Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-01-15

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:03 jnthn The OSX issue will be a linkingone
00:03 jnthn (No, I don't know how linking on OSX works...)
00:04 raydiak I suspect I've hit an impletementation wall, but is there any efficient way to store millions of values in memory under JVM? I tried hashes and arrays (swelled up to gigs for a few megs of actual data), tried buffers/compact arrays (don't seem to work yet), and am currently using a big string, which is extraordinarily slow to access
00:05 timotimo buffers should work actually
00:05 raydiak can you show me an example of one being initialized with values?
00:06 timotimo r: say Buf[int8].new(1, 2, 3, 4, 5, 128, 255);
00:06 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Buf:0x<01 02 03 04 05 -80 -1>␤»
00:07 raydiak r: my $a = Buf[uint8].new(1, 2, 3, 4, 5, 128, 255); say $a[0];
00:07 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«1␤»
00:07 raydiak r: my $a = Buf[uint8].new(1, 2, 3, 4, 5, 128, 255); $a[0] = 2;
00:07 camelia rakudo-parrot 4f66ce: OUTPUT«Cannot modify an immutable value␤  in block  at /tmp/thfLb3kAzA:1␤␤»
00:07 camelia ..rakudo-jvm 4f66ce: OUTPUT«Cannot modify an immutable value␤␤»
00:08 raydiak can I write to it?
00:08 raydiak r: my $a = Buf[uint8].new(1, 2, 3, 4, 5, 128, 255); $a[0] := uint8.new(2);
00:08 camelia rakudo-parrot 4f66ce: OUTPUT«Default constructor for 'uint8' only takes named arguments␤  in method new at gen/parrot/CORE.setting:812␤  in method new at gen/parrot/CORE.setting:807␤  in block  at /tmp/F0la2K0H9E:1␤␤»
00:08 camelia ..rakudo-jvm 4f66ce: OUTPUT«Default constructor for 'uint8' only takes named arguments␤␤»
00:08 raydiak r: my $a = Buf[uint8].new(1, 2, 3, 4, 5, 128, 255); $a[0] := uint8.new(value => 2);
00:08 camelia rakudo-parrot 4f66ce: OUTPUT«No such method 'BUILDALLPLAN' for invocant of type 'Perl6::Metamodel::NativeHOW'␤  in method BUILDALL at gen/parrot/CORE.setting:832␤  in method bless at gen/parrot/CORE.setting:824␤  in method new at gen/parrot/CORE.setting:809␤  in method new a…»
00:08 camelia ..rakudo-jvm 4f66ce: OUTPUT«java.lang.NullPointerException␤  in method BUILDALL at gen/jvm/CORE.setting:905␤  in method bless at gen/jvm/CORE.setting:817␤␤»
00:08 raydiak r: my $a = Buf[uint8].new(1, 2, 3, 4, 5, 128, 255); $a[0] = uint8.new(value => 2);
00:08 camelia rakudo-jvm 4f66ce: OUTPUT«java.lang.NullPointerException␤  in method BUILDALL at gen/jvm/CORE.setting:905␤  in method bless at gen/jvm/CORE.setting:817␤␤»
00:08 camelia ..rakudo-parrot 4f66ce: OUTPUT«No such method 'BUILDALLPLAN' for invocant of type 'Perl6::Metamodel::NativeHOW'␤  in method BUILDALL at gen/parrot/CORE.setting:832␤  in method bless at gen/parrot/CORE.setting:824␤  in method new at gen/parrot/CORE.setting:809␤  in method new a…»
00:09 raydiak r: my $a = Buf[uint8].new(1, 2, 3, 4, 5, 128, 255); substr($a, *-1);
00:09 camelia rakudo-jvm 4f66ce: OUTPUT«Nominal type check failed for parameter '$s'␤␤»
00:09 camelia ..rakudo-parrot 4f66ce: OUTPUT«Nominal type check failed for parameter '$s'; expected Cool but got Buf[uint8] instead␤  in sub substr at gen/parrot/CORE.setting:3544␤  in block  at /tmp/W85CvDb45c:1␤␤»
00:10 raydiak is there a way to write into an existing buffer?
00:11 timotimo r: my $a = Buf[uint8].new(1, 2, 3); $a[2] = 99; say $a;
00:11 camelia rakudo-jvm 4f66ce: OUTPUT«Cannot modify an immutable value␤␤»
00:11 camelia ..rakudo-parrot 4f66ce: OUTPUT«Cannot modify an immutable value␤  in block  at /tmp/KQ44WsaOyR:1␤␤»
00:11 timotimo r: my $a = Blob[uint8].new(1, 2, 3); $a[2] = 99; say $a;
00:11 camelia rakudo-jvm 4f66ce: OUTPUT«Cannot modify an immutable value␤␤»
00:11 camelia ..rakudo-parrot 4f66ce: OUTPUT«Cannot modify an immutable value␤  in block  at /tmp/nuLHEavk1J:1␤␤»
00:11 timotimo which one was the mutable one?
00:11 TimToady Buf, supposedly
00:12 jnthn Buf, but it's not yet mutable
00:12 jnthn Needs same work as native arrays do
00:12 timotimo Buf is supposed to, yeah :|
00:12 timotimo time to get that working ;)
00:12 TimToady .oO("These Bufs are made for writin', and writin's what they do, and one of the days these Bufs are gonna write all over you...")
00:13 jnthn Yeah, it's pretty high on my post-Moar todo list :)
00:13 * pmichaud thinks TimToday may have been in Texas too long.
00:13 jnthn Which, given we're at 98% or so... :)
00:14 TimToady r: my $a = Buf[uint8].new(1, 2, 3); $a.subbuf-rw(0,1) = 99;
00:14 camelia rakudo-jvm 4f66ce: OUTPUT«No such method 'subbuf-rw' for invocant of type 'Buf[uint8]'␤␤»
00:14 camelia ..rakudo-parrot 4f66ce: OUTPUT«No such method 'subbuf-rw' for invocant of type 'Buf[uint8]'␤  in block  at /tmp/hvolO304jj:1␤␤»
00:14 timotimo jnthn: yeah, anything in particular keeping us from merging?
00:15 jnthn timotimo: We need to merge nom into moar-support, and then make sure Parrot and JVM don't regress on any tests over nom.
00:15 jnthn That's mostly "run tests, compare output" in the best case.
00:15 jnthn And "fix stuff" in the worst.
00:15 jnthn I'd *like* to fix the OSX build before we merge.
00:15 jnthn But there's no real reason we need to I guess.
00:15 TimToady you've got 15 minutes :)
00:15 [Coke] r: _~*.A # RT#77246
00:15 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=77246
00:15 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9N48XBBot6␤Undeclared name:␤    _ used at line 1␤␤»
00:15 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OaGlbPW6V_␤Undeclared name:␤    _ used at line 1␤␤»
00:16 jnthn bah, I dunno how OSX links :P
00:16 dalek perl6-roast-data: 7aae641 | coke++ | / (6 files):
00:16 dalek perl6-roast-data: today (automated commit)
00:16 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/7aae641d70
00:17 raydiak timotimo++ jnthn++ TimToady++ # thanks for the clarification
00:17 [Coke] 98.17%
00:17 jnthn Nob Bad
00:17 jnthn Not
00:21 timotimo gotta run
00:23 dalek roast: cff0104 | coke++ | integration/weird-errors.t:
00:23 dalek roast: add test for RT #77246
00:23 dalek roast: review: https://github.com/perl6/roast/commit/cff0104791
00:23 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=77246
00:29 treehug88 joined #perl6
00:31 dalek roast: e776b42 | coke++ | S02-literals/string-interpolation.t:
00:31 dalek roast: add test for RT #78202
00:31 dalek roast: review: https://github.com/perl6/roast/commit/e776b427d5
00:31 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=78202
00:33 raydiak out of interest in the deeper things I don't understand yet, what is occupying all that memory for the boxed values? seems like the inflation was 2-3 orders of decimal magnitude in my case
00:34 jnthn raydiak: What types of values have you got?
00:34 raydiak jnthn: mostly numbers in the 0-1 range
00:35 jnthn OK, so a boxed Num will be object header + the actual value, and then if you have an Array then each of those is in a Scalar container
00:37 timotimo a list would be smaller then?
00:37 jnthn Yes, but how'd you mutate it? :)
00:37 jnthn well, bind of course
00:38 timotimo yup
00:38 jnthn Actualy, using an array but binding instead of assigning would be faster :)
00:38 timotimo use nqp::list_n instead
00:38 dalek roast: 7be1983 | coke++ | S05-grammar/methods.t:
00:38 dalek roast: add test for RT#113552
00:38 dalek roast: review: https://github.com/perl6/roast/commit/7be1983253
00:38 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=113552
00:38 jnthn The answer when it's implemented will be "use my num @a" :)
00:38 timotimo maybe faster but less memory usage?
00:39 timotimo i would like that, yes
00:39 jnthn Well, my num @a will boil down to the same 6model REPR than nqp::list_n uses ;)
00:39 clsn Is a method supposed to have access to the private methods/attributes of an instance of the class other than self?
00:40 treehug88 joined #perl6
00:40 TimToady yes, which is why you have to use the $other!method syntax
00:40 timotimo oh
00:41 jnthn dinnerz &
00:41 TimToady likewize &
00:41 timotimo that could help japhb out a lot
00:42 * [Coke] completes http://questhub.io/realm/perl/quest/52d435ecf6d3293819000050 and immediately starts another one.
00:42 timotimo [Coke]++
00:42 clsn I think I tried that.  Hmm.
00:43 btyler joined #perl6
00:43 Pleiades` joined #perl6
00:44 [Coke] r: my $a; my $c; ($a, $, $c) = 1..3;
00:44 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/_8CZwy0Onq␤Unsupported use of $, variable; in Perl 6 please use $*OUT.output_field_separator()␤at /tmp/_8CZwy0Onq:1␤------> [32mmy $a; my $c; ($a, [33m⏏[31m$, $c) = 1..3;[0m␤    expecti…»
00:44 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ymoaMmnU4Z␤Unsupported use of $, variable; in Perl 6 please use $*OUT.output_field_separator()␤at /tmp/ymoaMmnU4Z:1␤------> [32mmy $a; my $c; ($a, [33m⏏[31m$, $c) = 1..3;[0m␤    expe…»
00:44 [Coke] std: my $a; my $c; ($a, $, $c) = 1..3;
00:44 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m␤Non-declarative sigil is missing its name at /tmp/knqlkgPTUP line 1:␤------> [32mmy $a; my $c; ($a, [33m⏏[31m$, $c) = 1..3;[0m␤Use of uninitialized value $first in string eq at STD.pm line 66778.␤Use of uninitialized v…»
00:44 araujo joined #perl6
00:46 clsn class A { has $!x=rand; method show(A $m) { say self!x ~ ", " ~ $m!x } }; my $a=A.new; my $b=A.new; $a.show($b)
00:46 clsn r: class A { has $!x=rand; method show(A $m) { say self!x ~ ", " ~ $m!x } }; my $a=A.new; my $b=A.new; $a.show($b)
00:46 camelia rakudo-jvm 4f66ce: OUTPUT«No such private method '!x' for invocant of type 'A'␤␤»
00:46 camelia ..rakudo-parrot 4f66ce: OUTPUT«No such private method '!x' for invocant of type 'A'␤  in method show at /tmp/M2HIhMq7kH:1␤  in block  at /tmp/M2HIhMq7kH:1␤␤»
00:46 [Coke] RT #118075 - sat without a test, so it broke again. :(
00:46 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=118075
00:46 clsn Yeah... what am I missing here?  Is it because it's an attribute and not a method?
00:47 clsn Apparently so.  Defining a method lets me get to it.
00:48 [Coke] p: say (;:[]) #RT #115284
00:48 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=115284
00:48 camelia rakudo-parrot 4f66ce: OUTPUT«␤»
00:50 dalek roast: 018d397 | coke++ | integration/weird-errors.t:
00:50 dalek roast: add test for RT #115284
00:50 dalek roast: review: https://github.com/perl6/roast/commit/018d39776b
00:50 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=115284
00:53 [Coke] timotimo: https://rt.perl.org/Ticket/Display.html?id=120753 - you still going to add that test?
00:55 timotimo [Coke]: it would be splendid if you could do it for me
00:55 timotimo it's somewhat tricky
00:55 timotimo else i would have already done it :)
00:56 clsn How do I add a comment to a bug?
00:56 timotimo reply to the mail, for example
00:56 Timbus joined #perl6
00:56 timotimo otherwise, log in to the rt with your bitcard account
00:56 timotimo (or create it if you don't have one yet)
00:57 timotimo clsn: i have a local patch that makes the Nil show up in any("a", "b").match(/a/)
00:57 timotimo er. nope.
00:58 clsn Great.  I think my signature/parameter stuff is nearly ready to submit.  Some notable holes still, some which require adding methods to Parameter, which I wasn't going to do.
00:58 clsn And there are some we really can't do.  There isn't much to be done with type variables, for example.
00:59 clsn (there are a hell of a lot of weird corner cases, especially in .perl of Parameters.  my code is a mess.)
01:03 clsn hrmp.  bitcard isn't letting me get back to rt... grumble...
01:04 Rix joined #perl6
01:04 raydiak r: say num.new: 1
01:04 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«1e0␤»
01:05 raydiak r: say int.new: 1
01:05 camelia rakudo-parrot 4f66ce: OUTPUT«Default constructor for 'int' only takes named arguments␤  in method new at gen/parrot/CORE.setting:812␤  in method new at gen/parrot/CORE.setting:807␤  in block  at /tmp/ICaN32SNxl:1␤␤»
01:05 camelia ..rakudo-jvm 4f66ce: OUTPUT«Default constructor for 'int' only takes named arguments␤␤»
01:05 raydiak r: say int.new: :value(1)
01:05 camelia rakudo-jvm 4f66ce: OUTPUT«java.lang.NullPointerException␤  in method BUILDALL at gen/jvm/CORE.setting:905␤  in method bless at gen/jvm/CORE.setting:817␤␤»
01:05 camelia ..rakudo-parrot 4f66ce: OUTPUT«No such method 'BUILDALLPLAN' for invocant of type 'Perl6::Metamodel::NativeHOW'␤  in method BUILDALL at gen/parrot/CORE.setting:832␤  in method bless at gen/parrot/CORE.setting:824␤  in method new at gen/parrot/CORE.setting:809␤  in method new a…»
01:05 btyler back, saw jnthn++'s comment on it being a linking issue, sadly I don't know much about linking on OSX either...but I'm happy to help test theories
01:05 clsn there we are.
01:07 raydiak ^^^ how do I create a native int without a container, and why doesn't it work the same way as it does for num?
01:07 timotimo r: say (anon int8 = 5)
01:07 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m␤Type 'int8' is not declared. Did you mean any of these?␤    int␤    int1␤    int2␤    int4␤    uint8␤␤at /tmp/_x8rfmd5aO:1␤------> [32msay (anon int8 [33m⏏[31m= 5)[0m␤Malformed anon␤at /tmp/_x8rf…»
01:07 camelia ..rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m␤Type 'int8' is not declared. Did you mean any of these?␤    int␤    int4␤    int1␤    int2␤    uint8␤␤at /tmp/v3f7Qtfoqg:1␤------> [32msay (anon int8 [33m⏏[31m= 5)[0m␤Malformed anon␤at /tmp/v3f7Qtfo…»
01:07 timotimo r: say (anon uint8 = 5)
01:07 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m␤Type 'uint8' is not declared. Did you mean any of these?␤    int8␤    uint␤    uint1␤    uint2␤    uint4␤␤at /tmp/KqLuh4COHY:1␤------> [32msay (anon uint8 [33m⏏[31m= 5)[0m␤Malformed anon␤at /tmp/KqL…»
01:07 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m␤Type 'uint8' is not declared. Did you mean any of these?␤    int8␤    uint␤    uint1␤    uint2␤    uint4␤␤at /tmp/w4Aao0MfxL:1␤------> [32msay (anon uint8 [33m⏏[31m= 5)[0m␤Malformed anon␤at /tmp/…»
01:07 timotimo that's bollocks
01:07 timotimo r: say (anon uint8 :: = 5)
01:07 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/IM5kfBqdGz␤Cannot use :: as a type name␤at /tmp/IM5kfBqdGz:1␤------> [32msay (anon uint8 :: [33m⏏[31m= 5)[0m␤    expecting any of:␤        scoped declarator␤»
01:07 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Ty0STPeni2␤Cannot use :: as a type name␤at /tmp/Ty0STPeni2:1␤------> [32msay (anon uint8 :: [33m⏏[31m= 5)[0m␤    expecting any of:␤        scoped declarator␤»
01:08 [Coke] GAH
01:08 [Coke] ... says the man who has been spamming the channel all night with RT stuff.
01:08 timotimo r: say { my uint8 $ = 10 }
01:08 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Block.new()␤»
01:08 timotimo r: say { my uint8 $ = 10 }()
01:08 timotimo :P
01:08 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«10␤»
01:10 * [Coke] wonders why S05-mass/rx.t has a bunch of comments describing every test.
01:11 * [Coke] assumes it's from a p5 rx test file.
01:11 raydiak r: sub int ($val) { my uint8 $ = $val }; my @vals := int $_ for ^10; say @vals.perl;
01:11 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/sA3Tdl20k0␤Two terms in a row␤at /tmp/sA3Tdl20k0:1␤------> [32m { my uint8 $ = $val }; my @vals := int [33m⏏[31m$_ for ^10; say @vals.perl;[0m␤    expecting any of:␤        postfix␤…»
01:11 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rca1HQncDw␤Two terms in a row␤at /tmp/rca1HQncDw:1␤------> [32m { my uint8 $ = $val }; my @vals := int [33m⏏[31m$_ for ^10; say @vals.perl;[0m␤    expecting any of:␤        postfix…»
01:11 raydiak r: sub makeint ($val) { my uint8 $ = $val }; my @vals := (makeint $_ for ^10); say @vals.perl;
01:11 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(0, 1, 2, 3, 4, 5, 6, 7, 8, 9).list␤»
01:12 raydiak r: sub makeint ($val) { my uint8 $ = $val }; my @vals := List.new(makeint $_ for ^10); say @vals.perl;
01:12 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/yUJJ8jEfW1␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/yUJJ8jEfW1:1␤------> [32m$val }; my @vals := List.new(makeint $_ [33m⏏[31mfor ^10); say @vals.perl;…»
01:12 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5lQsrFKkC3␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/5lQsrFKkC3:1␤------> [32m$val }; my @vals := List.new(makeint $_ [33m⏏[31mfor ^10); say @vals.pe…»
01:12 raydiak erm, sorry, I'll stop with the flooding
01:13 dalek roast: 1b0aa36 | coke++ | S05-mass/rx.t:
01:13 dalek roast: Add test for RT #120753
01:13 dalek roast: review: https://github.com/perl6/roast/commit/1b0aa3606f
01:13 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=120753
01:14 clsn Do I need to have my account validated or something on RT?  Now that I'm logged in, I can't see any tickets.
01:18 [Coke] What's your login?
01:18 clsn mark@kli.org
01:19 [Coke] try now.
01:19 clsn Hm.  I feel like redoing my Signature mapping a whole new way.
01:19 clsn Shows me the tickets I submitted now, but I can't see other tickets.
01:19 [Coke] note that comments are not automatically sent to the mailing list, you may have to click "toggle send to perl6..." or something.
01:20 [Coke] clsn: start at rt.perl.org. upper RHS, click on "perl6" in the table.
01:20 [Coke] under "quick search"
01:21 clsn rt.perl.org redirects me to https://rt.perl.org/SelfService/, which lists my tickets (only). Clicking the camel on upper RHS does not help.
01:21 [Coke] https://rt.perl.org/Search/Results.html?Query=Queue%20%3D%20'perl6'%20AND%20(Status%20%3D%20'new'%20OR%20Status%20%3D%20'open'%20OR%20Status%20%3D%20'stalled')
01:22 clsn Back at SelfService.  Let me check cookies again; I thought I was accepting them.
01:23 clsn Yeah, accepting cookies.
01:23 [Coke] try logging out and back in?
01:24 dalek roast: 62e02f8 | coke++ | S32-exceptions/misc.t:
01:24 dalek roast: add test for RT #116547
01:24 dalek roast: review: https://github.com/perl6/roast/commit/62e02f896c
01:24 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=116547
01:24 clsn No luck.
01:25 [Coke] JS disabled?
01:25 timotimo [Coke]: i'm glad you're spending time killing testneeded bugs :)
01:25 [Coke] timotimo: I hate this job. :P
01:26 [Coke] er, you're welcome. :)
01:26 timotimo haha
01:26 clsn I didn't disable JS.
01:26 [Coke] ok.
01:26 timotimo teh fok?
01:27 timotimo what does teh fok say?
01:27 [Coke] clsn: might be worth opening a ticket with the rt admins for perl
01:28 clsn Heh.  Maybe.
01:28 treehug88 joined #perl6
01:31 thou joined #perl6
01:34 jnap joined #perl6
01:43 * [Coke] only needs 4 more to close his second set of 10 quest, which doesn't even have any likes, timo!
01:43 timotimo oh, that's weird
01:45 [Coke] well, i did just create it.
01:46 timotimo obviously a bug in questhub
01:46 timotimo i see one like!
01:47 raiph joined #perl6
01:51 * [Coke] is adding some tests that are introspecting exception messages because their types are LTA. Coke hopes this is better than no tests.
01:52 dalek roast: 9c0a20d | coke++ | S12-class/augment-supersede.t:
01:52 dalek roast: add test for RT #117163
01:52 dalek roast: review: https://github.com/perl6/roast/commit/9c0a20d855
01:52 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=117163
01:53 [Coke] ^^ that is for "is also", which isn't tested anywhere in roast other than the failure mode I just tested.
01:54 [Coke] er, "also is".
01:54 timotimo oh, huh.
01:57 [Coke] r: .say for (1, 2, 3)<<~>>"!" # RT # 117045
01:57 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/4yeHzovIpJ␤Two terms in a row␤at /tmp/4yeHzovIpJ:1␤------> [32m.say for (1, 2, 3)<<~>>[33m⏏[31m"!" # RT # 117045[0m␤    expecting any of:␤        postfix␤        shell-quote word…»
01:57 camelia ..rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0zCbgIh98g␤Two terms in a row␤at /tmp/0zCbgIh98g:1␤------> [32m.say for (1, 2, 3)<<~>>[33m⏏[31m"!" # RT # 117045[0m␤    expecting any of:␤        postfix␤        shell-quote words…»
02:00 bjz joined #perl6
02:01 clsn There.  Isn't it neater to make an ACCEPTS to compare Parameters, and use that in the Signature comparison, as opposed to matching up parameters in the signature comparison?  I hope it works.
02:02 clsn Let's see if it compiles; that's 15m.
02:02 timotimo that does sound sensible, yeah
02:02 timotimo 15 minutes!?
02:03 [Coke] p: role A[::T?] {}; class B does A[] {}; say "alive"
02:03 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Jsd0XX9SPz␤Unable to parse expression in generic role; couldn't find final ']' ␤at /tmp/Jsd0XX9SPz:1␤------> [32mrole A[::T[33m⏏[31m?] {}; class B does A[] {}; say "alive"[0m␤    exp…»
02:04 [Coke] r: use Test; eval_lives_ok '1<&1'
02:04 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«not ok 1 - ␤# Error: Whitespace required before < operator␤»
02:05 [Coke] Do we have any tests for Test.pm ?
02:06 [Coke] https://rt.perl.org/Ticket/Display.html?id=77650 is working these days, just need a test for it.
02:08 [Coke] away for a bit.
02:19 * timotimo beds
02:22 treehug88 joined #perl6
02:38 colomon joined #perl6
06:32 ilbot3 joined #perl6
06:32 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
06:35 filly joined #perl6
06:37 moritz good omrning
06:38 raydiak morning moritz
06:44 darutoko joined #perl6
06:47 ilbot3_beta joined #perl6
06:59 ilbot3_beta joined #perl6
06:59 ilbot3_beta joined #perl6
07:00 ilbot3_beta joined #perl6
07:10 berekuk_ joined #perl6
07:22 mdxi joined #perl6
07:27 jnap joined #perl6
07:52 FROGGS joined #perl6
08:00 mdxi left #perl6
08:05 zakharyas joined #perl6
08:09 FROGGS [Coke]++
08:09 FROGGS [Coke]++
08:09 FROGGS [Coke]++
08:09 FROGGS awesome RT work!
08:17 pecastro joined #perl6
08:25 bjz joined #perl6
08:27 jnap joined #perl6
08:30 dmol joined #perl6
09:01 hoelzro morning #perl6
09:02 FROGGS morning hoelzro
09:02 wtw joined #perl6
09:06 bjz joined #perl6
09:23 denis_boyun joined #perl6
09:24 grondilu rn: my @a; my $sum; say $sum += @a.push(7);
09:24 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«1␤»
09:24 camelia ..niecza v24-109-g48a8de3: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 301 (Any.Numeric @ 8) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/WIN1_gChNK l…»
09:25 * grondilu realizes that @a.push($x) returns the modified @a, not $x
09:28 jnap joined #perl6
09:44 moritz p: try EVAL q[/ /]; say $!.perl
09:44 camelia rakudo-parrot 4f66ce: OUTPUT«X::Syntax::Regex::NullRegex.new(filename => "eval_0", line => 1, column => Any, modules => Array.new(), is-compile-time => 1, pre => "/ /", post => "<EOL>", highexpect => Array.new())␤»
09:44 dakkar joined #perl6
09:58 dalek roast: 73208bf | moritz++ | S32-exceptions/misc.t:
09:58 dalek roast: RT #78404: Error reporting on Null regexes
09:58 dalek roast: review: https://github.com/perl6/roast/commit/73208bff83
09:58 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=78404
10:00 moritz p: /a | /
10:00 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter | (must be quoted to match literally)�at /tmp/zXzH2EnbDL:1�------> [32m/a | [33m�[31m/[0m�Unable to parse regex; couldn't find final '/'�at /tmp/zXzH2EnbDL:1�------> [32m/…»
10:00 moritz has anybody reported this as a bug?
10:02 sqirrel joined #perl6
10:03 * moritz does so
10:03 tadzik moritz++
10:04 kaleem joined #perl6
10:05 moritz std: /a | /
10:05 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Null pattern not allowed at /tmp/bw6vpvA5Z0 line 1:�------> [32m/a | [33m�[31m/[0m�Parse failed�FAILED 00:01 122m�»
10:08 kivutar joined #perl6
10:16 hummeleBop joined #perl6
10:22 moritz p: say 'non-existent-copy'.IO.e
10:22 camelia rakudo-parrot 4f66ce: OUTPUT«False␤»
10:24 moritz t/spec/S32-io/copy.t fails two tests on rakudo-parrot for me
10:24 moritz and reports a few deprecation warnings
10:26 tadzik do we have an often-running module smoketester?
10:26 moritz tadzik: colomon++ had something, at some time, but I have no idea how often it runs, and if still
10:27 dalek roast: 25873dc | moritz++ | S32-io/copy.t:
10:27 dalek roast: test .path.copy instead of deprecated .IO.copy
10:27 dalek roast: review: https://github.com/perl6/roast/commit/25873dcfd5
10:27 tadzik I'd like to see if zavolaj/reduce-overhead broke something, and if not, I'd like to merge it :)
10:29 jnap joined #perl6
10:32 daniel-s joined #perl6
10:35 fhelmberger joined #perl6
10:44 filly joined #perl6
11:11 bjz joined #perl6
11:23 colomon moritz: it tries to run every night, pretty reliably.  The uptime for the Dancer app to view the results is more variable.
11:23 colomon and ooo, we got a number of failures in the last two days.
11:24 tadzik good, I only pushed something yesterday :P
11:24 tadzik colomon: does it have a rememberable domain?
11:24 colomon Template::Mojo and Bailador are both on the failure list.
11:24 FROGGS ohh
11:24 colomon tadzik: nope, it's just running on the machine in my basement
11:24 tadzik and/or, can we link to it from modules.perl6.org and/or feather.perl6.nl:3000
11:25 FROGGS colomon: might that be due to s/eval/EVAL/ ?
11:25 tadzik colomon: how about we give it one? :)
11:26 colomon if we were smart, we'd probably copy the smoke results to feather (or something) and run the Dancer script there.
11:26 tadzik we can arrange that
11:26 tadzik http://feather.perl6.nl:3000/ is, unsurprisingly, Dancer app :P
11:27 colomon http://75.134.170.198:3001/report is where it is this morning.  :)
11:30 jnap joined #perl6
11:30 FROGGS colomon: how recent is your rakudo?
11:30 pecastro joined #perl6
11:31 FROGGS colomon: because it does not support EVAL
11:31 colomon FROGGS: pulled and rebuilt every night
11:31 colomon its part of the smoke
11:31 FROGGS hmmm
11:31 tadzik colomon: I linked to it from the feather modules page :)
11:32 FROGGS colomon: because Template::Mojo fails for two days because of this patch: https://github.com/tadzik/Template-Mojo/commit/f5cc9573f4bc4e7626c7647af3581dbf919b21d3
11:32 tadzik colomon: can we put an Atom feed on that page too? Preferably per-repo-owner :)
11:32 colomon tadzik: I don't know how?
11:32 tadzik colomon: I can implement that for you
11:33 colomon tadzik: note you can already do http://75.134.170.198:3001/report/tadzik
11:33 tadzik ooh, that's fantastic
11:33 tadzik colomon++
11:33 colomon FROGGS: it's running This is perl6 version 2013.12-8-g53c60ca built on parrot 5.9.0 revision RELEASE_5_9_0
11:34 tadzik colomon: anyway, if you give me access to the code I'll add Atom feeds to that pages
11:34 colomon … which is wildly out of date.  huh.
11:34 tadzik so people can subscribe to them and get nagged when something breaks
11:37 moritz colomon: maybe some uncommitted changes block a 'git pull' in rakudo?
11:40 V_S_C joined #perl6
11:40 FROGGS or it needs to adjusted to fit our build system changes
11:44 colomon tadzik: https://github.com/colomon/SmokeResults (you are now a contributor)
11:45 V_S_C left #perl6
11:46 tadzik colomon: thanks!
11:47 colomon moritz: I just blew away my rakudo (on that account) and started a fresh build
11:58 pecastro joined #perl6
11:58 raydiak why would I be getting a stack overflow trying to build perl6-j if I added the suggested '-Xms500m -Xmx2g', activated 2 gigs of swap, and have almost 1 gig ram free?
12:04 moritz maybe the OS doesn't want to swap the stack?
12:04 moritz no idea
12:04 moritz try with a smaller stack size?
12:10 raydiak yeah I'm thinking swap isn't helping...trying reduced stack size
12:12 raydiak no luck
12:13 moritz :(
12:13 raydiak I haven't tried building jvm on this machine before
12:14 jeffreykegler joined #perl6
12:14 raydiak it's a laptop with 1 gig ram and no hard drive...os and swap are on a flash drive that writes at like 5 megs/sec :P
12:15 raydiak but I got it to build on my vps with half the ram...must be the laptop won't swap for some reason
12:17 * raydiak wishes Actions.nqp (whatever that is) were split up into smaller files
12:18 moritz that won't help much; the real bottleneck is the setting
12:19 hummeleBop joined #perl6
12:21 raydiak guess restarting the gui is in order, since the memory savings doesn't seem to be helping
12:24 raydiak ought to go to bed anyways...maybe I'll go at this fresh tomorrow
12:25 raydiak g'night moritz++ (thanks for the suggestions) and #perl
12:25 raydiak *#perl6
12:25 atroxaper joined #perl6
12:27 arnsholt tadzik: Could you send me/gist the code you've been using to profile Zavolaj?
12:28 tadzik arnsholt: use NativeCall; sub strlen(Str) is native { * }; my $start = pir::time__N(); for 1..50000 { strlen("") }; say pir::time__N() - $start
12:29 tadzik I hope there's no typo there :)
12:29 tadzik star: use NativeCall; sub strlen(Str) is native { * }; my $start = pir::time__N(); for 1..5 { strlen("") }; say pir::time__N() - $start
12:29 camelia star 2013-09: OUTPUT«0.00651907920837402␤»
12:29 tadzik yeah, looks good :)
12:29 dalek roast: 89cce2b | (Elizabeth Mattijsen)++ | S02-types/bool.t:
12:29 dalek roast: Don't need "done" when we have a plan
12:29 dalek roast: review: https://github.com/perl6/roast/commit/89cce2b575
12:30 tadzik arnsholt: well, actually I was profiling it on the test.pl from that gist from the-day-before-yesterday
12:30 tadzik but that was a stupid move, because it basically has a sleep() inside :P
12:30 tadzik and all we really cared about is bothered by that one-liner here
12:30 tadzik s/bothered/covered/
12:31 jnap joined #perl6
12:31 erkan joined #perl6
12:32 arnsholt Yeah
12:32 * arnsholt goes to investigate some more
12:34 jeffreykegler left #perl6
13:08 timotimo o/
13:09 tadzik hey hey
13:10 arnsholt tadzik: I don't get quite the same speedup you saw, I think. But still a factor of 2
13:10 tadzik hm
13:10 tadzik that's very low :)
13:11 arnsholt Goes from 2.0080349445343 to 1.05001401901245
13:11 tadzik for how many calls?
13:11 tadzik I was testing it on 50k
13:11 arnsholt 50000
13:11 tadzik hm
13:11 timotimo tadzik: Task::Star seems to still depend on File::Tools, wasn't that merged into some other package?
13:11 tadzik timotimo: oh, it was unmerged into 2 packages
13:11 timotimo ah, right
13:12 tadzik arnsholt: what if you increase it tenfold, or more?
13:12 tadzik it'll probably be the same
13:13 arnsholt 9.65457582473755 on new
13:13 arnsholt 20.0757520198822 on old
13:14 tadzik hm
13:14 tadzik yeah, I get similar results on my work machine
13:15 tadzik weird :)
13:15 tadzik perhaps my laptop is very bad or very good at something
13:16 timotimo tadzik: for portability reasons, consider using nqp::time_n instead of pir::time__N()
13:16 tadzik backlog indicates that it was 14 secs vs 0.8 yesterday
13:17 tadzik timotimo: oh, that's even easier to type :) Thansk
13:20 tadzik arnsholt: that's weird :|
13:20 tadzik I'm now having trouble to reproduce the speedup, and it makes me sad
13:22 timotimo tadzik, cannot reproduce your crazy improvements when replacing returns with equivalent fall-out-of-end-of-block: https://gist.github.com/timo/ec2834b28ebf27d15416
13:23 tadzik timotimo: oh, that didn't impact stuff very much
13:23 tadzik that had about 5% improvement
13:23 timotimo ah, right
13:23 tadzik caching return type helped a lot in my case
13:24 timotimo yeah
13:24 timotimo i misunderstood you perhaps :)
13:25 tadzik well, it's weird anyway
13:25 tadzik I'll repeat tests on my laptop today
13:26 tadzik perhaps it was some pathological case
13:26 tadzik or I commited something else than what I was testing :P
13:26 woolfy joined #perl6
13:28 tadzik but it looks alright
13:30 tadzik oh-oh
13:30 tadzik add sync-local.opera.com to /etc/hosts?
13:30 tadzik whoops, ww
13:30 tadzik you didn't see that
13:31 jnap joined #perl6
13:34 mtk joined #perl6
13:47 dakkar joined #perl6
13:48 bjz joined #perl6
13:54 treehug88 joined #perl6
14:02 ajr joined #perl6
14:04 grondilu r: say 2 R/ my $ += 1
14:04 camelia rakudo-jvm 4f66ce: OUTPUT«use of uninitialized value of type Any in numeric context␤Cannot modify an immutable value␤  in block  at gen/jvm/CORE.setting:16328␤␤»
14:04 camelia ..rakudo-parrot 4f66ce: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/lNVbR_6zjB:1␤␤Cannot modify an immutable value␤  in block  at gen/parrot/CORE.setting:16601␤  in block  at /tmp/lNVbR_6zjB:1␤␤»
14:04 grondilu r: say 2 R/ (my $ += 1)
14:04 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«0.5␤»
14:05 moritz the / has tighter precedence than +
14:05 moritz and the R doesn't change that
14:05 grondilu ok
14:09 grondilu in order to avoid parenthesis, I wish we could write something like :  '2 R/: 1 + 1'  , kind of like method calls can be done with ':' :   .method: @args
14:10 grondilu a metoperator that transform an infix operator into the same operator but with lowest precedence.
14:10 grondilu *metaoperator
14:11 * grondilu hates prenthesis to death
14:11 moritz there's another solution
14:11 moritz split it into two statements
14:11 moritz my $x = 1 + 1;  $x / 2
14:11 timotimo r: say infix:</>: 6, 2
14:11 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/0tHmUAN1Zeâ�¤Two terms in a rowâ�¤at /tmp/0tHmUAN1Ze:1â�¤------> [32msay infix:</>[33mâ��[31m: 6, 2[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤â€¦Â»
14:11 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/iOyRXlPpVAâ�¤Two terms in a rowâ�¤at /tmp/iOyRXlPpVA:1â�¤------> [32msay infix:</>[33mâ��[31m: 6, 2[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopper…»
14:12 grondilu moritz: that's no fun
14:12 moritz p: say infix:</> 6, 2
14:12 camelia rakudo-parrot 4f66ce: OUTPUT«3␤»
14:12 timotimo oh, of course
14:12 timotimo r: say infix:<R/> 6, 2
14:12 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/F2TT0OG6g8â�¤Undeclared routine:â�¤    infix:<R/> used at line 1. Did you mean '&infix:<//>', '&infix:<~>>', '&infix:<||>', '&infix:<∋>'?â�¤â�¤Â»
14:12 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5cJca1UxjXâ�¤Undeclared routine:â�¤    infix:<R/> used at line 1. Did you mean '&infix:<>>', '&infix:<>=>', '&infix:<+&>', '&infix:<+|>', '&infix:<+^>'?â�¤â�¤Â»
14:12 timotimo i kind of wish this would work, too
14:12 timotimo r: say Rinfix:</> 6, 2
14:12 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/hn1ux3PW3sâ�¤Undeclared name:â�¤    Rinfix:</> used at line 1â�¤â�¤Â»
14:12 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Rw_0NnOLuKâ�¤Undeclared name:â�¤    Rinfix:</> used at line 1â�¤â�¤Â»
14:12 timotimo r: say R&infix:</> 6, 2
14:12 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2FiNRe19M_â�¤Undeclared name:â�¤    R used at line 1â�¤â�¤Â»
14:12 camelia ..rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nOce9ifymiâ�¤Undeclared name:â�¤    R used at line 1â�¤â�¤Â»
14:13 moritz r: say 1 R/ 2; say infix:<R/> 1, 2
14:13 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/CT9bPkPsqtâ�¤Undeclared routine:â�¤    infix:<R/> used at line 1. Did you mean '&infix:<//>', '&infix:<~>>', '&infix:<||>', '&infix:<∋>'?â�¤â�¤Â»
14:13 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/zqAQPz7oCsâ�¤Undeclared routine:â�¤    infix:<R/> used at line 1. Did you mean '&infix:<>>', '&infix:<>=>', '&infix:<+&>', '&infix:<+|>', '&infix:<+^>'?â�¤â�¤Â»
14:13 moritz I thought the first usage might create it :/
14:13 timotimo no, afaict those are not installed anywhere
14:13 timotimo though it may be a nice idea to cache the result of metaops?
14:13 FROGGS no it just dispatches to &METAOP_REDUCE or so
14:14 timotimo no, not reduce
14:24 kbaker_ joined #perl6
14:32 kaleem joined #perl6
14:32 jnap joined #perl6
14:37 jnap joined #perl6
14:46 kivutar joined #perl6
14:47 jnap joined #perl6
14:47 bluescreen10 joined #perl6
14:48 timotimo oh, on the JVM the difference between return and no return is much bigger
14:48 timotimo or maybe that's JIT side-effects
14:48 FROGGS should be easy enough to strip the return of the last statement of a block, right?
14:49 FROGGS that could be a good first step
14:49 timotimo yeah, could be
14:49 timotimo much more interesting to automatically transform returns inside an if into having an else-if branch for the rest. maybe.
14:49 timotimo er, not elseif. else.
14:49 timotimo sub multi_return($a) { ... }
14:49 timotimo 3.38700008392334
14:49 timotimo sub no_return($a) { ... }
14:49 timotimo 2.818000078201294
14:49 TimToady r: say 2 R/ do my $ += 1
14:49 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«0.5␤»
14:50 arnsholt I think there's more overhead to control exception handling on JVM than on Parrot
14:50 btyler joined #perl6
14:50 timotimo i think so, too. at least it's not a dramatic difference
14:50 timotimo and i think it's crazy cheap on moarvm
14:51 arnsholt Well, yeah. Aren't all algorithms O(1) on MoarVM? O=)
14:51 FROGGS *g*
14:51 FROGGS I wish
14:51 moritz including the Halting problem
14:51 timotimo :)
14:53 skids joined #perl6
14:54 tadzik O(1) or better :)
14:56 moritz O(0.1) :-)
15:01 nwc10 I like FROGGS' suggestion. But I'm not an expert. Transforming return inside an if into an else block around the rest of the function sounds reasonable. But technically isn't this the same as "goto the final ; of the function and then fall off the end naturally?"
15:01 * nwc10 guesses that structured programming is easier for subsequent optimiser steps to deal with
15:02 timotimo right. i don't know how to do that, though :)
15:02 timotimo also, i *think* i need to be aware of control exception catching blocks all around
15:04 thou joined #perl6
15:06 TimToady then they have a different final ;
15:06 TimToady but yeah, you can only replace return with a goto at the same level
15:07 TimToady and if that level is a routine rather than a block
15:07 timotimo sure
15:07 FROGGS and a proper routine, not a pointy
15:08 timotimo righto
15:08 TimToady pointies are counted as blocks
15:08 TimToady breakfast &
15:08 FROGGS hmpf, if I could remember what I wanted to ask TimToady++...
15:12 skids nwc10: generally optimizers are written to work on code that isn't just structured, but normalized to some form on which fancy properties hold true.
15:13 skids I don't think that form has been determined yet in this case, though :-)
15:14 timotimo that's true, the current optimizer transforms the code on the QAST level
15:17 lizmat r: my @a=0; say @a[@a].WHAT  # how bad would it be if this would say (Int) ?
15:17 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Parcel)␤»
15:18 lizmat TimToady: I feel that the number of values *returned* from a slice should determine whether a Parcel is returned or not
15:19 lizmat currently it is more or less determined by the slice specification: anything looking like it could return more than 1 element
15:19 lizmat r: my @a=0; say @a[*-1].WHAT  # another example
15:19 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Int)␤»
15:20 lizmat hmmm
15:20 lizmat r: my @a=0; say (@a[*-1]:v).WHAT  # another example
15:20 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Parcel)␤»
15:21 lizmat I think it would be safe to have the number of returned values from a slice determine: if there is one element, then it should return that rather than a Parcel returning that element
15:21 lizmat since we can subscript [0] on everything anyway, the cases assuming a Parcel being returned, would still work
15:22 lizmat but maybe this should be specced also
15:22 lizmat or is it already?
15:23 grondilu TimToady++ for the 2 R/ do stuff
15:26 rindolf joined #perl6
15:28 grondilu hum... are state variables supposed to be associated to a 'do' block?
15:28 grondilu see:  https://gist.github.com/grondilu/8438249  for why I ask this.
15:30 japhb jnthn: About?
15:30 grondilu r: sub count { do ++state $ }; say count xx 3
15:30 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/O8MEmD2mROâ�¤Undeclared routine:â�¤    xx used at line 1â�¤â�¤Â»
15:30 camelia ..rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/s1IPgkQwgzâ�¤Undeclared routine:â�¤    xx used at line 1â�¤â�¤Â»
15:31 grondilu r: sub count { do ++state $ }; say count() xx 3
15:31 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«1 2 3␤»
15:31 grondilu I guess not.
15:31 timotimo hm, can we figure out that the routine is an infix operator and the one before could have been meant to have () around it?
15:32 grondilu that would be nice indeed
15:34 FROGGS and then, what is "count + 3" supposed to mean?
15:35 skids lizmat: I do notice S02-types/autovivification.t referenced in the S09 autoviv section seems to require a \ to guarantee a Parcel
15:35 FROGGS count() + 3 or count(+3) ?
15:35 timotimo prefix operators may not have spaces between the op and the argument
15:35 FROGGS p: say -  3
15:35 camelia rakudo-parrot 4f66ce: OUTPUT«-3␤»
15:36 timotimo also, i'm asking that for making a better error mesasge, not for making that code work as-is
15:36 FROGGS I see
15:36 timotimo but you're right, i was wrong about the space requirement
15:36 FROGGS +3 for better error message :o)
15:37 timotimo haha :)
15:37 FROGGS + 3, even
15:37 timotimo postfix ops can have spaces before them, too?
15:38 grondilu still, it's bit silly to die when there is no other correct interpration.  I mean, xx is not a prefix, so count(xx 3) does not mean anything.  But count(+3) does.  So I get that count + 3 could be an error, but not count xx 3
15:38 timotimo std: sub count { do ++state $ }; say count xx 3;
15:38 camelia std 09dda5b: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'xx' used at line 1�Check failed�FAILED 00:01 126m�»
15:39 timotimo TimToady should decide about that :)
15:40 japhb preflex: ask jnthn Would you mind giving me a ping when you've got some time to talk concurrent design?  I need some implementor-sanity-checking on a design direction I'm considering.
15:40 preflex Consider it noted.
15:40 lizmat skids: I'm not sure where there is a test for Parcelness in S02-types/autovivification.t ?
15:40 lizmat the word Parcel does not even occur in that file?
15:44 lizmat cycling&
15:50 skids lizmat: it was using static indices anyway, so nevermind.
15:50 dalek rakudo-star-daily: dc902f0 | coke++ | log/ (5 files):
15:50 dalek rakudo-star-daily: today (automated commit)
15:50 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/dc902f050f
15:50 grondilu btw, I've noticed that there are very few warnings in Perl 6.  Is that on purpose?  Maybe expressions such as count xx 3 could trigger one.
15:50 [Coke] that just means you're doing it right.
15:51 FROGGS we will have warnings when we get lax mode I guess :o)
15:51 rindolf Hi all, why am I getting this with Niecza? http://pastie.org/8635970
15:51 FROGGS but atm the code is eitehr right and does not spit out warnings or it is wrong and dies
15:52 grondilu yeah, no warning in strict mode makes sense indeed.
15:52 PerlJam Perl 6 is just trending towards more black/white figure/ground/ solution/precipitate models  ;)
15:52 [Coke] rindolf: looks right to me. what is surprising you?
15:52 skids r: my @a = 0; @a[(0,)].WHAT.say;
15:53 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Parcel)␤»
15:53 japhb PerlJam: Perl 6 is the solution, and we're all the precipitate?
15:53 FROGGS rindolf: does that work for you? "Hello".substr(*-1)
15:53 [Coke] you ask for substr's that don't exist, so you get an undef Str; you concat that with "He", you get "He".
15:53 rindolf [Coke]: "Hello".substr(-1) should be "o".
15:53 FROGGS rindolf: no
15:53 [Coke] rindolf: nope. see FROGGS++ ^^
15:53 rindolf Like substr("Hello", -1) in Perl 5.
15:53 PerlJam rindolf: nope, see FROGGS
15:53 FROGGS p: "Hello".substr(-1)
15:53 camelia rakudo-parrot 4f66ce: OUTPUT«Start argument to substr out of range. Is: -1, should be in 0..Inf; use *-1 if you want to index relative to the end␤current instr.: 'throw' pc 410274 (src/gen/p-CORE.setting.pir:171926) (gen/parrot/CORE.setting:10748)␤called from Sub 'sink' pc 44636…»
15:53 FROGGS p: "Hello".substr(*-1)
15:53 camelia rakudo-parrot 4f66ce: ( no output )
15:53 rindolf [Coke], FROGGS , PerlJam : thanks.
15:53 FROGGS rindolf: you have to tell it that you want to wrap around
15:54 PerlJam Though maybe that's a case where a warning would have helped.  "Warning: attempting to take substr() beyond the bounds of the string"  or something
15:55 FROGGS well, rakudo does that
15:55 PerlJam oh, indeed it does
15:55 PerlJam rakudo++
15:55 FROGGS and I could imagine that in a (certain?) lax mode it would automagically wrap around without the whatever-*
15:55 FROGGS but I dunno how lax lax will be
15:56 PerlJam p5 mode? :)
15:56 FROGGS :o)
15:56 FROGGS no problemo
15:56 PerlJam rindolf: hey, is there a specific reason you're playing with niecza and not rakudo?
15:57 FROGGS speed
15:58 Psyche^_ joined #perl6
16:00 rindolf PerlJam: yes, speed. :-)
16:01 colomon PerlJam: when I was messing around with some of the stuff rindolf++'s been working on, I found niecza to be six times faster than Rakudo JVM.  And JVM ran out of stack space, even when I gave it several M to play with.
16:02 SHODAN joined #perl6
16:02 PerlJam yeah, I've run out of stack space a few times myself.
16:03 rindolf colomon: thanks for the karma.
16:03 * PerlJam misses sorear
16:03 * colomon feels guilty about not doing blog posts on this stuff.  but then, colomon also feels guilty for not getting enough $work done and not doing enough for his family, too.
16:03 * colomon also misses sorear++
16:03 PerlJam rindolf: want to take up the niecza mantle?  :)
16:06 rindolf PerlJam: maybe.
16:07 japhb colomon: I've seen a lot of JVM out-of-stack-space reports recently.  Seems like we need someone who knows Java well (a requirement that I do not fulfill) to figure out why that is happening so often.  Barring explicit recursion, a Perl 6 implementation ought to be heap-heavy, not stack-heavy ....
16:07 japhb And yes, the return of sorear++ would be very nice indeed.
16:07 colomon japhb: it happened to me while I was doing a big X+ -- makes me wonder if it's recursion in the List implementation causing the problem.
16:08 rindolf Wow, this Niecza program takes 9.1% of my 8GB of RAM.
16:09 rindolf Finished finally - yielding the correct result.
16:09 skids r: my constant @a = 0; @a[@a].WHAT.say; # lizmat
16:09 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Int)␤»
16:09 rindolf Maybe it's due to the bigints.
16:10 treehug88 joined #perl6
16:12 hoelzro who else is on QuestHub?
16:12 * hoelzro already follow [Coke]  and timotimo
16:12 hoelzro *follows
16:12 japhb colomon: I wouldn't be surprised a bit to hear that -- it would explain why so many people are hitting it, especially those working with big list-like things.
16:12 hoelzro many spelling misteak
16:12 hoelzro wow.
16:12 PerlJam hoelzro: I am, but not active really.
16:12 rindolf https://bitbucket.org/shlomif/project-euler/src/da6044807f702cb9756f8edf40d2cd6cb319dd48/project-euler/189/euler_189-2.p6?at=default - any ideas on how I can optimise it?
16:12 PerlJam (as perlpilot)
16:12 xenoterracide joined #perl6
16:13 colomon japhb: I know at one point lazy lists conceptually involved recursion.  no idea about the current implementation, but yeah, it would explain a lot.
16:15 hoelzro PerlJam: neither am I, but I'm going to give it another shot
16:17 rindolf It grows to about 10% of my 8GB of RAM and takes a long time.
16:20 TimToady r: my constant @a = 0; say @a.WHAT
16:20 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Int)␤»
16:20 TimToady ^^
16:21 TimToady skids: ^^
16:28 TimToady n: my constant @a = 0; say @a.WHAT
16:28 camelia niecza v24-109-g48a8de3: OUTPUT«(List)␤»
16:28 TimToady rakudo doesn't honor @ on constants yet
16:31 [Coke] is there a way to find out who follows me on questhub?
16:31 SHODAN joined #perl6
16:34 hoelzro I'd bet there's an RPC call
16:35 [Coke] opened a quest.
16:35 [Coke] almost beat hoelzro++ on qh. :)
16:38 rindolf Anyone? <rindolf> https://bitbucket.org/shlomif/project-euler/src/da6044807f702cb9756f8edf40d2cd6cb319dd48/project-euler/189/euler_189-2.p6?at=default - any ideas on how I can optimise it?
16:44 japhb rindolf: In lines 72 and 73, you shouldn't need to //= before +=, numbers should auto-viv to 0 when added to.
16:44 skids rindolf: not optimization, just idiom: 1 ..^ $wanted_h
16:45 rindolf japhb: they don't.
16:45 japhb ur?
16:45 rindolf skids: OK.
16:45 rindolf japhb: what?
16:45 japhb r: my $a; $a += 5; say $a
16:45 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«5␤»
16:45 PerlJam japhb: I think he means that they don't on Niecza
16:45 rindolf n: my %h; $h{'a'}{'b'} += 100; %h
16:45 japhb r: my %foo; %foo<a> += 5; say %foo<a>
16:46 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Variable $h is not predeclared (did you mean %h?) at /tmp/UlfpFM09el line 1:â�¤------> [32mmy %h; [33mâ��[31m$h{'a'}{'b'} += 100; %h[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/l…»
16:46 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«5␤»
16:46 rindolf n: my %h; %h{'a'}{'b'} += 100; %h
16:46 camelia niecza v24-109-g48a8de3: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 301 (Any.Numeric @ 8) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/LzkpWWtfeI l…»
16:46 japhb Yeah, nieczabug
16:46 rindolf japhb: ah.
16:46 ajr joined #perl6
16:49 skids rindolf: why cram all the variables into %data?
16:50 jeffreykegler joined #perl6
16:50 rindolf skids: well, that is a relic of the original design of the Perl 5 program which had an array of such values.
16:52 araujo joined #perl6
16:52 ajr_ joined #perl6
16:59 SHODAN joined #perl6
17:02 skids rindolf: if l_colors is never modified, maybe use array or where {} instead of hash?
17:02 skids erm s/where/when/
17:02 rindolf skids: neither is colors.
17:03 rindolf skids: but it lookups based on a string.
17:04 treehug88 joined #perl6
17:05 skids right but the string has numeric meaning, and depending on how fast rakudo can convert between substrings pulled out of the string and the desired index, might be faster than hashing.
17:06 rindolf skids: I use Niecza.
17:09 skids oh right.  Might be worth a try doing a full array conversion, I dunno.  Depends how fast the underlying constructs are, relatively.
17:11 skids e.g. when you do $seq.substr(*-1) that could involve a strlen, or might not, depending on the Str implementation.
17:11 skids Whereas an array almost certainly is implemented to store its own length.
17:13 skids Being able to precalc and premalloc the required space also might help, instead of letting things grow.
17:18 denisboyun joined #perl6
17:30 rindolf skids: precalc and premalloc?
17:32 locsmif joined #perl6
17:36 bjz joined #perl6
17:37 bjz joined #perl6
17:42 [Sno] joined #perl6
17:42 berekuk joined #perl6
18:06 skids rindolf: if you can, from the input parameters, determine the size of a structure needed to fit the state stored during the calculation, it could be created and the values in it altered, rather than creating new objects on the fly.  Further look at the code, probably not beneficial here.
18:06 rindolf skids: ah.
18:07 rindolf skids: I think part of the problem is that the Niecza program uses bigints all over the place, while in perl 5 they are machine integer limited to 64-bit.
18:08 treehug88 joined #perl6
18:11 araujo joined #perl6
18:21 FROGGS joined #perl6
18:22 hoelzro [Coke]: for points, or # quests? =P
18:26 [Coke] hoelzro: points. we're tied, I'll be closing out at least one next week.
18:26 treehug88 joined #perl6
18:27 erkan joined #perl6
18:27 erkan joined #perl6
18:28 [Coke] jnthn: you have some 404s on slides from http://www.jnthn.net/articles.shtml
18:28 [Coke] e.g. Perl 6 for da n00b
18:28 SamuraiJack joined #perl6
18:30 hoelzro whoa, I gotta hustle
18:32 timotimo rindolf: may i suggest using <1 2> instead of ['1', '2']? i find it easier on the eyes
18:32 xinming_ joined #perl6
18:32 timotimo r: say 00 => 'hi'
18:32 camelia rakudo-parrot 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/vFn5LKuGag:1â�¤    ------> [32msay 00[33mâ��[31m => 'hi'[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if …»
18:32 camelia ..rakudo-jvm 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/sf5lh6B99T:1â�¤    ------> [32msay 00[33mâ��[31m => 'hi'[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you…»
18:33 Rotwang joined #perl6
18:33 rindolf timotimo: OK.
18:33 timotimo r: say (00 => 'hi')
18:33 camelia rakudo-jvm 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/aFnyO847Eq:1â�¤    ------> [32msay (00[33mâ��[31m => 'hi')[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if y…»
18:33 camelia ..rakudo-parrot 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/WJsKcdbWol:1â�¤    ------> [32msay (00[33mâ��[31m => 'hi')[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 i…»
18:33 timotimo r: say (00 => 'hi') # OK
18:33 camelia rakudo-parrot 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/Juzwey8mHC:1â�¤    ------> [32msay (00[33mâ��[31m => 'hi') # OK[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use …»
18:33 camelia ..rakudo-jvm 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/T3k6_q_bv8:1â�¤    ------> [32msay (00[33mâ��[31m => 'hi') # OK[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0…»
18:33 timotimo dude.
18:33 timotimo r: (00 => 'hi').say
18:33 camelia rakudo-jvm 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/495Ap_E1vm:1â�¤    ------> [32m(00[33mâ��[31m => 'hi').say[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if y…»
18:33 camelia ..rakudo-parrot 4f66ce: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean thatâ�¤    at /tmp/TFM2UkZh2m:1â�¤    ------> [32m(00[33mâ��[31m => 'hi').say[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o0 i…»
18:34 timotimo that doesn't stringify properly. i think it'd be nice if it did (via IntStr semantics)
18:34 spider-mario joined #perl6
18:37 treehug88 joined #perl6
18:38 FROGGS std: (00 => 'hi').say
18:38 camelia std 09dda5b: OUTPUT«Potential difficulties:â�¤  Leading 0 does not indicate octal in Perl 6; please use 0o0 if you mean that at /tmp/1JFO8AJA2F line 1:â�¤------> [32m(00[33mâ��[31m => 'hi').say[0mâ�¤ok 00:01 125mâ�¤Â»
18:38 FROGGS hmmm
18:39 FROGGS I would just special case the fat arrow
18:40 SamuraiJack joined #perl6
18:41 FROGGS nr: say "abc".split(/./).perl
18:41 camelia niecza v24-109-g48a8de3: OUTPUT«["", "", "", ""].list␤»
18:41 camelia ..rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«("", "", "", "").list␤»
18:41 FROGGS weird
18:41 FROGGS ohh, I think it makes sense
18:43 timotimo yeah, it does
18:43 timotimo nr: say "abc".comb(/<!>/).perl
18:43 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«().list␤»
18:43 camelia ..niecza v24-109-g48a8de3: OUTPUT«[].list␤»
18:43 timotimo nr: say "abc".comb(/<?>/).perl
18:43 camelia niecza v24-109-g48a8de3: OUTPUT«["", "", ""].list␤»
18:43 camelia ..rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«("", "", "", "").list␤»
18:43 timotimo :P
18:43 timotimo er ... that's three in one and four in the other
18:43 FROGGS :o)
18:44 timotimo masak: i pullrequest'd something in xml-writer :)
18:45 timotimo rindolf: in $this_seqs and $prev_deriveds you can leave out the ' ' around the single-digit numbers
18:47 rindolf timotimo: how so?
18:47 timotimo r: say (1 => "hello").perl # autoquoting
18:47 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«1 => "hello"␤»
18:47 timotimo ...
18:47 rindolf timotimo: then they will be integers instead of strings.
18:47 timotimo r: say (1 => "hello").key.perl
18:47 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«1␤»
18:47 timotimo r: say (1 => "hello").key.WHAT
18:47 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Int)␤»
18:47 timotimo ... huh?
18:47 rindolf :-)
18:47 timotimo i thought that autoquotes for some reason o_O
18:47 moritz pairs can have non-string keys
18:47 moritz hashes not, by default
18:48 timotimo ah!
18:48 timotimo that's the missing piece :)
18:48 timotimo that makes the LHS-of-=>-turns-leading-zero-digits-into-IntStr a bit more wonky, doesn't it?
18:49 FROGGS yeah :/
18:51 FROGGS p: say rx:P5// === rx:P5// # how do I check that I got an empty regex?
18:51 camelia rakudo-parrot 4f66ce: OUTPUT«False␤»
18:51 FROGGS I need to special-case that in v5
18:54 timotimo p: say (rx:P5//).^methods
18:54 camelia rakudo-parrot 4f66ce: OUTPUT«<anon> <anon> <anon> <anon> <anon> <anon> ACCEPTS Bool gist <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> of returns rw onlystar assuming candidates cando multi soft wrap unwrap yada package perl <anon> add_ph…»
18:54 timotimo p: say (rx:P5//).candidates
18:54 camelia rakudo-parrot 4f66ce: OUTPUT«␤»
19:03 raiph joined #perl6
19:13 timotimo ah dang
19:13 timotimo i was about to say "look! github has p6 syntax highlighting now!" and then i noticed it's actually bitbucket
19:13 timotimo >_<
19:20 FROGGS but github has p6 syntax highlighting
19:20 FROGGS except for gists
19:23 dalek perl6-examples: 562a9b2 | (Shlomi Fish)++ | euler/prob189-shlomif.pl:
19:23 dalek perl6-examples: [Euler] Add a solution for Problem #189.
19:23 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/562a9b2784
19:24 FROGGS rindolf: don't use #!/usr/bin/perl when it is Perl 6
19:26 FROGGS hoelzro: there is an error in the highlighting of the hash: https://github.com/rakudo-p5/v5/blob/master/Configure.p6
19:27 rindolf FROGGS: OK, sorry.
19:27 FROGGS np
19:28 hoelzro FROGGS: thanks for pointg that out
19:28 vky joined #perl6
19:28 hoelzro FROGGS: lines 10-17, you mean?
19:29 FROGGS especially 12, 14 and 16, yes
19:29 FROGGS ohh, and 13 and 15, at least the first two chars
19:30 hoelzro yeah, I saw that
19:30 dalek perl6-examples: 35eff2f | (Shlomi Fish)++ | euler/prob189-shlomif.pl:
19:30 dalek perl6-examples: Remove #!/usr/bin/perl from a Perl6 example.
19:30 dalek perl6-examples:
19:30 dalek perl6-examples: Thanks to FROGGS.
19:30 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/35eff2f29d
19:30 hoelzro I'll take a look
19:32 timotimo i don't think #!perl6 makes a whole lot of sense
19:32 moritz #!/usr/bin/env perl6 # what I usually use
19:37 panchiniak joined #perl6
19:46 [Coke] /usr/bin/perl6 makes as much sense as /usr/bin/perl, no?
19:46 FROGGS sort of :o)
19:47 treehug88 joined #perl6
19:51 timotimo moritz: it seems like you could merge my pull request to xml-writer as well
20:04 moritz timotimo: done, thanks
20:06 vky joined #perl6
20:10 DarthGandalf joined #perl6
20:14 timotimo <3
20:16 lizmat r: my constant @a = 0; @a[@a].WHAT.say  # skids: the optimizer turns that into:
20:16 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Int)␤»
20:16 lizmat r: my @a = 0; @a[0].WHAT.say  # so it becomes a single element fetch
20:17 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Int)␤»
20:19 skids lizmat: per TimToady it's actually that constant treats the @ into a $ as a NYI on rakudo.
20:20 skids The case of (0,) one would think would be pretty optimizable though.
20:20 lizmat r: my @a = 0; @a.WHAT.say  # hmmm.... appears to work?
20:20 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Array)␤»
20:20 lizmat r: my constant @a = 0; @a.WHAT.say  # with the constant of course
20:20 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Int)␤»
20:21 skids n: my constant @a = 0; @a[@a].WHAT.say
20:21 camelia niecza v24-109-g48a8de3: OUTPUT«(Parcel)␤»
20:22 skids n: my @a = 0; @a[(0,)].WHAT.say
20:22 camelia niecza v24-109-g48a8de3: OUTPUT«(Parcel)␤»
20:27 masak lizmat: IIRC, 'constant' doesn't do typechecking, and so it stores a 0 directly in a @-sigil variable.
20:27 masak r: constant Int $f = "OH HAI"; say "alive"
20:27 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/WovA19_W3eâ�¤Missing initializer on constant declarationâ�¤at /tmp/WovA19_W3e:1â�¤------> [32mconstant Int [33mâ��[31m$f = "OH HAI"; say "alive"[0mâ�¤    expecting any of:â�¤        statement lis…»
20:27 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lc9IFHrA0dâ�¤Missing initializer on constant declarationâ�¤at /tmp/lc9IFHrA0d:1â�¤------> [32mconstant Int [33mâ��[31m$f = "OH HAI"; say "alive"[0mâ�¤    expecting any of:â�¤        statement …»
20:27 masak hm.
20:28 masak r: constant %f = "OH HAI"; say "alive"
20:28 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«alive␤»
20:28 masak there, that shows my point, I think.
20:28 masak r: constant %f = "OH HAI"; say %f.WHAT
20:28 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Str)␤»
20:31 treehug88 joined #perl6
20:32 jeffreykegler left #perl6
20:38 lizmat masak: my point was *not* about constant
20:38 masak oh.
20:39 lizmat but rather what a one element slice is supposed to return
20:39 lizmat currently this can either be a Parcel or the thing itself
20:39 lizmat r: my @a=0; @a[@a].WHAT
20:39 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: ( no output )
20:39 lizmat r: my @a=0; @a[@a].WHAT.say
20:39 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Parcel)␤»
20:40 lizmat my point is that this should return (int)
20:40 lizmat because it is a one element slice, even though an array was specified as the index
20:41 * moritz agrees
20:41 moritz all the list-y method are in Any anyway
20:41 moritz so we make it safe to return non-lists when lists are expected, kinda
20:41 PerlJam r: my @a=0; @a[0,].WHAT.say
20:41 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Parcel)␤»
20:42 moritz whereas boolification (for example) for a list is surprising when people expect a non-list
20:43 DarthGandalf joined #perl6
20:50 skids r: my $a := (("brown", "fox"),("jumps"), ("over","shark")); $a.perl.say; my @words = $a; @words.perl.say; sub foo($subject, $verb, $adverb) { $adverb.say; }; foo(|$a); # learning to love Parcels.through use cases.
20:50 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(("brown", "fox"), "jumps", ("over", "shark"))␤Array.new("brown", "fox", "jumps", "over", "shark")␤over shark␤»
20:55 bjz joined #perl6
20:56 masak r: my @a = 0; say !@a[@a]
20:56 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«False␤»
20:57 masak r: my @a = 0; say !@a[0]
20:57 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«True␤»
20:57 masak we're basically feeling out the WAT that comes from DWIM-ing scalars and lists.
20:58 * masak .oO( so monoidal )
20:58 xfix https://github.com/perl6/perl6-examples/blob/master/interpreters/brainfuck.p6.pl
20:58 xfix It would be interesting to see Brainfuck implementation that would use grammars.
20:59 skids r: say !(0,), !(0), !(0,0), !()
20:59 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«FalseTrueFalseTrue␤»
21:01 FROGGS r: say ?(0,), ?(0), ?(0,0), ?() # easier to read for me
21:01 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«TrueFalseTrueFalse␤»
21:02 Mouq joined #perl6
21:04 skids n: say ?(0,), ?(0), ?(0,0), ?()
21:04 camelia niecza v24-109-g48a8de3: OUTPUT«TrueFalseTrueFalse␤»
21:04 lizmat please remember that the comma is really what builds a Parcel
21:05 skids r: ().WHAT.say #except
21:05 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«(Parcel)␤»
21:05 lizmat ah, yes, the exception to the rule  :-)
21:05 FROGGS p: say ?(0=>) # only joking
21:05 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/QiBef2Yq8hâ�¤Bogus statementâ�¤at /tmp/QiBef2Yq8h:1â�¤------> [32msay ?(0=>[33mâ��[31m) # only joking[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or me…»
21:07 treehug88 joined #perl6
21:15 skids r: my @a = 0; @a[(Nil,)].perl.say
21:15 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«()␤»
21:16 skids call me pathological.
21:17 FROGGS Nil vanishes in lists,
21:17 FROGGS -,
21:18 skids "The Nil value represents the absence of a value where there should be one, so it does not disappear in list context" S02
21:19 FROGGS p: say Nil xx 42
21:19 camelia rakudo-parrot 4f66ce: OUTPUT«␤»
21:19 FROGGS p: say (Nil xx 42).perl
21:19 camelia rakudo-parrot 4f66ce: OUTPUT«().list␤»
21:19 FROGGS skids: I guess this sentence might be out of date since the failed-match-rework
21:19 lizmat not sure about that
21:20 virtualsue joined #perl6
21:20 dayangkun joined #perl6
21:21 Mouq p: my @a = ^42; say +@a; @a = Nil xx 42; say +@a
21:21 camelia rakudo-parrot 4f66ce: OUTPUT«42␤0␤»
21:22 Mouq oh, no, bad example
21:22 skids Was abut to say :-)
21:22 lue r: my Str $string = "Hello"; say $string.^name;
21:22 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«Str␤»
21:23 lue Huh, I'd've thought for sure ^name would give me the variable name, not the type name.
21:23 Mouq p: my @a = ^12; say @a; @a[^*] = (Nil xx 12); say @a
21:23 camelia rakudo-parrot 4f66ce: OUTPUT«0 1 2 3 4 5 6 7 8 9 10 11␤(Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any)␤»
21:23 FROGGS hi lucs
21:23 FROGGS hi lue
21:23 * lue somehow got into perusing perl6-examples and such.
21:24 FROGGS r: my Str $string = "Hello"; say $string.VAR.name
21:24 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«$string␤»
21:24 FROGGS lue: .^somthing is about its HOW
21:24 Mouq r: my $a = 42; my $b := $a; say $b.VAR.name
21:24 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«$a␤»
21:24 lue I feel like .^name isn't what you should be using for a typename anyway; I wouldn't immediately call Str the object's "name". (In any case, .WHAT is far more common for the same purpose.)
21:25 lue But whatever, I thought I stumbled onto an old-ism, and clearly I haven't :)
21:26 FROGGS p: multi foo(Mu \a) { say a.VAR.name }; my $a; foo($a[0])
21:26 camelia rakudo-parrot 4f66ce: OUTPUT«$v␤»
21:27 lue r: say q:raw/No escaping or anything, suspiciously like Q!/
21:27 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mlRLjpngJ7â�¤Unrecognized adverb: :rawâ�¤at /tmp/mlRLjpngJ7:1â�¤------> [32msay q:raw[33mâ��[31m/No escaping or anything, suspiciously l[0mâ�¤    expecting any of:â�¤        colon pair (restri…»
21:27 camelia ..rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ZnoGjA2NK6â�¤Unrecognized adverb: :rawâ�¤at /tmp/ZnoGjA2NK6:1â�¤------> [32msay q:raw[33mâ��[31m/No escaping or anything, suspiciously l[0mâ�¤    expecting any of:â�¤        colon pair (restricte…»
21:27 lue r: say q:0/No escaping or anything, suspiciously like Q!/
21:27 camelia rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tSnM3BTaGtâ�¤Colons may not be used to delimit quoting constructsâ�¤at /tmp/tSnM3BTaGt:1â�¤------> [32msay q:[33mâ��[31m0/No escaping or anything, suspiciously [0mâ�¤    expecting any of:â�¤     …»
21:27 camelia ..rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/CtssDz4l5Aâ�¤Colons may not be used to delimit quoting constructsâ�¤at /tmp/CtssDz4l5A:1â�¤------> [32msay q:[33mâ��[31m0/No escaping or anything, suspiciously [0mâ�¤    expecting any of:â�¤  â€¦Â»
21:27 FROGGS p: multi foo(Mu \a) { say a.VAR.name }; my $a = Array.new; foo($a[0])
21:27 camelia rakudo-parrot 4f66ce: OUTPUT«<element>␤»
21:27 lue p: say q0/No escaping or anything, suspiciously like Q!/
21:27 camelia rakudo-parrot 4f66ce: OUTPUT«���[���3���1���m���=���=���=������[���0���m���S���O���R���R���Y���!������[���3���1���m���=���=���=�…»
21:28 kaare_ joined #perl6
21:28 lue All of those things are in this old perl6-examples file. I think it's spelled Q// nowadays.
21:29 * FROGGS has a Deja-Q
21:29 Mouq p: say q:!b/No escaping or a\nything, suspiciously like Q!/
21:29 camelia rakudo-parrot 4f66ce: OUTPUT«No escaping or a\nything, suspiciously like Q!␤»
21:30 lue There's also q:1 (q1) for q//, and q:2 (q2) for qq//
21:30 Mouq lue: ^^
21:30 lue I get the sense that perhaps Q// didn't always exist :)
21:30 lue r: say Q/The true no-special-handling quoter!/
21:30 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«The true no-special-handling quoter!␤»
21:31 * lue needs to update his compose file with the quotes used for Q
21:32 lue r: say 「Q, the \t\r\u\e no-handling quote form!\」
21:32 camelia rakudo-parrot 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UnElkxFZgxâ�¤Two terms in a rowâ�¤at /tmp/UnElkxFZgx:1â�¤------> [32msay [33mâ��[31mï½¢Q, the \t\r\u\e no-handling quote form![0mâ�¤    expecting any of:â�¤        argument listâ�¤        pref…»
21:32 camelia ..rakudo-jvm 4f66ce: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7qkMk6uhHVâ�¤Two terms in a rowâ�¤at /tmp/7qkMk6uhHV:1â�¤------> [32msay [33mâ��[31mï½¢Q, the \t\r\u\e no-handling quote form![0mâ�¤    expecting any of:â�¤        argument listâ�¤        prefix …»
21:35 lue If I were to try and accept a pull request (about a year old), would you all prefer I tried to fast-forward it if possible, or do you not care if I press the big "Merge Pull Request" button?
21:36 wsri joined #perl6
21:36 [Coke] I would prefer fewer merge commits.
21:36 [Coke] but I am apparnetly not a normal git user.
21:36 wsri joined #perl6
21:36 [Coke] (in the end, I'd rather have the feature, probably. )
21:37 lue Well, if github does "git merge", which the manual instructions give, then the default behavior of that command is --ff (fast-forward if possible).
21:37 lue (so pressing the big button wouldn't be much different from the manual option)
21:38 lizmat I found one problem with @a[@a] not returning a Parcel:
21:38 lizmat $ perl6-p -e 'my @a=0; my @s := @a.keys.sort'
21:38 lizmat Type check failed in binding; expected 'Positional' but got 'Int'
21:39 lizmat perl6-p -e 'my @a=0; my $s := @a.keys.sort'   #no problem
21:40 lizmat so, if we have one element (which apparently .sort is returning), then binding to an array fails
21:42 lizmat ah, sort returns self[$index] at the end
21:42 berekuk joined #perl6
21:43 lizmat and if that is a single element, it would return that element
21:48 daxim joined #perl6
21:52 dalek perl6-examples: 6f46c61 | abcxyzp++ | cookbook/01strings/01-00introduction.pl:
21:52 dalek perl6-examples: Update cookbook/01strings/01-00introduction.pl
21:52 dalek perl6-examples:
21:52 dalek perl6-examples: The code:
21:52 dalek perl6-examples: <code>my $string = "1" ~ "1" + 10;</code>
21:52 dalek perl6-examples: will actually output "111" in Perl6.
21:52 dalek perl6-examples:
21:52 dalek perl6-examples: Since in Perl5, "~" (actually ".") is the same precedence as "+",
21:52 dalek perl6-examples: but in Perl6, numeric operations have higher precedence.
21:52 dalek perl6-examples: So the "1" + 1 part will be evaluated first, giving "111" as the result.
21:52 dalek perl6-examples:
21:52 dalek perl6-examples: Just a small modification here. :)
21:52 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/6f46c619fa
21:52 dalek perl6-examples: 5e49096 | abcxyzp++ | cookbook/01strings/01-00introduction.pl:
21:52 dalek perl6-examples: Update cookbook/01strings/01-00introduction.pl
21:52 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/5e4909670e
21:52 dalek perl6-examples: f016b1c | lue++ | cookbook/01strings/01-00introduction.pl:
21:52 dalek perl6-examples: Merge pull request #12 from ghost/patch-1
21:52 dalek perl6-examples:
21:52 dalek perl6-examples: Update cookbook/01strings/01-00introduction.pl
21:52 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/f016b1c295
21:54 treehug88 joined #perl6
21:55 lizmat r: my @a; my $b=0; my @b := @a[$b];  # so is this a bug in the binding, or what [$b] returns ?
21:55 camelia rakudo-parrot 4f66ce: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Any'␤  in block  at /tmp/Oq2OEKW2dl:1␤␤»
21:55 camelia ..rakudo-jvm 4f66ce: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Any'␤␤»
21:55 lizmat or is this a case of: when you're not sure what you'll get back, don't bind to an array ?
21:57 lue r: my @a = 1, 2, 3; my $b=0; my @b := @a[$b]; say @b.perl
21:57 camelia rakudo-jvm 4f66ce: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Int'␤␤»
21:57 camelia ..rakudo-parrot 4f66ce: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Int'␤  in block  at /tmp/_Ka8tuXdCJ:1␤␤»
21:57 lue r: my @z := 5; say @z.perl
21:57 camelia rakudo-parrot 4f66ce: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Int'␤  in block  at /tmp/pALvV1Z5w0:1␤␤»
21:57 camelia ..rakudo-jvm 4f66ce: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Int'␤␤»
21:57 lue lizmat: I think that's a problem with binding a non-positional to a @var.
21:57 lizmat lue: so one could consider with binding
21:57 lizmat indeed
21:58 lue Whether or not you think @z := 5 should work (I think it should), and thus if current behavior is a bug, is the thing here.
22:00 lizmat wonder if this could be fixed in src/core/Array:bind_pos
22:01 lizmat by adding 2 more candidates
22:03 bluescreen100 joined #perl6
22:04 bluescreen__ joined #perl6
22:08 lizmat hmmm...  apparently not  :-(
22:08 skids r: my (*@a) = 5; @a.say; # S02 "Parcels, parameters, and Captures" would imply assignment follows parm binding rules.
22:08 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«5␤»
22:08 * lizmat hopes that TimToady will be able to shine some light as to whether "my @a := 5" should work
22:09 skids just my *@a = 5 probably NYI.
22:10 skids OOps forgot the colon.  But still same results.
22:10 skids oh wait.
22:11 skids r: my (*@a) := 5; @a.say; @a.perl.say; # not the same.
22:11 camelia rakudo-parrot 4f66ce: OUTPUT«␤Array.new()␤»
22:11 camelia ..rakudo-jvm 4f66ce: OUTPUT«Flattening named argument must have VMHash REPR␤␤»
22:11 colomon :\
22:12 lue r: sub foo { }; my $bar = &foo; say $bar.VAR.name; # how do I get "foo" out of $bar, if possible ?
22:12 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«$bar␤»
22:13 lizmat r: sub foo { }; my $bar := &foo; say $bar.VAR.name;
22:13 camelia rakudo-parrot 4f66ce, rakudo-jvm 4f66ce: OUTPUT«foo␤»
22:14 lizmat aka by binding  ?
22:15 lue The function's actually getting assigned via    for @funcs -> $f {    though.
22:17 DarthGandalf joined #perl6
22:22 skids lizmat: so my read is that if it wouldn't work for sub foo (@a) { } ; foo (*); it won't work for @a := *. And in that case a slurpy is currently needed.
22:25 BenGoldberg joined #perl6
22:28 * skids decommute.  So much for seeing sunlight today.
22:28 cognominal joined #perl6
22:37 raiph .tell hoelzro http://questhub.io/realm/perl/quest/52bca72af6d329e15d0000ca
22:37 yoleaux raiph: I'll pass your message to hoelzro.
22:37 DarthGandalf joined #perl6
22:39 bjz joined #perl6
22:46 kbaker_ joined #perl6
22:50 Mouq how do I run perl6-j with increased stack size / so that it doesn't die with java.lang.StackOverflowError
22:50 Mouq ?
22:52 Pleiades` joined #perl6
22:59 lizmat Mouq: by manually tweaking parameter in perl6-j ?
22:59 lizmat mine starts with: exec java -Xms100m....
23:03 lizmat BTW, did someone forget to commit S04-operators/brainos.t to roast ?
23:03 lizmat spectest now starts with: Missing test file: t/spec/S04-operators/brainos.t
23:05 lizmat sleep&
23:05 timotimo i can specify more than one --vmlibs for nqp, right?
23:07 panchiniak joined #perl6
23:17 ilbot3 joined #perl6
23:17 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
23:18 go|dfish joined #perl6
23:19 dbrock joined #perl6
23:20 Mouq lizmat: Ohhhh, thank you
23:22 lue japhb: maybe you can add your idiomization concerns to the PR ?
23:24 Ben_Goldberg joined #perl6
23:24 lue Waitaminute, are the 99-problems named with the name of the person who wrote them? Hmm..
23:31 hmk joined #perl6
23:31 berekuk joined #perl6
23:32 lue japhb: scratch that, if you can tell me I'll put them into a comment I'm about to leave.
23:37 lue japhb: Are you talking about using Test.pm? That's the only thing I could spot semi-immediately.
23:51 lue First glance at perl6-examples/best-of-rosettacode tells me we should get rid of it in favor of leaving rosettacode stuff in one location, but I won't touch it for now.
23:55 lue What The‽ "Replaced erroneous use of .WHAT with .^name" I don't even.
23:58 lue If someone could please explain to me how .WHAT is ever "erroneous" with respect to .^name, I'd love to hear it.

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo