pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by TimToady on 25 January 2008.
00:06 cognominal_ joined
rakudo_svn r27897 | particle++ | [rakudo] [perl #54988] [PATCH] enhance t/harness (again) 00:16
r27897 | particle++ | ~ adds ability call fudge on a per-file basis via --configfudge option
r27897 | particle++ | ~ fudging (the default) can be disabled with an eol comment matching /\s+#\s*pure$/ in t/*.data files
r27897 | particle++ | ~ enables this behavior for the 'localtest' make target
r27897 | particle++ |
r27897 | particle++ | Courtesy Moritz Lenz (moritz++) with minor modifications
00:26 japhb left 00:28 mncharity joined 00:31 Eevee joined
pmichaud pugs: my @b; say @b.isa(List); 00:31
exp_evalbot OUTPUT[1␤] 00:32
pmichaud pugs: my @b = 1..3; say @b.isa(List);
exp_evalbot OUTPUT[1␤]
pmichaud pugs: say Array.isa(List);
exp_evalbot OUTPUT[1␤]
pmichaud pugs: say List.isa(Array);
exp_evalbot OUTPUT[␤]
Eevee hooray
00:32 qu1j0t3 joined
rakudo_svn r27898 | particle++ | [rakudo] enable per-file fudging in spectest_regression make target 00:42
r27898 | particle++ | ~ thanks to moritz++ for the per-file fudging, we can disable fudge for spectests that are passing without it
r27898 | particle++ | ~ of 43 passing test files (774 subtests) in spectest_regression, 23 files (225 subtests) pass without fudging!
mncharity so the elf sources have been using the wrong twigil for contextual variables, extensively, forever, and no-one noticed? sigh. sooo need code reviews. 00:52
00:59 qu1j0t3 is now known as FurnaceBoy 01:05 lisppaste3 joined
Auzon mncharity: What do you mean? 01:05
mncharity context variables are $+foo, not $^foo. having someone look at the code and ask "what is wrong here?" might have caught it earlier. 01:07
no biggie, just a startling thing to have wrong. 01:08
Auzon oh. I thought you meant compiler vars ($?WHATEVER)
mncharity ah, no 01:09
01:09 elmex left
mncharity TimToady: I note the word "context" is used both for the void/scalar/list concept, and the completely unrelated $+ dynamic scoping concept. This is bad. 01:12
Really bad. Not even "isn't best practices" bad. Shudder. 01:24
01:37 penk joined
pmichaud originally they were called "environmental variables", but that was "Really Bad" also. :-) 01:44
01:45 alester is now known as AndyAway
rakudo_svn r27902 | jkeenan++ | Add copyright, svn ID tag and coda. 01:46
mncharity lol 01:48
rakudo_svn r27903 | jkeenan++ | Set svn keywords and eol-style attributes. 01:50
01:51 alanhaggai__ joined
mncharity in the real world, they are called "dynamically scoped". Not a great name, a historical artifact, but if we want to come up with a better one... we need a better one. 01:51
or am I completely confused about what $+ means... 01:55
:/
pmichaud I think the term "contextual variable" may come from how they're often used. For example, in STD.pm the $+ variables are used to indicate a "context" to various subrules that are called.
thus list context, item context, etc. are just examples of possible contexts 01:56
mncharity eep. so "context" from 'calling context'... interesting... 02:00
pmichaud it took me a while to understand that also.
and I'm not sure my interpretation is the same as TimToady's -- that's just what made sense to me. 02:01
mncharity neat. that does make sense. my thanks. 02:03
TimToady: nm ;) 02:04
02:07 japhb joined
pugs_svnbot r20575 | putter++ | [elf] Switch all $^foo to $+foo, the correct twigil for contextual variables. 02:15
02:22 tobeya left 02:39 Alias__ joined 02:40 Alias_ left
mncharity perl6: my $pkg::v; 02:48
exp_evalbot kp6 r20575: OUTPUT["my" variable $pkg::v can't be in a package at (eval 24) line 1, near "( $pkg::v "␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/Pad.pm line 141␤"my" variable $pkg::v can't be in a package at - line 11, near "( $pkg::v "␤Execution of - aborted due to compilation
..errors.␤]
..pugs: OUTPUT[*** ␤ Unexpected "::v"␤ expecting word character, "?", "!", trait, "=", infix assignment, term postfix or operator␤ at /tmp/ZGmbyz49dk line 1, column 8␤]
..rakudo r27908: RESULT[Method 'perl' not found for invocant of class 'Undef'␤current instr.: '_block11' pc 38 (EVAL_11:18)␤
..elf r20575: OUTPUT["my" variable $pkg::v can't be in a package at (eval 14) line 3, near "my $pkg::v"␤ at ./elf_f_faster line 4439␤] 02:49
02:49 Gothmog_ left, yath left
mncharity perl6: our $pkg::x is context; 02:50
exp_evalbot kp6 r20575: OUTPUT[No package name allowed for variable $pkg::x in "our" at (eval 24) line 1, near "( $pkg::x "␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/Pad.pm line 141␤<is> not implemented at compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Term.pm line 1818, <> line 1.␤]
..pugs: OUTPUT[*** ␤ Unexpected "::x"␤ expecting word character, "?", "!", trait, "=", infix assignment, term postfix or operator␤ at /tmp/pL7aKsNIz6 line 1, column 9␤]
..rakudo r27908: OUTPUT[PAST::Compiler can't compile node of type Perl6::Grammar␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
..elf r20575: OUTPUT[No package name allowed for variable $pkg::x in "our" at (eval 14) line 3, near "our $pkg::x"␤ at ./elf_f_faster line 4439␤]
mncharity perl6: our $x is context; 02:51
perl6: our $x is context;
exp_evalbot kp6 r20575: OUTPUT[<is> not implemented at compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Term.pm line 1818, <> line 1.␤]
..pugs: RESULT[\undef]
..rakudo r27908: OUTPUT[PAST::Compiler can't compile node of type Perl6::Grammar␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
..elf r20575: RESULT[undef␤]
mncharity so the p5 local($pkg::x) = $pkg::x; becomes package pkg { our $x is context = $+OUTER::x; } ?? 02:53
02:55 alanhaggai_ joined 02:58 stevan_ joined, Grrrr joined, Gothmog_ joined, yath joined 03:09 alanhaggai__ left
pmichaud pugs: sub foo(@a, @b) { say @a.perl; }; foo(1, (2,3,4)); 03:16
exp_evalbot OUTPUT[[1,]␤]
pmichaud pugs: sub foo(@a, @b) { say @a.perl; }; foo((2,3,4), 1);
exp_evalbot OUTPUT[[2, 3, 4]␤]
pmichaud yay.
03:18 felipe joined
mncharity :) 03:21
03:24 eternaleye_ joined
mncharity rakudo: my $x is context = 3; { my $x is context = $x; say $x } 03:25
exp_evalbot rakudo r27908 OUTPUT[PAST::Compiler can't compile node of type Perl6::Grammar␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
mncharity pugs: my $x is context = 3; { my $x is context = $+x; say $x }
exp_evalbot OUTPUT[*** Can't modify constant item: VUndef␤ at /tmp/HS1NNShprr line 1, column 39-47␤ /tmp/HS1NNShprr line 1, column 39-47␤]
pmichaud (rakudo doesn't do contextual vars yet) 03:26
mncharity thanks. puzzling over scoping. 03:27
OUTER::CONTEXT::x, oh my 03:28
rouso: re talk, nifty. how long does it currently take, vs what you have available? 03:32
03:34 alc joined
pugs_svnbot r20576 | putter++ | [elf] Support 'my $x is context'. But elf's own code stayed with 'my $+x' for brevity. 03:36
03:36 rindolf joined
mncharity g'night all & 03:37
03:37 mncharity left
pugs_svnbot r20577 | Auzon++ | [gsoc_spectest] more mindless typecasting tests. 03:38
03:50 alanhaggai__ joined
Auzon perl6: class Test {has $.var;}; 03:51
exp_evalbot kp6 r20577: RESULT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824be04)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824be04)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: RESULT[undef]
..rakudo r27909: RESULT[Method 'perl' not found for invocant of class 'Sub'␤current instr.: '_block11' pc 38 (EVAL_11:18)␤
..elf r20577: RESULT[undef␤]
Auzon perl6: class Test {has $.var;}; my $thing = Test.new(var => 'test'); $thing;
exp_evalbot kp6 r20577: RESULT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824bfac)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤ 03:52
..main::DISPATCH('HASH(0x824bfac)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: RESULT[\Test.new(("var" => "test"),)]
..rakudo r27909: OUTPUT[get_bool() not implemented in class 'Test'␤current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1288 (src/PCT/HLLCompiler.pir:688)␤
rindolf WTF?
exp_evalbot ..elf r20577: OUTPUT[Odd number of elements in anonymous hash at ./elf_f_faster line 19.␤]
03:52 rindolf left
Auzon perl6: class Test {has $.var;}; my $thing = Test.new; $thing.var = 3; $thing 03:52
exp_evalbot kp6 r20577: RESULT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 345␤ KindaPerl6::Runtime::Perl5::MOP::__ANON__('HASH(0x824bf2c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
..main::DISPATCH('HASH(0x824bf2c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
..pugs: RESULT[\Test.new(("var" => 3),)]
..rakudo r27909: OUTPUT[get_bool() not implemented in class 'Test'␤current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1288 (src/PCT/HLLCompiler.pir:688)␤
..elf r20577: RESULT[Test.new(!!!)␤]
Auzon pugs works. elf is just weird there ;) 03:53
Hm. Elf works, just doesn't have .perl on objects very well. 03:54
03:57 pen1 joined, penk left
Auzon pugs: class Begin {has .value is rw;}; 04:04
exp_evalbot OUTPUT[*** ␤ Unexpected "."␤ expecting "=", "::", qualified identifier, "?" or variable name␤ at /tmp/wnlnFsYEgw line 1, column 18␤]
Auzon pugs: class Begin {has $.value is rw;};
exp_evalbot RESULT[undef]
04:04 alanhaggai_ left
Auzon pugs: class Begin {has $.value is rw;}; class End {has .value is rw;} multi sub infix:<+> (Begin $b, End $e) {$b.value ** $e.value}; my $b = Begin.new; my $e = End.new; 04:05
exp_evalbot OUTPUT[*** ␤ Unexpected "."␤ expecting "=", "::", qualified identifier, "?" or variable name␤ at /tmp/ifIW84pNe8 line 1, column 50␤]
Auzon pugs: class Begin {has $.value is rw;}; class End {has $.value is rw;} multi sub infix:<+> (Begin $b, End $e) {$b.value ** $e.value}; my $b = Begin.new; my $e = End.new;
exp_evalbot RESULT[\End.new(("value" => undef),)]
Auzon pugs: class Begin {has $.value is rw;}; class End {has $.value is rw;} multi sub infix:<+> (Begin $b, End $e) {$b.value ** $e.value}; my $b = Begin.new; my $e = End.new; $b.value = 2; $e.value = 5; say $b + $e;
exp_evalbot OUTPUT[32␤]
Auzon shrugs 04:08
Oh. I think I get it
04:09 alc left
Auzon Silly pugs, loading Perl 5's Test.pm instead of Pugs's Test.pm. 04:10
perl6: sub inc {state $inc = 0; $inc++;} say inc() for 1 .. 4; 04:15
exp_evalbot kp6 r20577: OUTPUT[error in Block at compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Sub.pm line 362, <> line 1.␤*** Syntax Error in sub '': missing closing curly bracket ␤]
..pugs: OUTPUT[0␤0␤0␤0␤]
..rakudo r27909: OUTPUT[scope declarator 'state' not implemented at line 1, near "= 0; $inc+"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
..elf r20577: OUTPUT[Parse error in: /tmp/t8AY6eKjsT␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: sub inc {state $inc = 0; $inc+␤WHERE:/\<-- HERE␤ STD_red/prelude.rb:98:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in `comp_unit'␤
..STD_red/std.rb:210:in `_UNIT'␤ ./../STD_red/STD_red_run:108:in `...
Auzon perl6: sub inc {state $inc = 0; $inc++;}; say inc(); say inc();
exp_evalbot kp6 r20577: OUTPUT[error in Block at compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Sub.pm line 362, <> line 1.␤*** Syntax Error in sub '': missing closing curly bracket ␤]
..pugs: OUTPUT[0␤0␤]
..rakudo r27909: OUTPUT[scope declarator 'state' not implemented at line 1, near "= 0; $inc+"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
..elf r20577: OUTPUT[Unknown rule: scope_declarator:state␤It needs to be added to ast_handlers.␤ at ./elf_f_faster line 2669␤]
Auzon No one likes state variables, huh? :-/ 04:16
04:25 alanhaggai__ left
pugs_svnbot r20578 | Auzon++ | [gsoc_spectest] multiple signatures testing. See perlcabal.org/syn/S13.html#Syntax 04:42
lambdabot Title: S13
rakudo_svn r27910 | pmichaud++ | [rakudo]:
r27910 | pmichaud++ | * Refactor the !keyword_* methods out of Object.pir and into
r27910 | pmichaud++ | src/builtins/guts.pir (as subs). If these really need to
r27910 | pmichaud++ | be methods, we should probably make them methods of a
r27910 | pmichaud++ | separate metaclass or of Class or something like that.
r27910 | pmichaud++ | * All tests and spectest_regression pass, so hopefully I didn't
r27910 | pmichaud++ | break anything.
04:51 alc joined
Auzon good night all. 04:53
pmichaud good night! 04:57
05:10 FurnaceBoy left 05:21 alanhaggai joined
pmichaud pugs: my $a = (1, 2, 3); say $a.WHAT; 05:31
exp_evalbot OUTPUT[Array␤]
rakudo_svn r27912 | pmichaud++ | [rakudo]: 06:05
r27912 | pmichaud++ | * "make localtest" needs 'all' and 't/spec' as dependencies.
r27913 | pmichaud++ | [rakudo]: 06:08
r27913 | pmichaud++ | * Clean up List '.pairs' method to return Perl6Pairs instead of the
r27913 | pmichaud++ | outdated Pair PMC.
spinclad pugs: my $a = (1, 2, 3); say VAR($a).WHAT; 06:13
exp_evalbot OUTPUT[Array␤]
spinclad pugs: my $a = 1; say $a.WHAT; 06:14
exp_evalbot OUTPUT[Int␤]
spinclad pugs: my $a = 1; say VAR($a).WHAT; 06:15
exp_evalbot OUTPUT[Int␤]
pmichaud pugs: my @array; @array[8]='eight'; @array.delete(8); say +@array; 06:17
exp_evalbot OUTPUT[8␤]
spinclad thinks the last of mine should be the container's type... and likely pugs doesn't do VAR
rakudo_svn r27915 | pmichaud++ | [rakudo]: 06:28
r27915 | pmichaud++ | * Remove no-longer-used perl6bool.pmc and perl6undef.pmc .
06:31 justatheory left 06:43 alanhaggai_ joined
rakudo_svn r27916 | pmichaud++ | [rakudo]: 06:44
r27916 | pmichaud++ | * Update List .map implementation to respect arity. (bacek++)
r27916 | pmichaud++ | * Patch courtesy Vasily Chekalkin [email@hidden.address]
06:46 luqui joined 06:53 luqui left, luqui joined 06:54 alanhaggai__ joined 06:57 alanhaggai left 07:08 alanhaggai_ left 07:16 kcwu joined 07:17 cognominal_ left 07:23 polettix joined
moritz_ pugs: my @a = (1); say @a.perl 07:23
exp_evalbot OUTPUT[[1,]␤]
bacek perl6: say int(-0.5) 07:27
exp_evalbot kp6 r20578: OUTPUT[syntax error at position 7, line 1 column 7:␤say int(-0.5␤ ^ HERE␤]
..pugs: OUTPUT[0␤]
..rakudo r27916: OUTPUT[-0␤]
..elf r20578: OUTPUT[syntax error at (eval 14) line 3, near "))"␤ at ./elf_f_faster line 4461␤]
bacek great. 07:28
who is wrong: pugs or spec/S29-num/int.t?
moritz_ there is no -0 07:30
actually -0 should be the same as 0
a 2-complement integer can't represent 0 and -0 distinctively, so there's no use in tryin' 07:31
bacek so we can safely fix spectest? 07:32
moritz_ 1) fix it 2) add a test that -0 == 0
pugs: say -0 == 0 ?? "yes" !! "you lost" 07:33
exp_evalbot OUTPUT[yes␤]
moritz_ rakudo: say -0 == 0 ?? "yes" !! "you lost"
exp_evalbot rakudo r27916 OUTPUT[Statement not terminated properly at line 1, near "?? \"yes\" !"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
moritz_ rakudo: if -0 == 0 { say "yes" } else { say "you lost" }
exp_evalbot rakudo r27916 OUTPUT[yes␤]
moritz_ so what's the problem? 07:34
is there a string based comparison anywhere? 07:35
bacek rakudo: say int(-0.5) == 0
exp_evalbot rakudo r27916 OUTPUT[1␤]
bacek rakudo: say int(-0.5) == -0 07:36
exp_evalbot rakudo r27916 OUTPUT[1␤]
bacek multi sub is($got, $expected, $desc) {
my $test = $got eq $expected;
bug in Test.pm
07:36 alanhaggai__ left
bacek rakudo: say (-0.5) cmp -0; 07:37
exp_evalbot rakudo r27916 OUTPUT[-1␤]
bacek rakudo: say int(-0.5) cmp -0;
exp_evalbot rakudo r27916 OUTPUT[0␤]
07:38 poletti joined
moritz_ bacek: the rakudo Test.pm? 07:38
07:38 polettix left, poletti is now known as polettix
bacek moritz_: yes 07:41
rakudo: say (int-0.5) == -0
exp_evalbot rakudo r27916 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: 'int' pc 7881 (src/gen_builtins.pir:5533)␤
bacek rakudo: say int(-0.5) == -0
exp_evalbot rakudo r27916 OUTPUT[1␤] 07:42
07:42 pmurias joined
moritz_ rakudo: say -0 === 0 07:44
exp_evalbot rakudo r27916 OUTPUT[Could not invoke non-existent sub infix:===␤current instr.: '_block11' pc 46 (EVAL_11:20)␤
bacek workaround is replace '$got eq $expected' with ($got cmp $expected) == 0 in rakudo's Test.pm 07:48
moritz_ does rakudo do type-based mmd? 07:49
pmichaud some.
moritz_ rakudo: multi sub f(Str $x) { say "Str"; }; multi sub f(Num $x) { say "Num"; }; f("abc") 07:50
exp_evalbot rakudo r27916 OUTPUT[No applicable methods.␤current instr.: '_block11' pc 34 (EVAL_12:17)␤
moritz_ rakudo: multi sub f(Str $x) { say "Str"; }; multi sub f(Num $x) { say "Num"; }; f(1)
exp_evalbot rakudo r27916 RESULT[No applicable methods.␤current instr.: '_block16' pc 88 (EVAL_12:39)␤
pmichaud rakudo: multi sub f(Str $x) { say 'Str'; }; multi sub f(Num $x) { say 'Num'; }; f(1.5); 07:51
exp_evalbot rakudo r27916 OUTPUT[Num␤]
pmichaud (Parrot "kindly" converts integer values from Num to Int for us. :-) 07:52
(which is a real pain, yes.) 07:53
moritz_ so type based MMD works, but not for subtypes? 07:55
pmichaud Parrot treats Num and Int as separate types, yes. 07:57
we'll undoubtedly fix that particular issue when we get to it 07:58
omg... it's 3am 08:00
pmichaud has to be up in 3.5 hours to feed kids and send them to school
pugs: say (1.2.3).kv; 08:03
exp_evalbot OUTPUT[*** ␤ Unexpected "3"␤ expecting ".", "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript␤ at /tmp/QiRj6k06J1 line 1, column 10␤]
pmichaud oops.
pugs: say (1,2,3).kv;
exp_evalbot OUTPUT[*** Not a keyed value: VList [VInt 1,VInt 2,VInt 3]␤ at /tmp/GZRrdgamD2 line 1, column 5-15␤]
pmichaud pugs; my @a = 1..3; say @a.kv;
pugs: my @a = 1..3; say @a.kv;
exp_evalbot OUTPUT[011223␤]
08:07 meppl joined
rakudo_svn r27917 | pmichaud++ | [rakudo]: 08:08
r27917 | pmichaud++ | * First pass at implementing Array types.
r27917 | pmichaud++ | * my @a = 1; now works properly.
r27917 | pmichaud++ | * Also understands [] versus (), mostly.
r27917 | pmichaud++ | * Still some list context issues to be addressed in parameters.
r27917 | pmichaud++ | * Resolves RT#52276.
pmichaud okay, sleep. then breakfast. Then Hash and hash composers.
moritz_ is ther a svn commit-hook that m/(resolves|closes) (RT)?#\d{5}/ automatically closes a ticket? 08:10
(wrong channel)
luqui Hash composer... like Berlioz? 08:14
moritz_ perlbot: karma moritz 08:22
perlbot Karma for moritz: 452
moritz_ perlbot: karma moritz_
perlbot Karma for moritz_: 41
08:26 poletti joined 08:27 polettix left
pugs_svnbot r20579 | moritz++ | [spec] fixed S29-array/delete.t as reported by pmichaud++ 09:04
bacek moritz_: you steal my karma! :) 09:08
moritz_ bacek: sorry, didn't know you were working on it ;-)
bacek++ # patches to rakudo and spec tests
bacek moritz_: :) 09:09
09:09 bacek left 09:34 chris2 joined 10:07 dmq joined 10:13 alc left 10:26 poletti left, dmq left, chris2 left, felipe left, Gothmog_ left, Grrrr left, yath left, stevan_ left, kcwu left, lisppaste3 left, avar left, Juerd left, wolverian left, bacek__ left, Patterner left, meppl left, pmurias left, aindilis left, PerlJam left, Sartak left, japhb left, Eevee left, ispy_ left 10:27 Alias__ left, pen1 left, AndyAway left, r0bby left, luqui left, eternaleye_ left, simcop2387 left 10:28 TimToady joined, dmq joined, chris2 joined, poletti joined, meppl joined, pmurias joined, kcwu joined, luqui joined, pen1 joined, eternaleye_ joined, felipe joined, pasteling joined, perlbot joined, TreyHarris joined, zev joined, spinclad joined, mtve joined, SubStack joined, yves joined, cj joined, obra joined, yahooooo joined, shachaf joined, buubot joined, joejaxx joined, moritz_ joined, rhr joined, speckbot joined, SamB joined, buu joined, silug joined, hcchien joined, drbean_ joined, diakopter joined, zostay joined, ingy joined, gugod joined, Tene joined, cls_bsd joined, nipotaway joined, rafl joined, bbkr_ joined, thepler joined, xdg_ joined, integral joined, audreyt joined, charsbar joined, dalek joined, pugs_svnbot joined, pmichaud joined, Juerd joined, wolverian joined, PerlJam joined, irc.freenode.net sets mode: +o TimToady, Sartak joined, simcop2387 joined, fullermd joined, zamolxes joined, ilbot2 joined, qmole joined, pjcj joined, jiing joined, IRSeekBot joined, Lunchy joined, viklund joined, araujo joined, ting joined, LCamel joined, tcliou joined, c1sung joined, gbacon joined, jjore joined, awwaiid joined, rakudo_svn joined, vixey joined, Khisanth joined, agentzh joined, smtms joined, kane_ joined, Maddingue joined, kolibrie joined, arguile joined, cosimo joined, Caelum joined, IllvilJa joined, mj41 joined, REPLeffect_ joined, allbery_b joined, jrockway joined, lambdabot joined, kst` joined, nothingmuch joined, [particle] joined, r0bby joined, AndyAway joined, avar joined, ispy_ joined, Patterner joined, aindilis joined, bacek__ joined, Eevee joined, lisppaste3 joined, japhb joined, Alias__ joined, stevan_ joined, Grrrr joined, Gothmog_ joined, yath joined 10:29 Helios- left 10:30 Helios- joined, bnjmn-- joined 10:42 pen1 left 10:48 bnjmn-- is now known as benjammy 11:11 IllvilJa left 11:12 Jedai joined 11:31 braceta joined 11:35 poletti left, luqui left 11:37 poletti joined
pmichaud pugs: my $b = hash(3, 4); say $b.perl; 11:41
exp_evalbot OUTPUT[{("3" => 4),}␤]
pmichaud pugs: my $b = hash('x', 4); say $b.WHAT;
exp_evalbot OUTPUT[Hash␤]
pmichaud pugs: say hash('x', 4).WHAT;
exp_evalbot OUTPUT[Hash␤]
pmichaud pugs: say { x=>4 }.WHAT; 11:42
exp_evalbot OUTPUT[x 4␤␤]
pmichaud my @b = hash(3,4); say $b.perl; 11:43
pugs: my @b = hash(3,4); say $b.perl;
exp_evalbot OUTPUT[*** ␤ Unexpected "."␤ expecting "::"␤ Variable "$b" requires predeclaration or explicit package name␤ at /tmp/37vfcLqPFn line 1, column 27␤]
pmichaud pugs: my @b = hash(3,4); say @b.perl;
exp_evalbot OUTPUT[[{("3" => 4),},]␤]
rakudo_svn r27918 | pmichaud++ | [rakudo]: 11:46
r27918 | pmichaud++ | * Fix typo in IO.pir (RT#55032, bacek++).
11:46 pbuetow joined 11:53 chris2 left 12:09 alanhaggai joined 12:11 braceta left 12:17 braceta joined, braceta left
moritz_ pugs: my @a = <a b c>; say @a.push('d') 12:25
exp_evalbot OUTPUT[4␤]
pmichaud ....which I find kinda odd -- seems to me it should return @a 12:34
12:36 wknight8111 joined
pmurias pmichaud: it has the same behaviour as perl5 push 12:38
12:38 wknight8111 left
pmichaud pmurias: okay, it makes more sense then. :-) 12:38
12:38 wknight8111 joined
pmichaud I had never used the return value of 'push' in p5 :-) 12:38
pmurias neither did i 12:39
;)
moritz_ but in p5 it's nonsense to return an array because you can't access push as a method call
so no chained method calls at all 12:40
pmichaud right.
moritz_ so returning self might be sensible, so you can do things like @list.push(3, 4).sort()
bacek__ pmichaud, moritz_ +1 12:41
pmichaud afk for a bit 12:44
pmurias @list.push(3,4).sort() is a bit confusing 12:48
lambdabot Unknown command, try @list
moritz_ pmurias: depends on your background ;)
pmurias moritz_: you use a lot of jQuery? 12:50
moritz_ pmurias: no ;)
but I do chain methods with side effects 12:51
pmurias in p5?
moritz_ yes 12:52
(not a lot, but still some)
in TK apps stuff like $window->Entry(...)->pack(...) 12:53
12:53 poletti left 12:54 yves left, poletti joined
pmurias chained methods are (sometimes) usefull but we should either have a whole bunch of them or none at all 12:55
moritz_ let's ask the other way round: what's the advantage for returning +self instead of self? 12:59
s/for/of/
13:04 stevan_ left 13:14 rdice joined
pmichaud pugs: say List.isa(Seq); 13:16
exp_evalbot OUTPUT[*** No such subroutine: "&Seq"␤ at /tmp/Sywo7Tq49o line 1, column 14-17␤]
pmichaud pugs doesn't know Seq ? 13:17
moritz_ seems like 13:18
pmurias moritz_: .push shouldn't propably return anything
pmichaud so, what isa relationship (if any) should there be between List and Seq ?
13:19 iblechbot joined
moritz_ I think Seq isa List 13:19
Seq Completely evaluated (hence immutable) sequence
which looks like List + extra stuff 13:20
pmichaud I might do them as unrelated to begin with
well, no. 13:21
pmichaud thinks. 13:23
pmichaud decides he will think better with a Dr. Pepper.
er, "Dr Pepper" 13:24
13:28 TJCRI joined 13:29 cmarcelo joined 13:32 poletti left 13:33 Juerd_ joined, pmichaud_ joined, wolv joined 13:34 pmichaud left, wolverian left, eternaleye_ left, wolv is now known as wolverian, Juerd left, alanhaggai_ joined, dalek left 13:35 PerlJam left 13:44 wknight8111 left 13:49 alanhaggai left 13:54 renormalist joined 14:00 yves joined 14:01 yves left 14:04 rindolf joined, wknight8111 joined 14:05 yves joined
moritz_ I'm off, have a nice weekend ;) 14:05
rindolf moritz_: bye
14:10 jhorwitz joined 14:11 alanhaggai_ left 14:23 IllvilJa joined, alanhaggai joined 14:25 justatheory joined 14:29 justatheory left 14:30 FurnaceBoy joined 15:06 elmex joined
pmichaud_ pugs: my @a = <a b c>; say @a.kv; 15:07
exp_evalbot OUTPUT[0a1b2c␤]
pmichaud_ pugs: say <a b c>.kv;
exp_evalbot OUTPUT[*** Not a keyed value: VList [VStr "a",VStr "b",VStr "c"]␤ at /tmp/iJ80EcnbOA line 1, column 5-15␤] 15:08
pmichaud_ pugs: say kv(<a b c>);
exp_evalbot OUTPUT[*** Not a keyed value: VList [VStr "a",VStr "b",VStr "c"]␤ at /tmp/IM1Xs1DelI line 1, column 5-16␤]
pmichaud_ pugs: say <a b c>.elems; 15:12
exp_evalbot OUTPUT[3␤]
15:13 kolibrie left 15:17 jjore is now known as zz_jjore 15:18 zz_jjore is now known as jjore 15:20 AndyAway is now known as Andy, ispy_ left 15:21 rindolf left 15:35 qu1j0t3 joined 15:37 alanhaggai_ joined 15:39 alanhaggai left 15:49 meppl left 15:50 FurnaceBoy left 15:53 meppl joined 15:55 vixey left
rakudo_svn r27921 | particle++ | [rakudo] allow leading 't/spec/' path in filenames specified in test list data files 15:58
pmurias @tell mncharity why is elf_f the recommended version instead of elf_f_faster? 15:59
lambdabot Consider it noted.
pmichaud_ pugs: say :a(1,2,3).perl; 16:04
exp_evalbot OUTPUT[*** Named argument found where no matched parameter expected: ("a",Ann (Pos (MkPos "/tmp/f7i6oYlq28" 1 8 1 13)) (Syn "," [Val (VInt 1),Val (VInt 2),Val (VInt 3)]))␤ at /tmp/f7i6oYlq28 line 1, column 1-19␤]
pmichaud_ pugs: say ('a'=>(1,2,3)).perl;
exp_evalbot OUTPUT[("a" => (1, 2, 3))␤]
pmichaud_ pugs: say ('a'=>1).perl 16:05
exp_evalbot OUTPUT[("a" => 1)␤]
pbuetow what's the 'NL' for?
[particle] newline
pbuetow ah ok
pmichaud_ say always adds a newline. 16:06
16:06 pmichaud_ is now known as pmichaud
pbuetow ywah i know 16:06
[particle] pugs: print ('a'=>1).perl
exp_evalbot OUTPUT[("a" => 1)]
pmichaud pugs: say [:a].perl 16:07
exp_evalbot OUTPUT[[("a" => Bool::True),]␤]
pmichaud oops. :-)
16:11 justatheory joined 16:14 justatheory left
pmichaud pugs: say (1,).kv; 16:16
exp_evalbot OUTPUT[*** Not a keyed value: VList [VInt 1]␤ at /tmp/gHPr8S3w1H line 1, column 5-12␤]
pmichaud S29 claims that ".kv" is a method on the Array class/role. 16:17
But t/spec/S29-array/kv.t claims
# (1,).kv works correctly 16:18
16:18 smtms left
pmichaud and (1,) is not an Array. 16:18
pmurias pmichaud: would it make sense for elf to have a parrot backend? 16:23
pmichaud pmurias: I don't know -- don't know enough about elf to be sure. 16:24
rakudo_svn r27922 | pmichaud++ | [rakudo]:
r27922 | pmichaud++ | More major refactorings to Array and List. This moves many of the
r27922 | pmichaud++ | array methods out of List and into Array (per S29). It also
r27922 | pmichaud++ | causes a couple of spectest_regression tests to fail; I think
r27922 | pmichaud++ | it's due to errors in the tests and I'm seeking clarification.
r27922 | pmichaud++ | But I didn't want to hold off on the commit, so that others can
r27922 | pmichaud++ | be testing also.
16:24 yoelfe joined
pmichaud and I need lunch, so bbiah 16:25
Juerd_ Bon apetit 16:28
16:33 alanhaggai joined 16:37 nipotaway is now known as nipotan 16:41 alanhaggai_ left 16:50 Psyche^ joined 16:54 jjore left, jjore joined 16:55 jjore is now known as zz_jjore, zz_jjore is now known as jjore 17:02 Patterner left, Psyche^ is now known as Patterner 17:04 vixey joined 17:29 ludan joined 17:33 tobeya joined 17:34 eternaleye_ joined 17:37 smtms joined, Sartak left
pmichaud From S29: 17:38
our List multi sort( Ordering $by = &infix:<cmp>, *@values )
17:39 PerlJam joined
pmichaud if I do @array = sort(5,4,7,3,2); 17:39
does the $by not bind to the 5 simply because it's not of type Ordering ?
wolverian there should be another sort that doesn't take a comparator 17:40
17:40 ispy_ joined
wolverian oh, wait. 17:40
ignore me. :)
PerlJam pmichaud: isn't it that those things must come at the end? 17:41
pmichaud pj: you mean after a slurpy? no
I think what is meant is
our List multi sort( Ordering *&by = &infix:<cmp>, *@values )
or something like that
where &by is a slurpy block 17:42
17:45 alanhaggai_ joined, yoelfe left 17:47 rindolf joined, Psyche^ joined 17:51 melgx joined, qu1j0t3 left
rakudo_svn r27923 | particle++ | [rakudo] tell update_passing_test_data utility to ignore end-of-line comments in test data files 17:52
r27924 | pmichaud++ | [rakudo]: 17:55
r27924 | pmichaud++ | * Fix sort() to look for a block argument (moritz++)
r27924 | pmichaud++ | * Resolves one more spectest_regression item.
17:59 alanhaggai left
TimToady pmichaud: Ordering isn't necessarily Code 17:59
pmichaud TimToady: true.
TimToady and & will prevent binding to anything that is not Code 18:00
pmichaud okay, that's back to my original question then.
18:00 Patterner left, Psyche^ is now known as Patterner 18:02 ispy_ left
TimToady yes, the type Ordering prevents binding the optional positional, so it takes its default instead 18:02
pmichaud ouch.
that's going to make parameter binding even more tricky in Parrot. :-|
but we'll make it work somehow. 18:03
probably some sort of multi trickery. 18:04
or some wrapping.
18:11 braceta joined
TimToady sounds like the same problem of binding being driven by the arguments rather than the signature... 18:15
pmichaud yes. Unfortunately Parrot doesn't really have a notion of "signature", except for MMD to a small extent. 18:17
18:20 ludan left
rindolf Hi all. 18:26
Hi TimToady , pmichaud
pmichaud hello, rindolf
rindolf pmichaud: what's up? 18:27
pmichaud just working on lists, arrays, pairs, and hashes in rakudo
and waiting for spectest answers :-)
rindolf pmichaud: ah, Rakudo seems promising. 18:28
pmichaud: I got banned from @perl.org and @pm.org
So now I'm doing cognitive exercises about it.
pmichaud how exactly does one get banned fr.... never mind, I don't think I want to know. 18:29
18:34 araujo left 18:36 araujo joined, braceta left
rakudo_svn r27925 | pmichaud++ | [rakudo]: 18:39
r27925 | pmichaud++ | * Clean up .perl for Pair objects, pair composer.
18:41 Andy left, alester joined
pmurias rindolf: what did you get banned for? ;) 18:50
18:50 FurnaceBoy joined
rindolf pmurias: some people complained to the mail admins about posts I made, and they banned me. 18:51
pmurias: without a warning.
pmurias: and without consulting people about it.
pmurias: and for both @perl.org and @pm.org
pmurias: and the bounce message was uninformative.
pmurias: and I got banned instead of just unsubscribed. 18:52
pmurias: and these people appealed to Authority instead of telling me how they feel.
pmurias: and they ignored all my past and present contributions to Perl and FOSS in general.
18:55 poletti joined 18:58 poletti left 18:59 justatheory joined 19:01 melgx left
rakudo_svn r27926 | pmichaud++ | [rakudo]: 19:02
r27926 | pmichaud++ | * Move .keys, .kv, .pairs, .values back into List class (TimToady++).
r27926 | pmichaud++ | * All spectest_regression tests pass again.
rindolf pmichaud++ 19:04
pmichaud pugs: my %hash = 1; say %hash.perl; 19:08
exp_evalbot OUTPUT[*** Odd number of elements found where hash expected: VInt 1␤ at /tmp/eNvhibzZxk line 1, column 1-13␤]
19:13 aindilis left, Alias__ left 19:18 schmalbe joined
pmichaud pugs: my %hash = (a=>1, b=>2, c=>3); say %hash.perl; 19:25
exp_evalbot OUTPUT[{("a" => 1), ("b" => 2), ("c" => 3)}␤]
[particle] really need parens there?
pmichaud in the output? I dunno.
19:40 REPLeffect_ is now known as REPLeffect, schmalbe left 19:41 ispy_ joined 19:43 tobeya left 20:02 _nike_ joined, _nike_ left 20:11 chris2 joined 20:15 braceta joined
rakudo_svn r27928 | pmichaud++ | [rakudo]: 20:24
r27928 | pmichaud++ | * Add first version of Hash, hashes, and the hash() composer.
r27928 | pmichaud++ | * my %a = (a=>1, b=>2); now works.
r27928 | pmichaud++ | * Still need to create {...} hash composer (but use parens in the
r27928 | pmichaud++ | meantime).
20:28 xdg_ left 20:29 xdg joined
rakudo_svn r27929 | pmichaud++ | [rakudo]: 20:34
r27929 | pmichaud++ | * Change increment and decrement methods to be named 'succ' and 'pred'.
r27929 | pmichaud++ | * Resolves RT#54654.
20:34 armagad_ joined 20:41 rdice left 20:49 meppl left 20:55 mj41_ joined
pmurias @tell mncharity re no-one notice, I mentioned that ^ is the placeholder sigil in the TODO section of README 20:56
lambdabot Consider it noted.
TimToady pmichaud: no, it shouldn't need parens there, since => is supposed to parse like item assignment 20:59
@tell mncharity "my $+foo" makes no sense, because $+foo is short for $CONTEXT::foo, and because "my" introduces a new name, and if my introduces $+foo then you can't say "my $foo is context = $+foo" 21:01
lambdabot Consider it noted.
pmichaud rakudo: my %hash = 1..6; say %hash.perl;
exp_evalbot rakudo r27929 OUTPUT[Class 'Perl6Array' already registered!␤current instr.: 'parrot;P6metaclass;new_class' pc 606 (runtime/parrot/library/P6object.pir:378)␤
pmichaud ick.
looks like evalbot needs a 'make clean' or to regenerate the makefile. 21:02
> my %hash = 1..6; say %hash.perl;
{"1" => 2, "3" => 4, "5" => 6}
lambdabot Parse error at "=" (column 10)
Auzon evalbot should regenerate everything real soon now 21:03
but I'll fire it off manually
pmurias TimToady: the short name of Foo::Bar is Bar?
pmichaud the class 'Perl6Array' error is fairly old -- from last night?
21:03 mncharity joined
Auzon checks the build logs 21:03
pmurias mncharity: hi :)
TimToady well, depends on what you mean by "short name" 21:04
21:04 [particle1 joined
pmurias the thing WHAT stringifies to 21:04
TimToady Foo::Bar is already the "short name" of the package/module, which also includes ver and auth
21:04 [particle1 left
TimToady it always stringifies to Foo::Bar 21:04
pmurias thanks 21:05
TimToady there are places you can just say "Bar" to mean "Foo::Bar", if Bar is in Foo
21:05 [particle]1 joined
TimToady when you declare an inner class Bar, it'd by default "our" within the Foo package 21:06
*it's
pmurias mncharity: why is elf_f the recommended version?
TimToady so you can refer to Bar after that, but as a predeclared name the compiler knows it really means Foo::Bar
Auzon Looks like parrot was just built for evalbot ~2m ago
rakudo: my %hash = 1..6; say %hash.perl;
exp_evalbot rakudo r27929 OUTPUT[Class 'Perl6Array' already registered!␤current instr.: 'parrot;P6metaclass;new_class' pc 606 (runtime/parrot/library/P6object.pir:378)␤
Auzon rakudo: my %hash = 1..6; say %hash.perl; 21:07
exp_evalbot rakudo r27929 OUTPUT[Class 'Perl6Array' already registered!␤current instr.: 'parrot;P6metaclass;new_class' pc 606 (runtime/parrot/library/P6object.pir:378)␤
TimToady basically, package name lookup looks first within the current package, and then in the global namespace 21:08
[particle]1 rakudo: my %hash = (1..6); print %hash.perl;
exp_evalbot rakudo r27929 OUTPUT[Class 'Perl6Array' already registered!␤current instr.: 'parrot;P6metaclass;new_class' pc 606 (runtime/parrot/library/P6object.pir:378)␤
[particle]1 hrmm
pmichaud the class Perl6Array error tends to arise because jonathan had perl6array.pmc as part of the build
but I've moved that into src/classes/Array.pir for now, so if perl6array.pmc is still being built or loaded then you get the "already registered" error. 21:09
[particle]1 pmichaud: any new spectests passing due to the hash code?
21:09 rindolf left
pmichaud [particle]: I haven't looked, really. I'm hoping others will do that :-) 21:09
[particle]1 okay
mncharity re "pmichaud: has to be up in 3.5 hours to feed kids and send them to school" ... "okay, sleep. then breakfast. Then Hash and hash composers." , <-- dedication++
lambdabot mncharity: You have 3 new messages. '/msg lambdabot @messages' to read them.
Auzon Looks like evalbot does a make realclean if make returns badly
mncharity hi pmurias 21:10
[particle]1 Auzon: does it realclean parrot or perl6?
Auzon Parrot.
[particle]1 excellent.
pmichaud and 'make' won't return badly for this -- it still makes.
i.e., make still succeeds, it's just that the resulting executable won't.
21:11 [particle] left
Auzon Hm... no real way to have it know when to clean automatically. OK, I'll do it manually 21:11
21:11 [particle]1 is now known as [particle] 21:12 mj41 left
Auzon muses... 21:13
I guess it could always make realclean, but that seems like overkill...
pmichaud it should probably clean whenever config/makefiles/root.in changes.
(or realclean)
21:13 REPLeffect_ joined
mncharity re "why is elf_f the recommended version instead of elf_f_faster?", historical artifact. though the absence of has() defaults was taking the edge off of changing it. 21:13
elf: class A { has @.a; }; say A.new.a.perl 21:14
exp_evalbot OUTPUT[[]␤]
mncharity oh, have defaults now? feel free to change the recomendation. :)
elf: class A { has $.a = 13; }; say A.new.a.perl 21:15
21:15 TJCRI left
mncharity elf: class A { has @.a; }; say A.new.a.perl 21:15
exp_evalbot OUTPUT[[]␤]
mncharity doh
elf: class A { has $.a = 13; }; say A.new.a.perl
exp_evalbot OUTPUT[13␤]
mncharity yay. pmurias++ 21:16
21:16 xdg left
mncharity re 'noticing $^foo', I stand corrected. breaking TODO out into it's own file... 21:17
21:17 sscaffidi joined
mncharity TimToady: re my $+foo" makes no sense, because $+foo is short for $CONTEXT::foo, and because "my" introduces a new name, and if my introduces $+foo then you can't say "my $foo is context = $+foo", 21:18
how does one say local($P::x) = $P::x; in p6?
Auzon rakudo: my %hash = 1..6; say %hash.perl;
exp_evalbot rakudo r27929 OUTPUT[{"1" => 2, "3" => 4, "5" => 6}␤]
pmichaud yay! 21:19
Auzon++
TimToady mncharity: temp($P::x) already has those semantics 21:20
Auzon I guess I should add myself to SLAVES for exp_evalbot, since I can do most maintenance tasks for it...
21:21 REPLeffect left
TimToady well, that's how it's defined, but nobody has actually implemented temp yet, and it's not clear whether that mechanism should be combined with context vars 21:21
context vars are friendlier to threading, I suspect 21:22
21:22 iblechbot left 21:23 xdg joined
pugs_svnbot r20580 | pmurias++ | [elf] changed version recommendation 21:23
pmurias mncharity: i think we should add named params to elf ASAP 21:24
21:24 jiing left
Auzon elf: my $var = 2; say $var ~~ 2; 21:25
exp_evalbot OUTPUT[syntax error at (eval 14) line 4, near "$var ~"␤ at ./elf_f_faster line 4461␤]
21:26 kler joined 21:29 REPLeffect_ left, REPLeffect_ joined
mncharity TimToady: re temp(), ah, ok. then elf is about to switch to temp() internally, and can then become more spec in its contextual vars. 21:29
pmurias: ah, ok. 21:30
pmurias there are lack of them is the most common occuring hack, and it will be more work if it's done later 21:31
should i move $*emitter and $*parser as $*compiler attribiutes? 21:33
mncharity sigh. the gotcha is, how to handle sub calls with multiple argument apis. an out of band scalar ('$X::x=0;f(...)' where 'sub f{if(not($X::x)){}elsif($X::x == 1){...named...}else{...full capture objects...}...}') is the fastest technique I found, but massively uglifies the code. no '$x->foo(...)->bar(...)', have to potentially assign X::x on each call.
pmichaud pugs: my %hash = 1..6; say %hash; 21:34
exp_evalbot OUTPUT[1 23 45 6␤]
pmurias we can use $foo->foo_named and $foo->full_capture_object and $foo->positional 21:35
mncharity next up is adding an argument to @_. putting at the beginning is slightly faster than at end, but breaks "sub and method call @_ look the same". so... ah well. f(args ,0) for now, with f(args, {named hash},1) for named.
pmurias $foo->foo_NAMED, $foo->foo_CAPTURE, $foo->foo_POSITIONAL is what i meant
mncharity hmm... 21:36
pmurias any issues? 21:38
mncharity so f(x) stays f(x) for positionals, but becomes &f->foo_blah() for blah. hmm.
&f->blah performance will be poor, but with named args, it already is. 21:39
you realize elf itself won't be able to use "we didn
21:39 justatheory left
mncharity 't manage to compile them away" named args very much, or performance will collapse... 21:39
pmurias mncharity: f(x=>1) will be f_NAMED(...) 21:40
mncharity that would require having multiple copies of functions attached to different names... I was hoping to avoid that. 21:41
21:42 jferrero joined
pmurias not a big problem, namespace items are cheap 21:42
f_NAMED will call to f with the right arguments to prevent code duplication if that is what worries you 21:43
mncharity I am still unclear on the consequences of the choice, and since it's not KISS, I fear it.
TimToady what does a referece to a function look like then?
pmurias \&foo_CAPTURE would be the most generic one 21:44
mncharity re 'call to f', yeah. autobox can define {package CODE; sub NAMED { $X::x=1; my $self=shift; goto $self; }} or some such.
pmurias \&foo_NAMED and \&foo_POSITIONAL being the slightly "unboxed" ones
mncharity: don't use $X::x 21:45
mncharity re 'what does a referece to a function look like then?', yeah... multiple functions-- 21:46
pmurias function should be stored in $scalars anyway
mncharity re 'don't use $X::x', then how does f know how it is being invoked? ie, what @_ actually contains?
pmurias f is allways invoked with positionals 21:47
* always
f_NAMED gets named arguments and positionals
f_CAPTURE gets captures
mncharity re 'function should be stored in $scalars anyway', the design choice of what a function looks like at runtime is independent of of where you put it.
pmurias yes
true 21:48
mncharity re separate f, f_N, f_C, see ^^^ 'what does a referece to a function look like then?'
pmurias probably f_C
as it's the most generic one
mncharity and 10+x slower. 21:49
pmurias you can always unbox it
$foo->i_want_the_positional_variant
21:49 braceta left
mncharity that brings us back to sub CODE::i_want_the_positional_variant. 21:50
pmurias using f and ->i_want_the_capture_variant is also an option
mncharity that's the {package CODE; sub NAMED { $X::x=1; my $self=shift; goto $self; }} 21:51
pmurias but you don't pay extra cost on the positional varaint
* variant
mncharity right. that's definitely a design objective.
the if(not($X::x)){} is fairly cheap. 21:52
pmurias but it's ugly
mncharity it's in the emitted code. Ugly is having them in front of every call, making it hard to read. It adds nothing to the 'unpack named args' ugliness it will preceed at the top of sub defs. 21:53
I definitely prefer your f->NAMED(...) to both f->(...,0) and $X::x-0;f->(...) . 21:55
*$X::x=0;f->(...)
pmurias i'll be away for the weekend at a lake with my classmates, but i can implement it afterwards (j2me can wait)
mncharity ok, or i. I actually sketched and was debugging the (...,0) variant, but it was just so "didn't feel like the Right Thing". this is much better. 21:56
sub's stay fast, and even simple in line named hash handling takes more time than the extra subcall. 21:57
pmurias can you wait a few days, or do you need it badly?
mncharity can wait. not like there isn't a lot else to do. :) 21:58
pmurias fine then
mncharity summer lakes++ 21:59
pmurias i got to go to sleep now, as i'm cycling to the lake in the morning
good night
22:00 pmurias left 22:01 alanhaggai_ left
mncharity good night 22:02
22:02 REPLeffect_ left 22:05 justatheory joined, Limbic_Region joined
mncharity pmurias: re 'should i move $*emitter and $*parser as $*compiler attribiutes?', I started to say 'sure, that makes sense', but one also wants to be able to do ../elf_f_faster Compiler.pm -v ... , which the change would break. So no, eventually, but not yet. 22:08
good idea though
Looks like svnbot is absent. :/ 22:10
or no, just slow I guess.
22:10 alester is now known as AndyAwy
pugs_svnbot r20581 | putter++ | [elf] Array.isa(List). pmichaud++ Broke TODO out of README, and expanded. 22:11
r20581 | putter++ | [STD_red] PROBLEMS: Noted :todo (unrelated) is intentionally ignored, and the file may be out of date.
mncharity @tell ruoso Could we have a conversation about p6 oo? I'd like to understand it well enough to sketch core oo runtime architectures for p5, javascript, ruby, and Common Lisp or a scheme. 22:14
lambdabot Consider it noted.
mncharity once the elf frontend is off STD_red on to p6, and perhaps the emitter onto multis, doing a broad multi-backend push will help keep the next refactoring steps sane. 22:16
22:16 cognominal_ joined 22:17 sscaffidi left
mncharity python probably involves generating bytecodes, and so waits, despite being needed for things like Google Apps. 22:17
22:18 araujo left, justatheory_ joined
rakudo_svn r27931 | pmichaud++ | [rakudo]: 22:19
r27931 | pmichaud++ | * Cleaned up Mapping and Hash code a bit more.
22:20 dduncan joined 22:32 cmarcelo left 22:34 justatheory left
mncharity anyone know if {no warnings 'void';$x} has any runtime cost? /me forgets how to get the p5 bytecodes for an expression... . repairing a regex engine core, so speed is critical, but need to say 'please don't "optimize" my closure by breaking it'. 'mention the variable' seems the recommended way to do that. 22:38
22:40 eternaleye_ left 22:49 dduncan left 22:50 shachaf left, jferrero left
mncharity perl -MO=Terse -e '...' shows {no warnings 'void';$x} does indeed have runtime cost. :/ $x if 0; is notably better, but still non-zero. ah well. 22:51
22:58 justatheory_ left 23:04 slavik joined
slavik I have not read all of the apocalypses, but could anyone tell me if Perl will allow partially evaluated functions to be passed around? 23:05
TimToady do you mean curried funcitons? 23:06
*functions
or are you thinking of something more like a coroutine?
slavik don't know, I just know that haskel allows partially evaluated functions to be moved around, they are called 'thunks' or something
ie: return sub { x+x; } (without having x+x actually get evaluated) 23:07
lazy evaluation but not only for lists 23:08
TimToady we have "lazy { $x+$x }" 23:09
slavik so "lazy" instead of "sub"? 23:10
TimToady we have sub too, but you have to call a sub explicitly
slavik you can't return anon subs like in perl5?
TimToady sure, but you have to invoke those explicitly too
just as in p5 23:11
slavik right
23:11 ispy_ left
slavik I was looking at the stuff that Larry has written about perl6, is that going to be up for discussion by the community or is it something that is very firmly set? 23:12
ghc 6.8.2, svn-rev 14546: Invalid grammatical category: "Bool"
TimToady considering it's been up for discussion for eight years already, there are lots of things that are fairly firmly set already :)
slavik kewl 23:13
it also seems like most of the important stuff is covered
TimToady most of the tweaks these days are based on feedback from the folx trying to implement it
slavik right
the direction is there, that's the important part :)
23:25 slavik left, chris2 left, slavik joined
slavik ooh, will pugs allow perl6 to have embedded haskel code? (that would be freaking awesome) :> 23:33
mncharity slavik: pugs is somewhat inactive at the moment, do to lack of active people with a haskell background. ...{use OtherLanguage; ... } ... is intended to work, but for use Haskell... may only work on a haskell backend. As doing a p6 implementation of haskell isn't going to happen rsn. Though, famous last words. 23:37
s/on a haskell backend/with a true haskell core linked/
slavik right 23:38
I am just asking :P
mncharity hmm, though may be able to do something with hs->C->(link with p6 backend as C, or run in a p6 C interpreter) 23:40
slavik I don't know, but if the haskel interpreter can be embedded, then there could be a C program that would have embedded haskel and perl modules 23:42
but then this would be parrot, no?
mncharity there's search.cpan.org/~autrijus/Language-...Haskell.pm which could be worked on 23:44
lambdabot Title: Language::Haskell - Perl bindings to Haskell - search.cpan.org, tinyurl.com/5gzn8u
23:44 cognominal_ left
mncharity re parrot, no, parrot is a vm, runtime objects, assorted other things too. 23:45
slavik ahh, fair enough 23:48
mncharity: right, sorry ...
23:49 pmichaud_ joined, Juerd joined
mncharity re Langauge::Haskell, real p6 implemenations are said to be likely to permit linking a p5 core so p5 CPAN modules can be used. if so, then a fleshed out Language::Haskell could permit embedded haskel code. 23:50
slavik nice 23:51
23:51 bacek joined
mncharity something like search.cpan.org/~ingy/Inline-0.44/C/C.pod or search.cpan.org/~patl/Inline-Java-0.52/Java.pod though not necessarily using the Inline interface. 23:51
lambdabot Title: Inline::C - Write Perl Subroutines in C - search.cpan.org
mncharity Inline isn't my favorite interface, and I would even suggest building an Inline::Haskell on top of a separate Language::Haskell-like module, but it would indeed be pretty to have an Inline::Haskell for existing perl. 23:55
So we could have embedded haskell in perl now... it's just a matter of tuits. 23:56
23:57 kler left, Juerd_ left
mncharity (plus, of course, the "would anyone actually use it, and if not, are there better places to trade life for code") 23:57