Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-06-04

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:03 felipe joined #perl6
00:12 takadonet left #perl6
00:15 takadonet joined #perl6
00:19 cj joined #perl6
00:34 bacek joined #perl6
00:39 Whiteknight joined #perl6
00:52 baest joined #perl6
00:54 cavelife^ joined #perl6
01:02 Sark hi
01:13 kimtaro joined #perl6
01:22 viirya joined #perl6
01:25 dduncan joined #perl6
01:27 dduncan I'm trying to figure out the right terminology for something I once saw in Perl 6 ...
01:27 dduncan the kind of twigil you use in a closure to reference your caller's lexicals
01:27 dduncan unless that has gone away in favor of lift
01:27 dduncan specifically I refer to accessing the lexicals of the routine where the closure was *declared*
01:28 synth joined #perl6
01:28 dduncan or maybe I mean used ...
01:29 s1n dduncan: $*CALLER?
01:29 dduncan for example, when foo() calls "map", you are inline-declaring and passing a Callable to "map", which "map" then invokes on your behalf ... and that callable may want to reference lexicals in foo()
01:30 s1n viklund: does Web.pm effort (on github) not currently build?
01:32 s1n rakudo: class A { method foo($bar)
01:32 s1n say "oh hai"
01:32 s1n end
01:32 s1n }
01:32 s1n doh
01:32 p6eval rakudo 77db80: OUTPUT«Malformed method definition at line 2, near "foo($bar)"␤in Main (src/gen_setting.pm:0)␤»
01:33 s1n viklund: it seems to not like the "method redirect(...) \n...\nend" format
01:33 s1n is that a valid way of defining functions anymore?
01:34 kimtaro joined #perl6
01:35 StephenPollei rakudo: class A { method foo($bar) {...} }
01:35 p6eval rakudo 77db80:  ( no output )
01:35 meppl good night
01:39 StephenPollei rakudo: class A { method foo($bar) { say 'cheese'} } ; my A $a=  A.new(); a.foo()
01:39 p6eval rakudo 77db80: OUTPUT«Could not find non-existent sub a␤»
01:39 Tene s1n: has that *ever* been valid?
01:39 StephenPollei rakudo: class A { method foo($bar) { say 'cheese'} } ; my A $a=  A.new(); $a.foo()
01:39 p6eval rakudo 77db80: OUTPUT«too few arguments passed (1) - 3 params expected␤in method A::foo (/tmp/YQYJOjgxaf:2)␤called from Main (/tmp/YQYJOjgxaf:2)␤»
01:40 Tene s1n: I don't remember ever seeing that in Perl 6 specs.
01:40 s1n Tene: dunno, it's in Web/Response.pm
01:40 pmichaud ...what's the question?
01:41 Tene in masak's Web repo?
01:41 s1n pmichaud: lemme linky...
01:41 StephenPollei rakudo: class A { method foo($bar) { say 'cheese'} } ; my A $a=  A.new(); $a.foo('bar')
01:41 p6eval rakudo 77db80: OUTPUT«cheese␤»
01:41 Tene method foo() \n...\n end
01:41 s1n http://github.com/masak/web/blob/56156ff72bc3c083edb67bbe0b3267a068f0ee0c/lib/Web/Response.pm#L23
01:41 s1n i've never seen that syntax before
01:42 s1n rakudo currently barfs, as does the configure/make for web
01:42 s1n swap it out with the usual {} suspects and it works fine
01:42 Tene s1n: I have an older version of that repo, and it doesn't have that.
01:42 s1n err it builds fine
01:42 Tene I suspect user error
01:42 s1n Tene: dunno, i assumed that was current
01:42 pmichaud that's a recent change, yes.
01:43 s1n Tene: you have commit access iirc, go ahead and change it :)
01:43 pmichaud it was added on 05-18
01:43 Tene pmichaud: ETA for protoregexes, btw?
01:43 pmichaud er, 05-19
01:43 pmichaud Tene: I don't know at the moment.  It may turn out that I need to redo the regex parser first.
01:43 Tene s1n: I'm on my phone right now... no free wifi at minneapolis airport
01:43 simcop2387 joined #perl6
01:43 Tene pmichaud: OK. :)
01:43 simcop2387-vnc joined #perl6
01:44 s1n Tene: okay, don't know how you and masak are handling issues, but i thought i'd point it out
01:44 Tene s1n: thanks. :)
01:44 s1n Tene: any time
01:44 pmichaud My inner sense of timing is telling me not to push too hard on it yet.  Usually that's because there's another change about to come up in the spec.  :-)
01:45 pmichaud At least, whenever I've listened to that inner sense of timing before, I've been glad for it shortly thereafter :-)
01:58 payload joined #perl6
01:59 takadonet joined #perl6
01:59 takadonet hey everyone
02:00 TimToady dduncan: you're looking for OUTER::<$x>
02:01 TimToady or just skip the OUTER and use normal lexical scoping
02:02 takadonet what is an easy way to determine if iteration in a loop is the last one?
02:03 TimToady the easiest way to predict the future is to create it
02:04 takadonet Indeed
02:12 silug joined #perl6
02:18 viirya joined #perl6
02:55 viirya joined #perl6
03:00 viirya joined #perl6
03:05 viirya joined #perl6
03:11 agentzh joined #perl6
03:15 pyrimidine joined #perl6
03:17 agentzh joined #perl6
03:19 agentzh joined #perl6
03:30 david___ joined #perl6
03:34 pyrimidine rakudo: for 1..3 -> $i { for $i..3 -> $j {}; say $i }
03:34 p6eval rakudo 77db80: OUTPUT«4␤4␤4␤»
03:34 TimToady er, ow
03:34 pyrimidine yeah
03:35 pyrimidine but it loops three times
03:35 TimToady it's incrementing $i rather than a temporary
03:35 pyrimidine rakudo: for 1..3 -> $i { my $tmp = $i; for $i..3 -> $j {}; say $i }
03:36 p6eval rakudo 77db80: OUTPUT«4␤4␤4␤»
03:36 pyrimidine rakudo: for 1..3 -> $i { my $tmp = $i; for $i..3 -> $j {}; say $tmp }
03:36 p6eval rakudo 77db80: OUTPUT«4␤4␤4␤»
03:36 TimToady now that's bizarre
03:36 pyrimidine rakudo: for 1..3 -> $i { say $i }
03:36 p6eval rakudo 77db80: OUTPUT«1␤2␤3␤»
03:39 TimToady rakudo: for 1..3 -> $i { my $tmp = $i; for $tmp..3 -> $j {}; say $i }
03:39 p6eval rakudo 77db80: OUTPUT«4␤4␤4␤»
03:39 dduncan TimToady, thanks for the response ...
03:39 TimToady rakudo: for 1..3 -> $i { my $tmp = $i; for $tmp..3 -> $j {}; say $i.WHAT }
03:39 p6eval rakudo 77db80: OUTPUT«Int()␤Int()␤Int()␤»
03:39 dduncan the situation I was thinking of was specifically how to deal with the general case where different scopes often have a variable with the same lexical name, such as $_
03:40 TimToady then OUTER::<$_> is fine
03:40 dduncan okay
03:40 TimToady OUTER::OUTER::<$_> etc
03:40 dduncan excellent, just the sort of thing I was hoping for
03:40 TimToady corresponding for the dynamic scope is CALLER::
03:41 pyrimidine rakudo: for 1..3 { for $_..3 -> $j {}; $_.say }
03:41 p6eval rakudo 77db80: OUTPUT«1␤2␤3␤»
03:41 pyrimidine rakudo: for 1..3 { for $_..3 -> $j {$j.say};  }
03:41 p6eval rakudo 77db80: OUTPUT«1␤2␤3␤2␤3␤3␤»
03:42 davidad joined #perl6
03:42 TimToady rakudo: for 1..3 -> $i { my $tmp = $i; for $tmp..3 -> $j {}; $i.say }
03:42 p6eval rakudo 77db80: OUTPUT«4␤4␤4␤»
03:42 pyrimidine rakudo: for 1..3 -> $i { for $i..3 -> $j {}; $i.say }
03:42 p6eval rakudo 77db80: OUTPUT«4␤4␤4␤»
03:43 pyrimidine ick
03:43 * pyrimidine rakudobug
03:43 TimToady like $i.say is being way too lazy
03:43 TimToady rakudo: for 1..3 -> $i { my $tmp = $i; for $tmp..4 -> $j {}; $i.say }
03:43 p6eval rakudo 77db80: OUTPUT«5␤5␤5␤»
03:43 TimToady yeep, it's the inner loop
03:44 TimToady probably just clobbering a register
03:45 TimToady rakudo: for 1..3 -> $i { my $tmp = $i; for $tmp..4 -> $j { say "($j;$i)"}; $i.say }
03:45 p6eval rakudo 77db80: OUTPUT«(1;5)␤(2;5)␤(3;5)␤(4;5)␤5␤(2;5)␤(3;5)␤(4;5)␤5␤(3;5)␤(4;5)␤5␤»
03:45 TimToady yow
03:45 pyrimidine that's nasty
03:45 TimToady $i is being clobbered with the off-the-end range value, or something
03:46 pyrimidine yup
03:46 TimToady I think you win the Nasty Bug of the Day award
03:46 pyrimidine thanks, I think
03:50 xinming_ joined #perl6
03:54 pyrimidine rakudo: for 1..3 { for $_..4 -> $j { say "($j;$_)"}; $_.say}
03:55 p6eval rakudo 77db80: OUTPUT«(1;1)␤(2;1)␤(3;1)␤(4;1)␤1␤(2;2)␤(3;2)␤(4;2)␤2␤(3;3)␤(4;3)␤3␤»
03:56 TimToady rakudo: for 1..3 -> $i is copy { my $tmp = $i; for $tmp..4 -> $j { say "($j;$i)"}; $i.say }
03:56 p6eval rakudo 77db80: OUTPUT«(1;1)␤(2;1)␤(3;1)␤(4;1)␤1␤(2;2)␤(3;2)␤(4;2)␤2␤(3;3)␤(4;3)␤3␤»
03:56 TimToady heh
03:56 pyrimidine we have a winner
03:57 TimToady rakudo: for 1..3 -> $i is rw { my $tmp = $i; for $tmp..4 -> $j { say "($j;$i)"}; $i.say }
03:57 p6eval rakudo 77db80: OUTPUT«(1;1)␤(2;1)␤(3;1)␤(4;1)␤1␤(2;2)␤(3;2)␤(4;2)␤2␤(3;3)␤(4;3)␤3␤»
03:57 TimToady rakudo: for 1..3 -> $i is readonly { my $tmp = $i; for $tmp..4 -> $j { say "($j;$i)"}; $i.say }
03:58 p6eval rakudo 77db80: OUTPUT«(1;5)␤(2;5)␤(3;5)␤(4;5)␤5␤(2;5)␤(3;5)␤(4;5)␤5␤(3;5)␤(4;5)␤5␤»
03:58 TimToady rakudo: for 1..3 -> $_ is readonly { my $tmp = $_; for $tmp..4 -> $j { say "($j;$_)"}; $_.say }
03:58 p6eval rakudo 77db80: OUTPUT«(1;5)␤(2;5)␤(3;5)␤(4;5)␤5␤(2;5)␤(3;5)␤(4;5)␤5␤(3;5)␤(4;5)␤5␤»
03:58 TimToady something to do with the readonly proxy, maybe
03:59 pyrimidine appears so
04:00 TimToady rakudo: for 1..3 -> $_ { my $tmp = $_; for $tmp..4 -> $j { say "($j;$_)"}; $_.say }
04:00 p6eval rakudo 77db80: OUTPUT«(1;5)␤(2;5)»
04:00 TimToady o_O
04:00 TimToady rakudo: for 1..3 <-> $_ { my $tmp = $_; for $tmp..4 -> $j { say "($j;$_)"}; $_.say }
04:00 p6eval rakudo 77db80: OUTPUT«(1;1)␤(2;1)␤(3;1)␤(4;1)␤1␤(2;2)␤(3;2)␤(4;2)␤2␤(3;3)␤(4;3)␤3␤»
04:04 pyrimidine rakudo: for 1,3 -> $i { my $tmp = $i; for $tmp,4 -> $j { say "($j;$i)"}; $i.say }
04:04 p6eval rakudo 77db80: OUTPUT«(1;1)␤(4;1)␤1␤(3;3)␤(4;3)␤3␤»
04:06 pyrimidine rakudo: for 1,3 -> $i { my $tmp = $i; for $tmp..4 -> $j { say "($j;$i)"}; $i.say }
04:06 p6eval rakudo 77db80: OUTPUT«(1;5)␤(2;5)␤(3;5)␤(4;5)␤5␤(3;5)␤(4;5)␤5␤»
04:06 pyrimidine It's Range
04:08 alester_ joined #perl6
04:14 japhb joined #perl6
04:17 pyrimidine_ joined #perl6
04:19 pyrimidine__ joined #perl6
04:29 pyrimidine RT #66280 on the pointy blocks issue above
04:29 TimToady pyrimidine++
04:30 * pyrimidine sleep
04:30 TimToady night
04:39 szabgab joined #perl6
04:53 lambdabot joined #perl6
05:10 beggars joined #perl6
05:10 cotto joined #perl6
05:15 teun_ joined #perl6
05:16 Jaap__ joined #perl6
05:16 Jaap__ left #perl6
05:16 Jaaaap joined #perl6
05:17 Jaaaap Does anybody know how to fix an "Could not find non-existent sub if" error in rakudo?
05:19 kate21de joined #perl6
05:21 dduncan left #perl6
05:36 Tene Jaaaap: what sub are you trying to call?
05:37 Jaaaap no real sub just   if (a == 3) { print 3; }
05:38 Tene that's trying to call a sub named 'a'.
05:46 Jaaaap oh sorry i mean $a
05:46 finanalyst joined #perl6
05:47 finanalyst hi everyone
05:47 Tene rakudo: my $a  3; if $a == 3 { print 3 }
05:47 p6eval rakudo 77db80: OUTPUT«Statement not terminated properly at line 2, near "3; if $a ="␤in Main (src/gen_setting.pm:0)␤»
05:47 Tene finanalyst: hi
05:48 finanalyst i just send an email to p6l about slowness parsing a grammar. Was that a good place to send, or should I ask here
05:48 Tene rakudo: my $a = 3; if $a == 3 { print 3; };
05:48 p6eval rakudo 77db80: OUTPUT«3»
05:48 Tene Jaaaap: like that?
05:49 Tene finanalyst: parrot-dev is where I would have sent it, fwiw.
05:49 Tene prolly fine where it it, though.
05:56 Jaaaap Tene, i'll post the code. hold on.
05:56 Jaaaap grammar Grmmr { .. }
05:56 Jaaaap class Actions { .. }
05:57 Jaaaap my $action = Actions.new();
05:57 Jaaaap Grmmr.parse('alpha beta', :action($action));
05:57 Jaaaap if($action.in-a == 1){ print 'first action has been called'};
05:57 Jaaaap ERROR
06:17 Jaaaap strange eh?
06:17 TimToady what is the error?
06:18 Jaaaap Could not find non-existent sub if
06:18 TimToady replace the parens with whitespace
06:18 TimToady std: if($action.in-a == 1){ print 'first action has been called'};
06:18 Jaaaap ok hold on
06:18 p6eval std 26999: OUTPUT«Potential difficulties:␤  Variable $action is not predeclared at /tmp/ozzaGCqd2y line 1:␤------> [32mif($action[31m.in-a == 1){ print 'first action has bee[0m␤Undeclared routine:␤       if used at 1 ␤ok 00:02 36m␤»
06:18 TimToady std: my $action; if($action.in-a == 1){ print 'first action has been called'};
06:18 p6eval std 26999: OUTPUT«Undeclared routine:␤   if used at 1 ␤ok 00:02 36m␤»
06:19 TimToady std: my $action; if($action.in-a == 1) { print 'first action has been called'};
06:19 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤if() interpreted as function call at line 1 ; please use whitespace instead of parens␤Unexpected block in infix position (two terms in a row) at /tmp/0RRaXKYKgW line 1:␤------> [32mmy $action; if($action.in-a == 1) [31m{ print 'first action has been
06:19 p6eval ..calle…
06:19 TimToady std: my $action; if ($action.in-a == 1) { print 'first action has been called'};
06:19 p6eval std 26999: OUTPUT«ok 00:02 36m␤»
06:19 TimToady std: my $action; if (\$action.in-a == 1 { print 'first action has been called'};
06:19 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/BZcifpOoF3 line 1:␤------> [32mmy $action; if (\$action.in-a == 1 [31m{ print 'first action has been called'};[0m␤    expecting any of:␤
06:19 p6eval ..infix or me…
06:19 TimToady std: my $action; if $action.in-a == 1 { print 'first action has been called'};
06:19 p6eval std 26999: OUTPUT«ok 00:02 36m␤»
06:20 Jaaaap std: grammar Grmmr { rule  TOP { <a> <b> } token a   { 'a' \w+ {*} } token b   { 'b' \w+ {*} } }
06:20 Jaaaap std: sub c($c) { print $c, "\n"; }
06:20 Jaaaap std: class Actions { has $.in-a = 0; has $.in-b = 0; has $.calls = ''; method a($/) { $!in-a++; $!calls ~= 'a'; } method b($x) { $!in-b++; $!calls ~= 'b'; } }
06:20 Jaaaap std: my $action = Actions.new();
06:20 Jaaaap std: Grmmr.parse('alpha beta', :action($action));
06:20 Jaaaap std: if($action.in-a == 1){ print 'first action has been called'};
06:20 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/ftQaxwhdxx line 1:␤------> [32mgrammar Grmmr { rule  TOP { <a> <b> } [31mtoken a   { 'a' \w+ {*} } token b   { 'b[0m␤    expecting any of:␤  infix or meta-infix␤      infix stopper␤    standard
06:20 p6eval ..stopper␤ statemen…
06:20 p6eval std 26999: OUTPUT«ok 00:04 39m␤»
06:20 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/4VkghgLZ7A line 1:␤------> [32mhod a($/) { $!in-a++; $!calls ~= 'a'; } [31mmethod b($x) { $!in-b++; $!calls ~= 'b';[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard
06:20 p6eval ..stopper␤ statem…
06:20 p6eval std 26999: OUTPUT«Undeclared name:␤      Actions used at 1 ␤ok 00:02 36m␤»
06:21 p6eval std 26999: OUTPUT«Potential difficulties:␤  Variable $action is not predeclared at /tmp/zOGSvoWZHO line 1:␤------> [32mrmmr.parse('alpha beta', :action($action[31m));[0m␤Undeclared name:␤ Grmmr used at 1 ␤ok 00:02 37m␤»
06:21 p6eval std 26999: OUTPUT«Potential difficulties:␤  Variable $action is not predeclared at /tmp/6Ev8Uy6DWW line 1:␤------> [32mif($action[31m.in-a == 1){ print 'first action has bee[0m␤Undeclared routine:␤       if used at 1 ␤ok 00:02 36m␤»
06:21 Jaaaap hmm guess i cant just remove the newlines ;-)
06:22 Jaaaap std: grammar Grmmr { rule  TOP { <a> <b> } token a  { 'a' \w+ {*} } token b  { 'b' \w+ {*} } }
06:22 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/fBetpKfNLt line 1:␤------> [32mgrammar Grmmr { rule  TOP { <a> <b> } [31mtoken a  { 'a' \w+ {*} } token b  { 'b' [0m␤    expecting any of:␤  infix or meta-infix␤      infix stopper␤    standard
06:22 p6eval ..stopper␤ statemen…
06:22 TimToady not if you've assumed ; after }\n
06:22 iblechbot joined #perl6
06:22 Jaaaap std: grammar Grmmr { rule  TOP { <a> <b> }; token a  { 'a' \w+ {*} }; token b  { 'b' \w+ {*} }; }
06:22 p6eval std 26999: OUTPUT«ok 00:03 36m␤»
06:22 Jaaaap class Actions { has $.in-a = 0; has $.in-b = 0; has $.calls = ''; method a($/) { $!in-a++; $!calls ~= 'a'; } method b($x) { $!in-b++; $!calls ~= 'b'; } }
06:23 Jaaaap std: class Actions { has $.in-a = 0; has $.in-b = 0; has $.calls = ''; method a($/) { $!in-a++; $!calls ~= 'a'; } method b($x) { $!in-b++; $!calls ~= 'b'; } }
06:23 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/TiUr2GNQDJ line 1:␤------> [32mhod a($/) { $!in-a++; $!calls ~= 'a'; } [31mmethod b($x) { $!in-b++; $!calls ~= 'b';[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard
06:23 p6eval ..stopper␤ statem…
06:23 Jaaaap std: class Actions { has $.in-a = 0; has $.in-b = 0; has $.calls = ''; method a($/) { $!in-a++; $!calls ~= 'a'; }; method b($x) { $!in-b++; $!calls ~= 'b'; }; }
06:23 p6eval std 26999: OUTPUT«ok 00:03 38m␤»
06:24 Jaaaap td: grammar Grmmr { rule  TOP { <a> <b> }; token a   { 'a' \w+ {*} }; token b   { 'b' \w+ {*} }; }; sub c($c) { print $c, "\n"; }; class Actions { has $.in-a = 0; has $.in-b = 0; has $.calls = ''; method a($/) { $!in-a++; $!calls ~= 'a'; } method b($x) { $!in-b++; $!calls ~= 'b'; } }; my $action = Actions.new(); Grmmr.parse('alpha beta', :action($action)); if($action.in-a == 1){ print 'first action has been called'};
06:24 Jaaaap std: grammar Grmmr { rule  TOP { <a> <b> }; token a   { 'a' \w+ {*} }; token b   { 'b' \w+ {*} }; }; sub c($c) { print $c, "\n"; }; class Actions { has $.in-a = 0; has $.in-b = 0; has $.calls = ''; method a($/) { $!in-a++; $!calls ~= 'a'; } method b($x) { $!in-b++; $!calls ~= 'b'; } }; my $action = Actions.new(); Grmmr.parse('alpha beta', :action($action)); if($action.in-a == 1){ print 'first action has been called'};
06:24 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Statements must be separated with semicolon at /tmp/TYW4A2p79h line 1:␤------> [32mhod a($/) { $!in-a++; $!calls ~= 'a'; } [31mmethod b($x) { $!in-b++; $!calls ~= 'b';[0m␤    expecting any of:␤        infix or meta-infix␤      infix stopper␤    standard
06:24 p6eval ..stopper␤ statem…
06:25 Jaaaap std: grammar Grmmr { rule  TOP { <a> <b> }; token a   { 'a' \w+ {*} }; token b   { 'b' \w+ {*} }; }; sub c($c) { print $c, "\n"; }; class Actions { has $.in-a = 0; has $.in-b = 0; has $.calls = ''; method a($/) { $!in-a++; $!calls ~= 'a'; }; method b($x) { $!in-b++; $!calls ~= 'b'; }; }; my $action = Actions.new(); Grmmr.parse('alpha beta', :action($action)); if($action.in-a == 1){ print 'first action has been called'};
06:25 p6eval std 26999:  ( no output )
06:25 Jaaaap hmmm that's strange
06:25 TimToady timed out maybe
06:25 TimToady if() is still wrong
06:26 Jaaaap TimToady: what do you mean if() is still wrong?
06:26 TimToady any identifier followed by ( is a function call, not a keyword
06:26 TimToady std: if()
06:26 Jaaaap ah
06:26 p6eval std 26999: OUTPUT«Undeclared routine:␤   if used at 1 ␤ok 00:02 35m␤»
06:27 TimToady std: if() {...}
06:27 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤if() interpreted as function call at line 1 ; please use whitespace instead of parens␤Unexpected block in infix position (two terms in a row) at /tmp/DRuBmob3xe line 1:␤------> [32mif() [31m{...}[0m␤    expecting any of:␤      infix or meta-infix␤
06:27 p6eval ..infix stopp…
06:27 davidad joined #perl6
06:28 Jaaaap thanks a lot. i didn't understand the "replace parens by spaces" but now i do ;)
06:41 snarkyboojum joined #perl6
06:46 DemoFreak joined #perl6
07:04 dakkar joined #perl6
07:08 Jaaaap left #perl6
07:10 sparc joined #perl6
07:13 hanekomu joined #perl6
07:26 Matt-W Good morning
07:46 Muixirt joined #perl6
08:13 iblechbot joined #perl6
08:15 unitxt left #perl6
08:19 cotto jnthn, something ate part of the uc example in your latest journal entry
08:23 Muixirt my @words = ("foo" "bar" "baz");
08:24 cotto I just though he'd like to know.  It's not much of stretch to fill in the blanks.
08:24 Muixirt :-)
08:27 cotto rakudo seems to complain about the comma-free version
08:27 amoc__ joined #perl6
08:28 cotto having .perl built in is *really* nice
08:28 Muixirt that was my first approach, don't rush me
08:29 Muixirt cotto, why
08:29 Muixirt ?
08:31 cotto It's nice how easy .perl makes it to inspect a data structure.
08:32 cotto It's very useful when learning a language, especially one as complex as perl6
08:32 DanielC joined #perl6
08:32 payload joined #perl6
08:36 Muixirt does the signatures of the candidates work?
08:37 finanalyst joined #perl6
08:37 Muixirt missing semicolons?
08:43 amoc joined #perl6
08:46 ZuLuuuuuu joined #perl6
08:49 Matt-W my @words = <foo bar baz?
08:49 Matt-W my @words = <foo bar baz>
08:58 cotto That's it.  Thanks.
09:03 amoc__ joined #perl6
09:08 araujo joined #perl6
09:12 Jaaaa joined #perl6
09:12 Jaaaa left #perl6
09:13 Jaaaap joined #perl6
09:13 Jaaaap How do i work with newlines in a Grammar? If i add a \n to a working grammar (and the source), it stops working.
09:14 Jaaaap rule TOP { <a> \n <b> };
09:14 Jaaaap never reaches b
09:17 jnthn Jaaaap: If you're writing a rule, there already is implicit whitespace matching anyway.
09:17 jnthn Including newline characters.
09:17 Jaaaap ah
09:17 jnthn Maybe you want to use regex instead of rule.
09:17 jnthn Which doesn't do that.
09:17 Jaaaap good idea. i'll try.
09:18 jnthn Alternatively, token gives the non-backtracking of rule but with the whitespace magic.
09:18 Jaaaap so token ha sautomatic whitespace stuff too?
09:20 jnthn cotto: Thanks for noticing - HTML makes a lousy blogging language... Fixed. :-)
09:20 luqui joined #perl6
09:21 luqui @seen diakopter
09:21 lambdabot diakopter is in #perl6. I don't know when diakopter last spoke.
09:21 jnthn Jaaaap: No, just rule has it.
09:21 jnthn Jaaaap: token and rule both disable backtracking.
09:21 jnthn regex is pretty much the backtracking semantics what you'd expect with regexes normally.
09:22 Jaaaap cool thx.
09:27 Muixirt jnthn, please explain what this means: proto 'term:' is precedence('z=')
09:27 Muixirt it is at the end of src/parser/grammar.pg
09:31 Muixirt is that valid perl6 code
09:34 jnthn letenku mam :-D
09:35 jnthn oops, mischannel
09:35 jnthn Muixirt: Yes.
09:36 jnthn Muixirt: It's just defining term precedence level, with the operator precedence parser needs to know about.
09:38 Muixirt rakudo: proto test { }
09:38 p6eval rakudo 77db80:  ( no output )
09:38 Muixirt rakudo: proto 'test' { }
09:38 p6eval rakudo 77db80: OUTPUT«Malformed routine definition at line 2, near "'test' { }"␤in Main (src/gen_setting.pm:0)␤»
09:39 jnthn Muixirt: Oh, hmm, the quotes are interesting. :-)
09:40 jnthn Muixirt: I don't know that this line will survive the protoregexes/LTM refactor though.
09:40 jnthn We'll end up with whatever STD.pm does for this.
09:41 jferrero joined #perl6
09:42 DanielC Btw, does Rakudo already support double precision numbers? I'm going to port another Debian shootout benchmark. This one is about double precision arithmetic.
09:44 Muixirt jnthn, i was curious and naive, and tried ./perl -c src/parser/grammar.pg
09:45 Muixirt well ./perl6 of course, not perl :-)
09:46 Muixirt btw. rakudo complains about the non matching =begin / =end pair
09:52 Matt-W jnthn: Good blog
09:52 DanielC rakudo: user constant PI => 3
09:52 p6eval rakudo 77db80: OUTPUT«No applicable methods.␤in Main (/tmp/37ajfGXymy:2)␤»
09:52 DanielC Help?  :-(
09:52 masak joined #perl6
09:52 DanielC o/ masak
09:53 masak DanielC: \o
09:53 DanielC Does anyone know if "use constant" is implemented in Rakudo?
09:53 DanielC rakudo: user constant PI => 3
09:53 p6eval rakudo 77db80: OUTPUT«No applicable methods.␤in Main (/tmp/BAMlfuGuTH:2)␤»
09:53 Matt-W it'd help if you typed 'use' correctly
09:53 DanielC oh!
09:53 DanielC rakudo: use constant PI => 3
09:53 jnthn Rakudo: constant PIE = 3;
09:53 p6eval rakudo 77db80: OUTPUT«Can't find ./constant in @*INC␤in Main (src/gen_setting.pm:439)␤»
09:53 DanielC Matt-W: It might...
09:53 Matt-W but I think you might find Perl 6 has a different mechanism for constants
09:53 DanielC :-)
09:53 jnthn rakudo: constant PI = 3;
09:53 p6eval rakudo 77db80:  ( no output )
09:53 jnthn rakudo: constant PI = 3; say PI;
09:53 p6eval rakudo 77db80: OUTPUT«3␤»
09:54 DanielC jnthn: thanks!
09:54 masak rakudo: constant PI = 3; PI = 4; say PI
09:54 p6eval rakudo 77db80: OUTPUT«Cannot assign to readonly variable.␤in Main (/tmp/cOkThmN31j:2)␤»
09:54 masak heh. :)
09:54 jnthn rakudo: constant π = 3; say π;
09:54 Matt-W DanielC: first assumption is not 'does rakudo do 'use constant'', but 'how do I do constants in perl 6'. Saves time, I find.
09:54 p6eval rakudo 77db80: OUTPUT«3␤»
09:54 jnthn Matt-W: nice try
09:54 jnthn erm, masak
09:54 Matt-W jnthn: tab miss?
09:54 Matt-W hah
09:55 jnthn Matt-W: Yes. :-/
09:55 Matt-W :)
09:55 * Matt-W -> table tennis
09:55 masak jnthn: it used to work. :)
09:55 jnthn masak: Occasionally, we fix bugs. ;-)
09:56 masak jnthn: that, if I don't say it often enough, rocks.
09:56 alanhaggai joined #perl6
09:59 DanielC What does 'sub foo($) {...' mean in Perl 5? I'm converting a program from p5 to p6 and I had never seen that before.
10:00 jnthn It's some kinda prototype thingy but I never understood those...
10:00 masak DanielC: it takes a single argument, which must be 5.
10:01 masak oh, it's a $. sorry. :)
10:01 jnthn lol!
10:01 masak DanielC: see http://perldoc.perl.org/perlsub.html#Prototypes
10:01 jnthn ;-)
10:01 DanielC :-)
10:01 DanielC *click*
10:03 DanielC Ok, so foo($) means "takes a single argument".
10:03 dakkar DanielC: sub foo { $_[0] }; push @a, foo 1, 2, 3 => @a=(1);
10:03 dakkar DanielC: sub foo($) { $_[0] }; push @a, foo 1, 2, 3 => @a=(1,2,3);
10:03 masak I've heard various reliable sources say that prototypes do more harm than good.
10:04 dakkar prototypes change the way the call is parsed, so beware
10:04 DanielC Thanks.
10:04 dakkar masak: I'd put them in the same league as "local": use them when necessary, and only if you know what you are doing
10:04 DanielC Does Perl 6 have prototypes? Not that I plan to use them.
10:04 masak dakkar: right.
10:05 masak DanielC: Perl 6 has full signatures!
10:05 dakkar DanielC: Perl 6 has full-fledged signatures, and you should use them :)
10:05 DanielC That's why I was wondering.
10:05 masak DanielC: see S06.
10:05 dakkar sub foo(Num $a) { ... }
10:05 DanielC I was thinking that Perl 6 has no need for them...
10:05 skids joined #perl6
10:06 DanielC rakudo: my @a = (); sub foo($x) { $x }; push @a , foo 1, 2, 3; say @a.perl
10:06 p6eval rakudo 77db80: OUTPUT«too many arguments passed (3) - 1 params expected␤in sub foo (/tmp/jpOzhfgUqe:1)␤called from Main (/tmp/jpOzhfgUqe:2)␤»
10:07 masak DanielC: you need parens to disambiguate that.
10:07 DanielC You see why I was asking?
10:07 DanielC Yes
10:07 dakkar oh, p6 always parses sub call as listop?
10:08 DanielC What I mean is... this is why I asked if Perl 6 had prototypes. dakkar showed how prototypes change the way an expression is parsed.
10:08 dakkar and I didn't know signatures didn't, in p6
10:08 masak lunch &
10:09 dakkar but it makes much sense: it makes the parser simpler (and in the face of macros, this is very much important), and it makes reading the code easier
10:09 dakkar and you can add optional parameters to your signatures without messing up all your calls
10:09 dakkar hmmm. and multis wouldn't work at all
10:13 Matt-W exactly
10:14 DanielC rakudo: constant ARR => (1,2,3,4)
10:14 p6eval rakudo 77db80: OUTPUT«No applicable methods.␤in Main (/tmp/Lk3gkKKy1G:2)␤»
10:15 dakkar rakudo: constant @ARR => (1,2,3,4)
10:15 p6eval rakudo 77db80: OUTPUT«No applicable methods.␤in Main (/tmp/YcutHWi9aM:2)␤»
10:15 jnthn =
10:15 dakkar rakudo: constant @ARR = (1,2,3,4)
10:15 p6eval rakudo 77db80:  ( no output )
10:15 dakkar I got confused with Readonly.pm :/
10:15 DanielC thanks
10:15 dakkar rakudo: constant @ARR = (1,2,3,4);@ARR[1]=4
10:15 p6eval rakudo 77db80:  ( no output )
10:15 dakkar uh?
10:15 dakkar rakudo: constant @ARR = (1,2,3,4);@ARR[1]=4;say @ARR
10:16 p6eval rakudo 77db80: OUTPUT«1434␤»
10:16 DanielC Well.. it's read-only, but Rakudo should complain.
10:16 dakkar rakudo: constant $ARR = (1,2,3,4);$ARR[1]=4;say $ARR
10:16 DanielC oh, wait!
10:16 p6eval rakudo 77db80: OUTPUT«1 4 3 4␤»
10:16 DanielC my bad.
10:16 clintongormley joined #perl6
10:18 Matt-W umm
10:18 Matt-W that seems... buggy
10:25 jnthn aye
10:29 DanielC Does Perl 6 have a Double type or do I have to use Num ?
10:30 DanielC I can't find a Double in S02...
10:38 zamolxes joined #perl6
10:39 jnthn DanielC: Use Num
10:40 DanielC k
10:40 jnthn I think it's double prec under the hood.
10:40 DanielC Ok, good.
10:47 agentzh joined #perl6
10:53 clintongormley DanielC - just checked out your blog - nicely written!
10:54 clintongormley you should get involved with the p6 documentation effort
10:54 DanielC clintongormley: I would consider it, but I don't know Perl 6 very well yet.
10:54 DanielC afk & dinner
10:55 DanielC afk & lunch :-)
10:55 masak clintongormley: url?
10:55 masak DanielC: you have lunch after dinner? :P
10:56 clintongormley http://daniel.carrera.bz/
10:56 masak clintongormley: thanks.
10:56 * masak submits rakudobug
11:11 literal hm, where's DanielC's blog?
11:11 literal oh, I'm blind
11:14 DanielC back
11:14 DanielC clintongormley: Let me experiment more with Perl 6 first. Are you the documentation guy?
11:14 hercynium joined #perl6
11:15 clintongormley DanielC: No, I'm a watcher :)
11:15 DanielC :-)
11:15 clintongormley i think masak is the one you want to talk to
11:15 tulcod joined #perl6
11:16 DanielC I don't know if masak is writing much documentation, but he's working on a program called "grok" which will be kind of like perldoc but better.
11:18 masak I'm not, literal is.
11:18 DanielC Btw, I just updated my local copy of the Rakudo repository. Do I have to run "Configure.pl" again, or do I just do "make"?
11:18 masak and yes, I actually intend to write quite some documentation.
11:18 jnthn .oO( who will literal in turn say it is? )
11:19 masak DanielC: if you need to ask... :)
11:19 masak DanielC: ...run Configure.pl.
11:19 * DanielC just figured what jnthn's .oO means
11:19 skids \o/
11:19 DanielC masak: ok
11:20 * DanielC runs perl Configure.pl --gen-parro
11:20 masak rakudo: class Object is also { method oO($s) { say $s } }; .oO( 'OH HAI' )
11:20 p6eval rakudo 77db80: OUTPUT«OH HAI␤»
11:21 skids masak++ That should be be used in the cookbooks :-)
11:22 jnthn "we'll deal with the future later"++
11:22 masak jnthn: :P
11:23 masak hanging on #perl6 is really good for me sense of self-worth. :P
11:23 jnthn masak: Mine too!
11:23 masak :)
11:24 jnthn mmm...lunch.
11:24 skids masak: you mean .worth, no?
11:24 jnthn BTW, I now have a flight to YAPC::EU.
11:24 jnthn Don't have one to get home yet, but... :-)
11:25 * jnthn almost looks forward to it...but he's got vacation to look forward to first :-)
11:25 * patmat maybe has his first job in the programming world... but with PHP :/
11:25 masak skids: :)
11:26 masak patmat: better than nothing... I think. :/
11:26 patmat yup and better than support...
11:29 masak :)
11:31 skids patmat: $support_job of Programming_job where { .release > 1.0 };
11:32 patmat :d
11:35 skids Hrm method improvement () { .esteem++; .worth++; .motivation++; }
11:36 * skids wonders how bad things explode if you define "class self"
11:40 DanielC @karma
11:40 lambdabot You have a karma of 7
11:40 * DanielC pushes another benchmark to perl6-examples
11:40 DanielC @karma
11:40 lambdabot You have a karma of 7
11:40 DanielC hmm...
11:41 DanielC Committing to perl6-examples doesn't get you karma points :-(
11:41 skids There'd need to be a dalek message, I think.
11:41 DanielC Yeah... someone said that they were going to change it, but it doesn't seem to have happened.
11:42 skids @karma esteem
11:42 lambdabot esteem has a karma of 0
11:42 skids @karma .esteem
11:42 lambdabot .esteem has a karma of 0
11:43 skids I guess it's smartened.
11:44 skids rakudo:  DanielC++
11:44 p6eval rakudo 77db80: OUTPUT«Could not find non-existent sub DanielC␤»
11:44 skids @karma DanielC
11:44 lambdabot DanielC has a karma of 8
11:44 DanielC That's interesting.
11:45 skids Not entirely smartened.
11:45 DanielC rakudo: DanielC++
11:45 p6eval rakudo 77db80: OUTPUT«Could not find non-existent sub DanielC␤»
11:45 DanielC @karma
11:45 lambdabot You have a karma of 8
11:45 DanielC oh well...
11:46 skids That's probably the first if statement in the block :-)
11:46 DanielC heh
11:52 mizioumt joined #perl6
11:54 DanielC Ok, on an arithmetic benchmark Rakudo is 720 times slower than Perl 5.
11:54 pmichaud only 720?
11:54 pmichaud (good morning, #perl6)
11:54 masak that's great!
11:54 DanielC The benchmark is mostly double precision arithmetic.
11:55 masak as the saying goes, 720 times slower ought to be enough for anyone.
11:55 * DanielC pmichaud I figure that your ++ improvements helped.
11:55 DanielC masak: :-)
11:56 DanielC If you are interested, this is the n-body benchmark in perl6-examples.
11:56 DanielC It is mostly double precision arithmetic, plus the evil ++
11:56 pmichaud (reading backscroll)
11:57 pmichaud (also preparing @kid breakfasts)
11:57 viklund @karma masak
11:57 lambdabot masak has a karma of 212
11:57 viklund rakudo: say " masak++ "
11:57 p6eval rakudo 77db80: OUTPUT« masak++ ␤»
11:57 jnthn DanielC: Did you do an optimized build of Parrot also?
11:58 viklund @karma masak
11:58 lambdabot masak has a karma of 214
11:58 viklund ha
11:58 skids pmichaud: not %kid?  You really should give them names you know, at least, by age 2 or so.
11:58 pmichaud They have names!
11:58 jnthn skids: It's an array of Kid objects. They know their names. ;-)
11:58 pmichaud @kid[0] and @kid[1]
11:58 lambdabot Unknown command, try @list
11:58 jnthn say @kid>>.name # see ;-)
11:58 masak everything is so much easier with Perl 6! :)
11:59 * skids would not want to grow up as kid #0.
11:59 DanielC jnthn: I don't know Parrot.
11:59 jnthn DanielC: OK, in that case the answer is no. :-)
11:59 DanielC jnthn: oops, I mis-read your question.
11:59 DanielC jnthn: No, I didn't. How do you do that?
12:00 DanielC Can you just do something like 'make O3' ?
12:00 jnthn If you are building with --gen-parrot, then also give --gen-parrot-option=--optimize
12:01 DanielC Cool.
12:01 DanielC Is there any reason why I should /not/ optimize?
12:01 jnthn Parrot sometimes has some bugs exposed as a result of optimization.
12:01 jnthn Things that didn't get tracked down yet.
12:01 viklund masak: smoketesting all proto projects were trickier than I thought,
12:02 viklund but here it is:
12:02 viklund http://feather.perl6.nl/~viklund/
12:02 DanielC jntthn: Ok... So, should I stick with the non-optimized version?
12:03 jnthn DanielC: For normal use probably it's safest. I think how well it works out varies by platform.
12:03 DanielC OK
12:04 masak viklund: cool!
12:04 masak viklund: really, really cool!
12:04 masak viklund++
12:04 pmichaud I'd be fine with a --optimize option to Configure.pl (that is then passed along to parrot's build)
12:04 pmichaud I'd even be fine if we did a little probing/detection to decide when it might be safe to automatically set --optimize by default
12:05 viklund masak: now I only need to cron it...
12:07 masak viklund: some of these projects target bleeding, some target release...
12:13 viklund masak: that may be
12:13 viklund it's tested on bleeding...
12:14 Matt-W viklund: I've never got around to fixing that broken test in form yet :)
12:14 Matt-W but I am aware of it
12:14 Matt-W have to do that tomorrow
12:14 Matt-W or maybe tonight
12:14 viklund nice ;)
12:14 viklund now I really have to make a cron job, if it can motivate ppl ;)
12:15 Matt-W :)
12:15 ruoso joined #perl6
12:15 masak viklund: it can me, I'm sure.
12:15 Matt-W Well actually, I'm already motivated by having an appointment for a hackathon on Form with masak tomorrow
12:15 Matt-W and it'd be nice to start on a tree that passes tests
12:15 masak yay, Friday evening hackathon appointment!
12:15 Matt-W before we add a load more
12:18 masak viklund: ONE failing test in November!
12:18 masak viklund: man, I hate that test! >:(
12:19 masak viklund: it could be argued that that test does nothing for us, since neither of us understand why it fails. and it sure annoys me.
12:20 Matt-W bah
12:20 Matt-W just drink coffee until it makes sense
12:20 Matt-W then declare it's irrelevant and delete it
12:20 viklund masak: yes, I know, need to look at that, but those test are important
12:21 viklund oh well, time to do the dishes...
12:24 jnthn pmichaud: (optimize) For me I think the issue is that my compiler doesn't let me have an optimized build with debug symbols.
12:24 jnthn That may have changed though.
12:27 DanielC With --gen-parrot-option=--optimize  Rakudo is only 550 times slower than Perl 5, instead of 720 times.
12:27 DanielC Of course, the benchmark has a significant margin of error.
12:28 jnthn That's a respectable improvement for setting a flag. :-)
12:29 DanielC yes
12:29 skids DanielC: you might get it down to 500 by setting MIN_BUCKETS to 4 in parrot/src/hash.c :-)
12:31 Matt-W DanielC: then you could go forward in time and bring back allison's calling conventions refactor so we don't have to wait
12:35 DanielC On the regex-dna benchmark (which tests regexes) Rakudo is 410 times slower than Perl 5 (using --optimize).
12:36 antiphase Time for premature optimization \o/
12:36 * DanielC waits for the computer to cool before running the last benchmark
12:37 beggars joined #perl6
12:40 * jnthn -> slovak class, back later
12:40 DanielC WOW! On the last benchmark Rakudo was only 200 times slower than Perl 5.
12:41 DanielC This used to be the slowest benchmark. It used to be about 2,000 times slower.
12:41 DanielC So we have a factor of 10 improvement. Probably because of pmichaud's fixes to ++
12:41 DanielC pmichaud++
12:42 Matt-W no doubt there are some other big wins like that to be had
12:42 DanielC no doubt
12:45 ZuLuuuuuu joined #perl6
12:48 * Muixirt pours water into the wine
12:49 Muixirt speed of perl5 is really the goal? ;-)
12:49 masak no, but it's a reasonable comparison.
12:50 DanielC Muixirt: A line in the sand is a line in the sand. It's a good way to measure improvement.
12:50 Matt-W IT's something to compare to
12:50 Matt-W I doubt we'll ever be that fast
12:51 Matt-W But we'll be a lot faster than we are now!
12:51 DanielC Matt-W: That's depressing though. I would hope that Rakudo would be faster one day.
12:51 DanielC Why can't Rakudo ever be as fast as Perl 5?
12:51 Matt-W I don't know
12:51 Matt-W maybe it can be
12:52 DanielC TimToady said yesterday that Perl 6 could one day be nearly as fast as C, if the programmer is willing to provide enough type info.
12:53 masak could be faster than C in some cases, if the optimizer is really clever.
12:53 Muixirt DanielC, i see that potential too, but ... optimizing compilers for languages as complex as perl6 are *really* hard to develop
12:54 Matt-W any kind of compiler's hard enough...
12:54 DanielC I know that Parrot is designed as a register-based machine because there is a lot of literature on optimization for register-based architectures.
12:54 Matt-W yup
12:55 DanielC Muixirt: Maybe, maybe not. You don't have to optimize everything. You have to optimize enough so that the programmer can refactor his code and make it fast.
12:58 DanielC Paul Graham opines that the most important thing for the speed of a language is not actually the compiler, but the profiling tools... because of the 80/20 rule.
13:01 pmichaud part of what makes optimization more difficult in Rakudo is the degree of dynamicism available
13:02 masak that also hinders static code analysis in many cases.
13:02 pmichaud there are a number of simplifying assumptions one could make that become no longer true when it's possible for a program to replace core functions / modify the grammar / override core functions / etc.
13:03 DanielC pmichaud: Maybe Rakudo shoudl have a flag where the programmer promises not to do any of the above.
13:03 DanielC That will be true 90% of the time.
13:03 pmichaud DanielC: Can't in the general case, because another programmer might undo it.
13:03 DanielC :-(
13:04 DanielC Sucks...  how often do you override core functions?
13:04 masak it happens.
13:05 pmichaud anyway, we may be able to do some jit optimizations, and a variety of other things.
13:05 DanielC I think the flag would be a good idea. Let the programmer decide.
13:05 Whiteknight joined #perl6
13:05 pmichaud DanielC: but the problem is "which programmer"?
13:05 pmichaud the one who wrote the CPAN module, or the one who is using it?
13:05 DanielC Can it be done per-module?
13:05 pmichaud yes, but it can always be undone.
13:06 pmichaud it's kinda like the following from S12:
13:06 masak rakudo: say ?("say <OH HAI>" ~~ /<Perl6::Grammar::TOP>/); say $/.perl
13:06 p6eval rakudo 77db80: OUTPUT«1␤No result object␤in method Match::!_perl (src/gen_setting.pm:788)␤called from method Match::perl (src/gen_setting.pm:754)␤called from Main (/tmp/4P2ogeVaig:2)␤»
13:06 pmichaud Classes are open and non-final by default, but may easily be closed
13:06 pmichaud or finalized not by themselves but by the entire application, provided
13:06 pmichaud nobody issued an explicit compile-time request that the class stay open
13:06 masak pmichaud: I never reported this yesterday, but I think I perhaps should.
13:06 masak pmichaud: it is a bug in .perl after all, right?
13:06 pmichaud oh, yes.
13:06 * masak submits rakudobug
13:07 pmichaud Although it could be a bug in Match somehow.
13:07 pmichaud rakudo: say ?("say <OH HAI>" ~~ /<Perl6::Grammar::TOP>/); say ?$/
13:07 p6eval rakudo 77db80: OUTPUT«1␤1␤»
13:07 pmichaud rakudo: say ?("say <OH HAI>" ~~ /<Perl6::Grammar::TOP>/); say $/.ast
13:07 p6eval rakudo 77db80: OUTPUT«1␤say <OH HAI>␤»
13:07 pmichaud rakudo: say ?("say <OH HAI>" ~~ /<Perl6::Grammar::TOP>/); say $/.Str
13:07 p6eval rakudo 77db80: OUTPUT«1␤say <OH HAI>␤»
13:08 pmichaud yes, looks like a bug in .perl
13:08 DanielC I keep thinking that there must be a way that it's ok to say "yes, please optimize my code".
13:08 DanielC Some programs don't even use CPAN modules.
13:08 DanielC The benchmarks sure don't.
13:09 pmichaud oh, we'll probably have that.
13:09 pmichaud I didn't say it wasn't possible, I just said it's hard.
13:09 DanielC I thought you said it was a bad idea :-)
13:09 pdcawley joined #perl6
13:22 synth joined #perl6
13:41 FurnaceBoy joined #perl6
13:42 PerlJam good morning #perl6
13:42 DanielC good localtime()
13:42 decasm joined #perl6
13:42 masak gm, pj.
13:43 FurnaceBoy call DanielC for a good localtime()
13:43 DanielC :-)
13:43 Matt-W hi perljam
13:44 masak those were the localtime()s...
13:45 PerlJam It was the best of localtime()s, it was the worst of localtime()s
13:45 lichtkind joined #perl6
13:46 masak localtime() flies like an arrow...
13:46 masak somehow doesn't have the same ring to it...
13:46 PerlJam Is it just my perl6 build or does the interactive mode not stop when given a ^D anymore?
13:47 masak PerlJam: it was reported on RT a while ago.
13:48 masak by moritz_, I think.
13:48 pmichaud Good morning, PerlJam (and #perl6)
13:48 pmichaud interactive mode doesn't stop?   That's odd, I suspect a parrot change.
13:49 Matt-W masak: and weren't you upset that you didn't report it first :P
13:49 PerlJam I was guessing it's related to other IO weirdness  (like .lines() returning an extra blank line at the end)
13:50 pmichaud that *really* should be fixable now.
13:50 masak Matt-W: I occasionally "let one slip" so that it won't look like a one-man show... :P
13:50 Matt-W masak: aah your secret is revealed!
13:50 masak dang.
13:51 DanielC rakudo: my $a = "hello"; $a = reverse $a; say $a;
13:51 p6eval rakudo 77db80: OUTPUT«hello␤»
13:51 DanielC :-(  Shouldn't that be reversed?
13:51 PerlJam DanielC: perhaps you want .flip ?
13:51 pmichaud rakudo:  my $a = 'hello';  $a = flip $a;  say $a;
13:51 p6eval rakudo 77db80: OUTPUT«olleh␤»
13:51 pmichaud reverse is for lists.
13:51 DanielC ah
13:51 pmichaud rakudo:  my @a = <hello world>;  say reverse @a
13:51 DanielC thanks PerlJam & pmichaud
13:51 p6eval rakudo 77db80: OUTPUT«worldhello␤»
13:51 masak no, seriously. if the competition is about who first submits a bug, I think that can be very good for the RT converage. but I don't submit many bugs because of the statistics, I do it because I care for Rakudo.
13:52 pmichaud rakudo:  my @a = <hello world>;  say flip @a
13:52 p6eval rakudo 77db80: OUTPUT«dlrow olleh␤»
13:52 DanielC pmichaud: That's interesting.
13:52 PerlJam DanielC: you didn't expect flip to be distributive?
13:52 Matt-W rakudo: my @a = <hello world>; say @a>>.flip.reverse
13:53 p6eval rakudo 77db80: OUTPUT«dlrowolleh␤»
13:53 Matt-W rakudo: my @a = <hello world>; say @a>>.flip.perl
13:53 pmichaud rakudo:  my @a = <hello world>;   say @a.flip;
13:53 pdcawley <hello world>? Damn, but I'm behind the specs by _ages_
13:53 p6eval rakudo 77db80: OUTPUT«["olleh", "dlrow"]␤»
13:53 p6eval rakudo 77db80: OUTPUT«dlrow olleh␤»
13:53 Matt-W ah it did work, good
13:53 Matt-W pdcawley: it's like qw//
13:53 pmichaud pdcawley: <hello world>  is    qw/hello world/;
13:53 pdcawley Nice
13:53 DanielC rakudo: my @a = (<one two>, <three four>); say flip @a;
13:54 p6eval rakudo 77db80: OUTPUT«ruof eerht owt eno␤»
13:54 DanielC kewl
13:55 PerlJam actually, that is interesting.  I didn't notice before that it also reversed the order of the list
13:55 Matt-W pdcawley: do you know about %hash<key> as well?
13:55 masak PerlJam: it's stringified when sent to flip.
13:55 DanielC rakudo: my @a = (<one two>, <three four>); say (flip @a).perl;
13:55 p6eval rakudo 77db80: OUTPUT«"ruof eerht owt eno"␤»
13:56 PerlJam masak: oh, of course
13:56 pdcawley Matt-W Not sure.
13:56 pdcawley How's that different from %hash{key} ?
13:57 PerlJam pdcawley: key isn't a bare word that just happens to be interpreted as a string.  :)
13:57 Matt-W no barewords in Perl 6
13:57 masak pdcawley: only the <> form autoquotes.
13:57 Matt-W so %hash<key> is like %hash{'key'}
13:57 masak aye.
13:58 pdcawley and %hash{{:key<val>}} uses the anon hash as a key of the hash?
13:58 pdcawley Or am I getting bits of my syntax muddled.
13:58 ZuLuuuuuu will we use also <elemet_1 element_2> instead of qw(element_1 element_2)
13:59 Matt-W ZuLuuuuuu: I certainly will!
13:59 masak ZuLuuuuuu: yes, why not?
13:59 Matt-W note that there's also the <<>> form, which is to <> as "" is to ''
13:59 pdcawley Schweet.
13:59 ZuLuuuuuu heh ok then, it looks better in my opinion, as well
13:59 Matt-W and its unicode equivalent, which I haven't learned how to type on a windows box yet
13:59 masak Matt-W: <<>>:<>::"":'' :)
14:00 pdcawley And <<>> can also use «» ?
14:00 Matt-W masak: I generally prefer to be more verbose than that. You might have noticed.
14:00 Matt-W pdcawley: yes
14:00 * pdcawley hasn't learned to type it yet, just copy/paste
14:00 masak Matt-W: yes, I just thought it was nice. :)
14:00 DanielC rakudo: my $s = "hi"; $s ~~ tr/hi/HI/;
14:00 p6eval rakudo 77db80: OUTPUT«Statement not terminated properly at line 2, near "/;"␤in Main (src/gen_setting.pm:0)␤»
14:00 masak Matt-W: not actually correcting you in any way.
14:00 Matt-W I'll worry about it when i start writing perl 6 on a windows system
14:00 DanielC Is 'tr' implemented in Rakudo?
14:00 pdcawley First time I came acros : :: : notation, I had the devil's own time working out what was meant by it.
14:01 pdcawley Was in an online iq test and nowhere did the silly sods explain it.
14:01 Matt-W I don't think we have the syntax for tr/// like we don't have the syntax for s///
14:01 DanielC Matt-W: For s/// there is the alternate syntax .subst(...)   Do you know if there is an equivalent for tr?
14:02 masak DanielC: .trans
14:02 Matt-W masak saves the day
14:02 masak DanielC: and yes, that one's implemented.
14:02 masak DanielC: see S05.
14:02 DanielC rakudo: my $s = "hi"; $s.trans(/hi/, 'HI');
14:02 p6eval rakudo 77db80: OUTPUT«Must pass a List of Pairs for transliteration␤in Main (/tmp/haaTVeYjxE:2)␤»
14:02 masak DanielC: no really. see S05.
14:02 masak don't guess. :)
14:02 * DanielC goes to S05
14:02 dukeleto_ joined #perl6
14:03 finanalyst rakudo: my $x = 'hi'; my %z=<hithere a b c>Z 1,2,3,4; %z<<{$x}there>>
14:03 p6eval rakudo 77db80:  ( no output )
14:03 masak it's under "Transliteration", I think.
14:03 DanielC I've been reading S05 for days and there's still so much I don't know...
14:03 pdcawley Can we write our own special forms in Rakudo yet?
14:03 masak pdcawley: special forms?
14:03 finanalyst rakudo: my $x = 'hi'; my %z=<hithere a b c>Z 1,2,3,4; %z<<{$x}there>>.say
14:03 * pdcawley is thinking of porting his Test::Class::Sugar port to Rakudo for shits and giggles.
14:03 p6eval rakudo 77db80: OUTPUT«1␤»
14:03 masak pdcawley: um, probably not.
14:03 pdcawley Roll your own keywords.
14:03 pdcawley macros.
14:03 masak pdcawley: nope, not yet.
14:03 pdcawley Dang.
14:04 Matt-W DanielC: It's okay, I think we told you we don't expect you to memorise it all this week
14:04 Matt-W pdcawley: we do have custom operators though
14:05 DanielC rakudo: my $s = "hello"; $s.trans( 'a..z' => 'A..Z').say;
14:06 p6eval rakudo 77db80: OUTPUT«HELLO␤»
14:06 DanielC :-D
14:06 pdcawley Custom operators? Grab a unicode character and define an op?
14:07 DanielC rakudo: my $s = "hello"; $s.trans('aeiou' => 'AEIOU').say;
14:07 p6eval rakudo 77db80: OUTPUT«hEllO␤»
14:07 DanielC :-)
14:08 masak pdcawley: yes, you can have that.
14:08 masak pdcawley: with some not-too-large caveats.
14:08 pdcawley I always think it's a shame you can't do $s.trans('ae..u' => 'AE..U'), but Perl isn't turing complete yet.
14:09 masak pdcawley: you can't?
14:09 masak pdcawley: it isn't?
14:09 pdcawley Infix ops, prefix ops... can we do outfix ops? Grab a pair of brackets from unicode and make them into a custom object constructor?
14:09 pdcawley In the sense of passing the turing test? No. Meant AI complete.
14:09 masak pdcawley: you're probably looking for 'postcircumfix ops'.
14:10 masak pdcawley: that's not the ordinary definition of "Turing complete".
14:10 pdcawley masak: Probably. Guessing names is always inferior to knowing them.
14:10 pdcawley masak: I know. I'm an idiot.
14:10 pdcawley and was proposing ae..u as a cleverdick 'shortcut' for aeiou.
14:11 masak pdcawley: ah. that wasn't too clear. :)
14:11 meppl joined #perl6
14:11 masak pdcawley: I don't know if I'd consider it a feature. :)
14:11 * pdcawley grins. "It was in _my_ head"
14:11 * ruoso just sent a confusing message to p6-language
14:15 pmichaud note that qw(...)  isn't the same as the qw quoting operator, though.
14:15 netsquire joined #perl6
14:16 pmichaud qw{foo bar}  # okay
14:16 pmichaud qw/foo bar/  # okay
14:16 pmichaud qw(foo bar)  # function call, not a quote.
14:17 ruoso pmichaud, btw... it would be nice if you could take a look in the message I just posted to p6-language...
14:18 Matt-W ruoso: man, you really know how to make someone's head hurt
14:18 ruoso thanks?
14:19 hudnix joined #perl6
14:19 pmichaud ruoso: interesting post.  I don't have any immediate comments on it, other than I'm curious to see how it plays out.
14:19 pmichaud There's a part of me that still feels that 'for' and 'map' aren't completely isomorphic.
14:20 pmichaud in particular, 'for' looks like an imperative statement to me, and I'd expect it to complete before moving on to the next statement.
14:20 pmichaud i.e., I'd expect it to be a bit eager.
14:20 ruoso you know... I'm kinda getting used to this non-functional, non-imperative, non-declarative programming...
14:20 ruoso but it will certainly bite a lot of people
14:20 pmichaud but 'map' feels like it could be lazy.
14:21 ruoso I think we're in new territory here on the way you program "as if" you were programming in an imperative programming, but something completely different happens
14:22 ruoso I mean... erlang and io are languages that embrace this degree of lazyness.. but programming for them require you to have a different mindset
14:25 ruoso and maybe it is a good thing not having any imperative barrier -- I mean... maybe that's where Perl 6 is really going to make a difference...
14:26 jnthn lol I'm back
14:26 ZuLuuuuuu is the meaning of $/ variable changed in perl 6?
14:26 jnthn $/ in Perl 6 is match object.
14:27 jnthn $/ in Perl 5 was almost certainly not that since there was no such thing as a match object.
14:27 ZuLuuuuuu hmmm in which synopsis are these special variables explained?
14:27 jnthn It probably mean "moon phase" or something. :-)
14:27 ZuLuuuuuu yeah in perl 5 I guess it is the input line seperator
14:27 jnthn $/ will be in S05 surely.
14:27 ZuLuuuuuu ok thanks
14:27 jnthn Well, there is few specials now
14:27 jnthn $/, $_, $! - that's it.
14:27 literal there are some in S28 "Special Variables"
14:27 ruoso the term now is "pre-defined", not "special"
14:27 ruoso ;)
14:28 mizioumt1 joined #perl6
14:28 ruoso it's not really magical anymore
14:28 jnthn special and magical are different. ;-)
14:28 mizioumt1 joined #perl6
14:28 * jnthn may well be special, but he sure ain't magical.
14:28 ZuLuuuuuu hmmm interesting
14:28 jnthn ;-)
14:29 ZuLuuuuuu only three, that's good :)
14:34 pmichaud @_ and %_ also.
14:34 lambdabot Maybe you meant: . ? @ v
14:34 pmichaud and maybe I meant "@go_jump_in_a_lake", lambdabot.
14:35 [particle]- burn.
14:36 exodist joined #perl6
14:37 rjh $/ is autoflush iirc :)
14:37 rjh no that's $|
14:37 rjh $/ is input record separator
14:37 exodist joined #perl6
14:37 [particle]- input recor...
14:37 rjh stupid perl 5 :/
14:37 [particle]- i use $/ all the time
14:37 [particle]- but people yell at me to use "\n" instead
14:37 rjh do { $/ = undef; <> } :)
14:38 rjh *local
14:38 TimToady std: do { $/ = undef; <> }
14:38 [particle]- print $foo, $/;
14:38 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Obsolete use of $/ variable as input record separator; in Perl 6 please use filehandle's :irs attribute instead at /tmp/zLBgluNXYU line 1:␤------> [32mdo { $/[31m = undef; <> }[0m␤FAILED 00:02 36m␤»
14:38 rjh Is it ever legal to set $/ ?
14:38 * [particle]- never liked do {...}, and used sub{ ...}->() instead
14:38 [particle]- sure it's legal
14:38 rjh in perl6
14:38 DanielC rakudo: say "hello".flip.trans("aeiou" => "AEIOU")
14:38 p6eval rakudo 77db80: OUTPUT«too few arguments passed (2) - 3 params expected␤in Main (/tmp/QowrpTRHmg:2)␤»
14:38 DanielC ???
14:39 [particle]- ah, we're talking about perl 6 again :)
14:39 DanielC flip and trans don't get along.
14:39 [particle]- rakudo: $/ = 'foo'; $/.print
14:39 p6eval rakudo 77db80: OUTPUT«foo»
14:39 [particle]- std: $/ = 'foo'; $/.print
14:39 p6eval std 26999: OUTPUT«##### PARSE FAILED #####␤Obsolete use of $/ variable as input record separator; in Perl 6 please use filehandle's :irs attribute instead at /tmp/8Qr8lvp5u5 line 1:␤------> [32m$/[31m = 'foo'; $/.print[0m␤FAILED 00:02 36m␤»
14:39 DanielC rakudo: my $s="hello".flip; say $s.trans("aeiou" => "AEIOU")
14:39 TimToady rakudo: say "hello".flip.trans(("aeiou" => "AEIOU"))
14:39 p6eval rakudo 77db80: OUTPUT«OllEh␤»
14:39 p6eval rakudo 77db80: OUTPUT«too few arguments passed (2) - 3 params expected␤in Main (/tmp/vy6SakrVwW:2)␤»
14:40 rjh looks like a bug
14:40 [particle]- is $/ not an lvalue?
14:40 TimToady looks to me like "aeiou" => "AEIOU" is getting interpreted as a named argumetn
14:40 DanielC TimToady: Strangely, that only happens when you include the .flip
14:41 TimToady rakudo: say "hello".flip.WHAT
14:41 p6eval rakudo 77db80: OUTPUT«Str()␤»
14:42 TimToady rakudo: say "hello".trans("aeiou" => "AEIOU")
14:42 p6eval rakudo 77db80: OUTPUT«hEllO␤»
14:42 ruoso TimToady, I just sent a second message about implicit threading/event... if you happen to have some time, I'd appreciate your feedback
14:43 TimToady statement semi is the main barrier we have, because it creates void contexts, which are eager to lists
14:43 TimToady rakudo: say "hello".flip().trans("aeiou" => "AEIOU")
14:43 p6eval rakudo 77db80: OUTPUT«too few arguments passed (2) - 3 params expected␤in Main (/tmp/thZLp9GiYA:2)␤»
14:44 ruoso so a bare: "foo()" is the only way to make a trully-imperative call...
14:44 TimToady rakudo: say "hello".flip().trans(~"aeiou" => "AEIOU")
14:44 p6eval rakudo 77db80: OUTPUT«too few arguments passed (2) - 3 params expected␤in Main (/tmp/aqvohyj7kQ:2)␤»
14:44 pmichaud I suspect .trans is wrong/incomplete.
14:44 TimToady rakudo: say "hello".flip().trans(("aeiou" => "AEIOU"))
14:44 p6eval rakudo 77db80: OUTPUT«too few arguments passed (2) - 3 params expected␤in Main (/tmp/8lGuqYIGAy:2)␤»
14:44 pmichaud oh, in fact, I'm sure of it.
14:44 pmichaud Parrot's ".trans" is interfering with Rakudo's .trans.
14:45 TimToady in that case, I will drink my coffee and backlog
14:45 * DanielC found another bug  o/
14:45 DanielC Soon I'll catch up with masak :)
14:48 Matt-W not a chance
14:48 Matt-W unless we make him type his reports with his nose
14:49 alanhaggai joined #perl6
14:55 DanielC Heh... on this benchmark Rakudo is 1600 times slower than Perl 5. But only because Perl does the benchmark in 0.09 seconds.
14:55 DanielC Rakudo does the benchmark fast, but when you divide by almost-zero you get a big number.
14:57 Matt-W DanielC: how do the factors change if you precompile your benchmark scripts to PIR and then time the runs from PIR?
14:58 DanielC How do you do that?
14:59 dalek rakudo: b88c33d | tene++ | src/parser/actions.pm:
14:59 dalek rakudo: Register foreign types at compile time.
14:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b88c33d13f863e6e50a7489bc4b4e944677207a9
14:59 dalek rakudo: 2653235 | tene++ | perl6.pir:
14:59 dalek rakudo: Fix an issue with foreign languages loading Perl6 libraries without exported symbols... probably the wrong fix
14:59 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2653235134667e07f05fb29b445115f5a70a93aa
15:01 jnthn DanielC: What is the benchmark Rakudo is 1600 times slower testing?
15:01 nihiliad joined #perl6
15:01 DanielC jnthn: reads a large file and does .flip and .trans on every line.
15:02 StephenPollei ae..u as a  'shortcut' for aeiou reminds me of http://en.wikipedia.org/wiki/Fluid_Concepts_and_Creative_Analogies a book by Douglas Hofstadter .. I think that way too much dwim ;-)
15:02 DanielC jnthn: But Rakudo is fast enough, that the problem could just well be the overhead of ++ or the while loop and the like.
15:03 DanielC The program runs in 14.366s in Rakudo and 0.009s in Perl 5.
15:04 [particle]- danielc: i suggest you build an optimized parrot and re-run
15:05 DanielC [particle]- I am using an optimized Parrot.
15:06 viklund joined #perl6
15:06 DanielC After I spoke with jnthn I figured that the optimized Parrot would give more meaningful benchmark figures.
15:06 [particle]- good
15:08 pyrimidine joined #perl6
15:10 pmichaud I have a fix for #66280, spectesting now.
15:10 pyrimidine cool
15:11 pyrimidine I thought it might be something simple, just didn't get a chance to look into it
15:11 pyrimidine (re: #66280)
15:21 pyrimidine DanielC: re: .trans, it's implemented in PIR but I think it's suboptimally implemented
15:21 pyrimidine (I can say that b/c I implemented it)
15:21 pyrimidine ;)
15:23 pmichaud_ joined #perl6
15:24 hatseflats joined #perl6
15:24 unitxt joined #perl6
15:25 dalek joined #perl6
15:29 dalek rakudo: 5745c6b | pmichaud++ | src/ (7 files):
15:29 dalek rakudo: Convert 'deref_objectref' dynop to 'deobjectref' and 'descalarref'.
15:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/5745c6b180dbfb2e25a184937ccbafe8e874470a
15:29 dalek rakudo: 9e2b9ad | pmichaud++ | src/builtins/assign.pir:
15:29 dalek rakudo: Better handling of assignment of ObjectRef values.  Fixes RT #66280.
15:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/9e2b9ad960e6a7d70f6dd6e4f7bd02bbfe10875e
15:29 dalek rakudo: 10a9b23 | pmichaud++ | :
15:29 dalek rakudo: Merge branch 'master' of git@github.com:rakudo/rakudo
15:29 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/10a9b23a4dad1f5974e725c161a8c5ee656cfb56
15:31 justatheory joined #perl6
15:32 pyrimidine \o/
15:34 pmichaud rakudo:  for 1..3 -> $i {  for $i..5 -> $j { }; say $i; }
15:35 p6eval rakudo 77db80: OUTPUT«6␤6␤6␤»
15:35 jnthn The bug of the beast
15:35 pmurias joined #perl6
15:35 pmichaud pmichaud@orange:~/rakudo$ ./perl6
15:35 pmichaud > for 1..3 -> $i { for $i..5 -> $j {}; say $i; }
15:35 pmichaud 1
15:35 pmichaud 2
15:35 pmichaud 3
15:35 lambdabot <no location info>: parse error on input `..'
15:35 pmichaud better.
15:36 pmichaud $lambdabot.set-location('lake')
15:39 pmichaud $Pm.set-location('lunch')
15:39 pmichaud or, more properly
15:39 pmichaud $Pm.location = 'lunch'
15:40 TimToady the problem with writing our own bot in p6 is it will probably become sentient and secretly take over the world
15:40 pmichaud I suspect it will just take over the TimToady nick.
15:40 pmichaud And then take over the world.
15:40 TimToady it certainly does a good job with speech synth on Wednesdays already...
15:41 pmichaud and like any good sentient being, it can't yet completely describe itself.  :-)
15:41 pyrimidine pmichaud++ (for  RT #66280).  Now to look for something else to file a bug on...
15:41 * pyrimidine turning in masak
15:41 TimToady try to find a pretty bug this time
15:42 pyrimidine ok
15:42 TimToady 'course, some people find rocket explosions beautiful...
15:44 sri_kraih joined #perl6
15:44 pyrimidine well, july 4th is not far off...
15:46 pyrimidine maybe christmas in july?  Now, which july is another question...
15:47 ejs joined #perl6
15:48 pugs_svn r27000 | pmichaud++ | [t/spec]:  Add test for RT #66280.
15:52 veritos joined #perl6
15:53 iblechbot joined #perl6
15:57 * diakopter tries to find my name highlighted in the backscroll
15:58 Tene 02:20 < luqui> @seen diakopter
15:58 Tene 02:21 < lambdabot> diakopter is in #perl6. I don't know when diakopter last  spoke.
15:58 diakopter Tene: thanks
15:58 araujo joined #perl6
15:59 pdcawley What're people using to edit perl6 code in? Is there an emacs mode, or should I bit the bullet and get padre installed?
16:00 ZuLuuuuuu I asked the same questiopn a few days ago, I guess only vim and padre has perl 6 syntax highlighting
16:02 pyrimidine using komodo myself
16:04 StephenPollei I wonder if the perl6 highlighting handles some of perl6 new features well
16:04 StephenPollei rakudo: say 377 #『 pare 』   +610
16:04 p6eval rakudo 10a9b2: OUTPUT«987␤»
16:05 ZuLuuuuuu pyrimidine: oh I didn't know komodo has it
16:05 ZuLuuuuuu will try now with some perl 6 files
16:05 pyrimidine no, komodo doesn't
16:05 pyrimidine but it could be done via UDL
16:05 pyrimidine http://www.perlmonks.org/?node_id=621135
16:09 DanielC I've had a lot of trouble getting Padre to run, so I think I'll stay with komodo for now.
16:23 agentzh1 joined #perl6
16:25 DanielC_ joined #perl6
16:30 Matt-W rakudo: "ABCD".comb.perl.say
16:30 p6eval rakudo 10a9b2: OUTPUT«["A", "B", "C", "D"]␤»
16:31 pdcawley comb?
16:34 Psyche^ joined #perl6
16:36 Matt-W it's like split
16:36 Matt-W but you specify what you want to keep, not what you want to throw away
16:36 Matt-W rakudo: "ABCD".comb(/B/).perl.say; "ABCD".split(/B/).perl.say
16:36 p6eval rakudo 10a9b2: OUTPUT«["B"]␤["A", "CD"]␤»
16:37 [particle]- piers! long time no see.
16:39 StephenPollei rakudo: say "ABCDEIBKO".comb(/[BCDK][AEIO]/)
16:39 p6eval rakudo 10a9b2: OUTPUT«␤»
16:39 StephenPollei rakudo: say "ABCDEIBKO".comb(/[AEIO]/)
16:39 p6eval rakudo 10a9b2: OUTPUT«␤»
16:39 Tene StephenPollei: [] in Perl 6 Rules are noncapturing groups
16:39 Tene rakudo: say "ABCDEIBKO".comb(/<[BCDK]><[AEIO]>/)
16:39 p6eval rakudo 10a9b2: OUTPUT«DEKO␤»
16:40 StephenPollei ki'e Tene thanks I need to reread the synopsis, especially before I start writing tests
16:42 StephenPollei hopefully by tuesday to friday of next week, given other things scheduled
16:42 pmurias pdcawley: you can always write a emacs mode for padre
16:45 szabgab pdcawley, pmurias there actually already is a partial emacs mode for padre
16:45 szabgab DanielC, can we help somehow on #padre
16:47 DanielC szabgab: I'll take you up on the offer, but later. I'm about to step out of the house.
16:47 szabgab ZuLuuuuuu, there is a  /util/cperl-mode.el in the pugs directory
16:47 DanielC thanks
16:47 DanielC cheers...
16:56 payload1 joined #perl6
17:10 ejs joined #perl6
17:13 payload joined #perl6
17:23 TimToady pmichaud: maybe Camelia's slogan should be "I'm a Second System.  What's your problem?"
17:26 viklund LOL!!
17:26 pmichaud TimToady: heh, I was just working on that.
17:27 pmichaud I'll add that a bit.
17:27 TimToady on two lines, maybe
17:27 pmichaud Probably, yes.
17:27 pmichaud I'm playing with converting the images now.  I'll send you a preview link when I've got something semi-ready
17:27 TimToady what format do they use?
17:28 pmichaud png, for this.
17:28 pmichaud so we send a *large* png :-)
17:28 pmichaud if you want to make a couple I can set those up also.
17:28 TimToady yeah :)
17:28 TimToady a couple what?
17:28 pmichaud images
17:28 pmichaud any particular font for the slogan?  ;-)
17:29 TimToady let me ask Geneva
17:29 pmichaud oooh, good call.
17:30 TimToady mac fonts?
17:30 pmichaud I'm on linux, but I can probably get mac fonts.
17:30 pmichaud or name a mac font typeface, and I can probably find a near-equivalent.
17:31 pmichaud (or a selection of typefaces -- I'm usually pretty good about locating fonts once I know what I'm after :-)
17:32 DemoFreak joined #perl6
17:34 netsquire left #perl6
17:37 M_o_C joined #perl6
17:37 pmichaud (I also have Windows and Photoshop available to me via VMware)
17:38 [particle]- i have photoshop and illustrator, if you need.  did the pvmw 2009 poster with those btw
17:38 pmichaud I have both of those.  Education discount, and all that :-)
17:39 [particle]- yeah, i got the 'neighbor works for adobe' discount, which was *awesome*.
17:42 TimToady preliminary result is Forgotten Futurist
17:43 TimToady but her mac hung halfway through her font collection, which is...extensive...
17:43 pmichaud I suspect so.  I remember when I had various font management utilities on my system :-)
17:43 pmichaud http://desktoppub.about.com/library/fonts/tx/uc_forgottenfuturist.htm  # this one?
17:44 TimToady looks about right
17:44 TimToady the Second System looks really spectacular in that font
17:45 TimToady it looks cyber without looking dated
17:45 TimToady back to see if Geneva's mac is back up...
17:47 pyrimidine_ joined #perl6
17:51 ZuLuuuuuu what was the process in linux to add rakudo dir to system search path so that I can type perl6 and perl6 executable runs directly?
17:52 ZuLuuuuuu sorry if nooby I didn't do that in linux before :)
17:52 antiphase Some variant on adding the new path to the creation of the system PATH variable in /etc/profile
17:54 ZuLuuuuuu antiphase: erm, I'm looking into that file but it looks pretty complex?
17:54 szabgab I have it in .bashrc   export PATH=$PATH:/path/to/rakudo/dir
17:55 mizioumt joined #perl6
17:55 DemoFreak joined #perl6
17:55 antiphase You can do that of course, if you'll only be using it yourself
17:55 szabgab don't forget to source .bashrc when you try it
17:55 ZuLuuuuuu szabgab: thank you, that solved the problem!
18:07 cj joined #perl6
18:24 jdv79 how would one do List::Pairwise::grep_pairwise() in p6?
18:25 TimToady with real pairs?
18:26 [particle]- that was my first thought, too
18:28 jdv79 sure, i like pears once in a while.
18:35 icwiener joined #perl6
18:47 kidd_ joined #perl6
18:51 Scorp1us joined #perl6
18:54 ruoso joined #perl6
18:54 jferrero joined #perl6
19:01 alexn_org joined #perl6
19:19 DanielC joined #perl6
19:20 DanielC After converting a few Debian benchmarks from Perl 5 o Perl 6 I have to say that Perl 6 really does feel a lot nicer.
19:20 masak joined #perl6
19:20 DanielC Invariably so far, the Perl 6 version is clearer, and easier to read. Usually shorter, never longer.
19:21 viklund Nice
19:21 masak what features does the Associative role deliver?
19:21 masak (the one connected with Hash)
19:22 PerlJam DanielC: yep.  Every time I write some perl 5 code after having written some perl 6 code, I'm always making brain-o type mistakes in perl 5 because I *wish* it was like perl 6  :)
19:22 DanielC PerlJam: :-)
19:23 jnthn masak: Requirement of postcircumfix:<{ }>
19:23 masak jnthn: what about .exists?
19:23 jnthn No.
19:23 jnthn Not afaik.
19:23 masak ok. then this isn't necessarily a bug:
19:23 masak rakudo: say Match ~~ Associative; say ?("42" ~~ /<Perl6::Grammar::integer>/); say $/.can("exists")
19:23 jnthn It just means "can this be indexed into associatively"
19:23 p6eval rakudo 10a9b2: OUTPUT«1␤1␤0␤»
19:24 masak (oh, and I'm on neighbournet again. caveat IRC-or.)
19:24 pochi joined #perl6
19:25 skids DanielC: mainly it's because it is no longer vogue to use regular expressions to make code that looks like line noise.  In perl6, you're supposed to use hyperopeators to do that. :-).
19:25 jnthn Not in the sense that Associative should promise you an exists method, no.
19:25 masak jnthn: right. oh well.
19:25 jnthn masak: I do suspect exists should have one though.
19:25 jnthn Though in the future postcircumfix:<{ }> probably should accept the :exists adverb too.
19:26 masak oh, right. .exists is deprecated. :)
19:26 masak I forget that sometimes...
19:26 jnthn It's deprecated?
19:26 masak it isn't?
19:26 jnthn I hadn't realized that. OK
19:26 jnthn I didn't know either way.
19:26 jnthn I'm not surprised to hear it though.
19:26 masak I thought it was to be replaced entirely by :exists.
19:26 jnthn Given the adverbial forms exist too.
19:26 DanielC skids/PerlJam: A lot of what I like about Perl 6 are the "little things". Loops look better. "say" is better than "print". Rewriting some functions as method calls ($str.substr) often makes the code more clear.
19:26 jnthn That'd make sense.
19:26 masak but I might be wrong.
19:27 skids It's unknown whether the method form is deprecated.  We've tried repeatedly to pry that detail out of TimToady, but his lips are sealed. :-)
19:27 masak ok.
19:28 lichtkind do backtics also work in perl 6?
19:28 explorer__ joined #perl6
19:28 exodist joined #perl6
19:28 masak lichtkind: yes, but they're spelled 'qx()' now.
19:28 masak backticks are reserved for user-defined sublanguages IIRC.
19:29 skids But it is pretty well established that %h{@a}.kv won't do what you expect, for that you need the adverb form.
19:29 Trey joined #perl6
19:29 DanielC skids: I hope that the method call is not deprecated. Often (not always) it makes the code less ambiguous.
19:30 pmichaud qx{}, not qx()
19:30 pmichaud qx() is a function.
19:30 masak oh, right.
19:30 masak of course.
19:30 PerlJam DanielC: It's almost just a matter of syntax.  there may not be a method, but there will be an adverb.
19:31 DanielC PerlJam: Remind me what an adverb is for the purpose of Perl 6? Do you have an example?
19:31 PerlJam DanielC: either way, there will be a "nice" way to say what you mean :)
19:31 PerlJam DanielC: %h<foo>:exists
19:31 pmichaud DanielC: the canonical example is     1..200 :by(2)
19:31 DanielC Looks great.
19:31 pmichaud the ":by(2)" is an adverb.
19:32 lichtkind masak: so no more direct `` ?
19:32 PerlJam lichtkind: nope
19:32 pmichaud the backticks are reserved for user-defined thingies, I think.
19:32 pmichaud although you can probably do   qx `cmd`  if you really want them :-)
19:32 pmichaud rakudo:  say qx`ls1
19:32 p6eval rakudo 10a9b2: OUTPUT«Statement not terminated properly at line 2, near "`ls1"␤in Main (src/gen_setting.pm:0)␤»
19:32 pmichaud rakudo:  say qx`ls`
19:32 p6eval rakudo 10a9b2: OUTPUT«operation not permitted in safe mode␤in Main (lib/Safe.pm:25)␤»
19:32 lichtkind thanks @all
19:33 PerlJam p6eval++
19:33 pmichaud std: `ls`
19:33 p6eval std 27000: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/64bWCtPDnj line 1:␤------> [32m[31m`ls`[0m␤    expecting any of:␤ prefix or noun␤   statement end␤    statement list␤   whitespace␤FAILED 00:02 35m␤»
19:33 DanielC PerlJam: Anyways. I find that with Perl 6 I can say what I mean better.
19:33 pmichaud I wonder if there should be a default  `` operator that says "did you mean qx{} ?"
19:33 masak s1n: thanks for discovering the lingering Rubyism in Web.pm. I must have gotten sloppy in porting the corresponding function from Ruby. :/
19:33 PerlJam probably
19:35 masak pmichaud: definitely, unless it interferes too much with the user-defined thing. :)
19:35 pmichaud it might
19:35 pmichaud I'm not sure we want to assume that `` is always circumfix.
19:36 pmichaud maybe defining term:sym<`> would be sufficient to still be easily overridden
19:36 PerlJam pmichaud: if there's <.ws> before the first `, then I think you can safely ask if they meant qx{}
19:36 pmichaud PerlJam:   say 3 ` 5
19:36 pmichaud or
19:36 pmichaud say 3```   # postfix
19:37 pmichaud although that doesn't have the <ws>
19:37 pmichaud but one might want infix:<`>
19:37 pmichaud or meta...:<`>
19:38 pmichaud rakudo:  sub prefix:<`> { '\o/' };    say `3;
19:38 p6eval rakudo 10a9b2: OUTPUT«\o/␤»
19:39 pmichaud rakudo: sub circumfix:<` '>($x) { "`$x'" };    say `4';   # just curious
19:39 p6eval rakudo 10a9b2: OUTPUT«`4'␤»
19:39 masak DanielC: did you submit the .flip.trans bug?
19:40 StephenPollei if term:sym<`> is in STD can it later be undefined if someone whats to extend the grammar their own way?
19:41 pmichaud I'm thinking it might end up being shortest (and thus last) token.
19:41 DanielC masak: This would be a good time for someone to show me how to submit a bug :-)  I know that there is an email address, but I'd rather go to the issue tracker.
19:41 pmichaud the only way to submit rakudobugs is via email.
19:41 PerlJam DanielC: the email address is it
19:41 masak DanielC: what pmichaud and PerlJam said.
19:41 DanielC But how do I check the status of the bug?
19:42 masak DanielC: http://rt.perl.org/rt3/
19:42 DanielC ok
19:42 PerlJam DanielC: rt will give you the number and you go where masak just said
19:42 DanielC thanks
19:42 PerlJam DanielC: if you're submitting a bug, prefix your subject with [BUG]
19:42 masak also, you'll get all the relevant conversation as emails.
19:42 DanielC perlbug-admin@perl.org ...
19:43 masak DanielC: rakudobug@perl.org
19:43 DanielC thanks
19:43 masak PerlJam: oh really? there's such a rule? :P
19:43 DanielC masak: I haven't received any conversation emails for the bug I submitted earlier.
19:43 PerlJam no, I may just be conflating lists.
19:44 masak PerlJam: I hope so, or I need to go back and change my 400 bugs...
19:44 DanielC PerlJam: [BUG] seems a bit redundant if it the email address is rakudobug@
19:44 PerlJam heh
19:44 pmichaud README:130 says
19:44 pmichaud =head2 Reporting bugs
19:44 pmichaud Bug reports should be sent to C<rakudobug@perl.org> with the moniker
19:44 pmichaud [BUG] (including the brackets) at the start of the subject so that
19:44 pmichaud it gets appropriately tagged in the RT system (https://rt.perl.org/rt3/).
19:44 DanielC It would be like adding [Rakudo]
19:44 PerlJam ah,  there you go!
19:44 pmichaud DanielC: patches, todos, and other similar things also go to rakudobug
19:44 PerlJam (reading the docs)++
19:44 DanielC ok
19:44 masak :)
19:45 masak oh well.
19:45 DanielC "When all else fails, read the instructions"
19:46 DanielC rakudo: my @pairs = ((1,2), (2,3)); for @pairs -> @pair { }
19:46 p6eval rakudo 10a9b2: OUTPUT«Parameter type check failed; expected something matching Positional() but got something of type Int() for @pair in call to _block62␤in Main (/tmp/JpXB9pIXoI:2)␤»
19:46 DanielC rakudo: my @pairs = ((1,2), (2,3)); for @pairs -> $pair { }
19:46 p6eval rakudo 10a9b2:  ( no output )
19:46 DanielC But but but...
19:46 DanielC @pairs[$x] is an array...
19:46 lambdabot Unknown command, try @list
19:50 pmichaud rakudo:  my @pairs = ((1,2), (2,3));  say @pairs.perl;
19:50 p6eval rakudo 10a9b2: OUTPUT«[1, 2, 2, 3]␤»
19:50 pmichaud note: not pairs
19:51 DanielC rakudo:  my @pairs = ((1,2), (2,3));  say @pairs[0].perl
19:51 p6eval rakudo 10a9b2: OUTPUT«1␤»
19:51 DanielC wtf
19:51 pmichaud rakudo:  my @pairs = (1 => 2, 2 => 3);  say @pairs.perl;
19:51 p6eval rakudo 10a9b2: OUTPUT«[1 => 2, 2 => 3]␤»
19:51 Tene rakudo: my @pairs = ([1,2], [2,3]); say @paris.perl;
19:51 p6eval rakudo 10a9b2: OUTPUT«Symbol '@paris' not predeclared in <anonymous> (/tmp/Cx9xLMxNES:2)␤in Main (src/gen_setting.pm:3207)␤»
19:51 pmichaud rakudo:  my @pairs = ((1,2), (2,3));  say @pairs.elems
19:51 p6eval rakudo 10a9b2: OUTPUT«4␤»
19:51 Tene rakudo: my @pairs = ([1,2], [2,3]); say @pairs.perl;
19:51 p6eval rakudo 10a9b2: OUTPUT«[[1, 2], [2, 3]]␤»
19:51 Tene rakudo: my @pairs = ([1,2], [2,3]); say @pairs.elems;
19:51 p6eval rakudo 10a9b2: OUTPUT«2␤»
19:51 Tene that's what you want to do.
19:52 pmichaud not if you really want Pairs
19:52 pmichaud @pairs is an Array with two Array elements
19:52 Tene well, sure.
19:52 lambdabot Not enough privileges
19:52 Tene @shutuplambdabot
19:52 lambdabot Unknown command, try @list
19:52 DanielC Tene: Thanks, but what is [ ] ? Is it a scalar that points to an array?  Or is it an array proper?  Does it take the $ sigil or the @ sigil?
19:53 DanielC rakudo: my @pairs = ([1,2], [2,3]); for @pairs -> $pair { }
19:53 p6eval rakudo 10a9b2:  ( no output )
19:53 DanielC rakudo: my @pairs = ([1,2], [2,3]); for @pairs -> @pair { }
19:53 p6eval rakudo 10a9b2:  ( no output )
19:53 PerlJam DanielC: you're asking questions that make no sense in perl 6 :)
19:53 PerlJam (mainly because perl 6 blurs the distinctions you're asking about)
19:53 pmichaud rakudo:  my @pairs = ([1,2], [2,3]); for @pairs -> @pair { $_.say; }
19:54 p6eval rakudo 10a9b2: OUTPUT«Use of uninitialized value␤␤Use of uninitialized value␤␤»
19:54 pmichaud rakudo:  my @pairs = ([1,2], [2,3]); for @pairs -> @pair { @pair.say; }
19:54 p6eval rakudo 10a9b2: OUTPUT«12␤23␤»
19:54 DanielC PerlJam: Surely, something can be an array or a scalar but not both... no?
19:54 pmichaud a scalar can be an array
19:54 DanielC :-(
19:54 pmichaud my $array = [1,2];   say $array.WHAT
19:54 pmichaud rakudo: my $array = [1,2];   say $array.WHAT
19:54 p6eval rakudo 10a9b2: OUTPUT«Array()␤»
19:54 DanielC my $array = (1,2);   say $array.WHAT
19:54 sri_kraih_ joined #perl6
19:55 DanielC rakudo: my $array = (1,2);   say $array.WHAT
19:55 pmichaud the (1,2) case is now a bug in Rakudo (didn't used to be)
19:55 p6eval rakudo 10a9b2: OUTPUT«Array()␤»
19:55 pmichaud (spec changed, rakudo hasn't caught up)
19:55 PerlJam wait, what is it now?
19:55 pmichaud a Capture
19:55 pmichaud except that we aren't sure we'll have captures anymore
19:55 pmichaud at any rate, it doesn't autopromote to Array
19:56 PerlJam oh, because of the parens.
19:56 pmichaud well, we'll have captures, but they may be called "List"
19:56 PerlJam Sure, but maybe they should be called MagicalListlikeThingy
19:57 pmichaud the more we've talked about it, the more they start to look like "List", except List is also allowed to have named information attached to it
19:57 jferrero joined #perl6
19:57 pmichaud in fact, List is something of a shorthand for "argument list"
19:58 pmichaud (keeping in mind that this is just my interpretation of discussions and might not be accurate with respect to current spec, the spec that is about to be, or whatever TimToady++ may actually be thinking as of today's date/hour/minute :-)
19:59 PerlJam calling them captures has more value as far as indexing text goes.   "List" is too generic.
20:00 PerlJam (and *way* too overloaded already :)
20:02 pmichaud but it's much more natural to say that  (1,2,3)  produces a list
20:02 masak pmichaud: speaking of 'what is it now?', you mentioned there's now a difference between $x = <a b c> and $a = [<a b c>]. could you point me to the new semantics? I must have missed when the change happened.
20:02 pmichaud masak: $x = <a b c>  is the same as   $x = ('a', 'b', 'c')
20:02 pmichaud for the rest, see above.
20:02 masak ok.
20:03 pmichaud $a = [<a b c>]  is the same as  $a = [('a', 'b', 'c')]
20:03 pmichaud and since [...] imposes list context, that makes it act like   $a = ['a', 'b', 'c']
20:03 masak so the first is a Capture, and the second an Array?
20:03 pmichaud yes.
20:03 masak ok, worksforme.
20:04 pmichaud the change occurred when $x = (1,2,3)  no longer promoted to an Array.
20:14 Scorp1us joined #perl6
20:16 DanielC Which synopsis explains captures?
20:16 pmichaud none of them at the moment explain it very well
20:17 DanielC Ok. In a way that makes me feel better about not knowing what they are.
20:17 masak DanielC: IIUC, they are the container type that return values come in.
20:18 masak sort of like a list, but with more structure to it.
20:18 DanielC And (1,2,3) is a capture/list but [1,2,3] is an array
20:19 masak right.
20:19 DanielC Is there any practical difference? They seem to behave the same.
20:19 pmichaud a capture can have named parts
20:19 PerlJam DanielC: captures can hold named values too
20:19 masak List is immutable.
20:19 masak Array is not.
20:20 pmichaud (1, 2, 3, :foo, :bar)   # has 3 positional elements, two named elements
20:20 DanielC masak: That's semi-acadameic because when you assign a list to a variable it becomes an array.
20:20 DanielC pmichaud: That's new!
20:20 pmichaud when you assign a list to an array variable it becomes an array
20:20 pmichaud if you assign it to a scalar, it's still immutable
20:20 DanielC ah..
20:20 pmichaud my $x = (1,2,3);   $x.push   # fails
20:21 masak DanielC: I don't think it's semi-academic. it's still important to know the difference.
20:21 DanielC rakuo: $a = (1,3,4); $a[1] = 8;
20:21 pmichaud fails.
20:21 pmichaud (although that might fail for a reason other than $a being immutable)
20:21 PerlJam DanielC: you're thinking of the perl5 list/array distinction.  Perl 6 is different
20:22 DanielC masak: Yeah. I had misunderstood something. I thought that you would never actually see a list in real code because you couldn't assign them to variables. But pmichaud explained that I was wrong.
20:22 masak nod.
20:22 DanielC rakudo: $a = (1,3,4); $a[1] = 8;
20:22 p6eval rakudo 10a9b2: OUTPUT«Symbol '$a' not predeclared in <anonymous> (/tmp/C8Xm4L5d8w:2)␤in Main (src/gen_setting.pm:3207)␤»
20:22 pmichaud note that rakudo still gets them wrong, though.
20:22 DanielC rakudo: my $a = (1,3,4); $a[1] = 8;  # BAH!
20:22 p6eval rakudo 10a9b2:  ( no output )
20:23 pmichaud what I'm not entirely certain of at this point
20:23 masak hm.
20:23 DanielC pmichaud: So, Rakudo should yell at me but doesn't.
20:23 pmichaud my $b = 5;  my $a = (1, $b, 3);  $a[1] = 2;   say $b;   # 2 ?
20:23 masak might that be something worth reporting?
20:23 pmichaud masak: you can report it, yes, but it's a very well known bug at the moment, at least to me.
20:24 * masak submits rakudobug
20:24 masak better to have duplicates in RT than bad coverage.
20:24 DanielC rakudo: my $b = 5;  my $a = (1, $b, 3);  $a[1] = 2;   say $b;   # 2 ?
20:24 p6eval rakudo 10a9b2: OUTPUT«5␤»
20:24 pmichaud I think rakudo may be wrong there also.
20:24 masak I'll include that one.
20:24 pmichaud (for the same reason -- it mistakenly promotes the List to an Array, per the earlier spec)
20:25 DanielC pmichaud: It would be cool if one got karma points for submitting bugs...
20:25 pmichaud I don't control the karmas :-)
20:25 DanielC ok :)
20:25 pmichaud you'll have to ask the various @botmasters for those.
20:27 DanielC Maybe I'll just make my own bot that gives a ++ every few minutes :-D
20:27 masak rakudo: say <jnthn pmichaud DanielC>.pick() ~ '++'
20:28 PerlJam rakudo doesn't like you :)
20:29 pmichaud ...
20:30 pmichaud ...
20:30 p6eval rakudo 10a9b2: OUTPUT«jnthn++␤»
20:30 pmichaud that took an awfully long time.
20:30 masak Rakudo likes jnthn++. and suspense. :)
20:30 pmichaud I suspect rakudo was a little frightened of returning the wrong answer :-)
20:30 ZuLuuuuuu it loves you all couldn't pick one up, it is like "who do you love most, dad or mom?"
20:30 pmichaud rakudo: say <jnthn pmichaud DanielC>.pick() ~ '++'   # faster this time?
20:30 p6eval rakudo 10a9b2: OUTPUT«DanielC++␤»
20:30 ZuLuuuuuu put me in and it will pick me in just a few miliseconds
20:31 DanielC @karma
20:31 pmichaud rakudo: say <jnthn pmichaud DanielC Zuluuuuuu>.pick() ~ '++'   # faster this time?
20:31 TimToady you could just change your name to Daniel C++
20:32 masak :P
20:32 DanielC he he
20:32 pmichaud I have no idea why rakudo/p6eval is taking forever on that.
20:32 jnthn hey, stop picking on me!
20:32 jnthn ;-)
20:32 lambdabot You have a karma of 8
20:32 ZuLuuuuuu hmmmm
20:32 masak all bots are slow today.
20:32 DanielC Hmm... even lambdabot is taking its sweet time.
20:32 Tene rakudo: say (<jnthn pmichaud Danielc ZuLuuuuuu> >>~>> '++').perl
20:32 pmichaud speedy on my local system, so I suspect p6eval slowness.
20:32 japhb Some set of servers lagging, perhaps?
20:32 japhb (irc servers)
20:32 masak yes, probably.
20:32 masak but only for bots.
20:32 pmichaud I couldn't connect to feather.perl6.nl earlier -- might be related.
20:32 p6eval rakudo 10a9b2: OUTPUT«DanielC++␤»
20:32 p6eval rakudo 10a9b2: OUTPUT«["jnthn++", "pmichaud++", "Danielc++", "ZuLuuuuuu++"]␤»
20:32 TimToady would you rather be picked on or picked off?
20:32 pmichaud TimToady:  my wife's comment upon seeing Camelia:  "It's a bug."
20:32 TimToady indeed
20:33 pmichaud followed by  "Why is it a bug?"
20:33 japhb pmichaud: some claim the universe itself is just one giant bug that got loose ...
20:33 TimToady there's always a bug
20:33 pmichaud ...but does it have to be this big?!  ;-)
20:33 TimToady we want everyone to get bit by the P6 bug
20:33 pmichaud aha!
20:33 jnthn I've got like huge lag here now and then...
20:33 pmichaud it could be fatal.
20:33 japhb Camelia: Vorpal Butterfly
20:34 mberends boobot: spack Whatever
20:34 masak buubot: spack Whatever
20:34 buubot masak: S02-bits.pod:10 S03-operators.pod:2 S12-objects.pod:1 S29-functions.pod:2
20:34 mberends :)
20:35 mberends boohoo
20:35 TimToady buubot: spack *
20:35 buubot TimToady: S01-overview.pod:14 S02-bits.pod:215 S03-operators.pod:280 S04-control.pod:15 S05-regex.pod:357 S06-routines.pod:91 S07-iterators.pod:1 S09-data.pod:72 S10-packages.pod:16 S11-modules.pod:18 S12-objects.pod:19 S13-overloading.pod:5 S16-io.pod:18 S17-concurrency.pod:7 S19-commandline.pod:40 S22-package-format.pod:9 S26-documentation.pod:5 S29-functi
20:35 masak if we were the Rails community, we'd probably have a boob bot...
20:36 Tene buubot: spack boobs
20:36 buubot Tene: Sorry, I couldn't find any matches for: boobs
20:36 TimToady n
20:36 jnthn .oO( must resist temptation to @seen ... )
20:37 pmichaud Camelia wingspan ~==~  3m, yes?
20:37 TimToady yes
20:37 japhb The little guy on my left shoulder is trying to convince me to put easter eggs into spec comment blocks ....
20:37 TimToady while the guy on the right is recommending christmas eggs?
20:38 TimToady Camelia is a butterfly that was caused by a storm flapping its wings in China :)
20:38 DanielC @seen DanielC++
20:38 lambdabot I haven't seen DanielC++.
20:38 DanielC @karma
20:38 lambdabot You have a karma of 8
20:38 DanielC :(
20:39 DanielC it was worth a shot.
20:39 japhb I'm somehow reminded of an Eric Carle book about a little cloud ....
20:39 masak DanielC: I can assure you, winning karma points honestly is more fun than trying to game the system. :)
20:39 japhb ... except when the karma bots reset.
20:39 masak bah. karma is just a fiction anyway.
20:40 jnthn Yeah! karma--
20:40 masak the real karma is within us.
20:40 jnthn oh, wait...
20:40 PerlJam karma PerlJam
20:40 mncharity joined #perl6
20:41 PerlJam @karma PerlJam
20:41 lambdabot You have a karma of 10
20:41 PerlJam @karma duff
20:41 lambdabot duff has a karma of 7
20:41 japhb I think Raph Koster would say that karma (as we use it) is a way to game our own pleasure centers to get us to have fun doing useful stuff
20:41 TimToady @karmel apples
20:41 lambdabot Maybe you meant: karma karma+ karma-
20:41 DanielC It would be funny if the karma points were stored as an unsigned byte, so that after 255 they reset back to 0. :)
20:41 TimToady @karmal apples
20:41 lambdabot Maybe you meant: karma karma+ karma-
20:41 TimToady @karma apples
20:41 lambdabot apples has a karma of 0
20:42 PerlJam @karma TimToady
20:42 lambdabot TimToady has a karma of 45
20:42 pmichaud @karma ran over my dogma
20:42 lambdabot ran has a karma of 0
20:42 TimToady @karma sutra
20:42 lambdabot sutra has a karma of 0
20:43 TimToady @karma+
20:43 lambdabot usage @karma(+|-) nick
20:43 masak ZuLuuuuuu: thanks for your question http://use.perl.org/comments.pl?sid=43098&amp;cid=68951 -- I'll have to think about that one for a bit.
20:44 diakopter karma++
20:44 PerlJam so I finally got my team of hot-shot coders together for a hackathon and what happens?  Everything that could possibly happen to make us not hack.
20:44 ZuLuuuuuu masak: oki doki
20:44 diakopter karma karma
20:44 diakopter @karma karma
20:44 lambdabot karma has a karma of 1
20:44 masak ZuLuuuuuu: I haven't been thinking very much about performance and target groups, I just want to give Perl 6 web applications a head start before Christmas.
20:44 diakopter karma--
20:44 diakopter karma--
20:44 diakopter @karma karma
20:44 lambdabot karma has a karma of -1
20:44 PerlJam What was supposed to be a day long hack session has turned into a day long series of distraction
20:44 Scorp1us joined #perl6
20:44 diakopter @karma ++
20:44 lambdabot ++ has a karma of 0
20:44 diakopter ++++
20:45 diakopter @karma ++
20:45 lambdabot ++ has a karma of 1
20:45 jnthn ++++++
20:45 jnthn @karma ++++
20:45 lambdabot ++++ has a karma of 1
20:45 jnthn hah
20:45 ZuLuuuuuu masak: I see
20:45 jnthn std: ++++
20:45 p6eval std 27000: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/KVGPipzYNI line 1:␤------> [32m[31m[0m␤    expecting noun␤FAILED 00:02 37m␤»
20:45 jnthn phew
20:46 diakopter no!
20:46 jnthn rakudo: my $x = 1; $x++ ++; say $x;
20:46 p6eval rakudo 10a9b2: OUTPUT«2␤»
20:46 jnthn (yes, masak, you already ticketed that one)
20:46 jnthn ;-)
20:47 masak jnthn: I thought postfix ops couldn't have space after the term.
20:47 jnthn masak: Right, and you probably can't stack 'em either.
20:47 jnthn masak: Thus it's a Rakudo bug.
20:47 masak 'probably'?
20:47 jnthn masak: Just an already ticketed one. :-)
20:47 jnthn std: $x++++
20:47 jnthn std: $x++ ++
20:47 masak I thought the bug was that it only increments once.
20:47 p6eval std 27000: OUTPUT«Potential difficulties:␤  Variable $x is not predeclared at /tmp/AqAB5Jl3BI line 1:␤------> [32m$x[31m++++[0m␤ok 00:02 36m␤»
20:47 p6eval std 27000: OUTPUT«##### PARSE FAILED #####␤Can't understand next input--giving up at /tmp/v0WFDCUwvK line 1:␤------> [32m[31m[0m␤    expecting noun␤Other potential difficulties:␤  Variable $x is not predeclared at /tmp/v0WFDCUwvK line 1:␤------> [32m$x[31m++ ++[0m␤  Variable $x is not
20:47 p6eval ..predecla…
20:47 jnthn No, parse bug.
20:47 masak right.
20:47 mncharity Hi folks.  Random observation: http://rosettacode.org/wiki/Main_Page seems to have no Perl 6 presence.  I've added it to http://rosettacode.org/wiki/Help:Request_a_new_programming_language .  So if someone wants to churn out
20:48 mncharity err,
20:48 masak "churn out..."?
20:48 * jnthn churns out
20:48 masak *lol*
20:49 mncharity write a bunch of illustrative Perl 6 code, here's a nice place for it.  The setup is flexible enough to permit including multiple versions, eg, the strongly typed version, the terse version, etc.
20:50 mncharity lots and lots of p5  http://rosettacode.org/wiki/Category:Perl
20:51 masak oh, and a reminder to everybody: write Perl 6 code! preferably as modules/projects, uploaded to github. it's a great way to learn Perl 6, and maybe even find your very own rakudobug!
20:52 TimToady $x++++ is legal syntax, but a semantic error, since you can't increment the temp value returned by the ++
20:52 TimToady ++++$x should be fine though
20:52 jnthn std: $x++++ # is a fail though
20:52 p6eval std 27000: OUTPUT«Potential difficulties:␤  Variable $x is not predeclared at /tmp/FQgdE38OSO line 1:␤------> [32m$x[31m++++ # is a fail though[0m␤ok 00:02 36m␤»
20:52 jnthn oh no
20:52 TimToady no, it's only complaining about $x
20:52 jnthn right
20:52 jnthn mis-parsed
20:52 jnthn the red scared me
20:53 TimToady rakudo: my $x = 0; ++++$x; say $x;
20:53 p6eval rakudo 10a9b2: OUTPUT«2␤»
20:53 TimToady rakudo: my $x = 0; ++$x++; say $x;
20:53 p6eval rakudo 10a9b2: OUTPUT«2␤»
20:53 TimToady that's arguable, but probably correct
20:54 masak only golfers would do that anyway.
20:54 TimToady rakudo: my $x = 0; say ++$x++; say $x;
20:54 p6eval rakudo 10a9b2: OUTPUT«1␤2␤»
20:54 TimToady std: ++$x++
20:54 p6eval std 27000: OUTPUT«##### PARSE FAILED #####␤"++" and "++" are not associative at /tmp/k5B9OrRF19 line 1:␤------> [32m++$x++[31m[0m␤    expecting any of:␤    POST␤   postfix␤   postfix_prefix_meta_operator␤      standard stopper␤ terminator␤Other potential difficulties:␤  Variable $x is not
20:54 p6eval ..predeclared at /tmp…
20:55 TimToady right
20:55 TimToady nm
20:55 masak 'are not associative'?
20:55 masak so it is a bug in Rakudo?
20:55 TimToady well, it's not up to STD's std
20:56 diakopter std: ++++()
20:56 p6eval std 27000: OUTPUT«ok 00:02 37m␤»
20:56 TimToady semantic error, but not syntactic
20:56 TimToady those are nested, not associated :)
20:56 masak I usually equate STD's std with 'objectively correct', unless there's a known STD bug.
21:01 decasm left #perl6
21:02 pmurias joined #perl6
21:10 mncharity hey pmurias.
21:10 mncharity how goes?
21:11 StephenPollei rakudo: say $PROCESS::PID
21:11 p6eval rakudo 10a9b2: OUTPUT«Use of uninitialized value␤␤»
21:15 skids joined #perl6
21:18 mncharity perl6: say $*PID;
21:18 p6eval rakudo 10a9b2: OUTPUT«Use of uninitialized value␤␤»
21:18 p6eval ..pugs: OUTPUT«␤»
21:18 p6eval ..elf 27000: OUTPUT«18045␤»
21:18 ejs joined #perl6
21:20 StephenPollei perl6: say $PROCESS::PID
21:20 p6eval rakudo 10a9b2: OUTPUT«Use of uninitialized value␤␤»
21:20 p6eval ..elf 27000, pugs: OUTPUT«␤»
21:20 viklund_ joined #perl6
21:21 gegloe joined #perl6
21:21 mncharity left #perl6
21:21 StephenPollei I also don't know how to test if a package/module exists at all
21:23 StephenPollei rakudo: my $foo;say $foo.WHAT
21:23 p6eval rakudo 10a9b2: OUTPUT«Failure()␤»
21:29 StephenPollei rakudo: package FOO { my $bar=1;  } ;  say $FOO::bar;
21:29 p6eval rakudo 10a9b2: OUTPUT«Use of uninitialized value␤␤»
21:30 Chillance joined #perl6
21:37 Whiteknight joined #perl6
21:38 * skids seems to recall something about Rat maybe being made into a hiesentype, or is it still goin to be as specced?
21:39 agentzh joined #perl6
21:54 eternaleye joined #perl6
21:57 Limbic_Region joined #perl6
22:04 eternaleye_ joined #perl6
22:09 IRSeekBot joined #perl6
22:09 mj41 joined #perl6
22:20 viklund rakudo: say "—"
22:20 p6eval rakudo 10a9b2: OUTPUT«—␤»
22:20 viklund *sigh*
22:21 viklund my perl6 binary produces squiggles when I do that
22:21 viklund anyone knows how to fix that?
22:21 viklund it works in perl5, the exact same thing
22:21 DanielC works here
22:22 DanielC are you using perl -e ?
22:22 viklund perl -E 'say "—"'
22:22 viklund works
22:22 viklund but, ./perl6 -e 'say "—"'
22:22 viklund doesn't
22:22 DanielC hm
22:22 viklund yes, hmm
22:23 DanielC Just for the sake of testing, could you put the "say" in a file? Just to check that it's not the terminal.
22:23 DanielC It shouldn't be. If it was the terminal, I'd expect to see the same problem with Perl 5.
22:23 viklund sure thing
22:24 viklund me too
22:24 viklund look at that, it worked
22:24 viklund now I'm confused
22:25 DanielC Interesting indeed.
22:25 viklund why did the perl5 version work?
22:25 DanielC dunno
22:25 DanielC My guess is that the terminal is sending a slightly funny character to Perl.... Perl 5 knows what to do with it and Rakudo does not.
22:26 DanielC But you probably want to speak with pmichaud or jnthn.
22:26 viklund we have the same problem in november
22:26 DanielC You know, someone who actually knows something about Rakudo.
22:26 viklund ;)
22:26 viklund yes
22:26 DanielC In any case, it looks like you found a bug. \o/
22:27 jnthn It's interesting thtat 5.10 gets it right.
22:27 viklund but you could do it from the terminal?
22:27 jnthn (if that's what you're saying)
22:27 viklund jnthn: yes
22:27 DanielC viklund: yes... perl6 -e 'say "-"'  => works for me
22:28 pmurias joined #perl6
22:28 viklund but that's not the Unicode dash I used up there? (just checking)
22:28 DanielC it is!
22:28 viklund ok
22:28 DanielC Your dash is different from mine!
22:28 DanielC I hadn't noticed that.
22:29 viklund ha!
22:29 DanielC Good thing you thought of that.
22:29 viklund if you copy paste it to the terminal, does it work then?
22:29 DanielC On my terminal, using your hash, I get the letter "a" with a little hat on top.
22:29 DanielC s/hash/dash/
22:29 viklund I'm not alone in this world!
22:29 DanielC â
22:29 DanielC That's what I get.
22:30 viklund me, too, and when I used "gnome-terminal" I got "—"
22:30 DanielC And like you, if I put it in a file, then it works correctly.
22:31 viklund and if you cat the file?
22:31 DanielC And like you, Perl 5 does the right thing.
22:31 viklund it looks ok here
22:31 DanielC cat => ok here
22:31 viklund probably a bug with -e then?
22:31 viklund lets try some other unicode character
22:32 DanielC yeah, all broken.
22:32 DanielC I just tried ñ and ü
22:32 viklund
22:32 ascent_ ń
22:33 viklund and from a file it works
22:33 DanielC So we have a bug that happens with Unicode + terminal (aka "-e" )
22:33 DanielC yup, ñ and ü work from a file.
22:34 DanielC jnthn: Are you following this thread?
22:34 DanielC jnthn: Just making sure that at least one Rakudo hacker is seeing this.
22:34 viklund doesn't work in interactive mode either...
22:34 DanielC Terminal.
22:35 viklund DanielC: can you submit a bug?
22:35 DanielC And not just gnome-terminal. I get the same result with xterm.
22:35 viklund my gmail is blacklisted at perl.org for some reason, otherwise I would do it
22:35 DanielC Ok, I'll submit the bug.
22:36 viklund my normal terminal is urxvt, that's were I tried it first
22:36 viklund I've already checked for it in rt, it's not filed
22:37 viklund I need to go to bed now
22:37 viklund c u
22:37 DanielC good night.
22:38 jnthn DanielC: no, sorry, I fixing up the build of some POS .Net project...
22:38 DanielC jnthn: Ok. I'm about to send a bug report. Somebody will see it.
22:41 jnthn (where POS obviously means Point Of Sale...oh, wait...)
22:41 jnthn DanielC: Yes, please do ticket it.
22:41 jnthn DanielC: I'm not sure what the fix will be, but note that Perl 5.10 gets it right in the report.
22:42 DanielC ok
22:42 jnthn Then we've got a lead of hunting soembody down who knows The Answer. :-)
22:44 DanielC sent
22:52 nsh_ joined #perl6
22:55 * jnthn -> sleep, rakudo day tomorrow
22:56 Whiteknight (rakudo day)++
22:56 nsh_ what's rakudo day?
22:57 Whiteknight that's where jonathan kicks ass
22:58 Whiteknight he gets funded to work on Rakudo one day per week
22:58 DanielC where does jnthn work?
23:00 * DanielC just added a new benchmark for Rakudod o/
23:00 skids from home I think
23:00 DanielC *Rakudo
23:00 DanielC skids: Ok... who does he work for?
23:00 skids I think he has an assortment of clients.
23:01 DanielC As of now I have 5 benchmarks ported from the Debian shootout.
23:01 DanielC skids: Ok... who pays him to work on Rakudo?
23:02 skids There are a couple of funding sources.  He has a Hague grant and something else -- I'm not the one to ask, but the details are probably scattered around blogs and wikis.
23:04 skids Basically one applies for a grant, proposing something they want to do, the applications are reviewed, and some get funded, others don't.
23:04 DanielC ok
23:05 lichtkind DanielC: are you still awaiken ?
23:05 DanielC yup
23:08 lichtkind DanielC:  yould you take a look my english isnt very native
23:08 lichtkind DanielC: http://www.perlfoundation.org/perl6/index.cgi?perl_6_tutorial_part_1
23:09 DanielC lichtkind: Not right now, and honestly I have other Perl 6 projects competing for my time. I'll be happy to help, but I probably won't be able to give it a lot of time.
23:09 s1n DanielC: i'll have to keep an eye on that benchmark now to make sure it's doing what it's supposed to :)
23:10 s1n (ironman blog inside joke)
23:10 DanielC lichtkind: but I have bookmarked the page. I'll try to find time this weekend.
23:10 lichtkind DanielC: right its  just some lines
23:11 lichtkind DanielC: i try to find some one tomorrow i want to be some pages further :)
23:11 DanielC lichtkind: Ok. Just some lines, I can do tomorrow when I'm awake.
23:11 DanielC I'm half asleep right now, but I see it's just one paragraph.
23:11 DanielC I'll be happy to review that tomorrow.
23:11 lichtkind DanielC: thanks
23:31 amoc joined #perl6
23:33 FurnaceBoy_ joined #perl6
23:40 payload joined #perl6
23:58 lichtkind whats wrong with run.pugscode.org?
23:58 exodist joined #perl6

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

Perl 6 | Reference Documentation | Rakudo