Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-09-03

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:00 diakopter japhb: ^ that's a long time from now
00:00 japhb timotimo: Yeah, that's an irssi fail.  xchat-gnome was smart enough to highlight any fallback variant of your nick.
00:00 japhb_ botsnack
00:00 yoleaux 2 Sep 2014 00:34Z <timotimo> japhb_: I'm still wondering why the benchmark plots don't disappear when there is 0 data at all, like the non-nqp-implemented benchmarks in a pure-nqp-comparison
00:00 yoleaux 2 Sep 2014 00:37Z <timotimo> japhb_: i wonder when it'll be time to re-implement the perl5 portions of p6bench in pure perl6 :)
00:00 yoleaux 2 Sep 2014 14:45Z <brrt> japhb_: i'm back (for 45 minutes or so)
00:01 timotimo .in 5d ermergerd blergperst!
00:01 yoleaux timotimo: I'll remind you on 8 Sep 2014 00:01Z
00:01 japhb_ Gah, 3 missed messages.
00:01 timotimo maybe yoleaux can be taught some nicks belong to the same person?
00:01 * japhb_ wonders if yoleaux can be taught how to detect nicks owned by the same human, since registering a nick allows that.
00:02 japhb_ heh
00:02 timotimo %)
00:03 diakopter .wa japhb
00:03 timotimo japhb_: have you thought about where a functionality to run a single scale of all benchmarks in a row, perhaps without swallowing the output?
00:03 yoleaux diakopter: Sorry, that command (.wa) crashed.
00:03 timotimo so that i can a) verify nothing crashes, b) extract spesh and/or jit logs and/or profiles
00:04 diakopter .wa timotimo
00:04 yoleaux Timothy (male given name): Information for US births: rank: 125th; fraction: 1 in 663 people (0.15%); number: 3016 people per year (US data based on 2013 births and other SSA registrations in the US); Estimates for current US population: expected total number alive today: 980815 people; expected population fraction: 1 in 245 people (0.41%); expected rank: 32nd; most common age: 51 years; (using standard US mortality data)
00:04 diakopter .wa TimToady
00:04 japhb_ OK, second question first: It'll be time to do the reimplementation of timeall when I trust timing results from Rakudo as much as I do from perl5.  Which will be a while, I think.  And reimplementing analyze will basically wait until parsing JSON is as fast in Rakudo as it is in perl5.
00:04 yoleaux Timothy (male given name): Information for US births: rank: 125th; fraction: 1 in 663 people (0.15%); number: 3016 people per year (US data based on 2013 births and other SSA registrations in the US); Estimates for current US population: expected total number alive today: 980815 people; expected population fraction: 1 in 245 people (0.41%); expected rank: 32nd; most common age: 51 years; (using standard US mortality data)
00:05 chenryn joined #perl6
00:05 timotimo .tell brrt i wonder why i didn't get any inlines at all in the previous instance i tried it, but now i do see inlines show up in the jitlog. maybe it only shows inlines if it has deopt points nearby?
00:05 yoleaux timotimo: I'll pass your message to brrt.
00:05 japhb_ timotimo: I'm not sure what you mean about the single scale of all benchmarks in a row.  (The first interpretation of that question that comes to mind makes no sense, so clearly I'm reading it wrong.)
00:06 timotimo aye, phrasing that wasn't easy %)
00:06 timotimo i'd like for the bench utility to run every benchmark a single time, but not start at the lowest scaling
00:08 japhb As for empty plots not disappearing, --skip-incomplete may get you what you want
00:08 timotimo didn't last time i tried it :(
00:09 japhb timotimo: Given how widely varying the scaling starting points are, how do you propose to choose the scaling they run at?  A fixed number of increments above the starting scale?  (E.g. running at 3 increments above would make a test with scale => 1 << 7 start at 1 << 10)
00:09 japhb timotimo: Hmmm, that's odd.
00:09 timotimo i thought so, too :)
00:09 timotimo let me retry that
00:10 bjz joined #perl6
00:10 japhb TBH, I may not have tested it with 'bench --format=html_plot compare' but rather with 'bench --format=html_plot history'
00:10 japhb So it may never have worked for standard comparison plots.  :-(
00:11 japhb Or to be more precise, bench --format=html_plot --skip-incomplete compare'
00:12 japhb GAH, you know what I mean.
00:13 diakopter .gcs "japhb" "TimToady"
00:13 yoleaux [site] "japhb" (121,000), "TimToady" (50,200)
00:13 timotimo :)
00:13 mberends joined #perl6
00:13 timotimo i just found out what i've been doing wrong with bindattrs_* and getattrs_*
00:13 diakopter .gc mberends
00:13 timotimo one of these "how could that ever have worked?!" pieces
00:13 yoleaux 13,200 (site), 1,420 (api)
00:16 * japhb wonders how the heck he ended up with a higher gcs than TimToady, and suspects complete the results are complete BS
00:17 japhb s:1st/complete //
00:17 timotimo gcs?
00:17 japhb timotimo: diakopter's query from a few minutes ago
00:19 timotimo yeah, but what is "gcs"?
00:20 japhb http://dpk.io/yoleaux, upper left section (Google)
00:21 timotimo aah, it's like "google fight"
00:29 timotimo .chars box
00:29 yoleaux ⌧ ⍽ ⎸ ⎹ ␣ ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏ ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟ ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯ ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿ ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏ ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟ ╠ ╡ ╢ ╣ ╤ ╥  …
00:29 yoleaux ╦ ╧ ╨ ╩ ╪ ╫
00:29 timotimo i didn't know this command and it's definitely useful!
00:35 chenryn joined #perl6
01:00 nick_____ so otter i believe that it would be an nice mascot https://speakerdeck.com/stevan_littl​e/perl-is-not-dead-it-is-a-dead-end
01:02 FROGGS_ joined #perl6
01:10 avuserow joined #perl6
01:13 dayangkun joined #perl6
01:27 avuserow joined #perl6
01:38 dj_goku_ ggoebel1111112: kind of reminds me of: http://www.nand2tetris.org
01:49 grondilu joined #perl6
01:51 nbrown__ joined #perl6
01:55 grondilu so normally we can define a class in its own file by starting with 'class Foo;' but if Foo is supposed to derive from an other role/class, how can we declare it?  where to put the 'use Bar'?
01:55 grondilu oh I can just write 'use Bar; class Foo is Bar;' apparently
01:57 grondilu (it's a bit redundant if you ask me)
01:59 chenryn joined #perl6
02:03 noganex_ joined #perl6
02:18 Alula_ joined #perl6
02:22 nbrown__ joined #perl6
02:25 grondilu m: class A { method WHICH { rand } }; my %h{A} of Real;  # this works fine
02:25 camelia rakudo-moar 41d7f7: ( no output )
02:25 grondilu m: class A { method WHICH { rand } }; class B { has %h{A} of Real }  # this doesn't
02:25 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/IhKV4fk0Yx�Cannot call 'trait_mod:<of>'; none of these signatures match:�:(Mu:U $target, Mu:U $type)�:(Routine:D $target, Mu:U $type)�:(Variable:D $v, Any |c)�:(Variable:D $v, Mu:U $of)�…»
02:26 BenGoldberg m: class A { method WHICH { rand } }; class B { has (%h{A} of Real) };
02:26 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/FD3amJLb68â�¤Unable to parse expression in declarator; couldn't find final ')' â�¤at /tmp/FD3amJLb68:1â�¤------> [32mthod WHICH { rand } }; class B { has (%h[33mâ��[31m{A} of Real) };[0mâ�¤    e…»
02:33 TimToady m: class A { method WHICH { rand } }; class B { has Real %h{A} }
02:33 camelia rakudo-moar 41d7f7: ( no output )
02:33 TimToady just doesn't like the 'of' form for some reason
02:34 TimToady mind you, you'll have a hard time looking up any number in that hash
02:37 TimToady m: m: class A { method WHICH { rand } }; my Real %h{A}; %h{42} = "hi there"; say %h{42};  # maybe this works
02:37 camelia rakudo-moar 41d7f7: OUTPUT«cannot stringify this␤  in method assign_key at src/gen/m-CORE.setting:10054␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:2799␤  in block <unit> at /tmp/38DGe8Yq30:1␤␤»
02:37 TimToady m: m: class A { method WHICH { ~rand } }; my Real %h{A}; %h{42} = "hi there"; say %h{42};  # maybe this works
02:37 camelia rakudo-moar 41d7f7: OUTPUT«cannot stringify this␤  in method assign_key at src/gen/m-CORE.setting:10054␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:2799␤  in block <unit> at /tmp/5XMdiswfEv:1␤␤»
02:43 grondilu "hard time looking up any number" because of the rand?  I put it just for an example.  Since A has to be a custom class to produce the bug.
02:43 _thou joined #perl6
02:43 grondilu m: class B { has %h{Int} of Real }
02:43 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MyaxutE6_U�Cannot call 'trait_mod:<of>'; none of these signatures match:�:(Mu:U $target, Mu:U $type)�:(Routine:D $target, Mu:U $type)�:(Variable:D $v, Any |c)�:(Variable:D $v, Mu:U $of)�…»
02:43 grondilu ah no.  My bad
02:44 * grondilu has to admit he does not fully understand the difference between 'my Real %h{Foo}' and 'my %h{Foo} of Real'
03:04 telex joined #perl6
03:41 xenoterracide how do I print to stderr
03:44 TimToady note is the simplest
03:46 TimToady $*ERR.print and such
03:50 xenoterracide TimToady: ty
04:04 rindolf joined #perl6
04:05 dayangkun joined #perl6
04:08 kaare_ joined #perl6
04:08 grondilu std: class A does Numeric { }; multi infix:<==>(A $, A $) { False }; say A != A;'
04:08 camelia std 53b3ca6: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse single quotes at /tmp/Gi_UUCAOyL line 1:�------> [32mix:<==>(A $, A $) { False }; say A != A;[33m�[31m'[0m�Couldn't find final "'"; gave up at /tmp/Gi_UUCAOyL line 1 (EOF):�------> [32mx:<==>(A $, A $)…»
04:08 grondilu std: class A does Numeric { }; multi infix:<==>(A $, A $) { False }; say A != A;
04:08 camelia std 53b3ca6: OUTPUT«ok 00:01 130m␤»
04:08 grondilu m: class A does Numeric { }; multi infix:<==>(A $, A $) { False }; say A != A;
04:08 camelia rakudo-moar 41d7f7: OUTPUT«use of uninitialized value of type A in numeric context  in block <unit> at /tmp/KuWR6fbevG:1␤␤use of uninitialized value of type A in numeric context  in block <unit> at /tmp/KuWR6fbevG:1␤␤False␤»
04:08 grondilu n: class A does Numeric { }; multi infix:<==>(A $, A $) { False }; say A != A;
04:08 camelia niecza v24-109-g48a8de3: OUTPUT«Potential difficulties:â�¤  &infix:<==> is declared but not used at /tmp/dIKGt1pz8D line 1:â�¤------> [32mass A does Numeric { }; multi infix:<==>[33mâ��[31m(A $, A $) { False }; say A != A;[0mâ�¤â�¤Use of uninitialized value in numeric contextâ�¤â€¦Â»
04:09 grondilu n: class A does Numeric { }; multi infix:<==>(A $, A $) { False }; say A.new != A.new;
04:09 camelia niecza v24-109-g48a8de3: OUTPUT«Potential difficulties:â�¤  &infix:<==> is declared but not used at /tmp/TOiCjjkPDl line 1:â�¤------> [32mass A does Numeric { }; multi infix:<==>[33mâ��[31m(A $, A $) { False }; say A.new != A.new[0mâ�¤â�¤Unhandled exception: Cannot use value lik…»
04:10 grondilu m: class A does Numeric { }; multi infix:<==>(A $, A $) { False }; say A.new != A.new;
04:10 camelia rakudo-moar 41d7f7: OUTPUT«(signal )»
04:10 sidewinder27 joined #perl6
04:11 grondilu for &infix:<!=>, isn't there a fallback to &infix:<==> in Numeric?
04:12 grondilu (line 301 in Numeric.pm)
04:17 raiph joined #perl6
04:28 xenoterracide class Logger does LoggerDebug does LoggerInfo (what's the shorter version of this?)
04:32 _thou joined #perl6
04:36 xenoterracide https://gist.github.com/xenot​erracide/7cf9a94e953a7226b929 is my use of requires correct here? also private works like this right?
04:40 * grondilu thinks it's 'require' not 'requires'
04:41 grondilu std: require Foo;
04:41 camelia std 53b3ca6: OUTPUT«ok 00:01 121m␤»
04:41 grondilu std: requires Foo;
04:41 camelia std 53b3ca6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Undeclared name:â�¤    'Foo' used at line 1â�¤Undeclared routine:â�¤       'requires' used at line 1â�¤Check failedâ�¤FAILED 00:01 121mâ�¤Â»
04:44 xenoterracide so no need for the quotes either?
04:45 xenoterracide std: require log();
04:45 camelia std 53b3ca6: OUTPUT«ok 00:01 123m␤»
04:46 xenoterracide std: require log( Str:D $message );
04:46 camelia std 53b3ca6: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/sXItFxOqCw line 1:â�¤------> [32mrequire log( Str:D [33mâ��[31m$message );[0mâ�¤    expecting any of:â�¤      infix or meta-infixâ�¤    infixed functionâ�¤       statement modifier loopâ�¤Parse failedâ�¤FAILED 00:…»
04:49 chenryn joined #perl6
04:58 grondilu if you want to assert that your role "requires a method", you just stub it.
04:58 grondilu role Logger { method log {...} }
04:58 grondilu or something like that
05:00 grondilu 'require' is a variant of 'use', it has little to do with role, mixins and stuff.  It's about module importation.
05:00 grondilu S11:323
05:00 synopsebot Link: http://perlcabal.org/syn/S11.html#line_323
05:02 grondilu m: role A { method foo {...} }; class B does A { };
05:02 camelia rakudo-moar 41d7f7: OUTPUT«===SORRY!===␤Method 'foo' must be implemented by B because it is required by a role␤»
05:02 grondilu ^see?  rakudo tells you that B *must* implement foo
05:03 xenoterracide grondilu: oh right
05:16 SamuraiJack joined #perl6
05:27 [Sno] joined #perl6
05:49 xenoterracide joined #perl6
05:50 grondilu n: class A does Numeric {}; multi infix:<*>(A $, A $) { rand }; say A.new**2;'
05:50 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Bogus statement at /tmp/inUYvtSlYk line 1:�------> [32mix:<*>(A $, A $) { rand }; say A.new**2;[33m�[31m'[0m��Parse failed��»
05:50 grondilu std: class A does Numeric {}; multi infix:<*>(A $, A $) { rand }; say A.new**2;'
05:50 camelia std 53b3ca6: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse single quotes at /tmp/UALGYOzhoh line 1:�------> [32mix:<*>(A $, A $) { rand }; say A.new**2;[33m�[31m'[0m�Couldn't find final "'"; gave up at /tmp/UALGYOzhoh line 1 (EOF):�------> [32mx:<*>(A $, A $) …»
05:50 gfldex joined #perl6
05:50 grondilu std: class A does Numeric {}; multi infix:<*>(A $, A $) { rand }; say A.new**2;
05:50 camelia std 53b3ca6: OUTPUT«ok 00:01 130m␤»
05:50 grondilu n: class A does Numeric {}; multi infix:<*>(A $, A $) { rand }; say A.new**2;
05:50 camelia niecza v24-109-g48a8de3: OUTPUT«Potential difficulties:â�¤  &infix:<*> is declared but not used at /tmp/mpEeGO8whv line 1:â�¤------> [32mclass A does Numeric {}; multi infix:<*>[33mâ��[31m(A $, A $) { rand }; say A.new**2;[0mâ�¤â�¤Unhandled exception: Cannot use value like A as …»
05:51 dolmen joined #perl6
05:52 grondilu p: class A does Numeric {}; multi infix:<*>(A $, A $) { rand }; say A.new**2;
05:52 camelia rakudo-parrot 41d7f7: OUTPUT«maximum recursion depth exceeded␤current instr.: 'print_exception' pc 142790 (src/gen/p-CORE.setting.pir:61593) (gen/parrot/CORE.setting:11857)␤called from Sub 'Numeric' pc 232640 (src/gen/p-CORE.setting.pir:96683) (gen/parrot/CORE.setting:1058)␤ca…»
05:53 grondilu j: class A does Numeric {}; multi infix:<*>(A $, A $) { rand }; say A.new**2;
05:53 camelia rakudo-jvm 41d7f7: OUTPUT«(timeout)»
05:57 anaeem1_ joined #perl6
06:09 chenryn joined #perl6
06:11 mr-foobar joined #perl6
06:16 PZt joined #perl6
06:21 _thou joined #perl6
06:27 domidumont joined #perl6
06:32 dayangkun joined #perl6
06:35 darutoko joined #perl6
06:46 aindilis joined #perl6
06:49 dayangkun joined #perl6
06:51 sorear joined #perl6
06:57 kaleem joined #perl6
06:57 virtualsue joined #perl6
07:03 dayangkun joined #perl6
07:05 jaffa4 joined #perl6
07:05 jaffa4 hi
07:06 jaffa4 I have question concerning native call. Are callbacks supported?
07:06 moritz I think so, yes
07:07 moritz jaffa4: there's even a test file for callbacks in the NativeCall repo
07:07 jaffa4 The doc says they are going to be supporteed in the future
07:07 jaffa4 The doc says they are going to be supported in the future
07:09 moritz then probably the docs are out of date
07:10 jaffa4 zavolaj?
07:10 eternaleye joined #perl6
07:12 moritz zavolaj!
07:13 grondilu m: role A {}; class B does A {}; multi f(A $a, $x) { f($x, $a) }; multi f($x, B $b) { $x }; say f B, pi;'
07:13 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JZFqesm2LNâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/JZFqesm2LN:1â�¤------> [32m multi f($x, B $b) { $x }; say f B, pi;'[33mâ��[31m<EOL>[0mâ�¤    expectin…»
07:13 grondilu m: role A {}; class B does A {}; multi f(A $a, $x) { f($x, $a) }; multi f($x, B $b) { $x }; say f B, pi;
07:13 camelia rakudo-moar 41d7f7: OUTPUT«3.14159265358979␤»
07:14 grondilu role A { multi f(A $a, $x) is export { f($x, $a) } }; import A; class B does A {}; multi f($x, B $b) { $x  }; say f B, pi;'
07:14 grondilu m: role A { multi f(A $a, $x) is export { f($x, $a) } }; import A; class B does A {}; multi f($x, B $b) { $x  }; say f B, pi;'
07:14 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/j3jE0PGySPâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/j3jE0PGySP:1â�¤------> [32mmulti f($x, B $b) { $x  }; say f B, pi;'[33mâ��[31m<EOL>[0mâ�¤    expectin…»
07:14 grondilu m: role A { multi f(A $a, $x) is export { f($x, $a) } }; import A; class B does A {}; multi f($x, B $b) { $x  }; say f B, pi;
07:14 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/lZLRwlWz5râ�¤Calling 'f' will never work with argument types (B, Num)â�¤    Expected any of: â�¤    :(Any $x, B $b)â�¤at /tmp/lZLRwlWz5r:1â�¤------> [32mes A {}; multi f($x, B $b) { $x  }; say [33…»
07:15 fdd__ joined #perl6
07:15 grondilu n: role A { multi f(A $a, $x) is export { f($x, $a) } }; import A; class B does A {}; multi f($x, B $b) { $x  }; say f B, pi;
07:15 camelia niecza v24-109-g48a8de3: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method statement_control:import not yet implemented at /tmp/vMeb9Tv6vp line 1:�------> [32m $x) is export { f($x, $a) } }; import A[33m�[31m; class B does A {}; multi f($x, B $b) {[0m��Unhandled e…»
07:18 fdd__ hi could some one help me please I have no idea what I doing but I need to read a file x amount of pages long but I need to view page at a time. This code just makes it scroll off the screen in one go using putty http://justpaste.it/gxtw
07:18 fdd__ thnaks
07:19 grondilu what do you mean by "page"?
07:20 grondilu I guess it's a constant number of lines, right?
07:20 fdd__ well i dont want the whole file to scroll by in one go
07:21 fdd__ i want to hit enter and read it by page at a time
07:21 fdd__ so yes a number of lines would be good
07:21 fdd__ as long as I can move on to the next number when i press enter
07:21 grondilu then make a counter and do a prompt every n lines
07:23 fdd__ ok thank you that gives me some thing google
07:24 grondilu m: role A { multi f(A $a, $x) is export { $x } }; import A; class B does A {}; f B, pi;'
07:24 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/KWa__n0GBxâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/KWa__n0GBx:1â�¤------> [32m; import A; class B does A {}; f B, pi;'[33mâ��[31m<EOL>[0mâ�¤    expectin…»
07:24 grondilu damn it I always forget to remove the quote at the end
07:24 grondilu m: role A { multi f(A $a, $x) is export { $x } }; import A; class B does A {}; f B, pi;
07:24 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/X__lDE61n6â�¤Undeclared routine:â�¤    f used at line 1â�¤â�¤Â»
07:24 grondilu so, can't I import a multi??
07:25 grondilu m:  role A { sub f(A $a, $x) is export { $x } }; import A; f A, pi;'
07:25 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Qh9INtECEZâ�¤Unable to parse expression in single quotes; couldn't find final "'" â�¤at /tmp/Qh9INtECEZ:1â�¤------> [32m is export { $x } }; import A; f A, pi;'[33mâ��[31m<EOL>[0mâ�¤    expectin…»
07:25 grondilu m:  role A { sub f(A $a, $x) is export { $x } }; import A; f A, pi;
07:25 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ufK4QLtBtzâ�¤Undeclared routine:â�¤    f used at line 1â�¤â�¤Â»
07:26 grondilu m: class A { sub f(A $a, $x) is export { $x } }; import A; f A, pi;
07:26 camelia rakudo-moar 41d7f7: ( no output )
07:26 grondilu m: class A { sub f(A $a, $x) is export { $x } }; import A; say f A, pi;
07:26 camelia rakudo-moar 41d7f7: OUTPUT«3.14159265358979␤»
07:26 grondilu so importation works from a class but not from a role.  Isn't that a bug?
07:31 grondilu m: import (role { sub duh is export { "duh" } }) <duh>; say duh;
07:31 camelia rakudo-moar 41d7f7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Texobmqx5t�A symbol '&duh' has already been exported�at /tmp/Texobmqx5t:1�------> �»
07:41 zakharyas joined #perl6
07:49 moritz grondilu: roles are rather special/complicated
07:49 moritz does to roles actually being some sort of multi
07:49 moritz and a role not doing much until it's punned or applied
07:52 grondilu ok
07:54 virtualsue joined #perl6
07:55 yeahnoob joined #perl6
07:57 yeahnoob Someone can help with it? Please see http://stackoverflow.com/q/25638528/3132217
07:58 yeahnoob Processing a large text file with Perl6 , but it's running very slow. And I don't know why...
08:03 grondilu well for one, the idiomatic way to read a file line by line is 'for lines open "file" {...}'
08:03 grondilu $line.split(' ') is better written $line.words
08:04 grondilu it does not make sense to write "{%dict{$p1}} {$p2}".words;  You're concatenating and the split again?!
08:05 grondilu just write %dict{$p1} = (%dict{$p1}, $p2)
08:06 yeahnoob the code just make a dictionary from a text file
08:07 kjs_ joined #perl6
08:07 grondilu well:  my %dict; for lines open "file" { my ($a, $b) = .words; %dict{$a} //= $b }
08:08 yeahnoob for example  abc.txt = " a b \n c d\n a e\n a cc\n", it get a dictionary like "a-> b e cc"
08:09 grondilu oh
08:09 dayangkun joined #perl6
08:09 grondilu well:  my %dict; for lines open "file" { my ($a, $b) = .words; push %dict{$a}, $b }
08:09 dakkar joined #perl6
08:09 _thou joined #perl6
08:10 yeahnoob OK. i would try your code modification:)
08:20 yeahnoob Still running two slow...even after the modification.
08:20 grondilu open("file").lines.classify(*.words[0])
08:20 grondilu also:  perl6 --version
08:21 yeahnoob perl6 --version
08:21 yeahnoob This is perl6 version 2014.08 built on MoarVM version 2014.08
08:21 yeahnoob i have tried the 2014.04 / 2013.12 versions
08:22 yeahnoob the 2013.12 version coming from Ubuntu's package, and 2014.04 from the rakudo-star
08:25 yeahnoob confused...
08:26 grondilu 2014.08 on MoarVM is not far from the best there is.
08:27 anaeem1_ joined #perl6
08:30 sergot hi o/
08:37 yeahnoob Perl 5 code deal with it about 200ms...I have tried in the past day.  Really don't know why V6 running 20+sec, and still no finish.
08:38 tadzik Because it's slower in many cases
08:41 dalek perl6-most-wanted: 024137c | (Kamil Kułaga)++ | most-wanted/modules.md:
08:41 dalek perl6-most-wanted: HTML documentation like htmlify.p6
08:41 dalek perl6-most-wanted: review: https://github.com/perl6/perl6​-most-wanted/commit/024137cafd
08:41 kjs_ joined #perl6
08:47 anaeem1_ joined #perl6
08:54 ribasushi joined #perl6
08:57 fhelmberger joined #perl6
08:59 yeahnoob joined #perl6
09:11 pecastro joined #perl6
09:15 timotimo o/
09:16 FROGGS o/
09:17 yeahnoob o/
09:17 aindilis` joined #perl6
09:19 dolmen joined #perl6
09:21 domidumont joined #perl6
09:29 mr-foobar joined #perl6
09:33 denis_boyun joined #perl6
09:51 SamuraiJack joined #perl6
09:51 xinming_ joined #perl6
09:58 _thou joined #perl6
10:03 dayangkun joined #perl6
10:16 virtualsue joined #perl6
10:18 kjs_ joined #perl6
10:20 colomon wo\ah, 20+ new module fails overnight
10:26 colomon just tested, NativeCall is failing
10:26 colomon t/09-nativecast.t ...... 1/10
10:26 colomon # Failed test 'casting int * to CArray[uint32] works'
10:26 colomon # at t/09-nativecast.t line 12
10:26 colomon # expected: '1 2 3'
10:26 colomon #      got: '1'
10:27 dayangkun joined #perl6
10:27 mathw_ at least nativecall failing is a good reason for lots of other things to fail...
10:28 colomon mathw: NativeCall is pretty important these days!
10:28 mathw yes, still can't quite believe how easy it is too
10:29 mathw I need some ideas, my local perl mongers group are finally having a technical talks meeting and they want me to talk about Perl 6. I'm struggling to find the right sort of way in which shows them things which are beneficial to them instead of just different
10:30 sergot afaik it's because of this: https://github.com/rakudo/rakudo/commit/​bf4b469c1150459222ee5bff9eef426560f7ecba
10:30 sergot or...
10:31 sergot is it?
10:31 colomon Migfht be because of the reason that patch was needed?
10:31 colomon I'd be really surprised if that patch was the cause
10:32 timotimo what colomon said
10:33 sergot http://irclog.perlgeek.de/​perl6/2014-09-02#i_9283186
10:34 sergot colomon: yes, I was wrong
10:34 colomon sergot: good catch
10:35 sergot https://github.com/rakudo/rakudo/commit/ef380d29f9 maybe?
10:38 bjz joined #perl6
10:45 kjs_ joined #perl6
10:47 carlin panda's projects.json still not updating? :(
10:47 tadzik isn't it?
10:48 tadzik oh, starman was being stupid for some reason
10:48 carlin hasn't updated since August 27, according to the HTTP headers
10:48 tadzik :o
10:49 tadzik I poked the indexer
10:51 tadzik carlin: should be better now
10:51 carlin tadzik++ thanks
10:51 tadzik no idea what caused it though, I'll monitor if it breaks again
10:51 FROGGS[mobile] joined #perl6
10:52 kaleem joined #perl6
11:06 chenryn joined #perl6
11:15 jnthn .oO( wo\ah is a pretty alarm-ing exclamation... )
11:18 oetiker joined #perl6
11:19 jnthn mathw: What kind of audience is it aimed at?
11:19 jnthn mathw: Dunno if any of my recentish talks can be of some inspiration...
11:20 jnthn Does anybody know what happened to DESTROY in S12?
11:20 jnthn I went to familiarize myself with the API it wanted so I can help out nine++'s work, and found it seems to have vanished... :S
11:21 jnthn And the only recent history I could see was removing fossils related to it whihc suggests it somehow got removed long ago.
11:22 jnthn I guess somebody conflated "not timely" with "useless" :P
11:22 moritz jnthn: it looks to me that they were only specified as method DESTROYALL / submethod DESTROY
11:23 moritz jnthn: and then (more or less accidentally) removed
11:23 jnthn Oh...
11:23 jnthn So accidental. OK.
11:23 jnthn That makes me worry a bit less )
11:24 pmurias joined #perl6
11:24 pmurias won't the moment DESTROY is called be very implementation dependent?
11:24 jnthn pmurias: Yes.
11:25 jnthn pmurias: And it may not be called at all.
11:25 jnthn But that's likely 'cus the VM is shutting down, in which case anyting you're holding on to is about to go away also :)
11:26 jnthn Or at least, anything you're planning to do last-gasp cleanup of with DESTROY
11:31 * lizmat wonders it should be called DESTROY
11:32 lizmat as the semantics are different from P5
11:32 lizmat maybe CLEANUP would be better ?
11:33 nine What's the difference in semantics?
11:37 jnthn I think cleanup has the wrong nuance
11:38 jnthn It's more like an event, really
11:38 jnthn COLLECT or so
11:38 jnthn I dunno :)
11:38 jnthn I do know it's dinner time, though. :)
11:38 jnthn &
11:40 lizmat REAP ?
11:43 moritz REAPer, grim
11:44 carlin class Reaper is Grim does Reap
11:47 _thou joined #perl6
11:47 labster joined #perl6
12:00 flussence I see this DESTROY thing as more of an advisory hook into the GC - if something's important enough that it *needs* to always run at a specific time, you'd just write it as normal code.
12:04 yeahnoob joined #perl6
12:04 flussence otoh, a separate CLEANUP might be useful to have, so the GC can politely ask things like caching classes to trim themselves a bit...
12:09 yeahnoob Need Help Please..http://stackoverflow.com/q/25638528/3132217
12:09 yeahnoob Processing a large text file using Perl6. And it's running Very Very Slow.
12:11 flussence what does "perl6 -e 'say $*VM'" print on your system?
12:11 yeahnoob But it only cost less than 200ms with Perl 5, almost the same code.
12:12 yeahnoob i have tried JVM/MoarVM/Parrot
12:12 yeahnoob now its ouput is jvm(1.7)
12:13 yeahnoob output
12:13 yeahnoob ing a large text file using Perl6. And it's running Very Very Slow.
12:13 yeahnoob perl6 -e 'say $*VM'
12:13 yeahnoob jvm (1.7)
12:13 flussence what about  perl6-m -e 'say $*VM' ?
12:14 yeahnoob i don't build MoarVM on my PC.
12:15 yeahnoob So no perl6-m now. But i have tried MoarVM with perl6-m
12:15 FROGGS[mobile] yeahnoob: .get is very very slow, a grammar might be better there
12:16 colomon yeahnoob: %dict{$p1} = "{%dict{$p1}} {$p2}".words; strikes me as a VERY inefficient way to do that
12:16 yeahnoob i know its not a efficient code
12:16 yeahnoob i have modified it with some suggestion.
12:17 yeahnoob But no better result
12:17 yeahnoob Such as:
12:17 yeahnoob use v6;
12:17 yeahnoob my %dict;
12:17 yeahnoob for open('wordpairs.txt',:r).lines {
12:17 yeahnoob my ($key, $words) = .words;
12:17 yeahnoob push %dict{$key}, $words;
12:17 yeahnoob }
12:17 yeahnoob ## Test
12:18 yeahnoob Or:
12:18 yeahnoob ...
12:18 yeahnoob use v6;
12:18 yeahnoob my %dict;
12:18 yeahnoob my $a;
12:18 yeahnoob my $b;
12:18 yeahnoob for lines open "wordpairs.txt" {
12:18 yeahnoob ($a, $b) = .words;
12:18 yeahnoob push %dict{$a}, $b;
12:18 yeahnoob }
12:18 yeahnoob ## Test
12:18 FROGGS[mobile] dont paste here
12:18 FROGGS[mobile] please use a paste service
12:19 colomon yeahnoob: can you upload the wordpairs file somewhere so we can try wit hthat?
12:19 yeahnoob Sorry
12:19 mathw jnthn: competent, active Perl 5 developers. Most of them seem to do nothing but websites in it, so I'm not sure how enthused they'd be by your brilliant ones about asynchronous programming.
12:19 yeahnoob I host the whole thing at my github
12:19 FROGGS[mobile] I can reply to your stackoverflow question later when I'm at my pc... then I can propose a grammar
12:19 yeahnoob https://github.com/yeahnoob/perl6-perf
12:20 colomon yeahnoob: brill
12:20 yeahnoob Pre-Thanks for any answer:)
12:21 mathw jnthn: I might throw in something about NativeCall though, because last I checked you couldn't do it that easily in 5...
12:23 colomon yeahnoob: it's entirely possible the answer (at the moment) is just rakudo is slow.  but we can at least learn more about it….
12:25 yeahnoob Yes, it's maybe the rakudo's. The code work no problem with a small test.txt file
12:28 colomon yeahnoob: it takes almost two minutes to run on my Mac
12:30 colomon profiling now
12:32 yeahnoob en..it's not a reasonable time cost, which is 160ms with the same function Perl 5 test code on my PC.
12:36 colomon Hmm, just got it down to 51 seconds.
12:37 FROGGS[mobile] colomon: I bet I get it down to <5s
12:38 FROGGS[mobile] :p
12:38 colomon FROGGS[mobile]: with a grammar?
12:43 dayangkun joined #perl6
12:46 FROGGS[mobile] joined #perl6
12:47 FROGGS[mobile] colomon: aye
12:47 colomon FROGGS[mobile]: Trying now...
12:53 colomon I dunno, my first stab at a grammar seems painfully slow
12:54 colomon oooo, maybe not
12:56 FROGGS[mobile] it should be a pretty easy grammar (with actions)
12:57 FROGGS[mobile] I mean, lines and words... right?
12:57 colomon FROGGS[mobile]: pretty sure it wasn't the grammar that was painfully slow, it was the call to Match.gist
12:58 colomon My grammar can succesfully scan the file in 21 seconds.
12:58 FROGGS[mobile] ohh, true :o)
12:58 FROGGS[mobile] hmmm, how big is the file?
12:59 colomon 1.5 meg
12:59 colomon no, waitr, that was the profile output!
12:59 colomon 1,474,282 bytes
12:59 FROGGS[mobile] how many lines?
13:00 colomon 138,523
13:00 FROGGS[mobile] because we can 20k lines Perl 6 with a much more complex grammar in 35s on my box
13:00 colomon okay, that was 46 seconds to parse and count
13:00 _thou joined #perl6
13:02 * colomon should maybe start $working at some point....
13:03 FROGGS[mobile] please put it in a gist, I try to improve it in abit
13:04 colomon heh, 97% of the running time is the my <word-pair> rule.
13:04 telex joined #perl6
13:05 colomon http://www.harmonyware.com/file​s/profile-1409749387.0399.html
13:05 colomon half the running time is in prefix:<~>
13:06 FROGGS[mobile] where is the code? :o)
13:06 kaleem joined #perl6
13:07 colomon WHAT
13:07 guru joined #perl6
13:09 colomon one-third of the running time is going to join?!
13:09 FROGGS[mobile] can I see the grammar?
13:09 colomon got it down to 37 seconds
13:10 colomon https://gist.github.com/co​lomon/ce21bb3f199637814f00
13:10 colomon profiling that one now
13:11 colomon profile: http://www.harmonyware.com/file​s/profile-1409749880.50828.html
13:13 colomon hmmm
13:15 colomon 33 seconds
13:15 dalek rakudo/pod-fixes: 6ac67de | (Rob Hoelz)++ | src/Perl6/Grammar.nqp:
13:15 dalek rakudo/pod-fixes: Convert two more END-related things in POD parsing
13:15 dalek rakudo/pod-fixes:
13:15 dalek rakudo/pod-fixes: It's finish now
13:15 dalek rakudo/pod-fixes: review: https://github.com/rakudo/rakudo/commit/6ac67de59b
13:15 dalek rakudo/pod-fixes: 74fd61d | (Rob Hoelz)++ | src/Perl6/Grammar.nqp:
13:15 dalek rakudo/pod-fixes: Fix paragraph and abbreviated comments
13:15 dalek rakudo/pod-fixes:
13:15 dalek rakudo/pod-fixes: Except for table comments, that is
13:15 dalek rakudo/pod-fixes: review: https://github.com/rakudo/rakudo/commit/74fd61dbf4
13:15 Akagi201 joined #perl6
13:16 colomon new one https://gist.github.com/co​lomon/c2d2c1940b92d8d9df01, profile http://www.harmonyware.com/file​s/profile-1409750168.18343.html
13:21 * colomon is trying to build moar jit to see what that does to the timings
13:23 raiph joined #perl6
13:24 prevost joined #perl6
13:25 colomon hmmm, JIT doesn't help at all
13:25 rindolf joined #perl6
13:27 timotimo ah, caphash is the top time-user there. some time soon MATCH will be rewritten in rakudo to include the stuff CAPHASH used to do and that'll make stuff faster, because it won't build an intermediate data structure just to throw it away again
13:28 colomon profile of the last with JIT is http://www.harmonyware.com/file​s/profile-1409750803.51175.html
13:28 timotimo ah, 73.8% jitted frames isn't terribly bad
13:28 timotimo 5% deoptimizations seems to be quite a lot
13:29 timotimo huh, using the jit makes it slower, but the time spent doing dynamic optimization is basically zero ...
13:32 timotimo doesn't FROGGS[mobile] want to implement the proper MATCH for rakudo? :P
13:35 chenryn joined #perl6
13:36 FROGGS[mobile] timotimo: not that I know :o)
13:36 timotimo do i remember correctly that you did that for NQP already?
13:37 FROGGS[mobile] timotimo: also, I am implementing C globals just fo you already :p
13:37 timotimo ooooh!
13:37 timotimo for me? :D
13:37 FROGGS[mobile] jnthn did
13:37 FROGGS[mobile] surprise /o/
13:38 timotimo i'm not sure if i even need c globals for any project i have going on at the moment
13:38 FROGGS[mobile] you said that yoz'd need that for OpenGL IIRC
13:38 timotimo oh
13:39 timotimo i hope you won't expect me to build an opengl binding immediately now :)
13:39 FROGGS[mobile] much disappointment *g*
13:39 timotimo what i needed for opengl was casting the return value of functions to invocables
13:39 FROGGS[mobile] ahh, true
13:40 timotimo and having mutable bufs would be very interesting for opengl
13:40 FROGGS[mobile] that should be doable too, since we have nativecast and callbacks
13:40 FROGGS[mobile] Buf is not mutable?
13:41 timotimo buf or blob or whichever
13:41 timotimo not yet, needs the native array thingie jnthn has somewhere near the top on his todo list
13:41 FROGGS[mobile] we have that now me thinks
13:41 FROGGS[mobile] ahh
13:41 FROGGS[mobile] I see
13:41 [Coke] mathw: I did a presentation on six for a bunch of fivers a few months ago, you can reuse that if you like.
13:46 yoleaux joined #perl6
13:48 [Coke] (though you'd need to familiarize yourself with the slides before using it; I was trying to hit all the highlights for "neat stuff fivers mights want". (and didn't have enough time to touch grammars, unfortunately)
13:48 timotimo oh, that's the one where i manually colored syntax in the slides, right? :D
13:49 [Coke] m: sub postfix:<!> { [*] 2..$^a }; say 0!, 1!, 2!
13:49 camelia rakudo-moar 41d7f7: OUTPUT«112␤»
13:49 [Coke] timotimo++ yes, I think so!
13:49 timotimo that was fun
13:49 timotimo except it was stupid work ;)
13:51 jnthn oh wow, timotimo provides Slide Highlighting as a Service? :D
13:51 timotimo i really want to find a better way to do that for the next time.
13:52 jnthn :)
13:52 timotimo it was also a very last-minute decision
14:03 dalek joined #perl6
14:06 jnthn Yay. Startup time is lower than last time I was looking at it...
14:07 salv0 joined #perl6
14:13 Ven joined #perl6
14:13 Ven o/, #perl6
14:13 Ven timotimo: slides.com highlighted my p6 correctly
14:13 timotimo oh, neato
14:14 Ven timotimo: i.e. http://slides.com/namidoc/road2p6#/9
14:15 Ven [coke]: I'd be very interested in your material too :-)
14:15 timotimo that presentation was on google docs
14:15 slavik joined #perl6
14:16 Ven timotimo: which one? [coke]'s one?
14:16 [Coke] ven, mathw : https://docs.google.com/presentation/d/1lsga8bGQK0​r0v0OCv0Iw360nCWu3MCgpWTTjROXohNQ/edit?usp=sharing
14:16 timotimo yes
14:16 Ven thanks! [coke]++
14:17 [Coke] Happy to to allow folks edit access if they're up for it. (timotimo, looks like we ended up with a white copy and a black copy)
14:17 timotimo ah
14:17 timotimo yes, i think so
14:19 [Coke] I should go through and delete one of those.
14:19 [Coke] (and make sure everything is up to date in teh other)
14:20 Ven well, cognome++ asked me to talk about 6 a bit too, but I really don't want to explain the internals
14:20 Ven "who cares" :-)
14:20 Ven [Coke]: no hard feeling if I skip the opening slides :p?
14:22 [Coke] Ven: of course not, share and enjoy.
14:22 [Coke] if you have improvements, let me know. :)
14:22 * colomon is very glad he is listening to some nice fiddling and so not tempted to sing the share and enjoy song
14:24 [Coke] definitely need updated moar benchmark shots!
14:24 [Coke] I see anonymous ibex and anonymous liger are reading the doc. :P
14:29 Ven I'll read through it later.
14:29 Ven I also don't really know what 5ers want, since I'm not a 5er, but I'm gonna use that :p
14:30 moritz perl 5 programmer, presumably
14:31 Ven moritz: wut?
14:31 timotimo i think he misread your "want" as "are"
14:31 Ven Oh, I think you read my "want" as "are"
14:31 timotimo %)
14:31 Ven timotimo++ # 2spooky
14:32 moritz Ven: sorry for the confusion
14:35 dalek rakudo/nom: 358c749 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
14:35 dalek rakudo/nom: Avoid around 6,000 allocations at startup.
14:35 dalek rakudo/nom:
14:35 dalek rakudo/nom: These chewed through around a 16th of a nursery.
14:35 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/358c749f15
14:35 jnthn Also is a small win for the initial run through every multi dispatch.
14:41 timotimo huh.
14:41 timotimo interesting
14:42 mr-foobar joined #perl6
14:43 timotimo Ven: "rakudo-js, unfortunately abandoned" - not actually true, but you may know that by now already
14:44 Ven timotimo: it was when I wrote this
14:44 Ven this is the talk I gave at the fpw2014
14:44 timotimo yeah, i saw the "3 month ago"
14:45 itz joined #perl6
14:45 timotimo (i'm using google translate to read your slides
14:45 timotimo )
14:46 timotimo sub postfix ($ N) {<!> [*] 2 .. $ N ; }  <- that's very well translated, google!
14:46 timotimo m)
14:48 Ven timotimo: not sure what that gives %)
14:48 Ven timotimo: think about woolfy++ and lizmat++, they sat through it without translators %)
14:49 pmurias joined #perl6
14:49 hoelzro morning #perl6
14:50 pmurias masak: I have thought a bit about your take an example and refactor it into a grammar thing
14:51 pmurias masak: what I think would be most usefull instead of having it as standalone web things would be to integrate it into an editor
14:51 masak pmurias: yes, quite probably
14:51 yoleaux 1 Sep 2014 19:45Z <Ven_> masak: you might think my "Map[K, V]" naming is unfortunate, but we can't type hashes.
14:51 yoleaux 2 Sep 2014 00:28Z <jepeway> masak: hey, I'm poking at RT 122319; would you have time to peek at clog around http://irclog.perlgeek.de/p​erl6/2014-09-01#i_9282046?
14:52 Ven actually, maybe my Foo %Bar{Baz} works but no clue what it does
14:53 pmurias masak: we could even do something like automatically find a rule that matches a given block of selected text
14:54 [Coke] someone was looking for things to do recently: here's a boring list of work that is a good way for folks to contribute: https://gist.github.com/coke/ac078396e8f216b83e9a
14:54 pmurias masak: so you could select {"foo":123} and have it "refactored" into <json>
14:55 [Coke] happy to have that go somewhere more easily editable.
14:56 timotimo Ven: i live so close to the french border, maybe i'll swallow my pride and learn some french at some point ...
14:56 Ven timotimo: well, if you want to drop by at some point, n'hésite pas %)
14:56 timotimo is nancy very far from you? that's the closest big town i think
14:57 Ven timotimo: almost 400km between those, yes – I'm in paris.
14:58 itz_ joined #perl6
14:58 Ven *(that's where the french mongueurs are)
14:58 timotimo mhm
14:58 timotimo that's pretty far :\
14:58 Ven indeed
15:01 pmurias masak: the biggest problem with integrating it into an editor is choosing the editor we want to integrate into ;)
15:01 * masak kinds of doubts that's the biggest problem :)
15:02 masak kind*
15:02 masak Ven: `my Foo %Bar{Baz}` works, AFAIK. generally when I have no clue what something does, I read the spec.
15:03 itz joined #perl6
15:03 Ven masak: I don't know, I just read that syntax 30min ago :P
15:04 masak anyway, your flippant ignorance of the actual way to write a typed hash does not inspire in me confidence about your choice of the name `Map`.
15:08 nwc10 jnthn: Rakudo startup seems to be 3% less than "last time I measured it"
15:08 guru joined #perl6
15:11 Ven masak: what was that about?
15:12 kaleem joined #perl6
15:12 Ven masak: as I said - this is barely pseudo code anyway.
15:13 Ven no apparently-flippant compiler is capable of handle `has`'s `where`s
15:13 masak Rakudo parses them but ignores them at present.
15:13 masak as deficiencies go, there are worse :)
15:14 Ven handling*
15:14 chenryn joined #perl6
15:14 jnthn m: my Int %h; %h<a> = 'omg'
15:14 camelia rakudo-moar 41d7f7: OUTPUT«Type check failed in assignment to '%h'; expected 'Int' but got 'Str'␤  in method assign_key at src/gen/m-CORE.setting:9716␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:2799␤  in block <unit> at /tmp/V93rnBru1J:1␤␤»
15:14 jnthn Doesn't look very ignored to me ;-)
15:14 masak that part works.
15:15 Ven m: my %h{Str}; %h{1} = 5;
15:15 camelia rakudo-moar 41d7f7: OUTPUT«cannot stringify this␤  in method assign_key at src/gen/m-CORE.setting:10054␤  in sub postcircumfix:<{ }> at src/gen/m-CORE.setting:2799␤  in block <unit> at /tmp/Ngws364YOd:1␤␤»
15:15 Ven well, at least it's not as terrible a syntax as go's.
15:15 * masak .oO( hammer time! )
15:16 jnthn nwc10: I'll take 3% :)
15:17 nwc10 me too
15:33 [Coke] .words is slooow.
15:37 PhilH joined #perl6
15:40 colomon [Coke]: yeeeeessssssss
15:41 [Coke] looking at the SE code that came through here a day or 2 ago
15:41 [Coke] http://stackoverflow.com/questions/25​638528/using-perl6-to-process-a-large​-text-file-and-its-too-slow-2014-09
15:42 * [Coke] updates to latest moar JIC.
15:42 colomon [Coke]: http://irclog.perlgeek.de/​perl6/2014-09-03#i_9290176 and beyond
15:43 colomon http://irclog.perlgeek.de/​perl6/2014-09-03#i_9290559 is good.  ;)
15:43 colomon but not great
15:45 jnthn 'night o/
15:47 timotimo aaw, jnthn is already gone again :S
15:48 itz_ joined #perl6
15:48 tadzik which timezone is jnthn in? :o
15:48 timotimo +7 or +8 i think
15:53 itz joined #perl6
15:56 yeahnoob +8 zone, me too. Sleeping time now.
15:59 [Coke] colomon: looks like 23% of the time is spent in reify (... using my local unpublished version of his code which uses .IO.lines and then calls ".words" 138K times.
16:03 colomon [Coke]: pretty sure using .words is a bad idea for performance
16:04 mattp__ joined #perl6
16:05 prevost_ joined #perl6
16:05 * colomon doesn't mean to say we shouldn't work on optimizing .words performance, mind you
16:05 hoelzro_ joined #perl6
16:06 mads-_ joined #perl6
16:06 [Coke]_ joined #perl6
16:06 Juerd_ joined #perl6
16:07 arnsholt_ joined #perl6
16:07 masak 'night, #perl6
16:07 moritz \o
16:07 timotimo gnite masak!
16:07 yukko_ joined #perl6
16:08 yogan joined #perl6
16:08 camelia joined #perl6
16:09 mtj_- joined #perl6
16:09 ClarusCogitatio joined #perl6
16:09 clkaoud_ joined #perl6
16:09 Celelibi joined #perl6
16:10 vukcrni joined #perl6
16:11 skarn joined #perl6
16:12 ggherdov joined #perl6
16:29 raiph joined #perl6
16:32 MilkmanDan joined #perl6
16:33 spider-mario joined #perl6
16:35 spider-mario joined #perl6
16:38 dj_goku joined #perl6
16:41 SamuraiJack joined #perl6
16:47 guru joined #perl6
16:57 FROGGS colomon: I was just able to make it about 20% faster: https://github.com/yeahnoob/perl6-perf/pull/1
16:59 PerlJam Is RT #118755 still valid?  (i.e. should first return the mutable containers?)
16:59 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=118755
17:04 anaeem1_ joined #perl6
17:07 TimToady on a 3300 word file, .words creates 16000 hashes
17:07 TimToady well, BOOTHashes
17:07 TimToady 9900 BOOTIters
17:08 FROGGS we are quite fast at allocating all these things /o\
17:08 TimToady 10000 BOOTCodes, 39000 BOOTInts, and 86000 BOOTArrays
17:09 FROGGS ohh dear
17:10 TimToady well, .words is defined as .comb(/\S+/) but it's stupid to implement it that way
17:11 FROGGS I know of somebody who has a commit bit *g*
17:11 * TimToady just needs to complain a little first
17:11 FROGGS sure
17:12 FROGGS I'd like to fix rakudo's MATCH which should help here too, the problem is that I don't know what to fix :o(
17:12 FROGGS I think jnthn++ said that we could get rid of three allocations
17:13 TimToady obviously we're paying a very high price for the abstraction here
17:14 FROGGS well, the machines have to pay that price... not the devs :o)
17:14 bjz joined #perl6
17:14 TimToady we pay a price in time
17:15 FROGGS intel should give us some money, because we indirectly sell CPUs :o)
17:17 TimToady then they should be paying us to *not* work :P
17:17 TimToady since we're trying to sell fewer CPUs
17:17 dalek rakudo/nom: 07ef21e | duff++ | src/core/Any.pm:
17:17 dalek rakudo/nom: Fixes RT #118755
17:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/07ef21ed55
17:17 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=118755
17:28 jack_rabbit joined #perl6
17:30 vendethiel "computational expressions" is what happened when f# realized it wanted haskell's do-notation but didn't have hindley-milner.
17:30 vendethiel at least it's cute...
17:34 zakharyas joined #perl6
17:39 dalek rakudo/nom: 03b9a09 | moritz++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
17:39 dalek rakudo/nom: [Bootstrap] natively-type a variable
17:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03b9a09f8c
17:39 dalek rakudo/nom: 4d18460 | moritz++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
17:39 dalek rakudo/nom: [Bootstrap] remove an unused variable
17:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4d184600fb
17:39 dalek rakudo/nom: 962a993 | moritz++ | src/Perl6/Actions.nqp:
17:39 dalek rakudo/nom: Cache a constant expressions
17:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/962a993b02
17:39 dalek rakudo/nom: 8ef5c55 | moritz++ | src/Perl6/Grammar.nqp:
17:39 dalek rakudo/nom: [grammar] use some more native types
17:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8ef5c5564c
17:43 lizmat moritz: maybe those fixed need a Moar or NQP revision bump??
17:43 lizmat *fixes
17:43 moritz lizmat: what makes you think so?
17:43 lizmat Stage parse      : moar(47427,0x7fff74dba310) malloc: *** error for object 0x7f85024f8290: pointer being freed was not allocated
17:43 lizmat *** set a breakpoint in malloc_error_break to debug
17:43 lizmat make: *** [CORE.setting.moarvm] Abort trap: 6
17:44 lizmat is what makes me suspect  :-)
17:44 moritz lizmat: I have tested it with moarvm master, but there's nothing in there the looks like it needs a new MoarVM
17:44 lizmat just before your commits, I had just built without any problems
17:44 cognome joined #perl6
17:45 lizmat retrying with moar master
17:48 lizmat nope, same failure
17:48 lizmat retrying with nqp=master
17:49 kjs_ joined #perl6
17:52 lizmat nope, still same problem  :-(
17:52 lizmat going back in commits now
17:52 nine (git bisect)++
17:53 lizmat moritz: seems 8ef5c5564c is the reason
17:56 lizmat if I remove all the native str typing, it builds
17:56 lizmat further refining now
17:56 itz joined #perl6
18:01 woolfy Hi all.  Remark from a friend from outside Perl 6: "I  am interested in Perl6 but until there is an easy way to install it on a  Windows machine, my interest is expressed from a safe distance only."
18:01 woolfy So I went looking for a MSi and found this: http://rakudo.org/downloads/star/
18:01 vendethiel woolfy: a new pal :P !
18:01 vendethiel a windows user
18:01 woolfy There's a MSI file for Rakudo Star 2014.03.  Not yet for 2014.08.
18:01 woolfy Any idea when?
18:02 woolfy vendethiel: actually, this is regarding a Perl-friend of mine that I know for 10+ years...
18:02 lizmat moritz: is it legal to do a eq 'f' on a str in nqp ?
18:03 woolfy And next question: how "easy" (I know, many definitions of what easy is) is it to install Rakudo Star with this MSI file?
18:03 vendethiel woolfy: it's a one-click installer
18:03 woolfy (I am not on Windows, so I cannot try it myself and I really would hate myself going back to Windows again)
18:03 vendethiel it's very well packaged.
18:03 vendethiel it's just unsuitable for prod because it's so slow
18:04 vendethiel (it's on parrot :P)
18:04 lizmat moritz: it appears that this line is causing the problem:
18:04 woolfy vendethiel: Really that simple?  So, at the end, my friend would have what, Parrot and MoarVM and JVM and NQP and Rakudo and could just go ahead?
18:04 lizmat my str $last  := nqp::substr($str, nqp::chars($check) - 1, 1);
18:04 woolfy Oh. Just parrot.
18:04 vendethiel woolfy: well, 2014.03 only had parrot
18:04 lizmat it feels like it is causing a problem on the next line (3449)
18:04 lizmat $last eq ')' || $last eq '}' || $last eq ']' || $last eq '>'
18:05 woolfy Hm. I'm not going to advice him to work on Parrot. No way.
18:05 vendethiel because every rakudo star was only-parrot, not just the windows one
18:05 vendethiel so, technically, this new R*for 2014.08 could definitely use moarvm :-)
18:05 woolfy vendethiel: OK, so it would be in the 2014.08 release?
18:05 vendethiel I hope so! But no reason not to, we know moar works on windows -- jnthn++'s on it
18:07 woolfy So, back to my first question...  Any idea when?  (I mean: "when is rakudo-star-2014.08.msi going to be available?").  Days, weeks, or wait for 2014.09 or 2014.10 or so...  ballpark figure would be nice.
18:08 BizarreCake joined #perl6
18:09 lizmat I think the main problem is that there are few people with MSI-building fu  :-(
18:10 woolfy fu?
18:11 nine woolfy: knowledge
18:11 SamuraiJack joined #perl6
18:11 woolfy Ah. That went way over my head.
18:12 molaf_ joined #perl6
18:13 FROGGS woolfy: "when is rakudo-star-2014.08.msi going to be available?" - hours
18:13 lizmat Suffix[edit]
18:13 lizmat -fu
18:13 lizmat (slang) Expertise; mastery.
18:13 lizmat My Google-fu is weak!
18:13 lizmat Aragorn uses Ranger-fu to figure out that Sam and Frodo have taken a boat.
18:14 lizmat woolfy: from http://en.wiktionary.org/wiki/-fu
18:14 timotimo FROGGS: pretty awesome! :)
18:14 MilkmanDan joined #perl6
18:14 FROGGS timotimo: I also did a 2014.04-moar.msi and -parrot.msi
18:15 woolfy Yeah yeah...  as said, it went way over my head. First time that I saw somebody use this lingo outside the "kung fu" area of expertise.
18:15 FROGGS but I did not upload it because I did not have a single tester...
18:15 huf "expert in kung"
18:15 huf i wonder what that is..
18:15 FROGGS but now I just upload anyway
18:15 woolfy FROGGS++
18:16 dalek rakudo/nom: 0be2374 | (Elizabeth Mattijsen)++ | src/Perl6/Grammar.nqp:
18:16 dalek rakudo/nom: Unbust on (at least) OSX, caused by 8ef5c5564c
18:16 dalek rakudo/nom:
18:16 dalek rakudo/nom: No idea why this makes a difference, but suspect the eq on the next line to
18:16 dalek rakudo/nom: have some influence in this.  Error seen was:
18:16 dalek rakudo/nom:
18:16 dalek rakudo/nom: Stage start      :   0.000
18:17 dalek rakudo/nom: Stage parse      : moar(51746,0x7fff74dba310) malloc: *** error for object 0x7faa4c7aad90: pointer being freed was not allocated
18:17 dalek rakudo/nom: *** set a breakpoint in malloc_error_break to debug
18:17 dalek rakudo/nom: make: *** [CORE.setting.moarvm] Abort trap: 6
18:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0be23748ff
18:18 woolfy OK, FROGGS, thanks.  I just mentioned it to my Perl5-friend (who I leave to be anonymous for now).  I guess he did not expect this.  I hope he likes it.
18:18 FROGGS I already started to make the msi's, so another funny coincident :o)
18:19 PerlJam FROGGS++  the best way to get testers is to make a release and tell everyone where to get it  :)
18:19 FROGGS *g*
18:19 FROGGS yeah, that might work too :o)
18:23 moritz lizmat++ # fixing up my mess
18:23 lizmat moritz: is that supposed to work in nqp?  eq on a native str ?
18:23 FROGGS nqp-m: my str 'foo'; say($foo eq 'foo')
18:23 camelia nqp-moarvm: OUTPUT«Confused at line 2, near "my str 'fo"␤   at gen/moar/stage2/NQPHLL.nqp:481  (/home/p6eval/rakudo-inst-2/language​s/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:913  (/home/p6eval/rakudo-inst-2/language​s/nqp/lib/nqp.moarvm:comp_unit:872)␤ fro…»
18:24 FROGGS nqp-m: my 'foo'; say($foo eq 'foo')
18:24 camelia nqp-moarvm: OUTPUT«Confused at line 2, near "my 'foo'; "␤   at gen/moar/stage2/NQPHLL.nqp:481  (/home/p6eval/rakudo-inst-2/language​s/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQP.nqp:913  (/home/p6eval/rakudo-inst-2/language​s/nqp/lib/nqp.moarvm:comp_unit:872)␤ fro…»
18:24 FROGGS nqp-m: my str $foo := 'foo'; say($foo eq 'foo')
18:24 camelia nqp-moarvm: OUTPUT«1␤»
18:24 FROGGS yes
18:24 moritz lizmat: I dearly hope so :-)
18:24 lizmat hmmm... well... then I have no idea...
18:24 moritz Cursor.INTERPOLATE has lots of vars that could become native
18:24 lizmat but undoing the "str" typing unbusted the build for me
18:25 moritz but when I tried to make it that way, core compilation hangs
18:25 lizmat so, definitely something fishy goin on there
18:25 * vendethiel reads some "go sucks post" again and chuckles
18:25 vendethiel FROGGS++ thanks for taking care of us windows users
18:26 vendethiel well, I don't really code on windows anymore, but I know I have an incredible luck
18:26 dalek rakudo/nom: c524e7d | (Elizabeth Mattijsen)++ | src/core/Parcel.pm:
18:26 dalek rakudo/nom: Simplify Parcel.WHICH, now that we don't flatten
18:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c524e7d8af
18:30 dalek star: 0644ed9 | (Tobias Leich)++ | / (2 files):
18:30 dalek star: pass --backends option to rakudo's configure
18:30 dalek star: review: https://github.com/rakudo/star/commit/0644ed974b
18:32 gfldex joined #perl6
18:36 guru joined #perl6
18:36 telex joined #perl6
18:38 vendethiel can I encode church's numbers in P6's type system?
18:38 vendethiel probably not :(
18:39 TimToady m: say set(set())
18:39 camelia rakudo-moar 8ef5c5: OUTPUT«set(set())␤»
18:48 TimToady interesting datapoint: I rewrite .comb(/S+/,$limit) in very raw nqp using nqp::findcclass and nqp::findnotcclass, and it runs twice as slow...
18:49 FROGGS hehe
18:49 TimToady despite the fact that .words is entirely jitted
18:50 FROGGS the funny thing here was that my window size made the line break after the 'as'... so the 'slow' was kinda unexpected *g*
18:50 TimToady would be lovely to have a statement-by-statement profiler...
18:50 PerlJam TimToady: Seems like it wasn't so stupid to implement .words with .comb(/S+/) after all  ;)
18:52 * TimToady thinks findcclass must be doing something stupid now, like reloading the Unicode database each time
18:53 [Coke]_ TimToady: you using moar, I assume?
18:54 PerlJam If you make findcclass and findnotcclass faster, that will have broad, positive impact
18:54 * PerlJam crosses his fingers that TimToady's changes have a happy ending.
19:00 diakopter istr writing findcclass
19:00 itz joined #perl6
19:03 TimToady oh, gee, the first thing findcclass does is length = MVM_string_graphs(tc, s);
19:04 diakopter I thought graphs was cached
19:04 diakopter on the string
19:04 diakopter object
19:04 TimToady maybe it is, though strings have changed somewhat since then
19:05 timotimo PerlJam: did you nqp::unbox_s the target string once?
19:06 timotimo if the string is utf8, it may have to scan through the string to get to the $start-index (byte vs codepoint)
19:06 diakopter it never stores as utf8
19:07 timotimo oh, right, we have 32bit storage for codepoints anyway
19:07 rindolf joined #perl6
19:16 TimToady findcclass does appear to cache the grapheme count, but it does create a new iterator every time; dunno whether that's expensive or not
19:17 diakopter I'd guess so
19:18 TimToady the regex engine at least knows it's gonna look for the same thing again, so it naturally saves the previous cursor to start from; maybe that's the difference...
19:19 TimToady I suppose we could cache the iterator, as long as the string doesn't change, and start from where we left off before, if appropriate
19:20 TimToady or add some kind of simplecomb instruction that knows it's going to alternate on some boolean test
19:22 diakopter that wouldn't be threadsafe, unless you laboriously made it so
19:22 diakopter (the cached iterator)
19:22 PerlJam depends on where the cache lives :)
19:22 diakopter true
19:23 zakharyas joined #perl6
19:24 timotimo right, the threadcontext could hold it and it'd be fine
19:25 TimToady well, this is probably too micro of an optimization to be looking at it right now
19:26 FROGGS woolfy:
19:26 FROGGS http://rakudo.org/downloads/sta​r/rakudo-star-2014.08-moar.msi
19:26 vendethiel woolfy: FROGGS++ just updated the msi :-)
19:26 FROGGS http://rakudo.org/downloads/star​/rakudo-star-2014.08-parrot.msi
19:26 vendethiel uploaded*
19:26 TimToady especially since it's lunch time
19:26 vendethiel sorry FROGGS, I'm too fast for you ;-)
19:26 FROGGS O.o
19:26 timotimo in the compilation process of rakudo-parrot, there was one file where updating the line position cache took much longer because the file was utf8 and it was re-doing the iterator from the beginning each and every time
19:26 FROGGS how on earth...
19:26 vendethiel did I know you pushed those?
19:26 FROGGS vendethiel: yeah
19:26 vendethiel I wonder :-)
19:26 timotimo he sat on the f5 button
19:27 FROGGS or he just pulled the internet and saw it in the diff
19:27 woolfy :-)
19:27 timotimo %)
19:27 vendethiel actually I just saw the github notifications
19:27 vendethiel cause I see those instantly
19:28 itz_ joined #perl6
19:28 timotimo .. github notifications?
19:28 vendethiel timotimo: FROGGS++ posted something on github about that *before* noticing woolfy++ here.
19:29 FROGGS I replied to a panda issue
19:29 vendethiel and I basically saw it insta
19:29 vendethiel (I spend far too much time on github :/)
19:30 FROGGS but we <3 github!
19:30 FROGGS I'd work for them if they'd need Perl ppl
19:30 vendethiel FROGGS: well, I do too. But still, I reached 531 days of streak -- that's far too much time spent on that
19:31 woolfy OK, I told my friend and he is happy. Now he needs some tuits (well, hours) to start playing with it.  But I am sure (meaning "I really really really hope) he is not the only one that will use it.
19:32 timotimo FROGGS: after installing it, the windows start menu shortcut wouldn't work
19:32 vendethiel woolfy: trust me, he's not. even if only with the people I introduced to p6 ;-)
19:32 vendethiel and I introduced *a lot* of them and they're mostly using windows
19:32 timotimo it'd say "missing file" or "broken shortcut" or something and tells me to look for "perl6-m.exe", but there's only perl6-m.bat
19:33 FROGGS timotimo: there is one? O.o
19:33 woolfy I am NOT on Windows so there is no way I am going to try that!
19:33 timotimo yes.
19:34 FROGGS timotimo: I see, that seems to be a relict of parrot-ish days, when we had .exe files only
19:34 timotimo :)
19:34 timotimo would be neat if you fixed it anyway :)
19:34 FROGGS yeah...
19:35 itz joined #perl6
19:40 moritz
19:40 beastd joined #perl6
19:41 moritz t/spec/integration/99problems-51-to-60.t segfaults for me
19:42 Ulti one issue with the MSI is it's not signed so modern Windows platforms complain a lot
19:42 vendethiel nothing's signed, these days :/
19:43 Ulti well that's the first time I have ever seen both a browser warning and a full windows 8.1 prompt refusing to run an installer
19:44 FROGGS Ulti: if someone would help me to accomplish that...
19:44 Ulti yeah if I could I would, I have the means but not the know how to do rakudo builds on windows
19:44 TimToady okay, now I have a .words that is six times faster than the .comb :)
19:44 diakopter I think pmichaud has a keypair for it or somethingg
19:44 Ulti I use this machine just for games ;P
19:44 moritz I'll happily sign any Star .msi
19:44 moritz ... with GPG :)
19:44 FROGGS :o)
19:45 PerlJam TimToady++
19:46 Ulti FROGGS++ well it runs >:3
19:46 Ulti on windows 8.1
19:46 FROGGS built on WinXP :P
19:47 Ulti using panda wasn't so easy   fatal: could not create work tree dir 'C:\Users\Matthew\.panda-work\1409773602_1'.: No such file or directory
19:48 FROGGS yes, that's https://github.com/tadzik/panda/issues/98
19:48 Ulti oh ok
19:48 FROGGS that seems easy to fix... dunno why it isnt already
19:49 dalek Inline-Perl5: e8a8e57 | nine++ | / (2 files):
19:49 dalek Inline-Perl5: Fix all sorts of strange errors on exit caused by double free'd string.
19:49 dalek Inline-Perl5:
19:49 dalek Inline-Perl5: SvPV returns a pointer to the string buffer in an SV.
19:49 dalek Inline-Perl5: NativeCall seems to free strings passed to it, so both Perl 5 and
19:49 dalek Inline-Perl5: NativeCall were freeing the same string leading to different error
19:49 dalek Inline-Perl5: messages.
19:49 dalek Inline-Perl5:
19:49 dalek Inline-Perl5: Pass a copy of the string instead.
19:49 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/e8a8e5715b
19:49 nine YES!
19:49 nine This one took hours to track down...
19:49 FROGGS I can imagine :/
19:49 FROGGS nine++
19:49 timotimo there's a trait for string management
19:51 nine timotimo: is it documented somewhere?
19:53 timotimo not sure
19:53 timotimo https://github.com/jnthn/zavolaj/b​lob/master/lib/NativeCall.pm6#L323
19:55 lastofthe joined #perl6
19:56 nine timotimo: thanks.
19:59 hoelzro timotimo: how are you even supposed to use that?
19:59 hoelzro it doesn't look like a trait to me
20:02 dalek star: cbe310b | (Tobias Leich)++ | tools/build/star-product.wxs:
20:02 dalek star: install windows start menu shortcut compatible with moar
20:02 dalek star: review: https://github.com/rakudo/star/commit/cbe310b813
20:02 FROGGS timotimo: I updated the msi so that the shortcut works
20:03 timotimo cool, thanks
20:03 timotimo why you no timotimo++ in your commit message? :P
20:03 FROGGS hehe, sorry timotimo++ :P
20:13 vendethiel FROGGS++ # thanks!
20:14 opendevnet joined #perl6
20:15 gtodd joined #perl6
20:18 opendevnet left #perl6
20:22 denis_boyun joined #perl6
20:22 tadzik nine: hmm, maybe you can bump the refcount and avoid copying?
20:23 tadzik nine++ # tracking down rough stuff
20:25 nine tadzik: I probably could if I find out how to keep NativeCall from freeing the string.
20:25 [Sno] joined #perl6
20:25 tadzik nine: or tell it to decrease the refcount instead
20:25 tadzik maybe Nativecall should have something like "call this instead of free()"
20:26 nine Oh! I just figured that since callbacks reference the objects, that means the GC still knows that they are in use and I don't have to do anything :)
20:26 spider-mario joined #perl6
20:26 tadzik it'd probably also help things like gtk
20:26 tadzik glib in general
20:26 nine But this brings me to the question: when are NativeCall callbacks actually freed?
20:27 nine I probably have to do that myself. Can I just free() them? in my Perl6::Object destructor?
20:27 tadzik FROGGS: as for the issue: I don't really know why it doesn't work
20:27 tadzik so it's not easy to fix to me :)
20:28 FROGGS coward! :P
20:29 dalek rakudo/nom: 39ee9fa | TimToady++ | src/core/Str.pm:
20:29 dalek rakudo/nom: don't implement .words with .comb
20:29 dalek rakudo/nom:
20:29 dalek rakudo/nom: Runs about six times faster now.
20:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/39ee9fa73e
20:29 tadzik TimToady++
20:30 FROGGS TimToady++
20:31 timotimo is it also still faster for short strings?
20:40 TimToady probably
20:43 dalek rakudo-star-daily: f10f88a | coke++ | log/ (14 files):
20:43 dalek rakudo-star-daily: today (automated commit)
20:43 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/f10f88a383
20:43 dalek perl6-roast-data: efe0fe5 | coke++ | / (6 files):
20:43 dalek perl6-roast-data: today (automated commit)
20:43 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/efe0fe5655
20:44 [Coke] lots of failures across platforms in S32-temporal/local.t
20:45 [Coke] parrot still dying after the 1/0 update (and fix)
20:45 kjs_ TimToady: Just wondering (as a lurker): the original code was 2 lines, which I would say is impressive, compared to the new 20-line implementation. Is this just a temporary replacement until .comb gets faster?
20:45 spider-mario joined #perl6
20:45 TimToady well, if .comb gets considerably faster, we can consider it :)
20:45 timotimo right
20:46 colomon joined #perl6
20:46 TimToady there are probably a general class of .comb patterns that reduce to what .words is doing, and could be optimized the same way
20:47 kjs_ ok. just hard to imagine that so much code is 6 times faster than the 2-line implementation :-)
20:47 Ven joined #perl6
20:47 [Coke] bulding rakudo behind a firewall. using --git-protocol to rakudo's configure. can't build moar because of the submodules using their own protocol.
20:47 sjn algorithmic complexity ftl
20:47 [Coke] kjs_: take a look at .comb
20:47 TimToady you probably don't realize how hard P5 works to avoid calling the regex engine :)
20:47 [Coke] it's shorter now than it was.
20:48 lizmat TimToady: I wonder whether pack/unpack would benefit from such a treatment
20:49 TimToady what is pack/unpack doing that you would like to avoid?
20:52 kjs_ [Coke]: oh right - you mean when you consider match as well.
20:52 TimToady regex has a lot of setup/teardown at the best of times
20:56 kurahaupo joined #perl6
20:58 treehug88 joined #perl6
20:58 lizmat TimToady: for $template.comb(/<[a..zA..Z]>[\d+|'*']?/) -> $unit {
20:59 lizmat hmm... that's really just set up
21:03 _thou joined #perl6
21:10 dwarring joined #perl6
21:13 Rotwang joined #perl6
21:13 ab5tract joined #perl6
21:15 dalek nqp: f6ceab6 | (David Warring david.warring@gmail.com)++ | examples/rubyish/ (3 files):
21:15 dalek nqp: [examples/rubyish] disable interpolation in single quoted strings etc
21:15 dalek nqp: review: https://github.com/perl6/nqp/commit/f6ceab6497
21:17 ab5tract m: my @greetings = '\o\', '\o/', '/o/'
21:17 camelia rakudo-moar c524e7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/k1DP__aMpBâ�¤Missing semicolon.â�¤at /tmp/k1DP__aMpB:1â�¤------> [32mmy @greetings = '\o\', '\[33mâ��[31mo/', '/o/'[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:17 ab5tract m: my @greetings = '\o\', '\o/', '/o/';
21:17 camelia rakudo-moar c524e7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/6FQeQZCvfBâ�¤Missing semicolon.â�¤at /tmp/6FQeQZCvfB:1â�¤------> [32mmy @greetings = '\o\', '\[33mâ��[31mo/', '/o/';[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:18 ab5tract m: my @greetings = '\o\', '\\o/', '/o/';
21:18 camelia rakudo-moar c524e7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Mdzspluk1bâ�¤Missing semicolon.â�¤at /tmp/Mdzspluk1b:1â�¤------> [32mmy @greetings = '\o\', '\[33mâ��[31m\o/', '/o/';[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:19 ab5tract seems a bit odd
21:19 ab5tract anyway, greetings!
21:19 dg m: my @greetings = '\o\\', '\o/', '/o/';
21:19 camelia rakudo-moar c524e7: ( no output )
21:20 ab5tract m:'\o\', '\\o/', '/o/'.roll(6);
21:20 ab5tract m: '\o\\', '\o/', '/o/'.roll(6);
21:20 camelia rakudo-moar c524e7: ( no output )
21:21 lizmat m: < \o/ o/ /o >.roll(6).say
21:21 camelia rakudo-moar c524e7: OUTPUT«o/ o/ /o /o /o \o/␤»
21:21 lizmat m: < \o/ o/ /o >.pick(*).say
21:21 camelia rakudo-moar c524e7: OUTPUT«\o/ o/ /o␤»
21:22 lizmat m: < \o/ o/ /o >.pick(*).say
21:22 camelia rakudo-moar c524e7: OUTPUT«/o o/ \o/␤»
21:22 lizmat *phew*
21:24 ab5tract m: < \o/ /o/ \o\ >.pick(*).say
21:24 camelia rakudo-moar c524e7: OUTPUT«\o\ \o/ /o/␤»
21:24 ab5tract ok
21:24 ab5tract so just stick to < > for lists of single quoted text :)
21:24 ab5tract i think i can do that
21:25 ab5tract i had a different question in mind though
21:27 ab5tract m: use MONKEY_TYPING; augment class Cool { method como { say "{$.name}.perl is perl" } }; "this".como;
21:27 camelia rakudo-moar c524e7: OUTPUT«No such method 'como' for invocant of type 'Str'␤  in block <unit> at /tmp/EHFbbmDbDD:1␤␤»
21:27 ab5tract m: use MONKEY_TYPING; augment class Str { method como { say "{$.name}.perl is perl" } }; "this".como;
21:27 camelia rakudo-moar c524e7: OUTPUT«No such method 'name' for invocant of type 'Str'␤  in method como at /tmp/2RgrTdEHnI:1␤  in block <unit> at /tmp/2RgrTdEHnI:1␤␤»
21:28 ab5tract m: use MONKEY_TYPING; augment class Str { method como { say "{$..perl is perl" } }; "this".como;
21:28 camelia rakudo-moar c524e7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vnSt0brP6lâ�¤Two terms in a rowâ�¤at /tmp/vnSt0brP6l:1â�¤------> [32mtr { method como { say "{$..perl is perl[33mâ��[31m" } }; "this".como;[0mâ�¤    expecting any of:â�¤        argument listâ�¤ …»
21:28 ab5tract m: use MONKEY_TYPING; augment class Str { method como { say "{$.perl is perl" } }; "this".como;
21:28 camelia rakudo-moar c524e7: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/RqDAej_z1Eâ�¤Two terms in a rowâ�¤at /tmp/RqDAej_z1E:1â�¤------> [32m class Str { method como { say "{$.perl [33mâ��[31mis perl" } }; "this".como;[0mâ�¤    expecting any of:â�¤        statement …»
21:28 ab5tract ok sorry guys
21:29 lizmat at the moment, class are closed by default
21:29 lizmat with MONKEY_TYPING you *can* augment a class with a method
21:29 ab5tract m: use MONKEY_TYPING; augment class Str { method como { say "{$.perl} is perl" } }; "this".como;
21:29 camelia rakudo-moar c524e7: OUTPUT«"this" is perl␤»
21:29 lizmat however, and this is a known bug, that method is *only* visible in the class it is made in
21:29 ab5tract ok
21:29 lizmat it is *not* known in any of its subclasses
21:30 ab5tract makes sense, but also kind of puts a damper on a project i had in mind
21:31 lizmat m: use MONKEY_TYPING; augment class Str { method foo { say "foo" } }; "bar".foo
21:31 camelia rakudo-moar c524e7: OUTPUT«foo␤»
21:31 ab5tract which was to create an .explore method and mix it in at the Mu level :)
21:31 lizmat m: use MONKEY_TYPING; augment class Cool { method foo { say "foo" } }; "bar".foo  # not seen on Str
21:31 camelia rakudo-moar c524e7: OUTPUT«No such method 'foo' for invocant of type 'Str'␤  in block <unit> at /tmp/C_jCxP68Cn:1␤␤»
21:31 ab5tract yeah, that was my question :)
21:32 ab5tract it didn't seem very perl 6-y to have it work in the first case but not in the second
21:32 lizmat not sure if this helps:
21:32 lizmat use MONKEY_TYPING; augment class Cool { method foo { say "foo" } }; augment class Str { }; "bar".foo
21:32 lizmat m: use MONKEY_TYPING; augment class Cool { method foo { say "foo" } }; augment class Str { }; "bar".foo
21:32 camelia rakudo-moar 39ee9f: OUTPUT«foo␤»
21:33 lizmat the main reason for this issue, is that classes currently are very bad parents:
21:33 ab5tract so the it just sort of needs a bit of a jump start, eh?
21:33 lizmat children know who their parents are, but parents do not know who their children are
21:33 ab5tract ohh
21:33 ab5tract how very Perl ;)
21:33 lizmat so, when augmenting Cool, it doesn't know who to notify of the changes made
21:34 lizmat this *will* be fixed at one point, but is not high on the list atm
21:34 ab5tract that would also put a barrier on the .explore idea
21:35 ab5tract on what layer would it need to be addressed? is it an issue in the rakudo nqp code or is it on a vm level?
21:35 lizmat what would such an .explore method do?
21:36 lizmat I think it would be at the nqp level, with maybe some VM hooks involved
21:36 lizmat jnthn would know better...
21:36 ab5tract list available methods, documentation on said methods, and explore inter-relationships between the various classes and roles
21:37 lizmat m: say Str.^methods
21:37 camelia rakudo-moar 39ee9f: OUTPUT«WHY BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode wordcase trans indent codes path unival univals WHICH Bool Str Stringy DUMP ACCEPTS Numeric gist perl comb subst split␤»
21:37 lizmat m: say Str.^methods>>.WHY
21:37 camelia rakudo-moar 39ee9f: OUTPUT«(Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any) (Any)␤»
21:37 ab5tract and -- the most important part -- leave bits of wisdom and even code examples by also mixing in some methods for adding text
21:37 lizmat no explanation yet  :-(
21:38 ab5tract then synchronizing those somehow (optional)
21:39 ab5tract so .WHY would explain where the method come from, i gather?
21:39 virtualsue joined #perl6
21:39 ab5tract *came
21:40 lizmat yes, that's the idea
21:40 lizmat look at S26:01
21:40 synopsebot Link: http://perlcabal.org/syn/S26.html#line_01
21:40 lizmat hoelzro has recently done a lot in that area...
21:41 * hoelzro looks
21:41 ab5tract so yeah .explore would rely on this stuff
21:42 hoelzro lizmat: I'd like to start documenting the core methods, but I don't want to kill parse time =/
21:42 lizmat FWIW, it feels like .explore would be a development tool, so it will probably never live in core
21:42 hoelzro jnthn had the idea of having docs stored elsewhere, perhaps even generated from doc.perl6.org stuff
21:42 hoelzro agreed
21:43 hoelzro there's nothing that says that WHY must come exclusively from #|/#= comments
21:43 ab5tract m: Str.trim.WHEREFORE
21:43 camelia rakudo-moar 39ee9f: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method trim at src/gen/m-CORE.setting:6744␤  in block <unit> at /tmp/uvwJYpY7n3:1␤␤»
21:43 lizmat hoelzro: indeed...
21:44 lizmat m: "foo".trim.WHEREFORE
21:44 camelia rakudo-moar 39ee9f: OUTPUT«No such method 'WHEREFORE' for invocant of type 'Str'␤  in block <unit> at /tmp/I11mU1sobl:1␤␤»
21:44 hoelzro WHEREFORE is on POD objects
21:44 lizmat m: "foo".trim.WHY.WHEREFORE
21:44 camelia rakudo-moar 39ee9f: OUTPUT«No such method 'WHEREFORE' for invocant of type 'Any'␤  in block <unit> at /tmp/HGhegGE04_:1␤␤»
21:44 colomon joined #perl6
21:44 ab5tract gotcha
21:44 hoelzro m: #|(hello) sub foo {} ; say(&foo.WHY.WHEREFORE)
21:44 camelia rakudo-moar 39ee9f: OUTPUT«sub foo () { #`(Sub|53068504) ... }␤»
21:48 lizmat m: #|(hello) sub foo {} ; say &foo.WHY   # pod at runtime!
21:48 camelia rakudo-moar 39ee9f: OUTPUT«hello␤»
21:48 ab5tract oh snap!
21:48 ab5tract i like the look of this synopsis
21:51 ab5tract and i am definitely into this built in introspection
21:51 hoelzro ab5tract: you might also be interested in the meta object API
21:51 erkan joined #perl6
21:51 hoelzro ex:
21:51 ab5tract like so much of my experience with perl 6 so far, the feature is just there already
21:52 hoelzro m: .say for Str.^methods
21:52 camelia rakudo-moar 39ee9f: OUTPUT«WHY␤BUILD␤Int␤Num␤chomp␤chop␤substr​␤pred␤succ␤match␤ords␤lines␤samecase␤sames​pace␤trim-leading␤trim-trailing␤trim␤words​␤encode␤wordcase␤trans␤indent␤codes␤path␤u​nival␤univals␤WHICH␤Bool␤Str␤Stringy…»
21:52 hoelzro eh
21:52 hoelzro m: say Str.^methods
21:52 camelia rakudo-moar 39ee9f: OUTPUT«WHY BUILD Int Num chomp chop substr pred succ match ords lines samecase samespace trim-leading trim-trailing trim words encode wordcase trans indent codes path unival univals WHICH Bool Str Stringy DUMP ACCEPTS Numeric gist perl comb subst split␤»
21:52 hoelzro that's better.
21:53 ab5tract yeah, i want to make an interface for this. maybe even render it to HTML and serve it on a local port
21:53 lizmat m: say Str.^methods.sort
21:53 camelia rakudo-moar 39ee9f: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in any p6sort at src/vm/moar/Perl6/Ops.nqp:346␤␤Code object coerced to string (please use .gist or .perl to do that)  in any p6sort at src/vm/moar/Perl6/Ops.nqp:346␤␤Code object …»
21:53 ab5tract though something in ncurses could be cool as well ;)
21:53 lizmat m: say Str.^methods>>.gist.sort
21:53 camelia rakudo-moar 39ee9f: OUTPUT«ACCEPTS BUILD Bool DUMP Int Num Numeric Str Stringy WHICH WHY chomp chop codes comb encode gist indent lines match ords path perl pred samecase samespace split subst substr succ trans trim trim-leading trim-trailing unival univals wordcase words␤»
21:53 hoelzro m: Str.^methods.grep(*.name ne '<anon>').sort(*.name)
21:53 camelia rakudo-moar 39ee9f: ( no output )
21:53 hoelzro m: say Str.^methods.grep(*.name ne '<anon>').sort(*.name)
21:53 camelia rakudo-moar 39ee9f: OUTPUT«ACCEPTS BUILD Bool DUMP Int Num Numeric Str Stringy WHICH WHY chomp chop codes comb encode gist indent lines match ords path perl pred samecase samespace split subst substr succ trans trim trim-leading trim-trailing unival univals wordcase words␤»
21:55 ab5tract m: say Str.^methods.grep(*.name eq '<anon>').sort(*.name)
21:55 camelia rakudo-moar 39ee9f: OUTPUT«␤»
21:55 hoelzro there happen to be none on Str =)
21:56 ab5tract so what's the metamagic to insert some pod onto those methods
21:57 hoelzro well, there's nothing spec'd
21:58 hoelzro but I happen to know the secret incantations to do so ;)
22:01 hoelzro actually, since we could stick that "incantation" on the end of CORE.setting...
22:01 hoelzro we might be able to easily document core classes/methods without imposing too much extra parse time
22:02 hoelzro it could even be a Configure.pl option
22:03 dalek rakudo/nom: cf69d8b | (Elizabeth Mattijsen)++ | src/core/List.pm:
22:03 dalek rakudo/nom: Use int in List.ACCEPTS
22:03 dalek rakudo/nom:
22:03 dalek rakudo/nom: For 1000 element identical lists, this is 14% faster.  Benchmark:
22:03 dalek rakudo/nom:   my @a = ^1000; my @b = ^1000; my $a=0; for ^1000 { $a++ if @a ~~ @b }; say $a
22:03 dalek rakudo/nom: From 20 CPU secs to 17.3.
22:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf69d8b339
22:03 lizmat sleep& so good night, #perl6!
22:04 ab5tract m: my $ex = "trim"; for Str.^methods -> $m { "$ex.$m = '|#(where) $m.perl'".EVAL }
22:04 camelia rakudo-moar 39ee9f: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/E5wz6xDqRj:1␤␤Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/E5wz6xDqRj:1␤␤Not enough positional parameters…»
22:04 hoelzro night lizmat
22:04 ab5tract o/ lizmat !
22:04 _thou joined #perl6
22:05 ab5tract i'm pretty sure that road leads to evil
22:05 hoelzro ab5tract: which one?
22:06 ab5tract m: for Str.^methods -> $m { "Str.$m = '|#(where) $m.perl'".EVAL }; say Str.^methods>>.WHY;
22:06 camelia rakudo-moar 39ee9f: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/Dyy6Qxn6Ze:1␤␤Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/Dyy6Qxn6Ze:1␤␤Invocant requires an instance, b…»
22:06 ab5tract m: for Str.^methods -> $m { "Str.$m.perl = '|#(where) $m.perl'".EVAL }; say Str.^methods>>.WHY;
22:06 camelia rakudo-moar 39ee9f: OUTPUT«Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/fXAwQK1rRy:1␤␤Code object coerced to string (please use .gist or .perl to do that)  in block <unit> at /tmp/fXAwQK1rRy:1␤␤Invocant requires an instance, b…»
22:07 hoelzro ab5tract: you probably want "$m.perl()"
22:07 ab5tract m: for Str.^methods -> $m { Str.$m = "'|#(where) $m.perl'".EVAL }; say Str.^methods>>.WHY;
22:07 camelia rakudo-moar 39ee9f: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method WHY at src/gen/m-CORE.setting:5960␤  in block <unit> at /tmp/EGZbE1lWcV:1␤␤»
22:07 hoelzro m: my $m = 'foo' ; say "$m.perl"
22:07 camelia rakudo-moar 39ee9f: OUTPUT«foo.perl␤»
22:07 hoelzro m: my $m = 'foo' ; say "$m.perl()"
22:07 camelia rakudo-moar 39ee9f: OUTPUT«"foo"␤»
22:07 ab5tract anyway, as i said, evil :)
22:07 hoelzro very >:)
22:07 ab5tract m: for Str.^methods -> $m { Str.$m = "'|#(where) $m.perl()'".EVAL }; say Str.^methods>>.WHY;
22:07 camelia rakudo-moar 39ee9f: OUTPUT«Invocant requires an instance, but a type object was passed␤  in method WHY at src/gen/m-CORE.setting:5960␤  in block <unit> at /tmp/UAq2FHbrTb:1␤␤»
22:09 ab5tract so what's the magic, doc?
22:09 ab5tract :D
22:09 ab5tract m: for Str.^methods -> $m { "Str.$m.perl() = '|#(where) $m.perl()'".EVAL }; say Str.^methods>>.WHY;
22:09 camelia rakudo-moar 39ee9f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling EVAL_0â�¤Two terms in a rowâ�¤at EVAL_0:1â�¤------> [32mStr.method [33mâ��[31mWHY (Str:D: *%_) { #`(Method|63575496) .[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤      â€¦Â»
22:10 hoelzro m: Str.^find_method('trim').set_why('trims the whitespace off of a string')
22:10 camelia rakudo-moar 39ee9f: ( no output )
22:10 hoelzro m: Str.^find_method('trim').set_why('trims the whitespace off of a string') ; say Str.^find_method('trim').WHY
22:10 camelia rakudo-moar 39ee9f: OUTPUT«No such method 'set_docee' for invocant of type 'Str'␤  in method WHY at src/gen/m-CORE.setting:3501␤  in block <unit> at /tmp/_4OUQlLWJC:1␤␤»
22:10 ab5tract hoelzro: now that's more like it!
22:10 hoelzro interesting
22:10 hoelzro ab5tract: that method may disappear any day now
22:11 ab5tract yeah it should be spec'd
22:11 hoelzro so don't get too comfortable with it!
22:11 ab5tract (the solution i mean)
22:11 hoelzro well, I'd rather something like Str.^find_method('trim').WHY = 'trims a string'
22:11 hoelzro agreed
22:12 ab5tract yeah, .WHY should have a .=
22:12 hoelzro I tried doing that, but my NQP fu was weak at the time
22:12 hoelzro I still might not be able to do it
22:12 hoelzro someone like jnthn probably could
22:13 ab5tract i think some process of making it even easier could be a good idea too
22:14 ab5tract it wouldn't even need to interact directly with the Pod looked up by .WHY
22:14 ab5tract (though the .WHY explanation could be derived from the larger Pod)
22:14 firefish5000 joined #perl6
22:15 hoelzro ab5tract: what exactly do you mean?
22:17 ab5tract i'm envisioning a way of making it very easy to add documentation around Perl 6
22:18 ab5tract something like a small web application backed up by a git repository
22:18 ab5tract by backed up i mean the it would source it's content from the git repository
22:18 ab5tract and serve it to your browser over a local port
22:19 ab5tract (or a cool CLI interface, though I think the HTML is easier short term)
22:19 ab5tract kind of like a distributed perlmonks, i guess
22:20 hoelzro ab5tract: so the WHYs of libraries could be populated by such a Git repo?
22:20 ab5tract theoretically, yes, but not necessary either
22:21 ab5tract if it were in Rakudo * then it could be the substrate of the shipped docs
22:22 hoelzro ab5tract: that's an interesting idea
22:23 hoelzro we'll have to see what TimToady thinks
22:23 ab5tract hoelzro: glad you think so!
22:24 ab5tract i'm curious to hear what he will say
22:24 ab5tract basically i've been spending a lot of time blowing my own mind in the moar repl
22:25 ab5tract and thinking "i wish i had somewhere useful to stash that example"
22:26 ab5tract other than just a flat text file growing in perl 6 examples
22:27 hoelzro like an image?
22:27 ab5tract i'd say more like a network
22:28 hoelzro ah ha
22:28 hoelzro sorry, I have to go for now
22:28 hoelzro I have class in a bit!
22:28 ab5tract okay, cheers hoelzro !
22:29 hoelzro later!
22:31 Psyche^ joined #perl6
22:40 firefish5000 How do you extract rules from captures? something like { $_<rule>.say } for $/[*]; ?
22:46 ren1us joined #perl6
22:46 ren1us anyone know if there's p6 syntax highlighting available for sublime?
22:53 timotimo i don't think so :(
22:55 ren1us i found this last night, but it doesn't seem to actually do anything: https://github.com/cognominal/sublime-perl6
22:57 pippo joined #perl6
22:58 Guest10538 joined #perl6
23:00 xragnar_ joined #perl6
23:01 japhb .ask lizmat I saw your benchmark in the comments for the List.ACCEPTS optimization.  Care for a perl6-bench commit bit?  :-)
23:01 yoleaux japhb: I'll pass your message to lizmat.
23:12 lastofthe joined #perl6
23:18 pippo m: grammar G { rule TOP {<line>}; rule line {\N+}}; G.parse('Hello World'); say $<line>;
23:18 camelia rakudo-moar cf69d8: OUTPUT«「Hello World」␤␤»
23:19 pippo m: grammar G { rule TOP {<line>}; rule line {\N+}}; G.parse('Hello World'); say A ~ $<line>;
23:19 camelia rakudo-moar cf69d8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/BkZ3UBIcMoâ�¤Undeclared name:â�¤    A used at line 1â�¤â�¤Â»
23:19 BenGoldberg joined #perl6
23:19 pippo m: grammar G { rule TOP {<line>}; rule line {\N+}}; G.parse('Hello World'); say ~A ~ $<line>;
23:19 camelia rakudo-moar cf69d8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kudVtopjseâ�¤Undeclared name:â�¤    A used at line 1â�¤â�¤Â»
23:19 pippo m: grammar G { rule TOP {<line>}; rule line {\N+}}; G.parse('Hello World'); say 'A' ~ $<line>;
23:19 camelia rakudo-moar cf69d8: OUTPUT«AHello World␤»
23:19 pippo m: grammar G { rule TOP {<line>}; rule line {\N+}}; G.parse('Hello World'); say $<line>;
23:20 camelia rakudo-moar cf69d8: OUTPUT«「Hello World」␤␤»
23:20 pippo firefish5000: ^^ does this help?
23:23 firefish5000 Unfortunatly no. My case is something like...
23:23 firefish5000 m: grammar G { rule TOP { (<word>)+ }; rule word {\S+}}; G.parse('Hello World'); for $/[*] { say $_<word>;}
23:23 camelia rakudo-moar cf69d8: ( no output )
23:23 firefish5000 m: grammar G { rule TOP { (<word>)+ }; rule word {\S+}}; G.parse('Hello World'); for $/[0..*] { say $_<word>;}
23:23 camelia rakudo-moar cf69d8: ( no output )
23:24 firefish5000 m: grammar G { rule TOP { (<word>)+ }; rule word {\S+}}; G.parse('Hello World'); say $/[0]<word>;
23:24 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:24 pippo m: grammar G { rule TOP { (<word>)+ }; rule word {\S+}}; G.parse('Hello World'); say $<word>;
23:24 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:25 firefish5000 But I keep getting (Any) or 'postcircumfix:<{ }> not defined for type' Any/Array
23:25 pippo m: grammar G { rule TOP { <word>+ }; rule word {\S+}}; G.parse('Hello World'); say $<word>;
23:25 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:26 firefish5000 m: grammar G { rule TOP { (<word>)+ }; rule word {\S+}}; G.parse('Hello World'); say $/.perl;
23:26 camelia rakudo-moar cf69d8: OUTPUT«Any␤»
23:26 pippo m: grammar G { rule TOP { <word>+ }; rule word {\S+}}; my $result = G.parse('Hello World'); say $result<word>;
23:26 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:26 BenGoldberg joined #perl6
23:26 firefish5000 m: grammar G { rule TOP { (<word>)+ }; rule word {\S+}}; G.parse('Hello World'); say $/;
23:26 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:26 firefish5000 mayby I mistyped something this time
23:27 pippo m: grammar G { rule TOP { <word>+ }; rule word {\w+}}; my $result = G.parse('Hello World'); say $result<word>;
23:27 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:27 pippo m: grammar G { rule TOP { <word>+ }; rule word {\w+}}; my $result = G.parse('Hello World'); say $/;
23:27 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:27 firefish5000 m: grammar G { rule TOP { (<word>)+ }; token word {\S+}}; G.parse('Hello World'); say $/;
23:27 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:27 firefish5000 m: grammar G { rule TOP { <word>+ }; token word {\S+}}; G.parse('Hello World'); say $/;
23:27 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:28 firefish5000 m: grammar G { rule TOP { <word>+ }; token word {\S+}}; my $res = G.parse('Hello World'); say $res.perl;
23:28 camelia rakudo-moar cf69d8: OUTPUT«Any␤»
23:30 firefish5000 Ahh, stupid mistak here... I never match the space
23:30 firefish5000 m: grammar G { rule TOP { (<word>+\s+) }; token word {\S+}}; my $res = G.parse('Hello World'); say $res.perl;
23:30 camelia rakudo-moar cf69d8: OUTPUT«Any␤»
23:30 firefish5000 m: grammar G { rule TOP { (<word>\s*)+ }; token word {\S+}}; my $res = G.parse('Hello World'); say $res.perl;
23:30 camelia rakudo-moar cf69d8: OUTPUT«Match.new(orig => "Hello World", from => 0, to => 11, ast => Any, list => ([Match.new(orig => "Hello World", from => 0, to => 6, ast => Any, list => ().list, hash => EnumMap.new("word", Match.new(orig => "Hello World", from => 0, to => 5, ast => Any, list …»
23:31 firefish5000 m: grammar G { rule TOP { (<word> \s+)+ }; rule word {\S+}}; G.parse('Hello World'); for $/[0..*] { say $_<word>;}
23:31 camelia rakudo-moar cf69d8: ( no output )
23:31 firefish5000 m: grammar G { rule TOP { (<word> \s+)+ }; rule word {\S+}}; G.parse('Hello World'); say $/.perl;}
23:31 camelia rakudo-moar cf69d8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/H_36zwMLkt�Unexpected closing bracket�at /tmp/H_36zwMLkt:1�------> [32m}}; G.parse('Hello World'); say $/.perl;[33m�[31m}[0m�»
23:32 firefish5000 m: grammar G { rule TOP { (<word> \s+)+ }; rule word {\S+}}; G.parse('Hello World'); say $/.perl;
23:32 camelia rakudo-moar cf69d8: OUTPUT«Any␤»
23:32 TimToady that can't match
23:33 TimToady \s+ requires a space after World
23:33 firefish5000 m: grammar G { rule TOP { (<word> \s*)+ }; rule word {\S+}}; G.parse('Hello World'); say $/.perl;
23:33 camelia rakudo-moar cf69d8: OUTPUT«Match.new(orig => "Hello World", from => 0, to => 11, ast => Any, list => ([Match.new(orig => "Hello World", from => 0, to => 6, ast => Any, list => ().list, hash => EnumMap.new("word", Match.new(orig => "Hello World", from => 0, to => 5, ast => Any, list …»
23:33 firefish5000 Ahh, Thanks TimeToady.
23:34 TimToady and you don't really need it there anyway
23:34 firefish5000 *TimToady.
23:34 pippo m: grammar G { rule TOP { (<word> \s*)+ }; rule word {\S+}}; G.parse('Hello World'); say $<word>;
23:34 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:34 TimToady m: grammar G { rule TOP { (<word> )+ }; rule word {\S+}}; G.parse('Hello World'); say $/.perl;
23:34 camelia rakudo-moar cf69d8: OUTPUT«Match.new(orig => "Hello World", from => 0, to => 11, ast => Any, list => ([Match.new(orig => "Hello World", from => 0, to => 6, ast => Any, list => ().list, hash => EnumMap.new("word", Match.new(orig => "Hello World", from => 0, to => 5, ast => Any, list …»
23:34 TimToady since 'rule' already implies that whitespace matches \s*
23:35 TimToady I wouldn't use rule for word though, it's obviously just a token
23:35 TimToady m: grammar G { rule TOP { (<word> )+ }; token word { \S+ }}; G.parse('Hello World'); say $/.perl;
23:35 camelia rakudo-moar cf69d8: OUTPUT«Match.new(orig => "Hello World", from => 0, to => 11, ast => Any, list => ([Match.new(orig => "Hello World", from => 0, to => 6, ast => Any, list => ().list, hash => EnumMap.new("word", Match.new(orig => "Hello World", from => 0, to => 5, ast => Any, list …»
23:36 TimToady m: grammar G { rule TOP { <word> + }; token word { \S+ }}; G.parse('Hello World'); say $/.perl;
23:36 pippo m: grammar G { rule TOP { (<word> )+ }; token word { \S+ }}; my $result = G.parse('Hello World'); say $result<word>;
23:36 camelia rakudo-moar cf69d8: OUTPUT«Match.new(orig => "Hello World", from => 0, to => 11, ast => Any, list => ().list, hash => EnumMap.new("word", [Match.new(orig => "Hello World", from => 0, to => 5, ast => Any, list => ().list, hash => EnumMap.new()), Match.new(orig => "Hello World", from …»
23:36 camelia rakudo-moar cf69d8: OUTPUT«(Any)␤»
23:36 TimToady m: grammar G { rule TOP { <word> + }; token word { \S+ }}; G.parse('Hello World'); say $/<word>;
23:36 camelia rakudo-moar cf69d8: OUTPUT«「Hello」␤ 「World」␤␤»
23:36 firefish5000 Well, its just a test case, so rule should work
23:36 firefish5000 m: grammar G { rule TOP { (<word> )+ }; rule word {\S+}}; G.parse('Hello World'); for $/[*] { say $_<word> ; } ;
23:36 camelia rakudo-moar cf69d8: OUTPUT«postcircumfix:<{ }> not defined for type Array␤  in method gist at src/gen/m-CORE.setting:13326␤  in sub say at src/gen/m-CORE.setting:14281␤  in block <unit> at /tmp/44w8QIaKf6:1␤␤»
23:37 TimToady see what I did
23:37 TimToady <word> +
23:38 TimToady m: grammar G { rule TOP { [<word> ]+ }; token word { \S+ }}; G.parse('Hello World'); say $/<word>;
23:38 camelia rakudo-moar cf69d8: OUTPUT«「Hello」␤ 「World」␤␤»
23:38 TimToady there's another way
23:38 TimToady if you don't like the ws before the +
23:38 pippo m: grammar G { rule TOP { [<word> ]+ }; token word { \S+ }}; G.parse('Hello World'); say $/<word>.WHAT;
23:38 camelia rakudo-moar cf69d8: OUTPUT«(Array)␤»
23:39 pippo m: grammar G { rule TOP { [<word> ]+ }; token word { \S+ }}; G.parse('Hello World'); .say for $/<word>;
23:39 camelia rakudo-moar cf69d8: OUTPUT«「Hello」␤ 「World」␤␤»
23:39 firefish5000 But, in the case of [(<rule1>||<rule2>)\h*\n?]+, is there a way to keep the order?
23:40 pippo I learned a new thing. Thank you TimToady.
23:40 xenoterracide joined #perl6
23:40 TimToady [$<rule>=(<rule1>||<rule2>)\h*\n?]+ or so
23:41 TimToady or just write a rule that does rule1||rule2
23:41 TimToady don't try to pack too much into one regex
23:42 firefish5000 hmm, I suppose that would work.. but it makes the last 2hr of struggling seem so pointless.
23:43 TimToady you have to enjoy struggling if you're to make it in this line of work :)
23:45 timotimo i decided to do a btrfs relocation across devices and not have a backup before starting it ... this will be ... interesting
23:46 firefish5000 I enjoy it well. It's just that when the simple answer is given by someone else, I cannot help but feel defeated.
23:46 * firefish5000 guesses that asking for help would be pointless if he doesn't want the answer
23:47 TimToady you are allowed to feel bemused, but you are not allowed to feel defeated :)
23:47 lastofthe firefish5000: the path to simple is long and winding :)
23:48 TimToady indeed, it's taken me several decades to get here :)
23:50 TimToady you kind of have to expect to try a thousand ways not to invent the light bulb, and then when you do invent the light bulb, you'll be wrong after another century or so :)
23:50 leont joined #perl6
23:51 TimToady the only true defeat is one that you learn nothing from
23:52 TimToady that's why it sucks to be dead after one :)
23:52 leont What's the equivalent of perldoc for rakudo?
23:53 BenGoldberg Nicola Tesla invented the flourescent lamp a century ago, but it took until a decade ago for someone to think of twisting it into a helix for more compactness.
23:53 leont It seems I'm doing something wrong with spurt, that I think used to work a year ago, but I don't know how I should use it
23:53 firefish5000 well, i'll do my best. although my light bulb usualy needs a centurys worth of refinement.
23:53 firefish5000 TimToady: lol
23:53 pippo night #perl6!
23:53 pippo leave
23:54 pippo left #perl6

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

Perl 6 | Reference Documentation | Rakudo