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