Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-08-17

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:05 [Coke] tadzik: I lied. removing a submodule is a PITA, and the directions I've found don't work for my version of git. we'll get it eventually.
00:12 cognominal joined #perl6
00:22 FROGGS joined #perl6
00:30 Tene [Coke]: git submodules?
00:30 Tene [Coke]: What's the question?
00:42 donaldh joined #perl6
00:42 [Coke] Tene: https://github.com/rakudo/star/issues/27
00:46 BenGoldberg preflex: karma yoleaux
00:46 preflex yoleaux has no karma
00:46 yoleaux 16 Aug 2013 18:09Z <[Coke]> preflex: DIE DIE DIE
00:46 diakopter haha
00:48 BenGoldberg r: ((map { $_ }, ^Inf) but role {}).print
00:48 camelia rakudo 10b9ac: OUTPUT«This type does not support elems␤  in method REIFY at src/gen/CORE.setting:7493␤  in method reify at src/gen/CORE.setting:6719␤  in method reify at src/gen/CORE.setting:6706␤  in method gimme at src/gen/CORE.setting:7139␤  in method print at src/gen/CORE.setting:12…
00:48 BenGoldberg That's a bug, right?
01:03 TimToady it seems wrongish
01:04 TimToady otoh, I can see why it might want to precalculate how much it's going to output, if it's using join
01:04 TimToady but if it's using join, that might be the bug :)
01:06 TimToady but the traceback seems to indicate that it's gimme/reify that is calling elems, which is...problematic
01:06 TimToady since the whole point of gimme/reify is to avoid precalculating things...
01:08 TimToady or possibly it's calling .elems to see how much is in the reified bit
01:08 TimToady one would, horrors, have to read the source code to find out :)
01:09 * TimToady promised the implementors 13 years ago that he would stay out of implementation, but maybe I should consider breaking that promise someday :)
01:09 TimToady s/I/he/
01:10 Mouq joined #perl6
01:16 BenGoldberg r: ((map { $_ }, ^Inf)).print
01:16 camelia rakudo 10b9ac: OUTPUT«(timeout)0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121…
01:28 raiph joined #perl6
01:35 TimToady so two bugs maybe; it should know that the mixin is also infinite, but when it is sure, it maybe shouldn't be assuming finite
01:35 TimToady ss/is sure/isn't sure/
01:36 TimToady my n't key is going all gimpy again...
01:48 diakopter Promise.break()
01:49 FROGGS joined #perl6
01:50 Mouq #`[Perl 6 rocks. Just getting the little things Right saves like half the brain load writing it, in what little time I've spent with the language. (all contributers ever)++]
01:50 raiph Promises/A+ standardizes on the terms “fulfilled”, “rejected”, “reason”, and “pending”
01:51 raiph (quoted from http://promisesaplus.com/differences-from-promises-a)
01:51 raiph I don't know the standing of the Promises/A+ spec
01:52 raiph but I like fulfil(ed), reject(ed), reason and pending
02:15 lue .oO(Does this mean std will *run* my Perl 6 code too someday?)
02:30 EvanTeitelman joined #perl6
02:30 araujo joined #perl6
02:55 colomon joined #perl6
02:59 * colomon is in Canada for the third time this summer...
03:02 colomon and jakudo still is giving org.perl6.nqp.runtime.UnwindException
03:02 colomon :(
03:08 colomon that's when building.
03:11 raiph joined #perl6
03:11 EvanTeit1lman joined #perl6
03:19 xilo joined #perl6
03:21 jaldhar joined #perl6
03:24 colomon getting the error on both OS X and Linux
03:29 preflex_ joined #perl6
03:35 colomon complete rebuild from scratch also fails
03:35 colomon and with that, I'm going to bed.
03:56 adu joined #perl6
04:20 Mouq Following “Building Rakudo on JVM” with the latest everything AFAIK and OS X, I also fail, but with “No registered operation handler for 'jvmisnull'␤  in …”
04:20 Mouq This might just be me doing something dumb though
04:22 moritz Mouq: that usually means your copy of nqp is too old
04:23 TimToady that op was added on Aug 7, so yeah
04:24 Mouq :p 'k, thx. Wanted to see if I could duplicate colomon's error
04:26 TimToady FROGGS++ already bisected it earlier, and 144a3f87f58e576159c1dea7b6a8854f2bdc1e86 is apparently in error
04:26 TimToady 5f460187c89ec42b98925dccebe1962b5efdbc60 is the last good commit
04:29 grondilu joined #perl6
04:31 adu hi TimToady
04:31 TimToady o/
04:40 Mouq Wow. So all the error does is tell you that it's throwing an error
04:41 TimToady "Something's wrong at line I dunno!"
04:42 benabik joined #perl6
04:43 diakopter "Either something's wrong or this error is wrong"
04:45 aindilis` joined #perl6
04:55 shinobicl_ joined #perl6
04:59 fridim__ joined #perl6
05:12 FROGGS joined #perl6
05:13 Mouq Very aside, is something like Storable::dclone() needed in Perl 6?
05:16 moritz yes
05:19 Mouq Err, asking if/how to deep copy. I wasn't really plan on implementing Storable >_>
05:22 * TimToady --> bed # jet slagged
05:22 moritz first implement it, then use it :-)
05:23 Mouq Goodnight TimToady!
05:23 Mouq The error in 144a3f8 comes from src/core/Array.pm, I've determined that much
05:25 FROGGS joined #perl6
05:29 Mouq Ah. Okay, the answer appears to be "yes" indeed. I wasn't sure what question you were answering. But:
05:29 Mouq r: my $x = {"a"=>{"a"=>{"a"=>3}}};my $y = $x;$y<a><a><a>++;say $y.perl;say $x.perl;
05:29 camelia rakudo 10b9ac: OUTPUT«{"a" => {"a" => {"a" => 4}}}␤{"a" => {"a" => {"a" => 4}}}␤»
05:30 Mouq I want to deep clone so that $y !~~ $x at the end
05:31 Mouq But, so, there really isn't a method for this?
05:32 moritz no
05:33 Mouq Err, wait my bad in the previous comment; I got mixed up because I was testing Array, it's src/core/Hash.pm that messes everything up
05:34 Mouq checkout 144a3f8 and then git checkout 5f46018 src/core/Hash.pm and it works
05:53 FROGGS joined #perl6
06:03 cognominal jnthn++ # slides for YAPC::EU
06:11 iSlug joined #perl6
06:17 dalek v5: d21eaa1 | (Tobias Leich)++ | STATUS.md:
06:17 dalek v5: status update after nqp changes
06:17 dalek v5: review: https://github.com/rakudo-p5/v5/commit/d21eaa1013
06:22 SamuraiJack joined #perl6
06:28 dalek rakudo/nom: ade8bc1 | (Tobias Leich)++ | src/core/ (3 files):
06:28 dalek rakudo/nom: unbreak build by reverting 144a3f87f58e576159c1dea7b6a8854f2bdc1e86
06:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ade8bc1a8f
06:31 Mouq FROGGS: The offending lines seem to be src/core/Hash.pm:29-31
06:33 FROGGS Mouq: before my last commit?
06:33 Mouq In 144a3f8
06:34 FROGGS hmmmm, I can just guess wildly what could be wrong with it
06:35 Mouq There are two other sets of basically the same thing within the file; maybe it's just because they don't get called, but `make` works when 29-31 are commented out
06:42 FROGGS .tell lizmat please read http://irclog.perlgeek.de/perl6/2013-08-17#i_7462070
06:42 yoleaux FROGGS: I'll pass your message to lizmat.
06:46 PerlJam r: my Buf $b .= new();
06:46 camelia rakudo 10b9ac: OUTPUT«Cannot modify an immutable value␤  in method dispatch:<.=> at src/gen/CORE.setting:1154␤  in any  at src/gen/Metamodel.nqp:1461␤  in block  at /tmp/1pFS9XvIZu:1␤␤»
06:46 PerlJam r: my Buf $b = Buf.new();
06:46 camelia rakudo 10b9ac:  ( no output )
06:49 PerlJam r: my Buf $b = $b.new();
06:49 camelia rakudo 10b9ac:  ( no output )
06:50 Mouq r: my Buf $b; $b .= new() #?
06:50 camelia rakudo 10b9ac: OUTPUT«Cannot modify an immutable value␤  in method dispatch:<.=> at src/gen/CORE.setting:1154␤  in any  at src/gen/Metamodel.nqp:1461␤  in block  at /tmp/blB71uYruw:1␤␤»
06:53 kaare_ joined #perl6
06:59 abnorman joined #perl6
07:14 PacoAir joined #perl6
07:14 grondilu I think Buf is not mutable yet because at_pos is not yet redefined for it.
07:14 grondilu (see Buf.pm line 200)
07:15 grondilu r: my Buf $b; $b = Buf.new: ^10; $b[3] = 13;
07:15 camelia rakudo ade8bc: OUTPUT«Cannot modify an immutable value␤  in block  at /tmp/LY_tto8SzH:1␤␤»
07:31 crab2313 joined #perl6
07:47 spider-mario joined #perl6
07:48 Mouq rn: my $foo; 0..* ==>$foo
07:48 camelia rakudo ade8bc:  ( no output )
07:48 camelia ..niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Feed ops NYI␤  at /home/p6eval/niecza/lib/CORE.setting line 1531 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3555 (infix:<==>> @ 4) ␤  at /tmp/naIVkSJi6O line 1 (mainline @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting li…
08:02 PacoAir joined #perl6
08:42 cognominal joined #perl6
08:44 masak oh hai #perl6
08:44 * masak is back home
08:47 * grondilu whishes he could write:  loop do-something(); instead of loop { do-something() };
08:49 * grondilu thought of this while writing http://rosettacode.org/wiki/Arithmetic-geometric_mean#Perl_6  He though it would be nice if he could write   loop given { ... } instead of loop { given {...} }
09:05 masak ah, so making 'loop' take a blast instead of just a block.
09:05 masak I *think* that'd fly.
09:06 masak r: macro myloop($s) { quasi { loop { $s } } }; myloop say "!"
09:06 SamuraiJack joined #perl6
09:06 camelia rakudo ade8bc: OUTPUT«(timeout)»
09:06 masak er.
09:07 masak r: macro myloop($s) { quasi { loop { {{{$s}}} } } }; myloop say "!"
09:07 camelia rakudo ade8bc: OUTPUT«(timeout)!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�¤!â�
09:07 masak \o/
09:07 masak quotation levels are tricky ;)
09:08 locsmif joined #perl6
09:08 masak locsmif: greetings.
09:11 rhr joined #perl6
09:18 grondilu masak: nice, but it doesn't work if I try:  myloop given rand { .say }
09:20 masak grondilu: try 'myloop do given rand { .say }'
09:21 masak grondilu: I haven't *actually* made it into a statement prefix, like 'try'.
09:21 grondilu indeed, do works
09:21 masak \o/
09:21 masak so 'myloop given <anything>' reads 'given' as a statement modifier.
09:22 masak and so 'myloop given rand { .say }' is TTIAR.
09:24 grondilu got a weird error while trying:  (do given rand { .say }) xx *
09:24 grondilu r: (do given rand { .say }) xx *
09:24 camelia rakudo ade8bc:  ( no output )
09:24 grondilu perl6 -e '(do given rand { .say }) xx *'
09:24 grondilu ===SORRY!===
09:24 grondilu Could not find sub cuid_1_1376731420.91863
09:25 * masak submits rakuodbug
09:25 diakopter o_O
09:25 diakopter sounds like an optimizer bug
09:25 masak hm, cannot reproduce locally.
09:25 masak grondilu: are you on ade8bc?
09:26 masak I seem to be on 0cd2c68 locally.
09:26 grondilu hang on
09:26 locsmif hi masak
09:26 grondilu the macro definition was actually still there (I did not bother deleting it)
09:26 grondilu if I remove it, the error does not appear.
09:26 masak locsmif: I'd like to extend a sincere welcome. if there's anything I can help with, please ask.
09:27 grondilu r: macro myloop($s) { quasi { loop { {{{$s}}} } } }; (do given rand { .say }) xx *
09:27 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376731623.80477␤»
09:27 grondilu r: macro myloop($s) { quasi { loop { {{{$s}}} } } };
09:27 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376731638.76788␤»
09:27 grondilu weird, isn't it?
09:27 masak oh! it's 'cus of the macro.
09:27 cognominal joined #perl6
09:27 locsmif masak: thanks, just your regular Perl affacianado hanging around. :)
09:27 locsmif afficianado*
09:27 masak locsmif: yes, I figured that out. :)
09:28 masak locsmif: since you show up so soon after a YAPC ;)
09:28 locsmif Heh... never been to one unfortunately, but I believe there must be some where I am (NL)
09:28 masak grondilu: why the heck did you get it for the 'perl6 -e' execution above? is that a real copy-paste?
09:29 masak locsmif: oh! then I was wrong. :) anyway, welcome!
09:29 masak rn: say <greetings aloha welcome>.roll, " locsmif!"
09:29 camelia rakudo ade8bc, niecza v24-88-g1f87209: OUTPUT«welcome locsmif!␤»
09:30 masak :D
09:30 locsmif :D
09:31 colomon joined #perl6
09:33 masak r: say "When someone asks 'Where can I download Perl 6?', we ought to say 'Here is Rakudo Star'."
09:33 camelia rakudo ade8bc: OUTPUT«When someone asks 'Where can I download Perl 6?', we ought to say 'Here is Rakudo Star'.␤»
09:33 masak star: say "When someone asks 'Where can I download Perl 6?', we ought to say 'Here is Rakudo Star'."
09:33 camelia star 2013.02: OUTPUT«When someone asks 'Where can I download Perl 6?', we ought to say 'Here is Rakudo Star'.␤»
09:33 masak 2013.02 is the newest Star release? :/
09:33 grondilu masak: it was a "hand-made" copy paste, if you see what I mean.
09:34 masak grondilu: that explains it.
09:34 masak grondilu: please don't do that. :) it makes it harder to reason deductively about causes.
09:34 grondilu ok
09:39 Mouq joined #perl6
09:42 masak r: macro myloop($s) { quasi { loop { {{{$s}}} } } }
09:42 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376732548.89373␤»
09:42 masak r: macro myloop($s) { quasi { loop { {{{$s}}} } } }; say "A"
09:42 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376732554.79208␤»
09:42 masak r: macro myloop($s) { quasi { loop { } } }; say "A"
09:42 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376732563.08685␤»
09:42 masak r: macro myloop($s) { quasi { } }; say "A"
09:42 camelia rakudo ade8bc: OUTPUT«A␤»
09:43 masak r: macro myloop($s) { quasi { loop { } } }
09:43 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376732590.26211␤»
09:46 rindolf joined #perl6
09:51 Mouq also
09:51 Mouq r: macro myloop($s) { quasi { while 1 { } } }
09:51 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376733098.895␤»
09:51 Mouq but not
09:51 Mouq r: macro myloop($s) { quasi { for 1 { } } }
09:51 camelia rakudo ade8bc:  ( no output )
09:52 Mouq r: macro myloop($s) { quasi { for 1..* { } } }
09:52 camelia rakudo ade8bc:  ( no output )
09:54 timotimo r: macro myloop($s) { quasi { loop { } } }; say &myloop;
09:54 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376733256.21519␤»
09:54 timotimo r: macro myloop($s) { quasi { loop { } } }; say "alive?";
09:54 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376733262.89451␤»
09:54 timotimo ah, so it's not even that.
09:55 masak right.
09:56 masak it's macros and loops (but not for loops), AFAICS.
10:01 Mouq r: macro myloop($s) { quasi { 1; loop { } } }
10:01 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376733672.75965␤»
10:02 Mouq r: macro myloop($s) { quasi { for 1 {}; loop { } } } # :B
10:02 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_2_1376733748.30408␤»
10:03 timotimo i still can't get rakudo to build
10:03 timotimo something must be foul
10:04 Rotwang joined #perl6
10:04 pdcawley joined #perl6
10:06 * moritz tries again
10:06 timotimo but i didn'r get the unwind exception, i get the very early class not found thingie
10:06 timotimo anyway, i need to go now
10:06 moritz timotimo: are you on nqp/master?
10:06 timotimo yes
10:06 timotimo configured and made clean a few times over
10:09 Mouq The latest commit make'd for me :/
10:10 Mouq Oh, maybe I was doing stuff wrong though...
10:10 dalek rakudo/nom: d9f8d6e | tadzik++ | tools/build/Makefile-JVM.in:
10:10 dalek rakudo/nom: Make 'make install' build stuff
10:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d9f8d6e6fc
10:12 masak r: quasi { loop {} }
10:12 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376734365.60755␤»
10:13 moritz r: quasi { loop {} }; 1
10:13 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤Could not find sub cuid_1_1376734386.4858␤»
10:13 moritz ok, it's not sink context that's to blame :-)
10:13 masak I bet from hunting that one down, I will learn something about the Rakudo internals.
10:13 masak moritz: right -- that's easy to assume, but we established above that it wasn't.
10:18 GlitchMr std: "\x"
10:18 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized backslash sequence: '\x' at /tmp/Vb18QyNjxB line 1:�------> [32m"\x[33m�[31m"[0m�Check failed�FAILED 00:00 41m�»
10:18 GlitchMr It's \x00 in Perl 5 (but I assume it's one of its bugs...)
10:18 tadzik moritz: I think you know; where is -I implemented?
10:21 masak GlitchMr: I assume so too.
10:23 pdcawley 1 @ 2
10:23 pdcawley Gah! Completely the wrong window.
10:23 masak :)
10:24 diakopter pdcawley: oh noes! :D
10:24 pdcawley Heh.
10:24 pdcawley Thinking smalltalk.
10:24 masak r: multi infix:<@>($l, $r) { $l +^ $r }; say 1 @ 2
10:24 camelia rakudo ade8bc: OUTPUT«3␤»
10:24 masak \o/
10:25 pdcawley r: multi infix:<@>($x,$y) { Point.new(...) }
10:25 camelia rakudo ade8bc: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bgYBfDHoYEâ�¤Undeclared name:â�¤    Point used at line 1â�¤â�¤Â»
10:25 pdcawley Just need to write the point class :)
10:27 pdcawley r: class Point { has $.x; has $.y; }; multi infix:<@>($x, $y) { Point.new(:x<$x>, :y<$y>) }; say 1 @ 2
10:27 camelia rakudo ade8bc: OUTPUT«Point.new(x => "\$x", y => "\$y")␤»
10:27 pdcawley Awesome!
10:27 pdcawley r: class Point { has $.x; has $.y; }; multi infix:<@>($x, $y) { Point.new(:x<$x>, :y<$y>) }; say 1@2
10:27 camelia rakudo ade8bc: OUTPUT«Point.new(x => "\$x", y => "\$y")␤»
10:28 jnthn pdcawley: Point.new(:$x, :$y) # shortcut :)
10:29 pdcawley Presumably, if I added a 'method perl' to Point, that output could be rejiggered to ($x@$y)
10:29 pdcawley jnthn: Of course!
10:29 jnthn um, and...I think you wanted :x($x), as :x<$x> is a literal  :)
10:29 pdcawley Ah. Right. Yes.
10:29 pdcawley Been away from six a while.
10:30 * pdcawley keeps reading the docs...
10:32 diakopter we have docs?
10:32 pdcawley There's something at doc.perl6.org
10:32 pdcawley Can't say they're brilliant, but they're a start.
10:34 pdcawley I'm also vaguely wondering if we (can) get Haskell style autocurrying...
10:34 pdcawley sub foo($a, $b) is Curried { ... } or some such?
10:36 * pdcawley blinks... circumfix () and circumfix {}? They're just operators like any other?
10:36 pdcawley That's awesome.
10:37 masak aye.
10:37 masak we have prefix, postfix, infix, but then also circumfix and postcircumfix.
10:38 masak the only one that's obviously missing is precircumfix ;)
10:38 pdcawley Could one do multi circumfix:(Announcement *@ann) and have it yield an AnnouncementCollection or some such?
10:38 pdcawley Or just override comma?
10:39 jnthn r: sub circumfix:<LOL LOL>($str) { $str.subst('s', 'z', :g) }; say LOL 'cheeseburger' LOL
10:39 camelia rakudo ade8bc: OUTPUT«cheezeburger␤»
10:39 * pdcawley has been playing with smalltalk - overriding comma for building specialized collections is one of those tricks you want to use everywhere.
10:41 masak pdcawley: the syntax is 'circumfix:<[ ]>(Announcement *@ann)' or some such.
10:42 pdcawley masak: Gotcha - jnthn's example was helpful.
10:42 masak that is, you specify the actual circumfixing symbols inside alligator quotes.
10:42 jnthn The...alligator?!
10:42 masak :)
10:42 jnthn Did we call them that before? :P
10:42 masak not that I know of.
10:42 masak but that's obviously what they are :>
10:43 pdcawley `~< >~' are alligators, surely?
10:44 masak r: sub circumfix:<< ~< >~ >>($str) { $str.uc }; say ~< 'come here... om nom nom' >~
10:44 camelia rakudo ade8bc: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7WbjybgfGQâ�¤Two terms in a rowâ�¤at /tmp/7WbjybgfGQ:1â�¤------> [32mc }; say ~< 'come here... om nom nom' >~[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-…
10:44 masak hrm... that looks legit to me.
10:44 masak std: sub circumfix:<< ~< >~ >>($str) { $str.uc }; say ~< 'come here... om nom nom' >~
10:44 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Prefix requires an argument at /tmp/xl_7WWEqT3 line 1 (EOF):â�¤------> [32mc }; say ~< 'come here... om nom nom' >~[33mâ��[31m<EOL>[0mâ�¤Other potential difficulties:â�¤  >~ is not an infix operator (to suppress warning put space between in…
10:44 jnthn masak: Conflict with the prefix.
10:45 masak yesbut... LTM...
10:45 jnthn masak: EXPR always parses a prefix, then a term.
10:45 jnthn And a circumfix is a term.
10:45 masak ah.
10:45 pdcawley looking at these docs again... various operators doing 'returns Numeric:D'
10:45 jnthn LTM only helps if you're looking for the right categories :P
10:45 pdcawley what does the :D mean?
10:45 masak pdcawley: defined.
10:45 masak pdcawley: often it means "don't accept the type object"
10:45 masak r: sub foo(Int) { say "yess!" }; foo Int
10:45 camelia rakudo ade8bc: OUTPUT«yess!␤»
10:46 masak r: sub foo(Int:D) { say "yess!" }; foo Int
10:46 camelia rakudo ade8bc: OUTPUT«Parameter '' requires an instance, but a type object was passed␤  in sub foo at /tmp/oyXUsKZKJj:1␤  in block  at /tmp/oyXUsKZKJj:1␤␤»
10:46 pdcawley So 'returns Numeric' means?
10:46 masak pdcawley: that they return anything Numeric, including the type object.
10:46 pdcawley r: sub foo(Int) { say "yess!" }; foo undef
10:46 camelia rakudo ade8bc: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/YllCqdlX_Fâ�¤Unsupported use of undef as a value; in Perl 6 please use something more specific:â�¤  Any (the "whatever" type object),â�¤      an undefined type object such as Int,â�¤  :!defined as a matcher,â�¤        Any:U as a
10:46 camelia ..ty…
10:46 masak pdcawley: in Perl 6, a type object like Numeric is on "equal footing" with actual instance objects.
10:46 masak pdcawley: undefined is abolished as being not type-y enough.
10:47 pdcawley So, undef : Perl 5 :: Nil : Perl 6
10:47 pdcawley r: sub foo(Int) { say "yess!" }; foo Nil
10:47 camelia rakudo ade8bc: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'foo' will never work with argument types (Nil) (lines 1, 1)␤    Expected: :(Int )␤»
10:47 pdcawley Allowing an instance of the type or the type objects seems like an interesting choice.
10:48 pdcawley Not particularly Huffmanized it seems to me.
10:48 * jnthn back in a bit
10:50 masak pdcawley: no, I'd say in most cases Any stands in for 'undef'.
10:51 masak pdcawley: but if, as above, your &foo wants an Int, then Int stands in for 'undef'.
10:51 masak think of it as a "typed 'undef'"
10:52 pdcawley Hmm... that might take a bit of getting used to.
10:52 pdcawley What's the diff between a type object and a class?
10:54 Mouq I don't think there is one. (?) See for example Math::Quaternion https://github.com/Util/Perl6-Math-Quaternion/blob/master/lib/Math/Quaternion.pm6
10:54 masak pdcawley: the type object is an object that can be used to represent either the whole class, or an undefined object of that class.
10:54 masak pdcawley: one very common use of type objects is to simply do Dog.new on them.
10:55 masak pdcawley: that is, type objects have all the methods instances of that class have. but you're not supposed to call methods that use attributes, since type objects don't deal in attributes.
10:55 pdcawley No parameterised types?
10:55 pdcawley List(Int) ?
10:55 masak yes, but only in roles.
10:56 masak classes in Perl 6 are too "messy" to do parameterization. roles are static enough to do it.
10:57 GlitchMr std: <<<<<<<
10:57 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse shell-quote words at /tmp/yaV_PbXveb line 1:�------> [32m<BOL>[33m�[31m<<<<<<<[0m�Couldn't find final '>>'; gave up at /tmp/yaV_PbXveb line 1 (EOF):�------> [32m<<<<<<<[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 …
10:57 GlitchMr std: #DEBUG -1
10:58 camelia std c2215f0: OUTPUT«    ::::::::::::::: RE_any 3 [RE_ast.pm:553]␤       :::::::::::::::: RE_sequence [RE_ast.pm:518]␤   ::::::::::::::::: RE_meta $ [RE_ast.pm:401]␤    ::::::::::::::::: RE_method ws [RE_ast.pm:411]␤ ::::::::::::::::: RE_method_re before [RE_ast.pm:440]␤  ::::::::::::::::::
10:58 camelia ..RE_cclass […
11:00 GlitchMr rn: https://gist.github.com/GlitchMr/6256391
11:00 camelia rakudo ade8bc: OUTPUT«[31m===[0mSORRY![31m===[0m�Found a version control conflict marker�at /tmp/3Tr1PxZtcG:3�------> [32m<<<<<<<[33m�[31m yours:sample.p6[0m�Preceding context expects a term, but found infix ==== instead�at /tmp/3Tr1PxZtcG:5�------> [32m====[33m�[31m===[0m��…
11:00 camelia ..niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0m��Found a version control conflict marker at /tmp/ysNSBYrpYV line 3:�------> [32m<<<<<<<[33m�[31m yours:sample.p6[0m��Bogus statement at /tmp/ysNSBYrpYV line 5:�------> [32m<BOL>[33m�[31m=======[0m��Parse failed��»…
11:00 pdcawley From Perl6::Math::Quaternion »**» vs »*« ?
11:01 pdcawley (That class is rather splendid, btw)
11:02 masak pdcawley: the direction of the » markers indicate a kind of strictness.
11:02 masak r: my @x = 1, 2, 3; my @y = 10, 20, 30; say @x »+« @y
11:02 camelia rakudo ade8bc: OUTPUT«11 22 33␤»
11:03 pdcawley Okay...
11:03 masak r: my @x = 1, 2, 3; my @y = 10; say @x »+« @y
11:03 camelia rakudo ade8bc: OUTPUT«Lists on both side of non-dwimmy hyperop of infix:<+> are not of the same length␤left: 3 elements, right: 1 elements␤  in sub hyper at src/gen/CORE.setting:15490␤  in sub hyper at src/gen/CORE.setting:15478␤  in block  at src/gen/CORE.setting:15469␤  in block  at /…
11:03 masak r: my @x = 1, 2, 3; my @y = 10; say @x »+» @y
11:03 camelia rakudo ade8bc: OUTPUT«11 12 13␤»
11:03 masak see, if you turn an arrow towards the operand, it doesn't have to be of the same shape as the other operand.
11:04 masak (and values are sort of filled in, rotating back to the beginning as necessary)
11:04 pdcawley So if you're raising everything in a list to the same power, you do @list »**« $pow
11:04 pdcawley Sorry »**» $pow
11:04 masak aye.
11:04 masak correct.
11:05 masak by the way, every time you do something like »**» with both arrows turned the same way, you should consider whether it's actually hyper behavior you want/need, or whether it's laziness with X**
11:05 masak they give the same result, but they behave differently.
11:06 jnthn Z** ?
11:07 masak oh!
11:07 masak yes.
11:07 masak of course.
11:07 pdcawley masak: I like laziness well enough, but Z**?
11:08 masak rightright, Z**
11:08 pdcawley snippet?
11:08 masak r: my @x = 1, 2, 3; my @y = 10; say @x Z+ @y
11:08 masak er.
11:08 camelia rakudo d9f8d6: OUTPUT«11␤»
11:08 masak r: my @x = 1, 2, 3; my @y = 10; say @x Z+ @y, *
11:08 camelia rakudo d9f8d6: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤  in method Numeric at src/gen/CORE.setting:961␤  in sub infix:<+> at src/gen/CORE.setting:3561␤  in sub infix:<+> at src/gen/CORE.setting:3559␤  in block  at src/gen/CORE.setting:15359␤  in …
11:09 masak r: my @x = 1, 2, 3; my @y = 10, 20, 30; say @x Z+ @y
11:09 camelia rakudo d9f8d6: OUTPUT«11 22 33␤»
11:09 pdcawley take @x Z+ @y ?
11:09 masak sorry, what?
11:09 Mouq Whoa. My brain just exploded when I realized you could (I'm pretty sure) implement X and Z with something sub infix:<X> (@a, @b) is parsed({...}) {...}
11:09 pdcawley Z = zip?
11:09 Mouq r: my @x = 1, 2, 3; my @y = 10; say @x Z+ @y xx *
11:09 masak pdcawley: aye.
11:09 camelia rakudo d9f8d6: OUTPUT«11 12 13␤»
11:09 pdcawley Implicitly lazy?
11:09 masak pdcawley: and zip is lazy, whereas hyperops are not.
11:09 masak pdcawley: yes.
11:10 masak pdcawley: it took us years to realize that X and Z were not just operators (cross product and zip, respectively), but also metaoperators.
11:10 pdcawley Hmm... not take, because take belongs to gather...
11:10 pdcawley masak: Writing zipWith all the time?
11:11 pdcawley r: my @x = 1,2,3; say @x X, @x
11:11 camelia rakudo d9f8d6: OUTPUT«1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3␤»
11:11 pdcawley r: my @x = 1,2,3; say @x X @x
11:11 camelia rakudo d9f8d6: OUTPUT«1 1 1 2 1 3 2 1 2 2 2 3 3 1 3 2 3 3␤»
11:11 masak pdcawley: I don't remember what we did before that. I guess we looped over stuff with 'for @x Z @y' and did things in the loop.
11:11 pdcawley r: my @x = 1,2,3; say @x X=> @x
11:11 camelia rakudo d9f8d6: OUTPUT«1 => 1 1 => 2 1 => 3 2 => 1 2 => 2 2 => 3 3 => 1 3 => 2 3 => 3␤»
11:12 pdcawley masak: zipWith's a pretty common higher order combinator.
11:12 masak aye.
11:12 masak guess we were slow on that one :)
11:12 pdcawley Does Z($a,$b -> { ... }) work then?
11:13 pdcawley Or have we got Haskelly list comprehensions for more complex combinators?
11:15 masak metaoperators work *only* on operators.
11:15 masak well, kinda.
11:15 pdcawley While I'm about it, if I want to do (1,2,3) ??? (1,2) and get ([1,1], [2,2]) as output (ie, zipping to the shortest), what do I do?
11:15 masak pdcawley: but you can do '@a Z @b Z @c' and it'd do what you want.
11:15 masak because chaining operators.
11:15 pdcawley masak: I don't think you get what I want.
11:16 masak no, maybe not.
11:16 pdcawley Zipping two lists and combining with an arbitrary lambda rather than a given op.
11:16 GlitchMr std: use incorrect
11:16 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot locate module incorrect at /tmp/JtqfzMxVD2 line 1 (EOF):�------> [32muse incorrect[33m�[31m<EOL>[0m�Check failed�FAILED 00:00 41m�»
11:16 GlitchMr Why neither Niecza or Rakudo has Sorry message in that case.
11:16 pdcawley Haskelly style, zipWith \x,y -> x * y + 999 $ xs
11:16 masak pdcawley: easiest to wrap your arbritary lambda in a sub or an op, I thinkk.
11:16 masak think*
11:16 pdcawley p'shaw!
11:17 masak pdcawley: or use the actual zipwith function.
11:17 pdcawley Happy enought to use zipWith :)
11:17 pdcawley persumably zipWith is lazy.
11:17 masak aye, 'cus it drives the operator.
11:19 pdcawley is there an equivalent to haskell's handy `func` which magically turns a binary function into an infix operator?
11:19 masak r: my @words = <so many words>; say @words.zipwith( -> $l, $r { $l ~ $r })
11:19 camelia rakudo d9f8d6: OUTPUT«No such method 'zipwith' for invocant of type 'Array'␤  in block  at /tmp/rJmOquADfd:1␤␤»
11:19 * masak submits NYI rakudobug
11:20 masak .zipwith is mentioned in S03:4774
11:20 synopsebot Link: http://perlcabal.org/syn/S03.html#line_4774
11:20 masak pdcawley: yes, kinda.
11:20 pdcawley masak: I'd expect a second list argument there...
11:20 pdcawley And generally expect zipWith to be a function, not a method.
11:20 masak pdcawley: oh, you're right.
11:21 masak r: sub foo { say "It was $^a and $^b" }; say "ham" [&foo] "eggs"
11:21 camelia rakudo d9f8d6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/cETJixHW8h�Unable to parse expression in bracketed infix; couldn't find final ']'�at /tmp/cETJixHW8h:1�------> [32msay "It was $^a and $^b" }; say "ham" [&[33m�[31mfoo] "eggs"[0m�»
11:21 masak hrm.
11:21 pdcawley r: @a = (1,2,3); @b = (5,6,7); zipWith [+], @a, @b
11:21 camelia rakudo d9f8d6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/pPahNJgfWoâ�¤Variable '@a' is not declaredâ�¤at /tmp/pPahNJgfWo:1â�¤------> [32m@a[33mâ��[31m = (1,2,3); @b = (5,6,7); zipWith [+], @[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
11:21 masak r: (<a b>; 1,2).zipwith(&[~])
11:21 camelia rakudo d9f8d6: OUTPUT«WARNINGS:␤Useless use of "a b" in expression "a b" in sink context (line 1)␤No such method 'zipwith' for invocant of type 'Parcel'␤  in block  at /tmp/57qxSq2VBV:1␤␤»
11:21 masak that's the actual example from S03.
11:22 masak guess list-of-lists are not quite there yet.
11:22 masak bah.
11:23 pdcawley r: my @a = (1,2,3); my @b = (5,6,7); zipWith [+], @a, @b
11:23 camelia rakudo d9f8d6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Cnfn76gZfTâ�¤Undeclared routine:â�¤    zipWith used at line 1â�¤â�¤Â»
11:24 jnthn r: zip
11:24 camelia rakudo d9f8d6: OUTPUT«(timeout)»
11:24 masak r: sub zipWith(&op, @l, @r) { map { &op($^l, $^r) }, (@l Z @r) }; say (zipWith &[+], <1 2 3>, <70 80 90>).perl
11:24 camelia rakudo d9f8d6: OUTPUT«(71, 82, 93).list␤»
11:24 masak \o/
11:24 * masak submits rakudobug on jnthn's timeout
11:24 * jnthn wonders where zip is defined
11:25 pdcawley masak: Wants to take >=2 lists surely?
11:25 masak pdcawley: just a simple example. but yes.
11:25 jnthn oh...
11:25 jnthn my &zip := &infix:<Z>;
11:25 jnthn :)
11:25 pdcawley ie, 'zipWith &[+], @a, @b, @c' should work.
11:25 masak jnthn: still shouldn't hang.
11:26 jnthn masak: aye, no idea why it does that.
11:26 masak pdcawley: yes; this is where lists of lists come in.
11:26 pdcawley lists of lists, or parcels of lists?
11:26 jnthn Well, I think @a Z @b Z @c works...
11:26 tadzik jnthn: I have a feeling something's wrong with ModuleLoader's search_paths
11:26 tadzik if INC is set, it completely skips vm_search_paths
11:26 masak jnthn: yes, it does.
11:26 pdcawley r: my @a = (1,2,3); (@a Z @a Z @a).perl
11:26 camelia rakudo d9f8d6:  ( no output )
11:26 pdcawley r: my @a = (1,2,3); say (@a Z @a Z @a).perl
11:26 camelia rakudo d9f8d6: OUTPUT«((1, 1, 1), (2, 2, 2), (3, 3, 3)).list␤»
11:27 tadzik that can't be right, can it?
11:27 masak pdcawley: "lists of lists" is our slightly wrong term for "parcels of lists"
11:27 pdcawley masak: Fairy nuff.
11:27 tadzik pdcawley: could you upload the lyrics for "1-2-3 Perl Hackers" somewhere, while the video is not online yet?
11:27 pdcawley Nope.
11:27 pdcawley And I'd rather the video weren't online.
11:28 tadzik oh
11:28 tadzik why so?
11:28 pdcawley That stuff is under the "What happens at YAPC stays at YAPC"
11:28 pdcawley licencse.
11:28 tadzik heh, ok
11:28 masak pdcawley++
11:28 pdcawley It's lyrically ropey as hell.
11:28 pdcawley Which is fine when it's a song about what happened at a particular event, but not fine for it to have a life after that.
11:30 jnthn tadzik: Note that in terms.pm, the things that are normally identified by vm_search_paths should be being put into @INC.
11:30 jnthn tadzik: So it's redundant once @INC is there.
11:30 pdcawley If I implement 'multi sub perl(MyType $thing) { ... }', do I get $mything.perl for foree?
11:30 tadzik oh. Seems like they aren't for some reason
11:30 pdcawley s/foree/for free/?
11:30 pdcawley Expecting the answer to be 'yes', but just checking
11:30 tadzik symptom: if I use either PERL6LIB or -I, Test.pm is not being located anymore
11:30 jnthn tadzik: OK, maybe check for if there's any accidental differences :)
11:31 tadzik it must be something jvm-specific
11:31 jnthn tadzik: Sure...I wonder if we're missing some notion of install directory?
11:31 jnthn tadzik: In the paths, I mean.
11:31 tadzik possibly
11:31 tadzik our install is a bit dodgy
11:33 jnthn Well, on an installed one, does @*INC contain the place wehre Test.pm is put? :)
11:33 jnthn If not, that's probably the problem ;)
11:33 tadzik it may be that it doesn't :)
11:34 pdcawley So... if I wanted to contribute something to perl6, where's zipWith documented and can I implement it in perl6, or should I use nqp?
11:35 colomon joined #perl6
11:35 pdcawley r: say perl (1,2,3) Z (1)
11:35 camelia rakudo d9f8d6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/dM7R1LlsU_â�¤Undeclared routine:â�¤    perl used at line 1â�¤â�¤Â»
11:36 pdcawley r: say ((1,2,3) Z (1)).perl
11:36 camelia rakudo d9f8d6: OUTPUT«((1, 1),).list␤»
11:36 pdcawley Hmm... docs say perl should work as a multisub as well as as a method.
11:38 xinming joined #perl6
11:40 pdcawley r: (<a b>; 1,2).zip.lol.map: { .reduce(&[~]) }
11:40 camelia rakudo d9f8d6: OUTPUT«WARNINGS:␤Useless use of "a b" in expression "a b" in sink context (line 1)␤No such method 'zip' for invocant of type 'Parcel'␤  in block  at /tmp/JoeDRl60Pe:1␤␤»
11:40 pdcawley Hmm... no wonder the synopsis for .zipWith isn't there, the .zip isn't there either :)
11:40 pdcawley (<a b>; 1,2).lol
11:41 pdcawley r: say (<a b>; 1,2).lol
11:41 camelia rakudo d9f8d6: OUTPUT«WARNINGS:␤Useless use of "a b" in expression "a b" in sink context (line 1)␤1 2␤»
11:41 * pdcawley is making shit up and expecting the computer to understand him now...
11:46 cosimo aren't we all?
11:46 pdcawley There is that :)
11:49 pdcawley r: (<a b>; 1,2).zip.tree.map: { .reduce(&[~]) }
11:49 camelia rakudo d9f8d6: OUTPUT«WARNINGS:␤Useless use of "a b" in expression "a b" in sink context (line 1)␤No such method 'zip' for invocant of type 'Parcel'␤  in block  at /tmp/CxAifWdgSq:1␤␤»
11:49 GlitchMr http://glitchmr.github.io/perl-changes-2013W10.html (error pages, why I bother...)
11:49 pdcawley r: say (<a b>; 1,2).tree
11:49 camelia rakudo d9f8d6: OUTPUT«WARNINGS:␤Useless use of "a b" in expression "a b" in sink context (line 1)␤1 2␤»
11:49 jnthn pdcawley: Try just , there
11:49 jnthn instead of ;
11:50 pdcawley r: say (<a b>, (1,2)).tree
11:50 camelia rakudo d9f8d6: OUTPUT«a b 1 2␤»
11:50 * pdcawley was following other examples.
11:50 jnthn r: say (<a b>, (1,2)).tree.perl
11:50 camelia rakudo d9f8d6: OUTPUT«LoL.new($("a", "b"), $(1, 2))␤»
11:50 GlitchMr Isn't ";" so called "comma" operator.
11:50 pdcawley r: say ;.perl
11:50 camelia rakudo d9f8d6: OUTPUT«␤»
11:51 pdcawley r: say (1,2;3,4).perl
11:51 camelia rakudo d9f8d6: OUTPUT«WARNINGS:␤Useless use of "," in expression "1,2" in sink context (line 1)␤(3, 4)␤»
11:51 jnthn shopping &
11:51 pdcawley ast: (1,2;3,4)
11:52 pdcawley Right. Need to go buy Earl Grey Tea.
11:52 pdcawley I shall be back - mind blown by how far P6 has come since I last looked :)
11:52 pdcawley And a pointer on how to contribute a zip/zipWith implementation would be handy for when I get back - even just a pointer to a webpage.
12:03 birdwindupbird joined #perl6
12:08 Mouq Am I right to think that I can have a role in it's own file (My/Role.pm) and then maybe use My::Role somehow?
12:08 Mouq s/it's/its/
12:12 colomon pdcawley!  \o/
12:12 colomon Mouq: yes
12:13 Mouq Awesomecoolness, thank you
12:13 * colomon has role ABC::Duration in lib/ABC/Duration.pm, so it even works.  ;)
12:23 masak moritz: just found this: http://lesswrong.com/lw/hmx/prisoners_dilemma_with_visible_source_code/ http://lesswrong.com/lw/hxy/prisoners_dilemma_tournament_results/ (haven't read it yet)
12:28 xenoterracide joined #perl6
12:29 timotimo GlitchMr: that error page is super cute!
12:29 timotimo i was able to build jakudo by supplying an absolute path to --with-nqp
12:29 timotimo thanks for the hint, whoever i have that from
12:31 dmol1 joined #perl6
12:42 cognominal joined #perl6
12:44 mtk joined #perl6
12:50 cognominal joined #perl6
12:57 FROGGS masak / jnthn: when nqp::sprintf passes the spectest suite and most of P5's sprintf tests, I am allowed then to use it for parrot backend too?
12:59 jnthn FROGGS: It'll pass more spectests on Parrot too then, 'cus it handles bigint better, iiuc?
13:00 FROGGS jnthn: that should be the case, yes
13:00 crab2313 joined #perl6
13:00 FROGGS right now I have a problem with the nqp test for it though, there is a testbigint repr, and it complains about get_integer() not being implemented...
13:01 jnthn FROGGS: Maybe a missing nqp::unbox_i somewhere?
13:02 domidumont joined #perl6
13:05 FROGGS I'll have a look... thank you!
13:18 coax75ohm joined #perl6
13:27 colomon FROGGS: Glad to see someone else hacking on sprintf.  :)
13:28 masak \o/
13:38 fridim__ joined #perl6
13:40 timotimo hm, can i assign to $/<something>? perhaps clear it?
13:40 jnthn no
13:40 timotimo i have a schlemiel-the-painter algorithm in my table parser right now
13:41 timotimo although that pretty much could be helped by moving one part into its own rule, i should probably really try that.
13:45 donaldh joined #perl6
13:50 * colomon has just received a complaint that his C++ code doesn't work with Visual C++ 6.0.  That's because the code uses features from ISO C++'98.  :(
13:51 timotimo :(
13:51 timotimo but vc++ 6 is pretty old now, too, isn't it?
13:53 geekosaur "and I can't view your web site in IE6"
13:55 TimToady heh: t/00-parrot/09-pir.t ............... skipped: This is not Parrot and cannot run PIR blocks
13:55 TimToady but it passes all the rest of the "parrot" tests
13:56 TimToady so maybe we need to pull some of those tests out of the "parrot" category into the "rakudo" category...
13:58 jnthn Yes, it's misnamed :)
13:58 jnthn Years of legacy there ;)
13:59 moritz shall we rename them to 00-pre-sanity ? :-)
13:59 tadzik unsanity
13:59 donaldh hi perl6 o/
14:00 jnthn Is there actually any real line between 00-* and 01-* tests?
14:00 masak hi, donaldh
14:00 jnthn I'm not sure there's any contemporary, interesting dividing line
14:01 TimToady eventually all the tests are sanity tests :)
14:01 jnthn Could just re-number and have 'em all in an 00-sanity or so
14:02 ruoso do junctions autothread in the jvm already?
14:02 * masak .oO( o.O-sanity )
14:02 jnthn ruoso: yeah
14:02 ruoso yay
14:02 jnthn ruoso: Well, thing we pass all the junction tests we do on Parrot at least :)
14:05 masak jnthn: autothread as in *actual threads*?
14:05 moritz that would be an interesting experiment
14:07 jnthn masak: no, that's not what autothread means
14:07 jnthn (to me, at least.)
14:07 ruoso ahhh
14:07 ruoso heh...
14:07 PacoAir joined #perl6
14:07 masak jnthn: I just saw the misunderstanding between you and decided to point it out. :)
14:07 jnthn I'm skeptical that most junction auto-threading would ever benefit from spreading the work over threads.
14:08 jnthn I mean, the synchronization overhead would dominate
14:08 diakopter *thank you*
14:08 diakopter finally someone who agrees with me
14:09 ruoso jnthn: my guess is that it will depend on how long you carry the junction
14:09 diakopter .. unless the junction were many thousands of items.. and it's spread only over as many threads as there are cores
14:09 jnthn It's same with hyperops; @ten-things >>+<< @ten-things is *never* worth tossing off to threads.
14:10 jnthn Unless your things are, like, huge matrices, and you overloaded + for matrix addition :P
14:12 domidumont joined #perl6
14:12 moritz hyper != autothread
14:13 moritz autothreading happens at call level, and you never know how expensive your calls are going to be
14:13 jnthn aye, but hyper does imply data parallelism.
14:13 ruoso it also depends on the cost of the operation
14:14 ruoso https://gist.github.com/anonymous/6257055
14:15 ruoso in this case, line 34, i create a junction with all the cells that may conflict with the current cell in the sudoku puzzle
14:15 ruoso the test itself is not trivial
14:16 ruoso so it would probably benefit from using extra threads
14:16 ruoso it already runs at more than 100% cpu (most likely because of the garbage collector that already runs in a different thread)
14:17 masak historically, it's one of those things where we have grown and learned over time as a community. so by the time hyperops were introduced it was all "ooh and we can just do everything in different threads", but these days we're like "it's a tradeoff, and it's often likely not to be worth the thread overhead".
14:18 ruoso maybe we need a pragma
14:18 jnthn The trick is finding good ways to decide if it is worth it.
14:18 jnthn And then providing a pragma to allow finder-grained control.
14:19 TimToady or race it both ways and see who wins the first time :)
14:20 masak to me it feels like a JIT thing, that would be based on statistics from actually running code.
14:20 TimToady feeds are much likelier to benefit from threading
14:20 ruoso or estimate the cost of the function being called to see if would be worth
14:21 TimToady and some lazy lists that can be turned into feeds
14:22 ruoso jnthn: how hard do you thikn it would be to make the change into using threads for an experiment?
14:25 * TimToady --> much needed shower &
14:26 jnthn ruoso: Well, the auto-threader is written in Perl 6 code and the synchronization primitives you need already exist...may have to add a pre-decl or so on Promise...
14:27 jnthn ruoso: You can even experiment with it outside of CORE.setting I think.
14:27 jnthn ruoso: Or do it as a module.
14:27 jnthn See Junction.pm
14:28 ruoso Ok. I'll take a look
14:38 Psyche^ joined #perl6
14:42 ruoso Interesting... for the sake of comparing performance, I used explicit async blocks, and now I got to a deadlock in the scheduler
14:43 ruoso because some jobs depend on other jobs which are not schedule because jobs in between did not get a chance to execute...
14:45 jnthn Yes, that's 'cus await and select aren't smart enough to yield back to the scheduler yet...
14:46 ruoso if you point me to the code that handles that I could try and implement it
14:46 jnthn It's all in Threading.pm
14:46 ruoso ok
14:46 jnthn It'll involve playing with the continuation stuff. :)
14:47 jnthn My first attempt failed, but I only spent 15 mins on it...
14:49 ruoso Is creating resumable control exceptions possible?
14:50 jnthn Hmm...if so, it's only to the degree that exception handlers run on the top of the stack, so a resumable exception is just something that doesn't unwind...
14:51 jnthn A control exception is needed somewhere in this, I suspect, but still need explicit use of the continuation ops too, like gather/take does
14:51 jnthn (See GatherIter.pm for more on that)
14:51 rindolf joined #perl6
14:51 jnthn We may wish to add another cont exception category, yield, or so.
14:52 ruoso I see something else that is missing, which is a way to tell the scheduler that the current thread is blocked and that it's waiting on something
14:53 jnthn Well, that's really the mechanism await and select are interested in.
14:54 jnthn That is, making them do the right thing is really a case of implementing what we're discussing, perhaps with a sufficiently extensible API.
14:55 benabik joined #perl6
14:57 ruoso Ok...
15:06 araujo joined #perl6
15:07 kbaker joined #perl6
15:14 ajr joined #perl6
15:23 EvanTeitelman joined #perl6
15:23 ruoso jnthn: is a Channel going to be a Promise? or are they different types?
15:23 ruoso if not, is there a base type for all "things that one may await on?"
15:25 tadzik a role may be more suitable
15:25 tadzik but yeah, that sounds like a good idea
15:25 tadzik and no, Channel is not going to be  a Promise
15:25 tadzik afaik :)
15:26 ruoso Yeah, I meant "base type" in a very loose sense... so yes, role makes more sense
15:26 JimmyZ trait!
15:26 JimmyZ is await
15:26 ruoso I think we may have to define that in order for me to implement the "blocked" state in the scheduler
15:27 JimmyZ is Promise
15:28 jnthn No, Channel isn't Promise
15:28 jnthn I could imagine Awaitable/Selectable roles
15:28 ruoso Selectable makes sense
15:29 ruoso since you are already reusing the "select" function
15:30 jnthn await operates on promises and channels also
15:31 tadzik Late :)
15:32 locsmif_ joined #perl6
15:32 moritz late await?
15:38 thou joined #perl6
15:42 dalek Heuristic branch merge: pushed 75 commits to nqp/make-install by donaldh
15:43 donaldh hurrah, I've finally found tuits again
15:43 tadzik \o/
15:45 berekuk joined #perl6
15:49 SamuraiJack_ joined #perl6
15:51 kaare__ joined #perl6
15:52 census joined #perl6
15:53 pdcawley joined #perl6
15:53 berekuk joined #perl6
15:56 SamuraiJack__ joined #perl6
16:12 dalek joined #perl6
16:46 |ChErOkY| joined #perl6
16:46 |ChErOkY| Hi
16:47 moritz hello
16:48 |ChErOkY| PacoAir, my friend :)
16:54 pdcawley joined #perl6
16:55 berekuk joined #perl6
17:04 donaldh rakudo Configure.pm uses a particular regex /^([\w:]+)=(.*)/ to filter nqp --show-config output
17:04 donaldh does anyone know why?>
17:06 geekosaur given the captures, I assume it's parsing the output so $1 is a variable and $2 its value
17:06 masak right.
17:07 masak it expects lines of that shape.
17:07 masak something like 'foo:bar:baz=42'
17:08 moritz grondilu: (re loop without curlies) the problem is that 'loop { }' is just a special case of 'loop (init; cond; increment) { ... }'. And in the general case, that would lead to two terms in a row if the curlies were omitted
17:08 masak and indeed, 'nqp --show-config' seems to output something like that.
17:08 geekosaur right, I figured that so I focused on the captures
17:08 masak moritz: ah -- that's a good reason to not have that. I almost got there, but I didn't finish the thought.
17:08 masak moritz++
17:09 moritz well, actually even with curlies it's TTIAR, but the requirements that the second term is surrounded by curlies gives it back some sanity
17:09 masak donaldh: interestingly, this one will fail the regex:
17:09 masak nqp::build-date=2013-07-06T21:41:05Z
17:09 masak because of the dash.
17:09 donaldh indeed
17:09 donaldh and jvm::runtime.jars
17:09 masak aye.
17:10 masak feels a bit odd to be listing cases like that as characters turn out to be allowed on the left side.
17:10 masak is there, like, a standard or something?
17:10 moritz maybe it should just be (\S+)=...
17:10 masak moritz: or ([^=]+)=
17:10 donaldh Looking at the output from parrot nqp, it looks like nqp::build-date is about the only victim
17:11 donaldh Yeah, I wondered about ^=
17:12 moritz [^\s=]+
17:13 masak aye.
17:14 * moritz tests a patch for it
17:18 araujo joined #perl6
17:19 SamuraiJack__ joined #perl6
17:30 ruoso Thinking about it... The "Promise" analogy works well for read operations, but gets slightly weird for write operations...
17:33 ruoso specifically, the term "result" is implicitly assuming read semantics
17:36 timotimo having just implemented the richards benchmark i don't really want to implement a proper scheduler for promises and friends
17:38 ruoso of course we could consider the result of a write operation to be simply the status of the write...
17:38 benabik joined #perl6
17:41 p5eval joined #perl6
17:42 jnthn ruoso: I didn't really see it in terms of reads and writes.
17:42 jnthn It's about a piece of asynchronous work that will eventually produce a result or an exception.
17:43 jnthn In a way, I guess promises and channels are mechanisms to avoid writes to shared memory.
17:43 ruoso well.. in that case, an exception is just a type of result, isn't it?
17:43 jnthn Yes.
17:43 ruoso Ok... in that case it makes sense
17:44 jnthn But we distinguish the cases.
17:44 ruoso I am thinking to have simply "has_result" as a fundamental introspection
17:45 jnthn Well, that's really just .satus == any(Kept, Broken)
17:45 jnthn *status
17:45 ruoso (which would be true whenever it was a success or a failure)
17:45 jnthn If we don't already have such a method, I can see it being useful
17:45 jnthn Though .completed would match the name channels have.
17:46 ruoso jnthn: the thing is that it needs to be a method to allow for lower-level implementations to decide
17:47 ruoso completed is also not the right one, because (specially in the case of channels) you may have more results later
17:48 jnthn completed on a channel means "no more results"
17:49 jnthn To send more results on a completed channel is an error.
17:49 jnthn To keep/break a Promise multiple times also is
17:49 jnthn So it fits nicely in that sense.
17:49 ruoso yes, but you may be unblocked with a few results before all results are available
17:49 ruoso so you need to be able to block/unblock several times
17:50 jnthn ah, I guess it's a ready/completed distinction.
17:50 jnthn hm, ready is cute, 'cus it means what it says, but it's like, read-y, like, you can read it :P
17:51 ruoso or writey
17:51 ruoso ;)
17:51 jnthn .oO( now somebody hits me on the head with an etymological dictionary and tells me that's where it came from... )
17:52 ruoso are we useing "is_foo" or just "foo"?
17:53 ruoso (as a convention, I mean)
17:54 arnsholt jnthn: Unfortunately it doesn't look like it =)
17:55 arnsholt 'Cause that would have been kinda neat
17:55 pdcawley joined #perl6
17:55 jnthn ruoso: Just foo
17:56 timotimo i put a piece of my grammar into a separate regex and made it b0rk :(
17:56 jnthn ruoso: has_blah is also kinda icky, which I why I was hunting for other things. I think for now I like .ready and .completed (which on a Promise mean the same).
17:56 jnthn arnsholt: Yeah...I'm sure there's been at least once a bad pun turned out to be the etymology of a word... :P
17:57 arnsholt Indeed =D
17:57 masak jnthn: what arnsholt said. "ready" seems to come from a ME word meaning "prompt", while "read" comes from Sanskrit.
17:58 ruoso jnthn: I think I may need to add a type to qualify the items in the scheduler's queue
17:59 ruoso and probably move the status enum to that type
17:59 jnthn That last bit sounds wrong
18:00 jnthn s/sounds/is/ :)
18:00 ruoso the secheduler need to be able to query the status for all the items in the queue
18:00 jnthn The type bit may make sense.
18:00 jnthn Hmmm
18:03 jnthn But that sounds more to me like the thing holding the scheduled item actually has a dependencies list and you want to just call .ready on each of those.
18:05 ruoso Hmm... that may make sense, so the scheduler would have to keep of everything by itself
18:06 ruoso and the control exception could contain enough data to allow for that...
18:07 ruoso I think you are right. This will encode less assumptions into the architecture, making it more future-proof
18:08 ruoso I think I don't even need a new type for the items in the queue...
18:10 donaldh joined #perl6
18:14 * [Coke] waves from the highway.
18:15 timotimo don't irc and drive!
18:17 masak maybe [Coke] is hitch-hiking.
18:17 Mouq joined #perl6
18:19 [Coke] the wife is driving. I remembered I had a hot spot on my phone.
18:20 timotimo you let the wifi drive?
18:20 benabik Maybe a little bit of ice will cool it off.  Remember to use a ziploc bag to keep the melt off the phone.
18:20 benabik Ooh, slides.  jnthn++
18:21 timotimo already seen them. they are recommended :)
18:21 masak they are indeed.
18:21 timotimo i was a bit blown away by how easy the parallelism stuff can be combined, that really is great
18:29 jnthn Composability is often undervalued in software design...
18:29 timotimo i've learnt to appreciate it through y'all
18:32 * masak winks and points to https://github.com/masak/workshop/blob/master/compose.md
18:33 timotimo "Two simple examples" and then three bullet points :)
18:34 masak oops -- fixing :)
18:34 jnthn Maybe the third one is a complex example :P
18:35 * masak .oO( composition is nice, but once-and-only-once isn't so bad either ) :P
18:35 masak fix'd. timotimo++
18:36 masak oh! CPAN is another really successful example of composition.
18:41 masak hoo, found this. interesting. http://www.existentialprogramming.com/2010/05/hole-for-every-component-and-every.html
18:41 masak "There is no such thing as a Component"
18:41 ruoso jnthn: I think I'll need a new thread to keep watching for blocked jobs to reinsert them to the queue as their blockers get ready...
18:47 jnthn Or just throw them into the queue main queue for now... :)
18:47 jnthn s:1st/queue//
18:48 eviltwin_b joined #perl6
18:48 ruoso the blocked ones?
18:50 GlitchMr rn: 09
18:50 camelia niecza v24-88-g1f87209: OUTPUT«Potential difficulties:â�¤  Leading 0 does not indicate octal in Perl 6; please use 0o9 if you mean that at /tmp/bG0aidKfSR line 1 (EOF):â�¤------> [32m09[33mâ��[31m<EOL>[0mâ�¤â�¤Â»
18:50 camelia ..rakudo d9f8d6: OUTPUT«Potential difficulties:â�¤    Leading 0 does not indicate octal in Perl 6; please use 0o9 if you mean thatâ�¤    at /tmp/gHv2_nIqpu:1â�¤    ------> [32m09[33mâ��[31m<EOL>[0mâ�¤    Leading 0 does not indicate octal in Perl 6; please use 0o9 if you mean thatâ�¤    at /tmp/gH…
18:50 jnthn ruoso: Yes; they'll come back around eventually and can be checked for not being blocked...
18:51 GlitchMr Uhm, why perl6 -e 'say 09;' says error two times?
18:51 masak GlitchMr: that's a bug. please submit.
18:55 GlitchMr https://rt.perl.org/rt3/Public/Bug/Display.html?id=119339
18:55 masak GlitchMr++
18:56 pdcawley joined #perl6
18:56 masak GlitchMr: the phrase "don't work" is generally taboo in bug reports.
18:56 GlitchMr sorry
18:56 masak GlitchMr: you should be talking about what you did, what you observe, and what you expected.
18:56 GlitchMr Null PMC access in get_string()
18:56 GlitchMr Sorry, I will next time.
18:56 masak right. that should be in there.
18:57 masak GlitchMr: the goal is to have enough information that the thing can be checked again later.
18:57 * masak adds this to the ticket
18:58 timotimo moritz: the link to "regular expressions" (masaks talk) has an url ending in ""
18:59 masak don't all strings end in "" ? :P
18:59 timotimo "didn't quite apply to much current work situation" probably should be "my" instead of "much"?
19:00 timotimo the "touching and thoughtful moments" link has no href
19:00 dalek rakudo/nom: 3aebcac | moritz++ | tools/lib/NQP/Configure.pm:
19:00 dalek rakudo/nom: [build] more permissive parsing of config keys
19:00 dalek rakudo/nom:
19:00 dalek rakudo/nom: donaldh++ and masak++ found out that the key "nqp::build-date" does
19:00 dalek rakudo/nom: not match the old regex, [\w:]+
19:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3aebcac81c
19:00 GlitchMr ~/c/panda (master) $ perl6 -e 'my $sock = IO::Socket::INET.new(host => "ipv6.google.com", port => 80); $sock.send("GET /lol HTTP/1.1\r\n\r\n"); say $sock.recv'
19:00 GlitchMr getaddrinfo failed: ipv6.google.com: Success
19:00 GlitchMr Am I doing something incorrectly?
19:01 GlitchMr Can I tell IO::Socket::INET to use IPv6?
19:01 masak moritz: nit: s/Moarvm/MoarVM/
19:01 moritz ChimeraVM :-)
19:02 jnthn :D
19:02 masak moritz: the link "touching and thoughtful moments" is empty.
19:03 moritz masak: yes, timotimo just said the same thing
19:03 moritz fixing now...
19:03 moritz fixed.
19:04 GlitchMr rn: my %hash is default<perfect>; say %hash<elem>
19:04 camelia niecza v24-88-g1f87209: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Trait default not available on variables at /tmp/VZHLPUhAy8 line 1:â�¤------> [32mmy %hash is default<perfect>[33mâ��[31m; say %hash<elem>[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting…
19:04 camelia ..rakudo d9f8d6: OUTPUT«perfect␤»
19:04 GlitchMr std: my %hash is default<perfect>; say %hash<elem>
19:04 camelia std c2215f0: OUTPUT«ok 00:00 43m␤»
19:06 timotimo i'm a bit annoyed that my table parsing regex doesn't work if i turn it from "regex" to "token"; i think that's because i rely on some backtracking somwehere :(
19:08 moritz masak++ timotimo++ # helping me improve my blog post
19:08 timotimo but i don't really know how to figure that out
19:08 timotimo moritz++ # for the original post
19:08 jnthn timotimo: Keep it as a regex. Now go through the quantifiers, adding a : after them, until you find the one where adding a : fails
19:09 timotimo ah, good tip, thanks!
19:10 timotimo do i want one : in the whole thing or keep adding more and more until only one (or perhaps multiple) non-:'d pieces?
19:11 jnthn A : on a quant means "don't backtrack on this one"
19:11 jnthn You could add it to half of them and do it bisect-style, maybe
19:11 jnthn Or maybe you have a sense for which it is :)
19:11 timotimo :)
19:11 masak moritz++ # blogging
19:12 timotimo i find it amusing how things like :my $foobar; have a : as starter and ; at the end
19:13 masak woolfy joked that I might "defect to Python". I just got an IndexError because I tried to assign to an element outside of an array.
19:13 masak so I guess I'm sticking with you lot. :P
19:13 geekosaur : helloworld forth love if honk then ;
19:13 masak geekosaur: :)
19:14 timotimo oh, i think i know what's going on
19:14 EvanTeitelman joined #perl6
19:14 moritz http://domm.plix.at/perl/2013_08_things_i_learned_at_yapc_europe_2013.html # another blog post about the YAPC
19:15 timotimo yes, yes; my columns are %'d with [\h+'|'?\h+]
19:15 timotimo that has some backtracking problems if | isn't in there, so i need to put in a little alteration and it should become backtrackless
19:17 timotimo although i need to make it match no less than 2 \h all in all, but that's very doable
19:19 masak moritz: nice!
19:23 dalek nqp/make-install: 28b58c0 | (Donald Hunter)++ | tools/build/ (2 files):
19:23 dalek nqp/make-install: Add install libdir into jvmconfig.properties
19:23 dalek nqp/make-install: review: https://github.com/perl6/nqp/commit/28b58c06b7
19:30 donaldh Does anyone else get intermittent out of memory errors when compiling NQP on JVM ?
19:30 donaldh Maybe it's an OSX thing
19:30 * jnthn hasn't seen that
19:31 * masak .oO( out-of-memory errors. all the cool kids do it. )
19:31 jnthn That explains why I don't get them :P
19:34 masak it's worth it for the rounded corners.
19:36 moritz the day after YAPC::EU was the one with the most visitors on irclog.perlgeek.de so far
19:49 * masak .oO( people backlogging? ) :P
19:51 moritz or people having unreliable connections, and thus prefering the logs over proper IRC?
19:56 pdcawley joined #perl6
19:57 jaffa4 joined #perl6
19:57 jaffa4 hi
19:57 jaffa4 Is there labels in JVM Rakudo version?
19:57 GlitchMr r: label: say "no"
19:57 camelia rakudo 3aebca: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nOIyyhpULOâ�¤Two terms in a rowâ�¤at /tmp/nOIyyhpULO:1â�¤------> [32mlabel[33mâ��[31m: say "no"[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤  â€¦
19:58 GlitchMr This is Parrot version, but JVM runs mostly the same code, so no.
19:58 jaffa4 std: labelL sat 'hello'
19:58 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared routines:â�¤        'labelL' used at line 1â�¤        'sat' used at line 1â�¤Check failedâ�¤FAILED 00:00 42mâ�¤Â»
19:58 jaffa4 std: label: sat 'hello'
19:58 camelia std c2215f0: OUTPUT«[31m===[0mSORRY![31m===[0m�Undeclared routine:� 'sat' used at line 1�Check failed�FAILED 00:00 42m�»
19:59 jaffa4 std: label: say 'hello'
19:59 camelia std c2215f0: OUTPUT«ok 00:00 42m␤»
20:02 stevan_ joined #perl6
20:04 colomon joined #perl6
20:06 dalek nqp/make-install: cd48fff | (Donald Hunter)++ | tools/build/gen-jvm-properties.pl:
20:06 dalek nqp/make-install: Added runtime.prefix to jvmconfig.properties
20:06 dalek nqp/make-install: review: https://github.com/perl6/nqp/commit/cd48fffc23
20:10 moritz jaffa4: no version of rakudo parses labels
20:11 donaldh https://github.com/rakudo/rakudo/pull/191
20:14 masak donaldh: looks good to me.
20:14 jaffa4 why not?
20:14 jaffa4 why not?
20:14 masak jaffa4: not yet implemented.
20:15 jaffa4 Oh my God!
20:16 dalek rakudo/nom: 7d24377 | (Donald Hunter)++ | / (4 files):
20:16 dalek rakudo/nom: Use configuration from nqp --show-config
20:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7d24377d56
20:16 dalek rakudo/nom: 41a2961 | (Donald Hunter)++ | /:
20:16 dalek rakudo/nom: Merge branch 'nom' of github.com:rakudo/rakudo into nqp-make-install
20:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/41a2961f92
20:16 dalek rakudo/nom: e063c1b | moritz++ | / (3 files):
20:16 dalek rakudo/nom: Merge pull request #191 from donaldh/nqp-make-install
20:16 dalek rakudo/nom:
20:16 dalek rakudo/nom: Make use of the JVM configuration properties provided by "nqp --show-config"
20:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e063c1b92f
20:16 moritz donaldh++
20:16 moritz jaffa4: quick, implement it! :-)
20:16 masak :D
20:16 masak just let the guy finish praying first.
20:16 jnthn moritz: um, I think the make-install branch in NQP had to be merged first ;)
20:17 jnthn "This is dependent on the make-install branch in nqp being merged first."
20:17 * moritz should read more carefully
20:17 masak jaffa4: for all I know, labels shouldn't be a hassle to parse. it's probably goto that people are wary of adding.
20:17 jnthn The parsing ain't the problem. It's the rest. :P
20:18 masak jaffa4: I for one would love to see 'next LABEL' in Rakudo.
20:18 moritz well, then we could at least parse, and give a nice NYI error message
20:18 masak right.
20:18 jnthn aye
20:18 jaffa4 involve me about the difficulties
20:18 moritz well, 'next' uses control exceptions
20:19 moritz so you need to set up the handlers to only catch the exceptions with the right label
20:19 dalek nqp: a620765 | (Donald Hunter)++ | tools/build/ (2 files):
20:19 dalek nqp: Restructured install layout to resemble parrot install layout.
20:19 dalek nqp: review: https://github.com/perl6/nqp/commit/a620765086
20:19 dalek nqp: 1f99742 | (Donald Hunter)++ | / (18 files):
20:19 dalek nqp: Merge remote-tracking branch 'origin/master' into make-install
20:20 jnthn moritz: That was the merge?
20:20 * jnthn tries it
20:20 moritz jnthn: yes
20:20 jaffa4 There is goto op in Qast ., right?
20:20 dalek joined #perl6
20:20 jnthn wrong
20:21 jnthn The tricky with goto is that it can cross block/routine boundaries...
20:21 masak ok, but there's a smaller bit of it that's easier to implement, yes?
20:21 jnthn I guess this stuff never bubbled up high enough on the todo list yet...
20:21 masak don't need to do it all at once...
20:22 jnthn Of all the things folks miss, goto is fairly far down the list :P
20:22 masak aye :)
20:22 masak but 'next LABEL' is fairly high... :)
20:22 moritz masak: I guess that 'next LABEL'/'last LABEL' and 'got LABEL' will be pretty much different beasts
20:22 jnthn ah
20:22 masak moritz: me too.
20:22 jnthn Yeah, those are rather different.
20:23 jaffa4 How can I print the qast tree?
20:23 moritz ./perl6 --target=past -e 'say 1 + 1' # iirc
20:23 moritz or maybe it's --target=ast
20:25 jaffa4 Where does it put the target?
20:26 pdcawley joined #perl6
20:27 jnthn donaldh: hmm, seems I get: jvm::runtime.jars value not available from install-jvm\nqp --show-config.
20:27 donaldh hmmm.
20:28 jnthn that's with a straight perl ConfigureJVM.pl in rakudo, after make install in NQP
20:28 moritz masak: http://www.pvk.ca/Blog/2013/06/23/bitsets-match-regular-expressions/
20:28 * moritz tests too
20:28 donaldh jnthn: with nqp in a subdir ?
20:28 * jnthn nukes his install-jvm directory
20:29 * donaldh is building master
20:29 jaffa4 jnthn: how to test perl6?
20:29 jaffa4 How do you view you the internal structures?
20:30 jnthn donaldh: Yeah, I have nqp subdir, in that I dod perl ConfigureJVM.pl --prefix=..\install-jvm
20:30 donaldh right
20:30 moritz does --prefix cope with relative paths?
20:30 jaffa4 I get no error message if I enter a bad target
20:31 moritz I know I have had trouble with that in the past
20:31 jaffa4 perl6.bat  --target=RRRRR -e "print 1"
20:31 jnthn oops
20:31 jnthn @java -Xmx512m -Xbootclasspath/a:$jar_dir\nqp-runtime.jar;C:\consulting\rakudo\install-jvm\languages\nqp\runtime\asm-4.1.jar;C:\consulting\rakudo\install-jvm\languages\nqp\runtime\jline-1.0.jar;C:\consulting\rakudo\install-jvm\languages\nqp\lib\nqp.jar -cp C:\consulting\rakudo\install-jvm\languages\nqp\lib nqp %*
20:32 jnthn donaldh: Note the $jar_dir in there :)
20:32 moritz so $jar_dir is not expanded
20:32 jnthn jaffa4: I can believe that... --target=ast is the most useful one
20:32 donaldh jnthn: yep.
20:32 donaldh In the windows case
20:33 jnthn donaldh: Trying a fix.
20:33 donaldh it's single quoted
20:33 donaldh no interpolation
20:33 donaldh missed that
20:34 moritz and rakudo's ConfigureJVM.pl:
20:34 moritz my $with_nqp    = $options{'with-nqp'} ||
20:34 moritz ($^O eq 'MSWin32' ? 'install-jvm\\nqp' : 'install-jvm/nqp');
20:34 moritz should that be install-jvm/bin/nqp now?
20:34 jnthn yeah
20:34 * moritz fixes it
20:34 donaldh moritz++ good catch.
20:34 jnthn I was gonna come to that next. :)
20:35 jnthn At least --with-nqp=... now works :)
20:35 dalek rakudo/nom: 7a2d8aa | moritz++ | ConfigureJVM.pl:
20:35 dalek rakudo/nom: fix default path for NQP binary
20:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7a2d8aa8b9
20:35 * donaldh is about to look at --gen-nqp
20:35 jnthn \o/
20:35 dalek nqp: 8d32819 | jnthn++ | tools/build/install-jvm-runner.pl:
20:35 dalek nqp: Fix thinko in Win32 runner generation.
20:35 dalek nqp: review: https://github.com/perl6/nqp/commit/8d32819e53
20:35 moritz \o/ indeed
20:36 jnthn This will make stuff easier for everyone :)
20:36 jnthn Aww, make doesn't work, though
20:36 jnthn (In Rakudo)
20:37 jnthn hmm
20:37 jnthn NQP_PREFIX = ..install-jvm
20:37 jnthn That looks...odd
20:37 jnthn Getting rid of the .. fixes things
20:37 moritz missing slash, missing rel2abs?
20:38 jnthn Well, ./install-jvm or so would be right
20:38 jnthn .. is not
20:39 moritz well, the problem seems to be that you passed a relative path to --prefix, and there's no logic to either make it absolute, or deal with relative paths
20:41 masak moritz: looks very interesting.
20:42 dalek nqp: 3246de8 | moritz++ | ConfigureJVM.pl:
20:42 dalek nqp: always turn --prefix into an absolute path
20:42 dalek nqp: review: https://github.com/perl6/nqp/commit/3246de8cd6
20:42 moritz jnthn: ^^ that should help
20:43 jnthn Will try. Anyway, yeah, it's wrong in the --show-config output...
20:43 pdcawley joined #perl6
20:48 jnthn moritz: um...whoa
20:48 jnthn the \rakudo ended up with the \r getting interpolated somewhere?!
20:48 masak o.O
20:49 moritz wtf.
20:49 jnthn yeah, it's wrong in the --show-config output. Rather upsets the terminal too!
20:50 jnthn It is absoluting it
20:50 jnthn I guess the error is elsewhere.
20:50 moritz but it built?
20:51 jaffa4 what is this op locallifetime?
20:51 moritz (nqp, that is)
20:51 jnthn moritz: not Rakudo, no...
20:51 jnthn oh, I might be able to guess where this is going...
20:52 jaffa4 Where is it going jnthn?
20:52 jnthn um, no, I can't guess
20:53 jnthn donaldh: How do the properties end up in the JAR?
20:53 jnthn donaldh: Is the jvmconfig.properties file name treated specially?
20:53 * jnthn was expecting to find it being spat out in a double-quoted string... :)
20:54 donaldh nope. gen-jvm-properties.pl is run twice in Makefile. Once for build env and once into bin/ which gets JARed up with the classes.
20:54 jnthn bin/jvmconfig.properties looks right so it must go wrong sometime after this...
20:55 jnthn Could something be interpreting the backslash sequences at some point?
20:55 * moritz has a runnable, installed rakudo-jvm o/
20:56 donaldh jnthn: possibly. I tried to use platform specific slashes everywhere, but may have missed one.
20:56 donaldh jnthn: what is the output of nqp --show-config?
20:56 moritz well, if it's emitted into a double-quoted string somewhere, you need to double the backslashes
20:57 jnthn donaldh: jvm.properties is correct, but when I --show-config then the \r in c:\rakudo has been turned into a carriage return
20:58 jnthn donaldh: Which then makes it in to the Makefile and corrupts it
20:58 donaldh ah
20:58 jnthn Could the Properties class be doing it?
20:59 jnthn bah http://stackoverflow.com/questions/5784895/java-properties-backslash
21:00 jnthn "The method does not treat a backslash character, '\', before a non-valid escape character as an error; the backslash is silently dropped."
21:01 donaldh is there some badness in thugh
21:01 donaldh ugh even
21:02 jaffa4 what is this :before<ast>?
21:02 donaldh Where Java behaviour crashes into OS behaviour
21:03 jnthn donaldh: Trying a patch
21:03 donaldh Good catch jnthn++
21:03 jnthn jaffa4: Guess you're looking at an add_stage call or so? Just says where to insert something into the compiler pipeline.
21:03 jnthn donaldh: Yes, took a little chasing to see where it was going wrong :)
21:04 jaffa4 jnthn : I mean the syntax
21:04 moritz jnthn: it's a pair
21:04 donaldh jnthn: I've been bitten by this Properties behaviour before. I should have known. Oh well.
21:04 jnthn moritz: you meant jaffa4? :)
21:05 jnthn jaffa4: Same as before => 'ast'
21:05 moritz yes
21:06 dmol joined #perl6
21:06 jnthn ok, now I get a Makefile that makes sense :)
21:07 stevan_ joined #perl6
21:07 dalek perl6-roast-data: 2de4b71 | coke++ | / (5 files):
21:07 dalek perl6-roast-data: today (automated commit)
21:07 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/2de4b716a7
21:07 donaldh Another approach would  be to always use forward slashes in the properties file and translate to Windows backslashes before printing.
21:10 moritz donaldh: that only works if all properties are paths. Are they?
21:10 * moritz doesn't know anything about those properties
21:11 donaldh moritz: good point
21:12 donaldh maybe we should double backslash on the way into the properties file, so it is a valid file.
21:13 dalek nqp: 5f7b3da | jnthn++ | tools/build/gen-jvm-properties.pl:
21:13 dalek nqp: Ensure backslashes in props file aren't mangled.
21:13 dalek nqp: review: https://github.com/perl6/nqp/commit/5f7b3da54e
21:13 jnthn With that, I get a successful Rakudo build
21:13 donaldh indeed, that is jnthn++ fix
21:13 moritz \o/
21:13 moritz jnthn: and does it install? :-)
21:14 jnthn yes, and I can run it from outside of the build directory
21:15 jnthn donaldh++, moritz++
21:15 masak hm, who and what was blocking on an installable rakudo-jvm?
21:15 masak evalbot, right?
21:15 donaldh panda
21:15 jnthn And Panda and... :)
21:15 donaldh I'm just cleaning up a patch for %*CUSTOM_LIB which panda also needs
21:16 moritz masak: evalbot doesn't really block on installable, it can chdir into a dir before evaling
21:16 masak huh. someone said it blocked on it.
21:16 donaldh Panda also wants chdir which would need faked on JVM. Might be easier to remove chdir from panda
21:17 abnorman joined #perl6
21:17 fridim__ joined #perl6
21:18 [Coke] let me know when panda works, I'll make the daily star run do both pvm and jvm
21:19 jnthn [Coke]++
21:21 araujo joined #perl6
21:21 timotimo hm, is there .comb(regex, :match) in nqp? :|
21:22 jnthn timotimo: no, but match with :g may get you all the things that match
21:24 timotimo oof. i think i'll need to find a differen tway
21:24 timotimo i'm about to match columns with two regexes, one covering the "don't have two or more spaces" and one "are there openers and closers for Pod6 formatting codes?"
21:24 timotimo and then i'd & them
21:25 timotimo doesn't sound like i'll exit that piece of code with my brain intact
21:29 * donaldh reminds himself that cross-platform build and install scripts are always challenging
21:31 donaldh jnthn++ for golfing and patching my broken Windows implementation of nqp jvm properties
21:32 jaffa4 Is nqp upward compatible with Perl 6 completely?
21:32 jnthn jaffa4: no
21:32 jnthn Mostly, but not completely.
21:35 jaffa4 Are you going to London Workshop?
21:36 timotimo oh my, i still need to get reservations and accomodation for frankfurt! /o\
21:36 jnthn Not sure yet
21:38 diakopter ... what's in frankfurt
21:38 timotimo a nqp&rakudo development workshop/learning session hosted by jnthn
21:38 diakopter oh yeah :)
21:40 timotimo oh my. the train journey from my home to salzburg is 5.5h long :o
21:40 Ulti jnthn: is that a photo of Gruyère in one of your YAPC talks?
21:41 diakopter the flight back from frankfurt was 12.5 hours O_O
21:41 timotimo diakopter: well, i'm not used to traveling
21:41 xenoterracide joined #perl6
21:42 jaffa4 everything travels... into the future at least
21:42 jaffa4 we are all time-travellers
21:42 timotimo okay, travels anywhere far from parallel to the time axis - at least relative to the earths crust
21:44 colomon joined #perl6
21:44 diakopter er, 11.5 hours
21:50 jaffa4 Is it going to be recorded?
21:54 timotimo hm. bedtime. today doesn't seem to be helping me progress
21:56 jaffa4 Why is there my in the  statement_control: in the grammar?
21:57 timotimo are you wondering about the general syntax of the :<...>?
21:58 jaffa4 no
21:58 timotimo k
21:58 yannickberthoud joined #perl6
21:59 jaffa4 I am looking at the Perl6 grammar and to see how it is structured....
22:06 jnthn Ulti: Yes. I went there and ate some tasty cheese :D
22:14 fridim__ joined #perl6
22:15 Ulti jnthn: me too :D but not recently, I went to a place on the right in that photo for fondue
22:15 donaldh https://github.com/rakudo/rakudo/pull/192
22:17 [Coke] .seen lizmat
22:17 yoleaux I saw lizmat 16 Aug 2013 08:07Z in #perl6: <lizmat> decommuting&
22:17 preflex yoleaux: you have 2 new messages. '/msg preflex messages' to read them.
22:17 [Coke] ZOMG.
22:18 donaldh is that the bots chatting ?
22:19 geekosaur ...right, i was going to contact mauke about that. >.>
22:21 mauke joined #perl6
22:22 diakopter .seen mauke
22:22 yoleaux I haven't seen mauke around.
22:22 mauke preflex: seen mauke
22:22 preflex mauke was last seen 1 minute and 5 seconds ago, saying: <private message>
22:25 jnthn Ulti: Ah, I did some vacation in Switzerland this summer :)
22:26 jnthn donaldh: Is that patch tested on Parrot also, ooc?
22:27 donaldh jnthn: good point, I did originally, but not after todays merge up.
22:27 Ulti jnthn: did you do the nice walk from Zermatt to the Matterhorn too?
22:28 jnthn Ulti: Was staying a bit of a distance from Zermatt, so only had time for a bit of walking there. Discovered I probably want to stay in that part of Switzerland some time in the future to explore it properly. :)
22:30 jnthn donaldh: Do you have chance to test it, or should I?
22:30 donaldh jnthn: doing it now
22:31 jnthn donaldh++
22:37 masak 'night, #perl6
22:43 donaldh jnthn: there are no spec tests for CUSTOM_LIB. Is build + make test + sanity check sufficient ?
22:44 jnthn donaldh: yeah, was worried about build fail
22:44 dalek rakudo/nom: 97dec7a | (Donald Hunter)++ | / (2 files):
22:44 dalek rakudo/nom: Resurrected %*CUSTOM_LIB on JVM.
22:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/97dec7ab81
22:44 dalek rakudo/nom: aab3d78 | jonathan++ | / (2 files):
22:44 dalek rakudo/nom: Merge pull request #192 from donaldh/custom-lib
22:44 dalek rakudo/nom:
22:44 dalek rakudo/nom: Resurrected %*CUSTOM_LIB on JVM.
22:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aab3d78a32
22:46 jnthn 'night, #perl6
22:46 colomon \o
22:46 donaldh night jnthn o/
22:56 araujo joined #perl6
22:58 cognominal joined #perl6
23:17 colomon joined #perl6
23:27 dalek nqp: 4c00cda | (Donald Hunter)++ | ConfigureJVM.pl:
23:27 dalek nqp: Use Cwd::realpath instead of rel2abs because rel2abs doesn't work
23:27 dalek nqp: review: https://github.com/perl6/nqp/commit/4c00cda013
23:27 BenGoldberg joined #perl6
23:33 berekuk joined #perl6
23:33 sorear o/
23:33 berekuk joined #perl6
23:35 [Coke] ö/
23:41 berekuk joined #perl6
23:45 Ben_Goldberg joined #perl6
23:51 berekuk joined #perl6
23:52 colomon joined #perl6
23:56 Urchin[emacs] joined #perl6
23:56 Ben_Goldberg .ud require Sayings::Wise;
23:56 yoleaux ENOTFOUND

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

Perl 6 | Reference Documentation | Rakudo