»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
Herby__ o/ 01:00
tbrowder question: I'm trying to install rakudo star on a VM with 512 Mb mem and it looks like that's too little. What is the min required? Is there any way to install on the VM I have? Thanks. 01:11
I guess I could copy from another, identical host (except for the mem size)... 01:12
japhb .ask ab5tract_ I've got a pile of changes I'd like to make to Terminal::Print (some cleanup, some speedup, some API extensions, etc.). How granular would you like PRs? Or would you rather I just maintained my own fork? 03:43
yoleaux japhb: I'll pass your message to ab5tract_.
p3rln00b tbrowder 06:37
tbrowder, you need about 2GB of ram+swap, so one solution for you is to get more swap
Zoffix 06:44
yoleaux 9 Oct 2016 22:39Z <tbrowder> Zoffix: there is a PR in ecosystem for an installation template for review
Zoffix :/ getting Inline::Perl5 installation failure with panda.... Or rather, it says "LibraryMake:ver<1.0.0>:auth<github:retupmoca>:api<> already installed" 07:14
Can't believe this bug is still present.
(that it aborts the install if a prereq is already installed) 07:15
p3rln00b Oh. I think I just forgot to build rakudo in a checkout, so it was installing into my system perl6. 07:27
RabidGravy boom 07:42
RabidGravy is there any conceivable way of expressing something like: 07:46
m: sub foo() returns Positional[Str] { <a b c d> }; say foo()
camelia rakudo-moar 2c681c: OUTPUT«Type check failed for return value; expected Positional[Str] but got List ($("a", "b", "c", "d"))␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
RabidGravy that is without using a subset that has a custom validator 07:50
p3rln00b That is, without the way that would make it actually work? :) 07:51
p3rln00b m: sub foo() returns Positional[Str] { my @ of Str = <a b c d> }; say foo() 07:52
camelia rakudo-moar 873e60: OUTPUT«[a b c d]␤»
RabidGravy it has to be available for the purpose
p3rln00b Of course, that makes the return type check kinda pointless :)
RabidGravy for the purpose of introspection
RabidGravy my actual reason for wanting to do this is that I am looking at a web service thing which can 'fess up its own description 07:58
psch doesn't get the question 07:59
is this just the "types are nominal and parameterized Positionals are annoying" thing..? 08:00
RabidGravy no 08:03
RabidGravy it's "is there a way to indicate that a routiine will return a positional of some known types which is available by introspection" 08:06
psch m: sub f(--> Positional[Str]) { }; say &f.returns
camelia rakudo-moar 873e60: OUTPUT«(Positional[Str])␤»
psch m: sub f() returns Positional[Str] { }; say &f.returns
camelia rakudo-moar 873e60: OUTPUT«(Positional[Str])␤»
RabidGravy that is so in the above I could do 08:07
RabidGravy yes, but, and crucially, that makes specific demands on what is actually done inside the routine 08:08
japhb .tell ab5tract_ I've sent you a PR with my first 11 commits (they're all very small, just minor cleanups/tuneups/fixes). After that I'm probably going to have to expand the API for further improvements.
yoleaux japhb: I'll pass your message to ab5tract_.
RabidGravy I'm tending to think that a special trait might be required 08:09
psch RabidGravy: yeah, that's what i'd do too 08:17
RabidGravy: unfortunately i'm bad at traits and it doesn't work :S 08:18
m: multi trait_mod:<is> (Routine $r, :$returning-unchecked) { $r does role { method returns-unchecked { $returning-unchecked } }; sub f() is returning-unchecked(Positional[Str]) { }; say &f.returns-unchecked
camelia rakudo-moar 873e60: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can't use unknown trait 'is returning-unchecked' in a sub declaration.␤at <tmp>:1␤ expecting any of:␤ rw raw hidden-from-backtrace hidden-from-USAGE␤ pure default DEPRECATED inlinabl…»
psch shrugs
RabidGravy missing right } in the outside of the sub 08:20
but yeah something like that
AlexDaniel By the way, if anybody feels lonely this weekend, here is what you can help with: github.com/perl6/whateverable/issues (several LHFs there) 09:04
RabidGravy We're going to the seaside in a bit, so you're alright :) 09:08
AlexDaniel RabidGravy: isn't it a bit cold? Where's that? :) 09:11
RabidGravy Whitstable, it'll be nice for a stroll and a few beers :) 09:23
andrzejku hello my friends :) 09:25
hchienjo Hello everyone. I wanted to take on some of the issues over here github.com/perl6/roast/issues that are labelled Hacktoberfest, specifically this one github.com/perl6/roast/issues/166. Wanted to confirm that the tests should go in this folder ./S17-procasync 09:26
tbrowder .tell p3rln00b Thanks. 10:14
yoleaux tbrowder: I'll pass your message to p3rln00b. 10:15
tbrowder I've simplified testing for my own code by using "done-testing" instead of the painful plan statement. Is there any downside to that? Zoffix notes that roast uses plan for all tests but is that a hard requirement? 10:20
moritz tbrowder: we've had cases in the past where tests were accidentally skipped 10:22
tbrowder: due to wrong fudging, bugs in the tests, bugs in the compiler
tbrowder: so for roast, it makes sense to use explicit plans
Herby__ \o 10:22
moritz tbrowder: for other test suites, it's a tradeoff between safety and convenience that you have to decide yourself 10:23
moritz \o Herby__ 10:23
hchienjo moritz: Is there a straight forward documentation on how to run the roast tests? 10:36
tbrowder thanks, moritz 10:38
moritz hchienjo: the typical setup is to have a git clone of rakudo, and then you run perl Configure.pl --gen-moar && make spectest 10:41
p3rln00b hchienjo: and you can run individual files with make t/spec/some-file.t
yoleaux 10:15Z <tbrowder> p3rln00b: Thanks.
moritz hchienjo: "make spectest" builds rakudo, but also clones roast into t/spec/, and runs the tests
p3rln00b m: sub do-stuff {@}; use Test; ok .is-prime for do-stuff; done-testing 10:42
camelia rakudo-moar 8ad885: OUTPUT«1..0␤»
p3rln00b tbrowder: ^ that's one of the examples where a naive done-testing fails. do-stuff() returned nothing and tested nothing, even though it should've returned results to test. But test suite doesn't know how many tests we were meant to run, so it passes
moritz it seems that p3rln00b isn't such a noob after all :-)
hchienjo moritz: What if I want to run tests on some of the changes I have made on my fork of roast? 10:44
p3rln00b hchienjo: clone it to t/spec 10:45
(in rakudo's checkout)
hchienjo p3rln00b: I am assuming that is run on a rakudo folder cloned from github?
p3rln00b Yeah 10:46
make spectest would've cloned perl6/roast into it. You can just toss it and clone your fork into it
moritz hchienjo: or if you have already cloned your repo somewhere else, a symlink will do too 11:06
hchienjo :moritz :p3rlnoob thanks. 12:10
hchienjo moritz: What about when testing for Proc.signal, shouldn't we use Proc.async instead? 12:11
timotimo why? .signal should just be set after the process has ended, right? 12:12
AlexDaniel xD one of the bots ran away from the test environment 12:20
dalek c: 14567d4 | (Tom Browder)++ | doc/Language/testing.pod6:
add caution about done-testing
12:41
AlexDaniel tbrowder: what does this mean? github.com/perl6/doc/commit/14567d4ef9 13:00
tbrowder AlexDaniel: Perhaps the wording could be improved, but that is how I interpreted moritz's answer to my query about why roast tests used plan and not done-testing. 13:40
AlexDaniel tbrowder: well, not removed then, but changed to 「plan」 ? 13:41
and as always, it does not hurt to explain why 13:42
tbrowder I'm sure it could be better worded.
tbrowder "and as always, it does not hurt to explain why": in the note or the comment? 13:43
AlexDaniel tbrowder: in the note (so that doc users can see it)
dalek c: 0dbc749 | (Tom Browder)++ | doc/Language/testing.pod6:
expand the note per AlexDaniel's comments
13:56
AlexDaniel that's better, I think. Could be improved further though. For example, I find the mention of roast a bit irrelevant to the docs. Instead, it can provide concrete examples when 「done-testing」 does not work as expected. 14:02
tbrowder ok, how about p3rln00b's example above? 14:10
dalek line-Perl5: f392591 | niner++ | / (4 files):
Replace use of Perl5Parent for v6::inline by Perl5Extension

This first part adds the v6::code package for using a different way of extending a Perl 5 package with Perl 6 code. Instead of abusing inheritance, we create Perl 5 wrappers for Perl 6 methods and subs.
On the Perl 6 side, Perl 6 extended objects are indistinguishable from plain Perl 5 objects. On the Perl 5 side, the only way to notice anything out of the norm is by looking for the attached magic.
Fixes memory leaks caused by the Perl 5/6 halves of extended objects to point to their other half, keeping both alive. Now the Perl 5 object is the authoritative source.
14:19
line-Perl5: bd8fc7c | niner++ | / (2 files):
Move the new Perl5Extension code into v6::inline

Get rid of the v6::code package and just replace v6::inline with it.
The user visible change is that we no longer need the "constructors" import argument. We override GLOBAL::CORE::bless instead to intercept object creation.
masak nince++ 14:23
er, nine++, lag--
somebody named "nince" somewhere now goes "yay -- free karma!"
tbrowder AlexDaniel: working on a change now...
AlexDaniel tbrowder++
dalek line-Perl5: 196f427 | niner++ | / (3 files):
Support attributes on routines added to Perl 5 packages via v6::inline

This adds the Perl5Attributes role which can be added to routines to record the Perl 5 attributes that should be set on the wrapper.
Can be used for emulating subroutine attributes via traits:
multi trait_mod:<is>(Routine $declarand, :$ActionClass!) {
   unless $declarand.does(Inline::Perl5::Perl5Attributes) {
   $declarand does Inline::Perl5::Perl5Attributes[$declarand];
   }
   $declarand.attributes.push("ActionClass('$ActionClass')");
  }
method end($c) is ActionClass["RenderView"] { }
14:24
AlexDaniel ah by the way
m: use Test;
camelia ( no output )
AlexDaniel m: use Test; done-testing 14:25
camelia rakudo-moar 666128: OUTPUT«1..0␤»
nine These 3 changes ^^^ turn extending Catalyst applications with Perl 6 from possible to down right simple! :)
vendethiel nine++
bazzaar o/ perl6
vendethiel \o
masak nine: I curse you with blogging about this :D
AlexDaniel 1..0?
dalek line-Perl5: 8e6dff1 | niner++ | META.info:
Version 0.18
bazzaar m: my @a=<1 2 3>; my @b=<a b c>; my @c=<0 0>; for @a Z @b Z @c -> [$a, $b, $c] { say ($a, $b, $c).join(",") }
camelia rakudo-moar 666128: OUTPUT«1,a,0␤2,b,0␤»
AlexDaniel bisectable6: use Test; done-testing
bisectable6 AlexDaniel, On both starting points (old=2015.12 new=666128f) the exit code is 0 and the output is identical as well
AlexDaniel, Output on both points: 1..0
masak with actual code examples 14:26
nine github.com/niner/XStats is my canonical Catalyst with Perl 6 example and it just lost almost all its Perl 6 support code as it's no longer necessary 14:27
bazzaar does anyone know a simpler way to avoid losing data in one of the input arrays, due to Z stopping when one of the input arrays is exhausted 14:28
timotimo nine: awesome
bazzaar I didn't explain that very well , sorry
timotimo depends on what you want to have happen when one of the arrays runs out 14:29
like, <<Operator>> will extend the shorter of the two by repeating it
that may not be what you want, however
AlexDaniel bazzaar: roundrobin ?
AlexDaniel m: say zip <a b c>, <1 2 3 4> 14:30
camelia rakudo-moar 666128: OUTPUT«((a 1) (b 2) (c 3))␤»
AlexDaniel m: say roundrobin <a b c>, <1 2 3 4>
camelia rakudo-moar 666128: OUTPUT«((a 1) (b 2) (c 3) (4))␤»
bazzaar timotimo: just padding out the missing elements would be fine
timotimo AlexDaniel: but you can't tell which one ran out that way 14:31
not without asking the arrays for their length, anyway
which would cause buffering if you have Seqs, i'd think
Juerd What's the usecase, anyway, where you have several lists of elements that apparently are related enough that those with the same index should be handled together, but that do not have the same length? 14:32
bazzaar AlexDaniel: I think roundrobin is what I'm looking for, didn't know it existed
dalek c: f940ea8 | (Tom Browder)++ | doc/Language/testing.pod6:
add an example per p3rln00b and AlexDaniel
14:33
AlexDaniel Juerd: dunno, but roundrobin behavior is very required in golfing :)
too bad it takes a thousand of bytes to type it 14:34
to use it, rather
bazzaar Juerd: I'm parsing a horribly formatted text file, and recombining the data, but it is only 95% successful, so there would be a post processing step
bazzaar so the different input arrays to roundrobin are not always the same length 14:36
bazzaar AlexDaniel: timotimo, and Juerd, many thanks for your help :) 14:43
dalek c: 43b6b02 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/testing.pod6:
Typo
14:52
AlexDaniel tbrowder: I like it 14:53
tbrowder Thanks to you and p3rln00b for good critiques! 14:54
AlexDaniel how do I .keep a promise if I'm not sure if it was kept or not? 16:02
should I just wrap it in try {} ?
p3rln00b m: given Promise.new { .keep; .keep unless $_ } 16:04
camelia ( no output )
AlexDaniel p3rln00b: what if it was kept right after unless ?
p3rln00b Fair 'nuf 16:06
AlexDaniel m: given Promise.new { .keep; try { .keep } }
camelia ( no output )
AlexDaniel that's what I'm thinking about
actually, nevermind 16:13
BenGoldberg m: given Promise.new { .keep xx 2 } 17:09
camelia rakudo-moar 666128: OUTPUT«Access denied to keep/break this Promise; already vowed␤ in block at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
moritz t/spec$ git grep 'my int \@'|wc -l 17:15
28
t/spec$ git grep 'my str \@'|wc -l 17:16
0
that's, like, totally a big hole in our test suite, right? :-)
p3rln00b moritz: you clearly haven't seen the coverage results, if you think THAT is a big hole :) Exhibit A: perl6.wtf/src_core_Num.pm.coverage.html#L462 17:23
(hint: red means uncovered)
AlexDaniel p3rln00b: shhh. gfldex may see it and start wiping it all out from the docs 17:30
that being said, we don't have nativenum doc-ed, so… 17:31
p3rln00b Well, wasn't the rule if it ain't in roast, it's not specced? I recall even some harsher terms being thrown around like "core devs and not doc team get to decide what is and isn't Perl 6". So I don't blame gfldex 17:32
Though, hopefully, all of accidentally uncovered stuff should be covered in about a month 17:33
gfldex some days ago i tried to install all modules from the ecosystem. About halve of them wont install because of failing tests. I'm quite sure most of those used to run just fine. 17:36
p3rln00b :(
gfldex So the harm is already done. Go and add whatever you want. :)
AlexDaniel p3rln00b: that absolutely right. But sometimes it's kinda obvious that something is a roast issue
(that is, the behavior is obvious and everybody is already using it, it's just that there's no test for it for some reason) 17:40
p3rln00b finds that a poor argument :} 17:55
m: my Num $i; my num $j; dd [ $i++, $j++ ]; # Not really obvious
camelia rakudo-moar 666128: OUTPUT«[0e0, NaN]␤»
AlexDaniel p3rln00b: we don't have to document edge cases if there are no tests then? ¯\_(ツ)_/¯ 17:57
p3rln00b m: Mix.new-from-pairs(1 => .9999).Bag.values.say # non-obvious, non-edge case 17:58
camelia rakudo-moar 666128: OUTPUT«()␤»
p3rln00b AlexDaniel: I'd go more for "we should have tests for any edge cases, and if there are no tests, they should be added" :) 17:59
AlexDaniel p3rln00b: yes, that's the point 18:00
AlexDaniel what would be the shortest NativeCall thing that segfaults? 18:36
timotimo m: use NativeCall; sub printf(int) is native(Str) {*}; printf(0); 18:37
camelia rakudo-moar 1acf5b: OUTPUT«Potential difficulties:␤ In 'printf' routine declaration - Not an accepted NativeCall type for parameter [1] : int␤ --> For Numerical type, use the appropriate int32/int64/num64...␤ at <tmp>:1␤ ------> 3Call; sub printf(int) is nativ…»
timotimo m: use NativeCall; sub printf(int32) is native(Str) {*}; printf(0);
camelia ( no output )
timotimo m: use NativeCall; sub printf(int64) is native(Str) {*}; printf(0);
camelia ( no output )
timotimo apparently it accepts a null string?
arnsholt Maybe strdup(NULL)? 18:38
timotimo m: use NativeCall; sub strdup(int64) is native(Str) {*}; strdup(0);
camelia rakudo-moar 1acf5b: OUTPUT«(signal SEGV)»
timotimo good call
AlexDaniel alright
thank you! Needed that for a test… ;)
timotimo m: use NativeCall; sub strdup(int64) is native(Str) {*}; strdup(0); signal(SIGSEGV).tap({ say "whoopsie!" }) 18:39
camelia rakudo-moar 1acf5b: OUTPUT«(signal SEGV)»
timotimo :P
p3rln00b m: class { has %.foo = foo => 42; method bar ($e where %!foo{ $e.lc }:exists) { say "got it" } }.new.bar: 'foo'
camelia rakudo-moar 1acf5b: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'exists' in parameter declaration.␤at <tmp>:1␤------> 3thod bar ($e where %!foo{ $e.lc }:exists7⏏5) { say "got it" } }.new.bar: 'foo'␤»
p3rln00b m: class { has %.foo = foo => 42; method bar ($e where { %!foo{ $e.lc }:exists } ) { say "got it" } }.new.bar: 'foo' 18:40
camelia rakudo-moar 1acf5b: OUTPUT«got it␤»
dalek osystem: 6b648ad | (Sterling Hanenkamp)++ | META.list:
Adding CompUnit::DynamicLib to the ecosystem
18:41
p3rln00b github.com/zostay/p6-CompUnit-DynamicLib 18:45
dalek line-Perl5: f3a06bf | niner++ | lib/Inline/Perl5.pm6:
No need for Perl5Attributes to be parametric

Version 0.19
19:14
bazzaar o/ perl6 19:21
bazzaar m: my @a = 1; my @b = 1..2; my @c = 1..3; for roundrobin(@a, @b, @c) -> $x { $x.say } 19:22
camelia rakudo-moar 1acf5b: OUTPUT«(1 1 1)␤(2 2)␤(3)␤»
bazzaar Hi, earlier today I was pointed to usage of the roundrobin sub, to solve my issue. That was great. I'm just pointing out that the docs give an example with flat in it which I think is clouded by that. 19:25
m: my @a = 1; my @b = 1..2; my @c = 1..3; for flat roundrobin(@a, @b, @c) -> $x { $x.say }
camelia rakudo-moar 1acf5b: OUTPUT«1␤1␤1␤2␤2␤3␤»
moritz bazzaar: feel free to submit a patch that adds a better example 19:26
bazzaar: or if you tell me your github username, I can give you direct push access
docmax: if it was tracked before, and deleted upstream, git will also delete it locally after a git pull 19:28
bazzaar moritz: your first post, and I'm thinking, now how do I do that, ... your second post, I'm thinking wow that's terrifying
moritz sorry, wrong channel
bazzaar: why terrifying? if you do something wrong, a simple 'git revert' will undo it
bazzaar moritz: my github username is bazzaar, I will have a go 19:38
moritz bazzaar: invitation sent. Have the appropriate amount of fun! 19:39
(and don't hesitate to ask for feedback here)
bazzaar moritz: thankyou 19:40
dalek c/spellcheck: ad907e8 | coke++ | doc/Language/subscripts.pod6:
other instances used the US version
20:27
c/spellcheck: 378ce60 | (Tom Browder)++ | doc/Language/testing.pod6:
add caution about done-testing
c/spellcheck: fa5a640 | (Tom Browder)++ | doc/Language/testing.pod6:
expand the note per AlexDaniel's comments
c/spellcheck: 3014124 | (Tom Browder)++ | doc/Language/testing.pod6:
add an example per p3rln00b and AlexDaniel
c/spellcheck: 20d109d | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/testing.pod6:
Typo
c/spellcheck: 8596adb | coke++ | doc/Language/testing.pod6:
remove trailing ws
AlexDaniel [Coke]: this didn't look like a merge 20:28
BenGoldberg m: dd Mix.new-from-pairs( 1 => .9999 ); 22:15
camelia rakudo-moar 1acf5b: OUTPUT«(1=>0.9999).Mix␤»
BenGoldberg m: dd Mix.new-from-pairs( 1 => .9999 ).Bag; 22:16
camelia rakudo-moar 1acf5b: OUTPUT«().Bag␤»
BenGoldberg m: dd Mix.new-from-pairs( 1 => pi ).Bag; 22:17
camelia rakudo-moar 1acf5b: OUTPUT«(1=>3).Bag␤»
BenGoldberg s: Mix, 'Bag', (); 22:18
SourceBaby BenGoldberg, Ehhh... I'm too scared to run that code.
BenGoldberg s: Mix, 'Bag', ()
s: Mix.new-from-pairs( 1 => pi ), 'Bag';
p3rln00b You broke my robot! 22:20
But the code's here: github.com/rakudo/rakudo/blob/nom/...Mix.pm#L37 22:21
s: &say
Seems hack is churning on something. Undercover is still connected, but I can't ssh (just hangs ) 22:27
timotimo uh oh, again? 22:30
p3rln00b Does that happen often?
I wonder if my bots are leaking :/
timotimo i'll look into it in a bit, gotta do some stuff first
usually hack b0rks because of one of the virtual disk is dying 22:31
it just suddenly stops doing anything, so we just reboot the vm and everything's fine
timotimo hack is back 22:35
p3rln00b timotimo++
timotimo we should tell all those people to get an account on irc.p6c.org
those that just flew from the 'net
dalek ateverable: 43a553a | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/ (3 files):
Move some logic into Testable.pm6

It's not pretty, but it works fine for tests. But let's have this ugliness only once. 69ff223 | (Aleks-Daniel Jakimenko-Aleksejev)++ | t/lib/Testable.pm6: Oops. This is what I actually meant in 43a553a596
Also, give it a bit more time to settle down.
23:00
AlexDaniel mmm… yeah 23:00
AlexDaniel m: say 42 23:11
camelia rakudo-moar 1acf5b: OUTPUT«42␤»
evalable6 AlexDaniel, rakudo-moar 666128f: OUTPUT«42»
AlexDaniel wrong…
geekosaur evilable? :p 23:13
AlexDaniel m: say 42 23:19
camelia rakudo-moar 1acf5b: OUTPUT«42␤»
AlexDaniel oh well, it's ‘+camelia’ :) 23:21
p3rln00b What does it do? 23:22
AlexDaniel p3rln00b: evalable you mean? 23:23
p3rln00b: by the way, NAMES returns a list of nicknames in a slightly interesting way…
p3rln00b Well, it includes op/voice markers 23:24
AlexDaniel yea
p3rln00b And yeah, I meant what does evalable do
AlexDaniel p3rln00b: basically, it is camelia on drugs 23:26
so not that interesting
if during netsplit you end up on the same side with evalable but not camelia, it will answer m: commands 23:27
(or if camelia is k-lined again)
p3rln00b ah 23:28
AlexDaniel otherwise it is identical, I think. It does allow you to set custom stdin, it will accept any raw link but not normal github links, it will gist long output, etc. 23:29
samcv hey p3rln00b i have the code working with no errors now, but it doesn't seem to call irc-privmsg-channel at all vpaste.net/ptraK
it does start the script though i have confirmed that 23:30
but i added a say in there to print out whenever something was said in the channel, but it doesn't print out anything at all
AlexDaniel m: say 42 23:40
camelia rakudo-moar eb3123: OUTPUT«42␤»
AlexDaniel ok
evilable: say 666
evalable6 AlexDaniel, rakudo-moar 666128f: OUTPUT«666»
AlexDaniel geekosaur: ↑ ;)
lucasb_ it's name is evalable6, but you have to address it as evilable? 23:42
p3rln00b And 666... is a real commit? :O)
geekosaur they edit correct their names
lucasb_ evalable6: say 42
evalable6 lucasb_, rakudo-moar 666128f: OUTPUT«42»
lucasb_ hmm
p3rln00b samcv: .write actually takes a Blob, not a Str, so you need to encode it. 23:43
AlexDaniel p3rln00b: surprisingly… it is :)
p3rln00b m: dd "Meow meow".encode
camelia rakudo-moar eb3123: OUTPUT«utf8.new(77,101,111,119,32,109,101,111,119)␤»
p3rln00b m: dd "Meow meow".encode.^name
camelia rakudo-moar eb3123: OUTPUT«"utf8"␤»
p3rln00b bah
samcv p3rln00b, shouldn't it at least print something out though?
p3rln00b Well, tis a blob
samcv: it does for me: gist.github.com/zoffixznet/ac6892e...35bf624e93 23:44
samcv so it's getting called but i can't set the $body = $e.text and stuff like that?
hmm weird. ok. thank you. weird 23:45
AlexDaniel ebalable: .say for ^100
evalable6 AlexDaniel, rakudo-moar eb3123e: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34…»
AlexDaniel, Full output: gist.github.com/b980e3d318d23ecff1...72f0f06c13
p3rln00b samcv: maybe your stuff is too old? (Perl 6 or IRC::Client)
evilable: $*EXECUTABLE.IO.slurp.say 23:46
evalable6 p3rln00b, rakudo-moar eb3123e: OUTPUT«#!/bin/sh␤exec /tmp/whateverable/rakudo-moar/eb3123e5e60fa1635ed1ee121cec1290c290044a/bin/moar…»
samcv well i have 2016.09 rakudo let me see if i need to update the client
evalable6 p3rln00b, Full output: gist.github.com/c37a242b7a9b560afb...cf4c3b2af2
p3rln00b samcv: 2016.10 is the latest :)
(since about 10 minutes ago) 23:47
samcv hahahha
great :)
shin_ hi all... how can i do a sub such as
m: sub test1(*@v) { dd @v; }; my $a = 1; test1($a,2,3,5);
camelia rakudo-moar eb3123: OUTPUT«[1, 2, 3, 5]␤»
shin_ but showing that the first parameter was a variable called $a and the other were constants? 23:48
lucasb_ maybe when macros arrive in P6
p3rln00b m: sub test1(*@v is rw) { dd .VAR.name for @v; }; my $a = 1; test1($a,2,3,5); 23:50
camelia rakudo-moar eb3123: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Can only use 'is rw' on a scalar ('$' sigil) parameter␤at <tmp>:1␤»
p3rln00b shin_: it might not even be available, since you're slurping
p3rln00b m: sub test1() { dd .VAR.name for @_; }; my $a = 1; test1($a,2,3,5); 23:50
camelia rakudo-moar eb3123: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Placeholder variable '@_' cannot override existing signature␤at <tmp>:1␤------> 3sub7⏏5 test1() { dd .VAR.name for @_; }; my $a␤»
lucasb_ m: sub f(\x, \y) { say x.VAR.WHAT, y.VAR.WHAT }; my $x = 10; f($x, 20)
p3rln00b shrugs 23:51
camelia rakudo-moar eb3123: OUTPUT«(Scalar)(Int)␤»
p3rln00b m: sub f(\x, \y) { say x.VAR.name, y.VAR.name }; my $x = 10; f($x, 20)
camelia rakudo-moar b744de: OUTPUT«No such method 'name' for invocant of type 'Int'␤ in sub f at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
p3rln00b m: sub f(\x, \y) { say x.VAR.name, y.VAR.?name // 'nada' }; my $x = 10; f($x, 20) 23:51
camelia rakudo-moar b744de: OUTPUT«$xnada␤»
timotimo m: sub test1(*@v is raw) { say @v[0].VAR.perl; say @v[1].VAR.perl }; my $var = 999; test1($var, 1, 2, 3) 23:52
camelia rakudo-moar b744de: OUTPUT«Int.new␤1␤»
AlexDaniel m: sub test1(*@v is raw) { try { dd .VAR.name } for @v }; my $a = 1; my $b = 25; test1($a,2,3,$b) 23:53
camelia rakudo-moar b744de: OUTPUT«"\$a"␤"\$b"␤»
AlexDaniel ahhhh
timotimo: :E
timotimo :)
my output wasn't as good as yours, though
AlexDaniel but yeah! Surprisingly, you can do it!
who would've thought!
shin_ I know i can use this already: m: my $a = 1; my $b = "hello!", my $c = { $_ x 2}; dd($a, $b, $c); 23:54
p3rln00b :)
shin_ m: my $a = 1; my $b = "hello!", my $c = { $_ x 2}; dd($a, $b, $c);
camelia rakudo-moar b744de: OUTPUT«Int $a = 1␤Str $b = "hello!"␤Block $c = -> ;; $_? is raw { #`(Block|82687016) ... }␤»
AlexDaniel shin_: irclog.perlgeek.de/perl6/2016-10-15#i_13410414 ?
p3rln00b &
shin_ Hehe, great :) 23:55
Thanks AlexDaniel
AlexDaniel m: sub foo(*@v is raw) { say .VAR.?name // $_ for @v }; my $a = 1; my $b = 25; foo($a,2,3,$b) 23:56
camelia rakudo-moar b744de: OUTPUT«$a␤2␤3␤$b␤»
AlexDaniel another cool thing in Perl 6 is Proxy 23:57
which is not related to this, but it is just as cool as 「is raw」