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