Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-02-01

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:10 pbuetow joined #perl6
00:17 |jedai| joined #perl6
00:19 shinobi-cl_ joined #perl6
00:20 kanru joined #perl6
00:20 shinobi-cl_ hi
00:26 pugs_svn r25138 | particle++ | [spec] spelling, grammar, and other clarifications; TimToady++
00:37 ejs joined #perl6
00:47 mabes_away joined #perl6
00:47 mabes_away left #perl6
00:52 kanru joined #perl6
00:57 alexn_org joined #perl6
01:29 khatar joined #perl6
01:29 wknight8111 joined #perl6
01:40 shinobi-cl_ how do u call the ^ symbol when used to specify a protomethod (or is metamethod?)
01:44 shinobi-cl_ example, role Fly {} : class Bird does Fly {}; my Bird $B .= new; say $B.^does(Fly);
02:25 TimToady shinobi-cl_: I'd call it the meta arrow or the how arrow
02:42 hercynium joined #perl6
02:54 TimToady or the MOP arrow if you want to be cute
02:56 TimToady 'course, if you're naming it, you could call it the 忍び arrow
03:00 shinobi-cl_ I just need to know the name in case i make an article on my wiki :), meta arrow sounds fine, i think i?ll name it that way
03:01 stephenlb joined #perl6
03:03 shinobi-cl_ perl6: sub Test (Int +$x = 100, Int +$y = 50) { say $x + $y; } &Test(100, 100);
03:04 p6eval rakudo 36222: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 1, near "+$x = 100,"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
03:04 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "Int"␤    expecting "|", ":", "*", parameter name or ")"␤    at /tmp/uaQfsDyuz8 line 1, column 11␤»
03:04 p6eval ..elf 25138: OUTPUT«Parse error in: /tmp/ze5bsnkFZI␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: sub Test (Int +$x = 100, Int +␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤
03:04 p6eval ..STD_r...
03:04 shinobi-cl_ std: sub Test (Int +$x = 100, Int +$y = 50) { say $x + $y; } &Test(100, 100);
03:04 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Unable to parse multisig; couldn't find final ')' at /tmp/AzfiK7tdk4 line 1:␤------> [32msub Test (Int [31m+$x = 100, Int +$y = 50) { say $x + $y; [0m␤    expecting any of:␤    param_sep␤        parameter␤        post_constraint␤  trait␤
03:04 p6eval .. type_constraint␤...
03:04 shinobi-cl_ std: sub Test (Int $x = 100, Int $y = 50) { say $x + $y; } &Test(100, 100);
03:04 p6eval std 25138: OUTPUT«00:02 35m␤»
03:05 shinobi-cl_ are named parameters implemented yet?
03:05 shinobi-cl_ std: sub Test (Int $x = 100, Int $y = 50) { say $x + $y; } &Test(x => 100, y => 100);
03:05 p6eval std 25138: OUTPUT«00:02 35m␤»
03:05 shinobi-cl_ i mean, "force named parameter"?
03:07 shinobi-cl_ nevermind, just found it
03:09 shinobi-cl_ std: sub Test (Int $x = 100, Int $y = x | 50) { say $x + $y; } &Test(x => 100);
03:09 p6eval std 25138: OUTPUT«Undeclared routine:␤   x used at 1 ␤00:02 35m␤»
03:10 shinobi-cl_ std: sub Test (Int $x = 100, Int $y = (x | 50)) { say $x + $y; } &Test(x => 100);
03:10 p6eval std 25138: OUTPUT«Undeclared routine:␤   x used at 1 ␤00:02 35m␤»
03:10 shinobi-cl_ std: sub Test (Int $x = 100, Int $y = (x or 50)) { say $x + $y; } &Test(x => 100);
03:10 p6eval std 25138: OUTPUT«Undeclared routines:␤  or used at 1 ␤    x used at 1 ␤00:02 34m␤»
03:10 shinobi-cl_ std: sub Test (Int $x = 100, Int $y = ($x or 50)) { say $x + $y; } &Test(x => 100);
03:10 p6eval std 25138: OUTPUT«00:02 34m␤»
03:10 shinobi-cl_ rakudo: sub Test (Int $x = 100, Int $y = ($x or 50)) { say $x + $y; } &Test(x => 100);
03:10 p6eval rakudo 36222: OUTPUT«FixedIntegerArray: index out of bounds!␤current instr.: 'Test' pc 95 (EVAL_16:51)␤»
03:11 shinobi-cl_ rakudo: sub Test (Int $x = 100, Int $y = $x) { say $x + $y; } &Test(x => 100);
03:11 p6eval rakudo 36222: OUTPUT«FixedIntegerArray: index out of bounds!␤current instr.: 'Test' pc 95 (EVAL_16:51)␤»
03:11 shinobi-cl_ pugs: sub Test (Int $x = 100, Int $y = $x) { say $x + $y; } &Test(x => 100);
03:11 p6eval pugs: OUTPUT«*** Undeclared variable: ("$x",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb5dde639>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb5de7a51>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb5ddf781>, ...
03:13 TimToady I don't think &Test is parsing the way you think it is
03:13 TimToady at least with STD, that would be parsed as infix:<&>
03:14 shinobi-cl_ pugs: sub Test (Int $x = 100, Int $y = $x) { say $x + $y; } Test(x => 100);
03:14 p6eval pugs: OUTPUT«*** Undeclared variable: ("$x",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb5ed4311>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb5ef2bdd>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb5ed6bbd>, ...
03:14 shinobi-cl_ pugs: sub Test (Int $x = 100, Int $y = 100) { say $x + $y; } Test(x => 100);
03:14 p6eval pugs: OUTPUT«200␤»
03:14 TimToady it should also be requiring a ; after the }
03:14 TimToady std: sub Test (Int $x = 100, Int $y = $x) { say $x + $y; } Test(x => 100);
03:14 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/phLTHXmrLY line 1:␤------> [32m$x = 100, Int $y = $x) { say $x + $y; } [31mTest(x => 100);[0m␤    expecting any of:␤  infix or meta-infix␤      infix stopper␤    standard stopper␤ statement
03:14 p6eval ..modifier loo...
03:15 shinobi-cl_ two terms in a row
03:15 shinobi-cl_ std: sub Test (Int $x = 100, Int $y = $x) { say $x + $y; }; Test(x => 100);
03:15 TimToady yes, the sub def is one term and Test() is the other
03:15 p6eval std 25138: OUTPUT«00:02 34m␤»
03:15 shinobi-cl_ rakudo: sub Test (Int $x = 100, Int $y = $x) { say $x + $y; }; Test(x => 100);
03:15 p6eval rakudo 36222: OUTPUT«FixedIntegerArray: index out of bounds!␤current instr.: 'Test' pc 78 (EVAL_16:48)␤»
03:15 TimToady that's obviously a different problem...
03:16 shinobi-cl_ aoh, yes :D. Thats the problem i currently have
03:17 shinobi-cl_ i want to pass initial_Health, and Health to a method. If health is not defined, it should fall back to initial_health
03:17 shinobi-cl_ well, it should at least in my opinion :D
03:18 shinobi-cl_ i think i?ll just go the "if !defined" way
03:21 shinobi-cl_ std: sub Test (Int $x = 100, Int ?$y) { $y = $x if !defined $y; say $x + $y; }; Test(x => 100);
03:21 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Can't put required parameter after optional parameters at /tmp/LRqT4XHvE6 line 1:␤------> [32msub Test (Int $x = 100, Int [31m?$y) { $y = $x if !defined $y; say $x + [0m␤    expecting any of:␤ parameter␤        post_constraint␤  trait␤
03:21 p6eval ..type_con...
03:22 shinobi-cl_ std: sub Test (Int $x = 100, Int ?$y) { $y = $x if !(defined $y); say $x + $y; }; Test(x => 100);
03:22 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Can't put required parameter after optional parameters at /tmp/E6K5w2E7M8 line 1:␤------> [32msub Test (Int $x = 100, Int [31m?$y) { $y = $x if !(defined $y); say $x [0m␤    expecting any of:␤ parameter␤        post_constraint␤  trait␤
03:22 p6eval ..type_con...
03:23 shinobi-cl_ std: sub Test (Int $x, Int ?$y) { $y = $x if !(defined $y); say $x + $y; }; Test(x => 100);
03:23 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Unable to parse multisig; couldn't find final ')' at /tmp/R92cvFT2mO line 1:␤------> [32msub Test (Int $x, Int [31m?$y) { $y = $x if !(defined $y); say $x [0m␤    expecting any of:␤    param_sep␤        parameter␤        post_constraint␤
03:23 p6eval .. trait␤  type_con...
03:26 ihrd joined #perl6
03:27 shinobi-cl_ std: sub Test (Int $x, Int ?$y) { $y = $x if (!defined $y); say $x + $y; }; Test(x => 100);
03:27 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Unable to parse multisig; couldn't find final ')' at /tmp/ldsPY59VEh line 1:␤------> [32msub Test (Int $x, Int [31m?$y) { $y = $x if (!defined $y); say $x [0m␤    expecting any of:␤    param_sep␤        parameter␤        post_constraint␤
03:27 p6eval .. trait␤  type_con...
03:28 shinobi-cl_ std: sub Test (Int $x, Int ?$y) {  if (!defined $y){my $y = $x; }; say $x + $y; }; Test(x => 100);
03:28 TimToady std: sub Test (Int $x = 100, Int $y?) {...}
03:28 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Unable to parse multisig; couldn't find final ')' at /tmp/rCGgRcfaNe line 1:␤------> [32msub Test (Int $x, Int [31m?$y) {  if (!defined $y){my $y = $x; }; [0m␤    expecting any of:␤    param_sep␤        parameter␤        post_constraint␤
03:28 p6eval .. trait␤  type_con...
03:28 p6eval std 25138: OUTPUT«00:02 33m␤»
03:28 TimToady your ? is in the wrong place
03:29 shinobi-cl_ ahh i see.. Im reading an old version of a perl6 book... in it the ? was at the beggining
03:29 shinobi-cl_ std: sub Test (Int $x, Int $y?) {  if (!defined $y){my $y = $x; }; say $x + $y; }; Test(x => 100);
03:29 p6eval std 25138: OUTPUT«Undeclared routine:␤   if used at 1 ␤00:03 35m␤»
03:30 TimToady since ? and =100 both make optional, they both come at the end
03:30 shinobi-cl_ yes, that makes more sense
03:30 TimToady and trailing ! marks as mandatory
03:30 TimToady the std was giving a misleading error message
03:30 TimToady s/the/though/
03:31 shinobi-cl_ std: sub Test (Int $x = 100, Int $y+) {...}
03:31 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Can't put required parameter after optional parameters at /tmp/3A90evO1ff line 1:␤------> [32msub Test (Int $x = 100, Int $y[31m+) {...}[0m␤    expecting any of:␤       parameter␤        post_constraint␤  trait␤  whitespace␤00:02 33m␤»
03:31 TimToady there is no plus
03:31 shinobi-cl_ for forcing named parameter?
03:32 TimToady std: sub Test (Int $x = 100, Int :$y!) {...}
03:32 p6eval std 25138: OUTPUT«############# PARSE FAILED #############␤Can't put required parameter after optional parameters at /tmp/7mCgQCja2w line 1:␤------> [32msub Test (Int $x = 100, Int :$y![31m) {...}[0m␤    expecting any of:␤      post_constraint␤  trait␤  whitespace␤00:02 33m␤»
03:32 TimToady heh
03:32 shinobi-cl_ std: sub Test (Int $x, Int $y!) {...}
03:32 TimToady probably should allow named required anywhere
03:32 p6eval std 25138: OUTPUT«00:02 33m␤»
03:32 TimToady std: sub Test (Int $x, Int :$y!) {...}
03:33 p6eval std 25138: OUTPUT«00:02 33m␤»
03:33 TimToady okay, that's a bug in std
03:33 TimToady required named should count as being in the positional zone
03:33 TimToady *shouldn't
03:33 TimToady I'll fix that, but dinner first &
03:33 shinobi-cl_ mmm, complicated... i think i'll reread some synopses now..
03:42 shinobi-cl_ rakudo: sub RestartVCR(Str $Clock="12:00") { say 'VCR Clock shows:' ~ $Clock; }; RestartVCR; RestartVCR("15:20");
03:42 p6eval rakudo 36225: OUTPUT«VCR Clock shows:12:00␤VCR Clock shows:15:20␤»
03:55 Casan joined #perl6
03:56 pugs_svn r25139 | lwall++ | [STD] don't treat sub Test (Int $x = 100, Int :$y!) {...} as zone violation
04:08 TimToady std: sub Test (Int $x, Int :$y!) {...}
04:08 p6eval std 25139: OUTPUT«00:02 33m␤»
04:11 |jedai| joined #perl6
04:29 shinobi-cl_ joined #perl6
04:37 |jedai| joined #perl6
04:44 shinobi-cl_ left #perl6
04:44 shinobi-cl_ joined #perl6
04:51 alester joined #perl6
05:02 |jedai| joined #perl6
05:09 shinobi-cl_ std:sub Test(*@numbers){ my Int $result = 0; for @_ -> $value {$result+=$value}; return $result; };  say Test (1,2,3);
05:09 shinobi-cl_ std: sub Test(*@numbers){ my Int $result = 0; for @_ -> $value {$result+=$value}; return $result; };  say Test (1,2,3);
05:09 p6eval std 25139: OUTPUT«00:02 35m␤»
05:09 shinobi-cl_ rakudo: sub Test(*@numbers){ my Int $result = 0; for @_ -> $value {$result+=$value}; return $result; };  say Test (1,2,3);
05:09 p6eval rakudo 36227: OUTPUT«invalid arg type in named portion of args␤current instr.: 'Test' pc 113 (EVAL_16:54)␤»
05:09 shinobi-cl_ pugs: sub Test(*@numbers){ my Int $result = 0; for @_ -> $value {$result+=$value}; return $result; };  say Test (1,2,3);
05:09 p6eval pugs: OUTPUT«0␤»
05:10 shinobi-cl_ pugs: sub Test(*@numbers){ for @_ -> $value {say $value;}};  say Test (1,2,3);
05:10 p6eval pugs: OUTPUT«␤␤»
05:10 shinobi-cl_ rakudo: sub Test(*@numbers){ for @_ -> $value {say $value;}};  say Test (1,2,3);
05:10 p6eval rakudo 36227: OUTPUT«invalid arg type in named portion of args␤current instr.: 'Test' pc 113 (EVAL_16:54)␤»
05:11 shinobi-cl_ std: sub Test(Int *@numbers){ for @_ -> Int $value {say $value;}};  say Test (1,2,3);
05:11 p6eval std 25139: OUTPUT«00:02 35m␤»
05:12 shinobi-cl_ std: sub Test(Int *@numbers, Int $x = 0){ for @_ -> Int $value {say $value;}};  say Test (1,2,3);
05:12 p6eval std 25139: OUTPUT«############# PARSE FAILED #############␤Can't put optional positional parameter after variadic parameters at /tmp/qgFah4uesD line 1:␤------> [32msub Test(Int *@numbers, Int $x = 0[31m){ for @_ -> Int $value {say $value;}}; [0m␤    expecting any of:␤        standard stopper␤
05:12 p6eval ..terminat...
05:12 shinobi-cl_ std: sub Test(Int $x = 0, Int *@numbers ){ for @_ -> Int $value {say $value;}};  say Test (1,2,3);
05:12 p6eval std 25139: OUTPUT«00:02 35m␤»
05:13 shinobi-cl_ rakudo: sub Test(Int $x = 0, Int *@numbers ){ for @_ -> Int $value {say $value;}};  Test (1,2,3);
05:13 p6eval rakudo 36227: OUTPUT«invalid arg type in named portion of args␤current instr.: 'Test' pc 102 (EVAL_16:53)␤»
05:13 shinobi-cl_ pugs: sub Test(Int $x = 0, Int *@numbers ){ for @_ -> Int $value {say $value;}};  Test (1,2,3);
05:13 p6eval pugs: OUTPUT«␤»
05:24 shinobi-cl_ std: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; Just_A_Test(x => 1, y=>2, z=>3);
05:24 p6eval std 25139: OUTPUT«00:02 35m␤»
05:24 shinobi-cl_ rakudo: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; Just_A_Test(x => 1, y=>2, z=>3);
05:24 p6eval rakudo 36228: OUTPUT«too many named arguments - 'x' not expected␤current instr.: 'Just_A_Test' pc 94 (EVAL_16:52)␤»
05:24 shinobi-cl_ pugs: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; Just_A_Test(x => 1, y=>2, z=>3);
05:24 p6eval pugs: OUTPUT«Result: 9␤»
05:26 shinobi-cl_ pugs: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; Just_A_Test(z=>3, x=>1, y=>2);
05:26 p6eval pugs: OUTPUT«Result: 9␤»
05:28 mtnviewmark joined #perl6
05:30 shinobi-cl_ pugs: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; Just_A_Test(:z(3), :x(1), :y(2));
05:30 p6eval pugs: OUTPUT«Result: 9␤»
05:35 shinobi-cl_ pugs: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; Just_A_Test(:y(2), :x(1), 3);
05:35 p6eval pugs: OUTPUT«Result: 9␤»
05:35 shinobi-cl_ pugs: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; Just_A_Test(3, :y(2), :x(1));
05:35 p6eval pugs: OUTPUT«Result: 9␤»
05:44 mtnviewmark @TimToady: so - if not :bool -- or :truthy --- how 'bout :testable
05:45 TimToady too general
05:45 mtnviewmark okay , we'll I'm happy with :truthy
05:45 mtnviewmark or :iffy
05:45 |jedai| joined #perl6
05:46 mtnviewmark also - I have .panic messages that I think are, well, too dry:
05:46 TimToady :iffy is shorter and (possibly) funnier
05:46 mtnviewmark Can't cross a non-value operator
05:46 mtnviewmark would you rather I put the operator name in there ($<O><dba> I think()
05:47 TimToady I think that's likelier to be meaningful to the user
05:48 mtnviewmark okay, will do
05:48 TimToady can't cross a mumble operator because it's not a pure value
05:48 TimToady or some such
05:48 mtnviewmark last thing
05:48 mtnviewmark did you want [=] $a, $b, 3 to work?
05:49 mtnviewmark but not [:=] or [::=] (surely)
05:49 shinobi-cl_ std: sub Test(Int $x = 0, Int *@numbers ){ for @_ -> Int $value {say $value;}}; Test (1,2,3,4,5,6);
05:49 TimToady don't really care, though we'd certainly have to force it to item, I think
05:49 p6eval std 25139: OUTPUT«00:02 35m␤»
05:49 mtnviewmark there's a unit test for it
05:49 eternaleye_ joined #perl6
05:49 shinobi-cl_ pugs: sub Test(Int $x = 0, Int *@numbers ){ for @_ -> Int $value {say $value;}}; Test (1,2,3,4,5,6);
05:49 p6eval pugs: OUTPUT«␤»
05:49 TimToady seems a bit odd to need to alias a bunch of things at once
05:50 TimToady aliases being a bit evil in the first place...
05:50 mtnviewmark would  [=] $a, $b, $c, 5  be a shift of values? as things are left to right with reduce?
05:50 TimToady but the = one is strange
05:50 TimToady insofar as it needs lvalues in all but last
05:50 TimToady so I don't think we need to support it
05:50 mtnviewmark okay - so I'll remove the unit tests for those as well
05:51 mtnviewmark or at least comment them out
05:51 TimToady it's rather un-iso in that respect
05:51 shinobi-cl_ pugs: sub Test(Int *@numbers ){ for @_ -> Int $value {say $value;}}; Test (1,2,3,4,5,6);
05:51 p6eval pugs: OUTPUT«␤»
05:51 TimToady and => is iso in the sense of not caring what is on the left or right
05:51 mtnviewmark yes, it's use seems more like a programming puzzle than a clear intention
05:51 TimToady so bias against
05:51 mtnviewmark sure - I've got => covered now (running testspec.....)
05:52 TimToady 'preciate the fresh eyes
05:52 mtnviewmark most welcome -- now if we could only come up with a better term than :value
05:53 TimToady well, really more like rvalue, but that's worse
05:54 mtnviewmark :normal
05:54 mtnviewmark heh
05:54 TimToady :unadulterated
05:54 TimToady :smooth_not_thunky
05:54 mtnviewmark :pure
05:54 TimToady unfortunately rather overloaded culturally
05:55 mtnviewmark (Mac OS X builtin thesaurus to the resuce)
05:55 mtnviewmark smooth also has the funny reference to a 80s hit song: "Smooth Operator"
05:55 TimToady :plain
05:56 mtnviewmark well there ya go - I buy :plain -- unless you like the humor of :smooth .....
05:56 TimToady rather too obscure, I fear
05:57 TimToady 'course, the opposite of :plain is :peanut
05:57 mtnviewmark (though I can imagine the exchange "What the heck is a smooth operator?"  "It's smooth, not thunky!" getting pretty stale)
05:57 mtnviewmark and you didn't find a way to make those adverbs of mm?
05:57 TimToady open, guileless, transparent...
05:57 mtnviewmark mm:plain/foo/     mm:peanut/foo/
05:59 mtnviewmark explicit, calm, clean
05:59 TimToady direct
06:00 TimToady right, ortho
06:00 mtnviewmark hmmm... :ortho and :iso
06:01 TimToady and para and meta...
06:01 TimToady but chemistry is probably too far afield
06:01 TimToady pure is probably fine, given its FP connotations
06:02 shinobi-cl_ std: sub Just_A_Test (*@params) { say $_ for @_; } Just_A_Test(1,2,3,4);
06:02 p6eval std 25139: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/236RHa5yUX line 1:␤------> [32mst_A_Test (*@params) { say $_ for @_; } [31mJust_A_Test(1,2,3,4);[0m␤    expecting any of:␤    infix or meta-infix␤      infix stopper␤    standard stopper␤
06:02 p6eval ..statement modifi...
06:03 mtnviewmark let's see -- of all these....   :norm  :plain  :pure
06:03 shinobi-cl_ std: sub Just_A_Test (*@params) { say $_ for @_; }; Just_A_Test(1,2,3,4);
06:03 TimToady basically, anything constant fold could fold
06:03 p6eval std 25139: OUTPUT«00:02 34m␤»
06:03 TimToady so we could even mark them :fold
06:03 TimToady :spindle, :mutilate...
06:03 shinobi-cl_ rakudo: sub Just_A_Test (*@params) { say $_ for @_; }; Just_A_Test(1,2,3,4);
06:03 p6eval rakudo 36228: OUTPUT«invalid arg type in named portion of args␤current instr.: 'Just_A_Test' pc 98 (EVAL_16:54)␤»
06:04 shinobi-cl_ pugs: sub Just_A_Test (*@params) { say $_ for @_; }; Just_A_Test(1,2,3,4);
06:04 p6eval pugs: OUTPUT«␤»
06:04 mtnviewmark well, are foldable operators the :iso set?
06:04 TimToady I don't mean fold in the FP sense
06:05 TimToady in the compiler sense of constant folding
06:05 TimToady which doesn't care about types
06:05 TimToady only about purity
06:05 mtnviewmark oh - you mean in the collapse at compile time sense
06:05 TimToady yes
06:05 mtnviewmark right - so...oh?  :eval
06:06 mtnviewmark (of course evaluate... just brings us back to :value!)
06:06 TimToady :value is okay, just kinda pedestrian
06:07 shinobi-cl_ left #perl6
06:08 shinobi-cl_ joined #perl6
06:09 TimToady really more like idempotent
06:09 TimToady since $x op $y isn't, in fact a value until evaluated
06:09 mtnviewmark :idem
06:11 TimToady but argubably thunks are idempotent too, so that's not quite right either
06:12 mtnviewmark :direct
06:12 mtnviewmark as in, to the point!
06:12 TimToady I had that one earlier
06:13 TimToady as in not indirect, which is the main point
06:13 mtnviewmark so - that seems better than :value to me
06:13 TimToady good enough for now
06:13 mtnviewmark sold to the man with two Ts
06:14 TimToady 'course, maybe we should be marking the ones that are indirect instead...
06:15 TimToady and the ones that aren't iso...
06:15 ihrd joined #perl6
06:15 TimToady dunno, brain is working well enough any more
06:15 shinobi-cl_ std: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); } my %Params = { x => 1, y => 2, z => 3 } Just_A_Test(*%Params);
06:15 p6eval std 25139: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/CLQq0wqoo9 line 1:␤------> [32m) { say 'Result: ' ~ $x + ($y ** $z); } [31mmy %Params = { x => 1, y => 2, z => 3 } [0m␤    expecting any of:␤ infix or meta-infix␤      infix stopper␤    standard
06:15 p6eval ..stoppe...
06:15 shinobi-cl_ std: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; my %Params = { x => 1, y => 2, z => 3 }; Just_A_Test(*%Params);
06:16 p6eval std 25139: OUTPUT«Undeclared type:␤      Params used at 1 ␤00:02 35m␤»
06:16 shinobi-cl_ std: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; my %Params = { x => 1, y => 2, z => 3 }; Just_A_Test(%Params);
06:16 p6eval std 25139: OUTPUT«00:02 35m␤»
06:16 shinobi-cl_ pugs: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; my %Params = { x => 1, y => 2, z => 3 }; Just_A_Test(%Params);
06:16 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&Just_A_Test"␤    at /tmp/3GVytcBkBC line 1, column 122-142␤»
06:16 TimToady ah, it parsed as * % Params :)
06:17 Sepheebear joined #perl6
06:21 shinobi-cl_ rakudo: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; my %Params = { x => 1, y => 2, z => 3 }; Just_A_Test(%Params);
06:21 p6eval rakudo 36230: OUTPUT«too few arguments passed (1) - 3 params expected␤current instr.: 'Just_A_Test' pc 166 (EVAL_16:61)␤»
06:22 TimToady rakudo: sub Just_A_Test (Int $x, Int $y, Int $z) { say 'Result: ' ~ $x + ($y ** $z); }; my %Params = { x => 1, y => 2, z => 3 }; Just_A_Test(|%Params);
06:22 p6eval rakudo 36230: OUTPUT«argument doesn't array␤current instr.: 'Just_A_Test' pc 166 (EVAL_16:61)␤»
06:22 TimToady argument doesn't array?  who wrote that error message?
06:26 TimToady s/brain is working/brain is (obviously) not working/
06:31 mtnviewmark it is 'normal' for t/spec//S02-literals/string-interpolation.t to fail to parse -- right?
06:31 mtnviewmark "Potential difficulties:
06:31 mtnviewmark Leading 0 does not indicate octal ..."
06:32 mtnviewmark I'm pretty sure I didn't introduce that
06:33 mtnviewmark If I had an 8 core machine, I'd parallelize teststd....
06:36 TimToady yes, that's normal
06:36 TimToady also teh .= 'foo' warnings
06:36 TimToady and a bunch of malformed unicode
06:37 mtnviewmark I suppose I should write up how I got all this to work on my Mac....
06:37 mtnviewmark since the README still says that you can't
06:37 TimToady well, it's try, I can't  :)
06:37 TimToady *true
06:38 mtnviewmark it's re::engine::TRE
06:38 mtnviewmark it has something bad in it's config -- so it issues the wrong link statement on a Mac
06:39 TimToady no, I just don't have a mac
06:39 mtnviewmark ha ha!
06:39 TimToady but corrections welcome
06:39 mtnviewmark I'll try to isolate it to a repro case
06:40 finanalyst joined #perl6
06:41 shinobi-cl_ std: my %hash = { a_key => 'a_value', cats => 4, :pigs(6) } for (%hash.kv) -> ($key, $value) { say $key ~ ' : ' ~ $value; }
06:41 p6eval std 25139: OUTPUT«00:02 35m␤»
06:41 shinobi-cl_ pugs: my %hash = { a_key => 'a_value', cats => 4, :pigs(6) } for (%hash.kv) -> ($key, $value) { say $key ~ ' : ' ~ $value; }
06:41 p6eval pugs: OUTPUT«*** ␤    Unexpected "->"␤    expecting operator␤    at /tmp/BMJy4ql66F line 1, column 71␤»
06:42 shinobi-cl_ rakudo: my %hash = { a_key => 'a_value', cats => 4, :pigs(6) } for (%hash.kv) -> ($key, $value) { say $key ~ ' : ' ~ $value; }
06:42 p6eval rakudo 36230: OUTPUT«Statement not terminated properly at line 1, near "-> ($key, "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
06:42 TimToady need ;
06:42 shinobi-cl_ rakudo: my %hash = { a_key => 'a_value', cats => 4, :pigs(6) }; for (%hash.kv) -> ($key, $value) { say $key ~ ' : ' ~ $value; }
06:42 p6eval rakudo 36230: OUTPUT«Statement not terminated properly at line 1, near "-> ($key, "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
06:42 shinobi-cl_ rakudo: my %hash = { a_key => 'a_value', cats => 4, :pigs(6) }; for (%hash.kv) -> ($key, $value) { say $key ~ ' : ' ~ $value; };
06:42 p6eval rakudo 36230: OUTPUT«Statement not terminated properly at line 1, near "-> ($key, "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
06:44 TimToady there aren't supposed to be () on -> parameters
06:44 shinobi-cl_ rakudo: my %hash = { a_key => 'a_value', cats => 4, :pigs(6) }; for (%hash.kv) -> $key, $value { say $key ~ ' : ' ~ $value; };
06:44 p6eval rakudo 36230: OUTPUT«a_key : a_value␤cats : 4␤pigs : 6␤»
06:44 shinobi-cl_ hehe, thanks
06:45 TimToady it's legal syntax, but means to bind a single arg to the subsignature
06:46 TimToady also a little surprised that std parsed it without a semi, so it probably parsed it some other way
06:55 pugs_svn r25140 | mtnviewmark++ | [STD,t] normalized how the metaops decided what they can be applied to
06:55 pugs_svn r25140 | mtnviewmark++ | removed tests that used [=], since that is no longer a legal reduction
06:55 mtnviewmark woot - my first commit!
06:56 mtnviewmark if you want, it should now be easy to switch from :direct to :indirect and :iso to :noniso -- perhaps when my head isn't so stuffy
07:03 TimToady we can let it sit a bit and see how it looks in a day or two
07:03 mtnviewmark eggsellent
07:05 TimToady as for the std misparse, it succeeds through overagressive backtracking, so maybe I'll work on that soon so it's more of a predictive parser
07:05 mtnviewmark er - was that idrected at me or at shinobi?
07:06 TimToady shinobi
07:06 TimToady but mostly just to the world at large :)
07:10 TimToady well, I'm falling asleep, so I'd better continue to do that.
07:10 TimToady zzz &
07:12 TheOrz joined #perl6
07:33 DemoFreak joined #perl6
07:50 jhuni joined #perl6
08:10 meppl joined #perl6
08:32 iblechbot joined #perl6
08:50 maerzhase joined #perl6
09:04 vixey joined #Perl6
09:10 iblechbot joined #perl6
09:10 masak joined #perl6
09:34 Matt-W joined #perl6
10:05 ejs joined #perl6
10:37 barney joined #perl6
10:38 ihrd left #perl6
11:05 moritz_ rakudo: "abcdefg" ~~ m/@<a>=(.)+/; say $/<a>.elems
11:05 p6eval rakudo 36242: OUTPUT«Statement not terminated properly at line 1, near "=(.)+/; sa"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
11:05 moritz_ rakudo: "abcdefg" ~~ m/$<a>=(.)+/; say $/<a>.elems
11:05 p6eval rakudo 36242: OUTPUT«7␤»
11:07 moritz_ rakudo: "abcdefg" ~~ m/$<a>=[.]+/; say $/<a>.elems
11:07 p6eval rakudo 36242: OUTPUT«0␤»
11:10 pugs_svn r25141 | moritz++ | [t] in array_cap.t, use capturing parenthesis if we want to capture something
11:10 pugs_svn r25142 | moritz++ | [t] mvoe array_cap to spec/
11:14 pugs_svn r25143 | moritz++ | [t] clean up subrule.t
11:15 pugs_svn r25144 | moritz++ | [t] moved subrule.t to spec/
11:19 pugs_svn r25145 | moritz++ | [t] clean up prior.t a bit
11:19 moritz_ is the rule <prior> the same as matching against ~$/ ?
11:19 moritz_ ie a literal match?
11:20 moritz_ if so, prior.t has that wrong
11:20 moritz_ it seems to thing <prior> is "match with the last succeessful regex"
11:23 pugs_svn r25146 | moritz++ | [t] prior.t: syntactic cleanup
11:23 moritz_ if somebody says "yes, you're right" I'll re-write the tests according to my current understanding
11:26 masak joined #perl6
11:30 pugs_svn r25147 | moritz++ | [t] small cleanup in regex test
11:55 jan_ joined #perl6
12:07 M_o_C joined #perl6
12:07 pugs_svn r25148 | moritz++ | [t] move named_cap.t to spec/, cleaned up a bit
12:10 pugs_svn r25149 | moritz++ | [t] move attributes/defaults.t to spec/
12:13 kanru joined #perl6
12:17 pugs_svn r25150 | moritz++ | [t] remove a duplicate test
12:17 pugs_svn r25150 | moritz++ | (one remains in spec/S06-signature/named-parameters.t)
12:19 barney joined #perl6
12:21 pugs_svn r25151 | moritz++ | [t] merged is_copy_ne_is_rw.t into is-copy.t
12:25 pugs_svn r25152 | moritz++ | [t] cleaned up some tests in xx-uncategorized, moved one to spec/integration
12:29 pugs_svn r25153 | moritz++ | [t] cleaned up attributes/recursive.t and moved to spec/
12:32 pugs_svn r25154 | moritz++ | [t/spec] fix plan in recursive.t, fudge for rakudo
12:40 finanalyst joined #perl6
12:40 Tene_ joined #perl6
12:48 kanru joined #perl6
13:06 szabgab_ joined #perl6
13:15 ayrnieu joined #perl6
13:16 TheOrz joined #perl6
13:24 Whiteknight joined #perl6
13:27 |jedai| joined #perl6
13:27 pmurias joined #perl6
13:46 gravity joined #perl6
13:53 ejs joined #perl6
14:08 finanalyst hi. Has anyone tried to get rakudo from git. I just installed git, cloned the repository, but perl Configure.pl gives an error
14:09 finanalyst any suggestions whats wrong?
14:10 masak finanalyst: you need to put the rakudo directory in parrot/languages
14:10 masak the README has not yet been updated to reflect this
14:10 finanalyst ok. as rakudo not perl6?
14:11 finanalyst otherwise a refresh would clobber the git repository. no?
14:12 masak finanalyst: probably.
14:12 masak there would be more of a mess, in any case.
14:18 moritz_ moving a check-out git repo to a different location is no problem
14:20 Limbic_Region joined #perl6
14:22 finanalyst that was easy, but i found i had to delete the svn parrot local copy and do another checkout. so now reconfiguring and making parrot
14:23 finanalyst any reason parrot uses svn and rakudo git?
14:24 moritz_ yes
14:25 moritz_ parrot preferes svn, rakudo prefers git ;-)
14:26 finanalyst it took a day for me to read enough about git to get a clone, but then it was easy. Nice video tutorial at git-hub
14:26 mberends joined #perl6
14:27 finanalyst but rakudo is not listed at git-hub as a project.
14:27 finanalyst is this because its just moved, or because rakudo is private?
14:28 moritz_ what is http://github.com/rakudo/rakudo/tree/master if not a project?
14:28 finanalyst but i found that link in the #perl6 logs
14:28 moritz_ http://github.com/search?q=rakudo&amp;type=Everything&amp;repo=&amp;langOverride=&amp;start_value=1 also finds rakudo
14:29 finanalyst ??? i thought i tried a search
14:29 finanalyst gone to check again
14:31 vixey ]/j #JAPANESE
14:31 vixey oops sorry
14:31 |jedai| joined #perl6
14:31 masak home-made hamburgers! &
14:40 finanalyst1 joined #perl6
14:47 finanalyst joined #perl6
15:00 vixey joined #Perl6
15:08 jan_ joined #perl6
15:12 pmurias joined #perl6
15:17 pugs_svn r25155 | pmurias++ | [smop] added infix:<+>,infix:<->,infix:<==> methods to int
15:17 pugs_svn r25155 | pmurias++ | the &?ROUTINE and &?BLOCK circular reference is broken sometimes
15:17 pugs_svn r25155 | pmurias++ | added True and False to the prelude
15:17 pugs_svn r25155 | pmurias++ | add mildew/t/int.t
15:21 timebomb joined #perl6
15:35 alc joined #perl6
15:38 finanalyst joined #perl6
15:43 aindilis joined #perl6
15:45 Tene joined #perl6
15:46 kanru joined #perl6
16:05 masak joined #perl6
16:15 finanalyst joined #perl6
16:25 AzureStone joined #perl6
16:25 pugs_svn r25156 | lwall++ | move away from "prelude" towards "setting"
16:25 pugs_svn r25156 | lwall++ | establish LANG lexical scope to indicate setting
16:25 pugs_svn r25156 | lwall++ | define --language or -L to set LANG dsl
16:25 aindilis joined #perl6
16:28 TimToady moritz_: yes, you're right
16:31 pugs_svn r25157 | lwall++ | ref -L in S19
16:31 masak is it possible to control the visibility of methods created via 'handles'?
16:32 _jedai_ joined #perl6
16:32 TimToady not really, OO is not about lexical scoping, unless the methods look at caller()
16:32 masak ok.
16:38 masak TimToady: I was thinking about a situation when a class wanted delegation of some methods, but only needs them for itself, not to share publicly with others.
16:40 rakudo_svn r36249 | fperrad++ | [config] make @cat@ available and use it
16:44 rhr_ joined #perl6
16:48 shinobi-cl_ how do i create a hash that is unique to the class?
16:48 masak shinobi-cl_: a class attribute?
16:48 shinobi-cl_ yes
16:48 masak my %!hash;
16:49 shinobi-cl_ i have a class Thing. I want to implement THING_LIST, and be able to add, search and remove things from the list
16:49 shinobi-cl_ but, i tough that ! only made the attribute private.
16:49 masak shinobi-cl_: it does.
16:50 masak you said 'unique to the class'.
16:50 masak that sounds private to me.
16:50 shinobi-cl_ well, is that also, but the idea is that THING_LIST is unique to all Things
16:51 masak aye. hence the 'my' instead of 'has'.
16:51 shinobi-cl_ ahh, thanks!
16:51 masak no problem.
16:51 masak I face these questions every day.
16:51 justatheory joined #perl6
16:52 masak I have two large and several small applications written in Perl 6.
16:59 s1n joined #perl6
17:00 s1n std: (1,2,3,4)[-1].say
17:00 p6eval std 25157: OUTPUT«00:05 38m␤»
17:00 s1n rakudo: (1,2,3,4)[-1].say
17:00 p6eval rakudo 36249: OUTPUT«Use of uninitialized value␤␤»
17:00 masak that's a bug.
17:00 s1n hmm
17:00 masak please report.
17:00 masak oh, wait.
17:00 masak no, it's a Perl5ism.
17:01 masak rakudo: (1,2,3,4)[*-1].say
17:01 p6eval rakudo 36249: OUTPUT«4␤»
17:01 s1n why does it parse the std then?
17:01 s1n err std parse it
17:01 masak because it's syntactically correct.
17:01 s1n what does it mean then?
17:01 masak it's just not what you mean.
17:01 masak it means element number -1
17:01 masak (which is undefined)
17:02 s1n is that possible?
17:02 masak not at present, no.
17:02 masak see S09.
17:02 s1n i'll check it in a minute, thanks
17:03 masak my pleasure.
17:03 aindilis joined #perl6
17:03 s1n masak: btw, i started responding to some of your old rt tickets
17:03 masak aye, saw that.
17:03 s1n but i can't change the status (guess i'm not an admin)
17:04 masak good that someone is doing some cleaning in there.
17:04 masak I'm just creating new ones right now.
17:04 s1n i'd like to mark them resolved, what do i need to get that access?
17:05 masak a BitCard account, I think.
17:05 * masak is not sure
17:05 s1n i have one obviously
17:05 masak ok.
17:05 s1n but it tells me i don't have permission to do that
17:05 masak then I don't know.
17:06 s1n know who would?
17:06 masak another Parrot dev. :)
17:06 masak ask on #parrot, perhaps?
17:06 s1n ok
17:06 masak (on irc.perl.org)
17:06 finanalyst joined #perl6
17:07 finanalyst left #perl6
17:12 masak s1n: in the meantime, it'd help a lot if you just wrote on tickets that they can be resolved.
17:13 s1n masak: i can do that, how can i search rt for tickets i've commented on?
17:13 masak s1n: beats me. with a query, perhaps?
17:14 masak I'm at a loss to use RT efficiently, much less explain how to do it :)
17:14 diakopter moritz_: you around?
17:14 moritz_ diakopter: yes
17:14 diakopter did Infinoid reply re: commit messages to #perl6?
17:15 diakopter I can add it now if he didn't
17:15 s1n did you get an automailer? if so, can you just tell me the ticket numbers?
17:15 moritz_ diakopter: I don't think so
17:15 diakopter ok, I'll do it now; it's an easy change.
17:15 diakopter moritz_: if you want I'll explain how so you can do such things too
17:15 moritz_ diakopter: please go ahead then
17:15 diakopter ok; /msg
17:16 |jedai| joined #perl6
17:22 pugs_svn r25158 | diakopter++ | adding dir for botnix_plugins in misc/
17:25 masak rakudo: package A {}; A::method_that_does_not_exist
17:25 p6eval rakudo 36249: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 60 (EVAL_19:39)␤»
17:26 * masak reports rakudobug
17:27 pugs_svn r25159 | diakopter++ | adding dalek local modules to botnix_plugins for irc channel reporting of svn commits, mostly for #parrot, some for #perl6
17:29 dalek left #perl6
17:29 dalek joined #perl6
17:29 dalek joined #perl6
17:30 pugs_svn r25160 | diakopter++ | adding #perl6 notification for rakudo, hopefully
17:31 dalek left #perl6
17:31 dalek joined #perl6
17:31 dalek joined #perl6
17:32 pugs_svn r25161 | moritz++ | [t] clean-up of prior.t; it was written under a totally wrong assumption
17:32 pugs_svn r25161 | moritz++ | (it tested things siliar to what ~~ now does in regex)
17:36 |jedai| joined #perl6
17:36 pugs_svn r25162 | moritz++ | [t] move prior.t to spec/
17:54 dalek rakudo: b65ae23 | (Moritz Lenz)++ | README:
17:54 dalek rakudo: removed $Id$ from README
17:54 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/b65ae23fa591a7fbd6051aea36ba45750b5e4146
17:54 p6eval rakudo 36249: OUTPUT«Statement not terminated properly at line 1, near ":"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
17:54 p6eval rakudo 36249: OUTPUT«Statement not terminated properly at line 1, near "$ from REA"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
17:54 p6eval rakudo 36249: OUTPUT«Statement not terminated properly at line 1, near ": http://g"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
17:55 * moritz_ detects irc name clash
17:55 masak ok, someone needs to do something about that, really quick.
17:55 masak "I smell a Wumpus."
17:56 * moritz_ tries to grok what diakopter++ did to the dalek thing
17:59 pugs_svn r25163 | moritz++ | [dalek-plugins] try not interfere with evalbot
18:00 dalek left #perl6
18:00 dalek joined #perl6
18:01 dalek joined #perl6
18:02 moritz_ ok, dalek should omit the colon now
18:03 masak moritz_++
18:03 Psyche^ joined #perl6
18:05 justatheory joined #perl6
18:10 pugs_svn r25164 | moritz++ | [irclogs] linkify https URLs
18:11 dalek rakudo 21f374f | (Moritz Lenz)++ | Configure.pl:
18:11 dalek rakudo remove another $Id$ (mostly as test for our irc bots)
18:11 dalek rakudo review: http://github.com/rakudo/rakudo/commit/21f374f690082d8a70ed5b9af2e305286d5642f6
18:12 moritz_ just a test: https://www.parrot.org/
18:20 diakopter moritz_: on #parrot, they made the eval bots disregard the notify bots for : purposes
18:20 moritz_ diakopter: hurm
18:20 moritz_ diakopter: so how do we solve the problem then?
18:21 diakopter have p6eval ignore dalek
18:21 diakopter I'd (and I think many would) prefer the colons there or something
18:21 moritz_ ok, working on ignoring dalek...
18:23 pugs_svn r25165 | moritz++ | [evalbot] ignore dalek
18:24 dalek left #perl6
18:24 dalek joined #perl6
18:24 dalek joined #perl6
18:24 pugs_svn r25166 | moritz++ | [botnix_plugins] give #parrot their colon back
18:29 icwiener joined #perl6
18:34 s1n pmichaud: ping
18:34 s1n jnthn: ping
18:58 icwiener joined #perl6
19:02 rindolf joined #perl6
19:07 Whiteknight rakudo: my $x = -> $a { say $a; }; $x(5);
19:07 p6eval rakudo 36250: OUTPUT«5␤»
19:07 Whiteknight yay!
19:11 km2 joined #perl6
19:14 Whiteknight 5 -> $x { say $x; }
19:14 Whiteknight rakudo: 5 -> $x { say $x; }
19:14 p6eval rakudo 36250: OUTPUT«Statement not terminated properly at line 1, near "-> $x { sa"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:14 Whiteknight rakudo: 5 -> $x { say $x; };
19:14 p6eval rakudo 36250: OUTPUT«Statement not terminated properly at line 1, near "-> $x { sa"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:14 Whiteknight rakudo: (5) -> $x { say $x; };
19:14 p6eval rakudo 36250: OUTPUT«Statement not terminated properly at line 1, near "-> $x { sa"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:15 moritz_ Whiteknight: since point blocks are terms, you're trying two terms in a row
19:15 moritz_ rakudo: -> $x { say 2 * $x }.(3)
19:15 p6eval rakudo 36250: OUTPUT«6␤»
19:16 moritz_ rakudo: -> $x { say 2 * $x }(3)
19:16 p6eval rakudo 36250: OUTPUT«6␤»
19:16 Whiteknight Ah, okay
19:16 moritz_ rakudo: if 3 -> $_ { .say }
19:16 p6eval rakudo 36250: OUTPUT«3␤»
19:16 Whiteknight Okay, that's what I was looking for I think
19:16 Whiteknight is there a do- form of it too?
19:17 moritz_ in for, if, while etc. it only works because because they have special grammar rules
19:17 moritz_ Whiteknight: don't think so
19:17 Whiteknight rakudo: do (3) -> $x { say $x; }
19:17 p6eval rakudo 36250: OUTPUT«Statement not terminated properly at line 1, near "-> $x { sa"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:17 Whiteknight yeah, no
19:18 Whiteknight I'm trying to find a way to just execute a pointy block inline without having to use a loop or an if
19:18 moritz_ Whiteknight: the -> $stuff {  ... }.($args) should work
19:18 Whiteknight Okay, I'll use that
19:19 moritz_ rakudo: { say $^a * $^b }.(2, 3)
19:19 p6eval rakudo 36250: OUTPUT«6␤»
19:22 icwiener joined #perl6
19:23 Whiteknight rakudo: if(5) -> $a { say $a; }
19:23 p6eval rakudo 36250: OUTPUT«5␤»
19:23 moritz_ Whiteknight: don't write it with parenthesis - that's allowed now, but not valid Perl 6, so likely to change
19:24 moritz_ (in "real" Perl 6 it calls a function called if())
19:27 TimToady @tell masak re private delegation, that's just a method on the delegational attribute; why would your class want to lie to itself about its own implemention?  Lying is for outside the class. :)
19:27 TimToady no lambdabot I guess...
19:36 Whiteknight moritz_: okay, I'll try to remember that
19:36 Whiteknight (and try to make sure that factoid is properly transcribed in the book)
19:36 |jedai| joined #perl6
19:37 moritz_ Whiteknight: the parsing rules are simple - every identifier followed by '(' is a sub call
19:37 Whiteknight ah, so if I had a space in there it would be legal?
19:37 moritz_ yes
19:37 jhuni joined #perl6
19:37 moritz_ but `if' doesn't require a space anymore
19:38 Whiteknight so "if($x)" is legal or not?
19:38 moritz_ it is a legal sub call
19:38 moritz_ which fails at runtime if there is no such sub defined
19:38 Whiteknight but not a legal conditional?
19:38 Whiteknight okay
19:38 Whiteknight I'll get it, slowly but surely
19:39 moritz_ the idea is that if there's no clash between keywords and sub calls, it's much easier to introduce keywords without breaking anything
19:39 TimToady if requires the space, not the paren
19:40 TimToady and functions are in some sense more fundamental than keywords
19:40 TimToady you can use given to get the parameter out front
19:41 TimToady and then you don't have to worry about whether it's true
19:41 TimToady rakudo: given 0 -> $a { say $a }
19:41 p6eval rakudo 36251: OUTPUT«0␤»
19:41 moritz_ nice idea
19:42 TimToady it's just a degenerate for, basically
19:43 TimToady rakudo: for 2, 3 { say $^a * $^b }
19:43 p6eval rakudo 36251: OUTPUT«6␤»
19:43 moritz_ some parts of rakudo work so reliable that it always surprises me again ;-)
19:43 Whiteknight so it's better to just write it as "if $x > 5" then "if ($x > 5)"?
19:44 moritz_ Whiteknight: yes
19:44 TimToady yes
19:44 TimToady you only need (...) if there's a { that would be confused with the block
19:44 TimToady and that's hard to do
19:45 TimToady only loop (;;) still requires the parens
19:45 moritz_ if { $_ > 0 ?? 1 !! $_ * $?BLOCK($_-1) }.(4) > 120 { ... }
19:45 Whiteknight I want to make sure I get this all correct for the book, better to teach new users best-practices fro the beginning
19:46 moritz_ ok, that's a *very* constructed example
19:46 moritz_ Whiteknight: is there anything I should review?
19:47 Whiteknight moritz_: You should probably review all of it!
19:47 TimToady std: if { $_ > 0 ?? 1 !! $_ * $?BLOCK($_-1) }.(4) > 120 { ... }
19:47 p6eval std 25166: OUTPUT«00:02 33m␤»
19:47 moritz_ Whiteknight: is it p6pe? or something different?
19:47 TimToady moritz_: that's not a problem
19:48 moritz_ std: if 1 { .. } > 4
19:48 Whiteknight moritz_: it's at Wikibooks: http://en.wikibooks.org/wiki/Perl_6
19:48 p6eval std 25166: OUTPUT«############# PARSE FAILED #############␤Unable to parse block; couldn't find final '}' at /tmp/ggRDFS4Vxn line 1:␤------> [32mif 1 { [31m.. } > 4[0m␤    expecting any of:␤      prefix or noun␤   statement end␤    statement list␤00:02 32m␤»
19:48 TimToady wel, but you had two terms in a row
19:48 moritz_ I just wanted to test if there's an operator expected after the block of an 'if'
19:48 TimToady std: if grep { $_ % 2 }, 1,2,3 { ...}
19:48 p6eval std 25166: OUTPUT«00:02 34m␤»
19:48 TimToady even that is okay
19:50 TimToady std: do if 1 { ... } > 4
19:50 p6eval std 25166: OUTPUT«00:02 32m␤»
19:50 TimToady looks like you can do it with do
19:51 TimToady and the } properly terminates the do
19:51 TimToady however, probably better to say
19:51 TimToady std: (if 1 {...}) > 4
19:51 p6eval std 25166: OUTPUT«00:02 32m␤»
19:52 TimToady just for clarity
20:00 justatheory joined #perl6
20:04 Limbic_Region joined #perl6
20:22 |jedai| joined #perl6
20:24 ABB joined #perl6
20:31 |jedai| joined #perl6
20:52 alexn_org joined #perl6
20:56 ejs joined #perl6
21:18 pugs_svn r25167 | lwall++ | [prior.t] missing a closing /
21:18 moritz_ damn, I should install a local pre-commit hook that runs committed test files through STD.pm first
21:20 TimToady I enjoy fixing parsefails, actually :)
21:20 moritz_ ok, then I'll leave that joy to you
21:21 moritz_ and I must say that I'm duely impressed by the quality of the error messages
21:22 moritz_ although sometimes it says "expecting any of ... @some_list[]... whitespace", and when I insert whitespaces at that point, it still appears in the list
21:24 TimToady well, it always expects more whitespace at the start of a token, except where prohibited
21:25 TimToady so maybe we could suppress it if after whitespace
21:25 TimToady part of the whole reason for STD is to get the right set of error messages.
21:25 TimToady I get a little tired of seeing "statement terminated incorrectly" out of rakudo...
21:26 TimToady it really just means "syntax error"
21:27 elmex joined #perl6
21:34 moritz_ std: say
21:34 p6eval std 25167: OUTPUT«00:02 32m␤»
21:34 moritz_ shouldn't that be a parse error?
21:34 moritz_ std: my ($a, $b, $c); $b := $c; say [&&] ($a, $b) X!=:= ($b, $c)
21:34 p6eval std 25167: OUTPUT«00:02 36m␤»
21:35 moritz_ rakudo: my ($a, $b, $c); $b := $c; say [&&] ($a, $b) X!=:=X ($b, $c)
21:35 p6eval rakudo 36259: OUTPUT«say requires an argument at line 1, near " [&&] ($a,"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:35 moritz_ rakudo: my ($a, $b, $c); $b := $c; my &foo := &say; foo [&&] ($a, $b) X!=:=X ($b, $c)
21:35 p6eval rakudo 36259: OUTPUT«Statement not terminated properly at line 1, near "[&&] ($a, "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:39 TimToady no, it's a semantic error
21:40 Chillance joined #perl6
21:40 moritz_ ok
21:40 TimToady syntactically, it's just a listop, which can take 0 args
21:40 TimToady not that STD doesn't check for a few semantic errors on its own...
21:47 pugs_svn r25168 | lwall++ | [STD] panic on statement_control block where modifier parsed
21:47 pugs_svn r25168 | lwall++ | "handles" must only parse one term to avoid parsing any following block
21:47 pugs_svn r25168 | lwall++ | reduction needs to trap any panic from infixish parse
21:47 pugs_svn r25169 | diakopter++ | adding p6vm stub dir.  see the README for laughs (or tears).
21:48 moritz_ .oO( plan to throw 5 away )
21:49 moritz_ that seems to be the Perl 6 implementation motto :-)
21:49 diakopter which?
21:49 moritz_ plan to throw 5 away
21:49 diakopter I don't get it
21:51 moritz_ it's just a memorandum on the various abandoned efforts, and a bad pun on  the "plan to throw one away" prototyping rule
21:52 diakopter moritz_: oh; heh. :)
21:53 moritz_ parrot plans three iterations on each subsystem; that would be two to throw away.. now you only need to find three abondoned other projects, and you're there ;-)
22:02 |jedai| joined #perl6
22:18 M_o_C joined #perl6
22:20 M_o_C joined #perl6
22:28 |MoC| joined #perl6
22:32 M_o_C joined #perl6
22:33 M_o_C` joined #perl6
22:36 M_o_C joined #perl6
22:37 M_o_C joined #perl6
22:38 Jedai joined #perl6
22:38 |jedai| joined #perl6
22:44 M_o_C joined #perl6
22:53 M_o_C joined #perl6
22:55 spx2 joined #perl6
23:00 spx2_ joined #perl6
23:01 M_o_C joined #perl6
23:01 jeremiah joined #perl6
23:02 jeremiah Hey jnthn, how did you feel this morning? ;)
23:02 jeremiah seen jnthn
23:03 jeremiah Ah, no perlbot here . . .
23:03 moritz_ perlbot: seen jnthn
23:05 eternaleye joined #perl6
23:06 jeremiah purl
23:06 moritz_ I'm glad purl isn't here ;-)

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

Perl 6 | Reference Documentation | Rakudo