Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-05-29

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 cognominal_ joined #perl6
00:15 rakudo_svn r27897 | particle++ | [rakudo] [perl #54988] [PATCH] enhance t/harness (again)
00:15 rakudo_svn r27897 | particle++ | ~ adds ability call fudge on a per-file basis via --configfudge option
00:15 rakudo_svn r27897 | particle++ | ~ fudging (the default) can be disabled with an eol comment matching /\s+#\s*pure$/ in t/*.data files
00:15 rakudo_svn r27897 | particle++ | ~ enables this behavior for the 'localtest' make target
00:16 rakudo_svn r27897 | particle++ |
00:16 rakudo_svn r27897 | particle++ | Courtesy Moritz Lenz (moritz++) with minor modifications
00:27 mncharity joined #perl6
00:31 Eevee joined #perl6
00:31 pmichaud pugs:  my @b;  say @b.isa(List);
00:31 exp_evalbot OUTPUT[1␤]
00:31 pmichaud pugs: my @b = 1..3;   say @b.isa(List);
00:31 exp_evalbot OUTPUT[1␤]
00:31 pmichaud pugs: say Array.isa(List);
00:31 exp_evalbot OUTPUT[1␤]
00:31 pmichaud pugs:  say List.isa(Array);
00:31 exp_evalbot OUTPUT[␤]
00:32 Eevee hooray
00:32 qu1j0t3 joined #perl6
00:42 rakudo_svn r27898 | particle++ | [rakudo] enable per-file fudging in spectest_regression make target
00:42 rakudo_svn r27898 | particle++ | ~ thanks to moritz++ for the per-file fudging, we can disable fudge for spectests that are passing without it
00:42 rakudo_svn r27898 | particle++ | ~ of 43 passing test files (774 subtests) in spectest_regression, 23 files (225 subtests) pass without fudging!
00:51 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.
01:05 lisppaste3 joined #perl6
01:05 Auzon mncharity: What do you mean?
01:06 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 mncharity no biggie, just a startling thing to have wrong.
01:07 Auzon oh. I thought you meant compiler vars ($?WHATEVER)
01:08 mncharity ah, no
01:12 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:24 mncharity Really bad.  Not even "isn't best practices" bad.  Shudder.
01:36 penk joined #perl6
01:43 pmichaud originally they were called "environmental variables", but that was "Really Bad" also.  :-)
01:45 rakudo_svn r27902 | jkeenan++ | Add copyright, svn ID tag and coda.
01:48 mncharity lol
01:49 rakudo_svn r27903 | jkeenan++ | Set svn keywords and eol-style attributes.
01:50 alanhaggai__ joined #perl6
01:50 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:54 mncharity or am I completely confused about what $+ means...
01:54 mncharity :/
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.
01:55 pmichaud thus list context, item context, etc.  are just examples of possible contexts
02:00 mncharity eep.  so "context" from 'calling context'... interesting...
02:00 pmichaud it took me a while to understand that also.
02:00 pmichaud and I'm not sure my interpretation is the same as TimToady's -- that's just what made sense to me.
02:03 mncharity neat.  that does make sense.  my thanks.
02:03 mncharity TimToady: nm ;)
02:06 japhb joined #perl6
02:14 pugs_svnbot r20575 | putter++ | [elf] Switch all $^foo to $+foo, the correct twigil for contextual variables.
02:38 Alias__ joined #perl6
02:48 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
02:48 exp_evalbot ..errors.␤]
02:48 exp_evalbot ..pugs: OUTPUT[*** ␤    Unexpected "::v"␤    expecting word character, "?", "!", trait, "=", infix assignment, term postfix or operator␤    at /tmp/ZGmbyz49dk line 1, column 8␤]
02:48 exp_evalbot ..rakudo r27908: RESULT[Method 'perl' not found for invocant of class 'Undef'␤current instr.: '_block11' pc 38 (EVAL_11:18)␤
02:48 exp_evalbot ..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:50 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.␤]
02:50 exp_evalbot ..pugs: OUTPUT[*** ␤    Unexpected "::x"␤    expecting word character, "?", "!", trait, "=", infix assignment, term postfix or operator␤    at /tmp/pL7aKsNIz6 line 1, column 9␤]
02:50 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)␤
02:50 exp_evalbot ..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␤]
02:50 mncharity perl6: our $x is context;
02:51 mncharity perl6: our $x is context;
02:51 exp_evalbot kp6 r20575: OUTPUT[<is> not implemented at compiled/perl5-kp6-mp6/lib/KindaPerl6/Grammar/Term.pm line 1818, <> line 1.␤]
02:51 exp_evalbot ..pugs: RESULT[\undef]
02:51 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)␤
02:51 exp_evalbot ..elf r20575: RESULT[undef␤]
02:52 mncharity so the p5  local($pkg::x) = $pkg::x;   becomes   package pkg { our $x is context = $+OUTER::x; }  ??
02:54 alanhaggai_ joined #perl6
02:57 stevan_ joined #perl6
02:57 Grrrr joined #perl6
02:57 Gothmog_ joined #perl6
02:57 yath joined #perl6
03:15 pmichaud pugs:  sub foo(@a, @b) { say @a.perl; };  foo(1, (2,3,4));
03:15 exp_evalbot OUTPUT[[1,]␤]
03:15 pmichaud pugs: sub foo(@a, @b) { say @a.perl; };  foo((2,3,4), 1);
03:16 exp_evalbot OUTPUT[[2, 3, 4]␤]
03:16 pmichaud yay.
03:17 felipe joined #perl6
03:20 mncharity :)
03:23 eternaleye_ joined #perl6
03:24 mncharity rakudo: my $x is context = 3; { my $x is context = $x; say $x }
03:24 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)␤
03:24 mncharity pugs: my $x is context = 3; { my $x is context = $+x; say $x }
03:24 exp_evalbot OUTPUT[*** Can't modify constant item: VUndef␤    at /tmp/HS1NNShprr line 1, column 39-47␤       /tmp/HS1NNShprr line 1, column 39-47␤]
03:25 pmichaud (rakudo doesn't do contextual vars yet)
03:27 mncharity thanks.  puzzling over scoping.
03:27 mncharity OUTER::CONTEXT::x, oh my
03:32 mncharity rouso: re talk, nifty.  how long does it currently take, vs what you have available?
03:33 alc joined #perl6
03:36 pugs_svnbot r20576 | putter++ | [elf] Support 'my $x is context'.  But elf's own code stayed with 'my $+x' for brevity.
03:36 rindolf joined #perl6
03:37 mncharity g'night all &
03:38 pugs_svnbot r20577 | Auzon++ | [gsoc_spectest] more mindless typecasting tests.
03:49 alanhaggai__ joined #perl6
03:50 Auzon perl6: class Test {has $.var;};
03:50 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␤
03:50 exp_evalbot ..main::DISPATCH('HASH(0x824be04)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
03:50 exp_evalbot ..pugs: RESULT[undef]
03:50 exp_evalbot ..rakudo r27909: RESULT[Method 'perl' not found for invocant of class 'Sub'␤current instr.: '_block11' pc 38 (EVAL_11:18)␤
03:50 exp_evalbot ..elf r20577: RESULT[undef␤]
03:51 Auzon perl6: class Test {has $.var;}; my $thing = Test.new(var => 'test'); $thing;
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(0x824bfac)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/KindaPerl6/Runtime/Perl5/MOP.pm line 169␤
03:51 exp_evalbot ..main::DISPATCH('HASH(0x824bfac)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
03:51 exp_evalbot ..pugs: RESULT[\Test.new(("var" => "test"),)]
03:51 exp_evalbot ..rakudo r27909: OUTPUT[get_bool() not implemented in class 'Test'␤current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1288 (src/PCT/HLLCompiler.pir:688)␤
03:51 rindolf WTF?
03:51 exp_evalbot ..elf r20577: OUTPUT[Odd number of elements in anonymous hash at ./elf_f_faster line 19.␤]
03:51 rindolf left #perl6
03:52 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␤
03:52 exp_evalbot ..main::DISPATCH('HASH(0x824bf2c)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
03:52 exp_evalbot ..pugs: RESULT[\Test.new(("var" => 3),)]
03:52 exp_evalbot ..rakudo r27909: OUTPUT[get_bool() not implemented in class 'Test'␤current instr.: 'parrot;PCT::HLLCompiler;command_line' pc 1288 (src/PCT/HLLCompiler.pir:688)␤
03:52 exp_evalbot ..elf r20577: RESULT[Test.new(!!!)␤]
03:52 Auzon pugs works. elf is just weird there ;)
03:53 Auzon Hm. Elf works, just doesn't have .perl on objects very well.
03:56 pen1 joined #perl6
04:03 Auzon pugs: class Begin {has .value is rw;};
04:03 exp_evalbot OUTPUT[*** ␤    Unexpected "."␤    expecting "=", "::", qualified identifier, "?" or variable name␤    at /tmp/wnlnFsYEgw line 1, column 18␤]
04:04 Auzon pugs: class Begin {has $.value is rw;};
04:04 exp_evalbot RESULT[undef]
04:04 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:04 exp_evalbot OUTPUT[*** ␤    Unexpected "."␤    expecting "=", "::", qualified identifier, "?" or variable name␤    at /tmp/ifIW84pNe8 line 1, column 50␤]
04:04 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:04 exp_evalbot RESULT[\End.new(("value" => undef),)]
04:05 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;
04:05 exp_evalbot OUTPUT[32␤]
04:07 * Auzon shrugs
04:07 Auzon Oh. I think I get it
04:10 Auzon Silly pugs, loading Perl 5's Test.pm instead of Pugs's Test.pm.
04:14 Auzon perl6: sub inc {state $inc = 0; $inc++;} say inc() for 1 .. 4;
04:14 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 ␤]
04:14 exp_evalbot ..pugs: OUTPUT[0␤0␤0␤0␤]
04:14 exp_evalbot ..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)␤
04:14 exp_evalbot ..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'␤
04:14 exp_evalbot ..STD_red/std.rb:210:in `_UNIT'␤  ./../STD_red/STD_red_run:108:in `...
04:15 Auzon perl6: sub inc {state $inc = 0; $inc++;}; say inc(); say inc();
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 ␤]
04:15 exp_evalbot ..pugs: OUTPUT[0␤0␤]
04:15 exp_evalbot ..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)␤
04:15 exp_evalbot ..elf r20577: OUTPUT[Unknown rule: scope_declarator:state␤It needs to be added to ast_handlers.␤ at ./elf_f_faster line 2669␤]
04:15 Auzon No one likes state variables, huh? :-/
04:41 pugs_svnbot r20578 | Auzon++ | [gsoc_spectest] multiple signatures testing. See http://perlcabal.org/syn/S13.html#Syntax
04:41 lambdabot Title: S13
04:42 rakudo_svn r27910 | pmichaud++ | [rakudo]:
04:42 rakudo_svn r27910 | pmichaud++ | * Refactor the !keyword_* methods out of Object.pir and into
04:42 rakudo_svn r27910 | pmichaud++ |   src/builtins/guts.pir (as subs).  If these really need to
04:42 rakudo_svn r27910 | pmichaud++ |   be methods, we should probably make them methods of a
04:42 rakudo_svn r27910 | pmichaud++ |   separate metaclass or of Class or something like that.
04:42 rakudo_svn r27910 | pmichaud++ | * All tests and spectest_regression pass, so hopefully I didn't
04:42 rakudo_svn r27910 | pmichaud++ |   break anything.
04:51 alc joined #perl6
04:52 Auzon good night all.
04:57 pmichaud good night!
05:21 alanhaggai joined #perl6
05:30 pmichaud pugs:  my $a = (1, 2, 3);   say $a.WHAT;
05:30 exp_evalbot OUTPUT[Array␤]
06:04 rakudo_svn r27912 | pmichaud++ | [rakudo]:
06:04 rakudo_svn r27912 | pmichaud++ | * "make localtest" needs 'all' and 't/spec' as dependencies.
06:07 rakudo_svn r27913 | pmichaud++ | [rakudo]:
06:07 rakudo_svn r27913 | pmichaud++ | * Clean up List '.pairs' method to return Perl6Pairs instead of the
06:07 rakudo_svn r27913 | pmichaud++ |   outdated Pair PMC.
06:12 spinclad pugs:  my $a = (1, 2, 3);   say VAR($a).WHAT;
06:12 exp_evalbot OUTPUT[Array␤]
06:14 spinclad pugs:  my $a = 1;   say $a.WHAT;
06:14 exp_evalbot OUTPUT[Int␤]
06:14 spinclad pugs:  my $a = 1;   say VAR($a).WHAT;
06:14 exp_evalbot OUTPUT[Int␤]
06:16 pmichaud pugs:  my @array; @array[8]='eight'; @array.delete(8); say +@array;
06:16 exp_evalbot OUTPUT[8␤]
06:17 * spinclad thinks the last of mine should be the container's type... and likely pugs doesn't do VAR
06:27 rakudo_svn r27915 | pmichaud++ | [rakudo]:
06:27 rakudo_svn r27915 | pmichaud++ | * Remove no-longer-used perl6bool.pmc and perl6undef.pmc .
06:42 alanhaggai_ joined #perl6
06:43 rakudo_svn r27916 | pmichaud++ | [rakudo]:
06:43 rakudo_svn r27916 | pmichaud++ | * Update List .map implementation to respect arity.  (bacek++)
06:43 rakudo_svn r27916 | pmichaud++ | * Patch courtesy Vasily Chekalkin <bacek@bacek.com>
06:45 luqui joined #perl6
06:53 luqui joined #perl6
06:53 alanhaggai__ joined #perl6
07:15 kcwu joined #perl6
07:22 polettix joined #perl6
07:22 moritz_ pugs: my @a = (1); say @a.perl
07:22 exp_evalbot OUTPUT[[1,]␤]
07:26 bacek perl6: say int(-0.5)
07:26 exp_evalbot kp6 r20578: OUTPUT[syntax error at position 7, line 1 column 7:␤say int(-0.5␤       ^ HERE␤]
07:26 exp_evalbot ..pugs: OUTPUT[0␤]
07:26 exp_evalbot ..rakudo r27916: OUTPUT[-0␤]
07:26 exp_evalbot ..elf r20578: OUTPUT[syntax error at (eval 14) line 3, near "))"␤ at ./elf_f_faster line 4461␤]
07:27 bacek great.
07:28 bacek who is wrong: pugs or spec/S29-num/int.t?
07:29 moritz_ there is no -0
07:30 moritz_ actually -0 should be the same as 0
07:30 moritz_ 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:31 moritz_ 1) fix it 2) add a test that -0 == 0
07:32 moritz_ pugs: say -0 == 0 ?? "yes" !! "you lost"
07:32 exp_evalbot OUTPUT[yes␤]
07:32 moritz_ rakudo: say -0 == 0 ?? "yes" !! "you lost"
07:32 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)␤
07:33 moritz_ rakudo: if -0 == 0 { say "yes" } else { say "you lost" }
07:33 exp_evalbot rakudo r27916 OUTPUT[yes␤]
07:33 moritz_ so what's the problem?
07:34 moritz_ is there a string based comparison anywhere?
07:35 bacek rakudo: say int(-0.5) == 0
07:35 exp_evalbot rakudo r27916 OUTPUT[1␤]
07:35 bacek rakudo: say int(-0.5) == -0
07:35 exp_evalbot rakudo r27916 OUTPUT[1␤]
07:35 bacek multi sub is($got, $expected, $desc) {
07:35 bacek my $test = $got eq $expected;
07:36 bacek bug in Test.pm
07:36 bacek rakudo: say (-0.5) cmp -0;
07:36 exp_evalbot rakudo r27916 OUTPUT[-1␤]
07:37 bacek rakudo: say int(-0.5) cmp -0;
07:37 exp_evalbot rakudo r27916 OUTPUT[0␤]
07:37 poletti joined #perl6
07:37 moritz_ bacek: the rakudo Test.pm?
07:40 bacek moritz_: yes
07:40 bacek rakudo: say (int-0.5) == -0
07:41 exp_evalbot rakudo r27916 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: 'int' pc 7881 (src/gen_builtins.pir:5533)␤
07:41 bacek rakudo: say int(-0.5) == -0
07:41 exp_evalbot rakudo r27916 OUTPUT[1␤]
07:41 pmurias joined #perl6
07:43 moritz_ rakudo: say -0 === 0
07:43 exp_evalbot rakudo r27916 OUTPUT[Could not invoke non-existent sub infix:===␤current instr.: '_block11' pc 46 (EVAL_11:20)␤
07:48 bacek workaround is replace '$got eq $expected' with ($got cmp $expected) == 0 in rakudo's Test.pm
07:49 moritz_ does rakudo do type-based mmd?
07:49 pmichaud some.
07:49 moritz_ rakudo: multi sub f(Str $x) { say "Str"; }; multi sub f(Num $x) { say "Num"; }; f("abc")
07:49 exp_evalbot rakudo r27916 OUTPUT[No applicable methods.␤current instr.: '_block11' pc 34 (EVAL_12:17)␤
07:50 moritz_ rakudo: multi sub f(Str $x) { say "Str"; }; multi sub f(Num $x) { say "Num"; }; f(1)
07:50 exp_evalbot rakudo r27916 RESULT[No applicable methods.␤current instr.: '_block16' pc 88 (EVAL_12:39)␤
07:51 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␤]
07:52 pmichaud (Parrot "kindly" converts integer values from Num to Int for us. :-)
07:52 pmichaud (which is a real pain, yes.)
07:55 moritz_ so type based MMD works, but not for subtypes?
07:56 pmichaud Parrot treats Num and Int as separate types, yes.
07:57 pmichaud we'll undoubtedly fix that particular issue when we get to it
07:59 pmichaud omg... it's 3am
08:00 * pmichaud has to be up in 3.5 hours to feed kids and send them to school
08:02 pmichaud pugs:  say (1.2.3).kv;
08:02 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␤]
08:02 pmichaud oops.
08:02 pmichaud pugs:  say (1,2,3).kv;
08:02 exp_evalbot OUTPUT[*** Not a keyed value: VList [VInt 1,VInt 2,VInt 3]␤    at /tmp/GZRrdgamD2 line 1, column 5-15␤]
08:03 pmichaud pugs;  my @a = 1..3;   say @a.kv;
08:03 pmichaud pugs:  my @a = 1..3;   say @a.kv;
08:03 exp_evalbot OUTPUT[011223␤]
08:06 meppl joined #perl6
08:07 rakudo_svn r27917 | pmichaud++ | [rakudo]:
08:07 rakudo_svn r27917 | pmichaud++ | * First pass at implementing Array types.
08:07 rakudo_svn r27917 | pmichaud++ | * my @a = 1;  now works properly.
08:07 rakudo_svn r27917 | pmichaud++ | * Also understands [] versus (), mostly.
08:07 rakudo_svn r27917 | pmichaud++ | * Still some list context issues to be addressed in parameters.
08:07 rakudo_svn r27917 | pmichaud++ | * Resolves RT#52276.
08:08 pmichaud okay, sleep.  then breakfast.  Then Hash and hash composers.
08:09 moritz_ is ther a svn commit-hook that m/(resolves|closes) (RT)?#\d{5}/ automatically closes a ticket?
08:10 moritz_ (wrong channel)
08:13 luqui Hash composer... like Berlioz?
08:21 moritz_ perlbot: karma moritz
08:21 perlbot Karma for moritz: 452
08:21 moritz_ perlbot: karma moritz_
08:21 perlbot Karma for moritz_: 41
08:25 poletti joined #perl6
09:04 pugs_svnbot r20579 | moritz++ | [spec] fixed S29-array/delete.t as reported by pmichaud++
09:07 bacek moritz_:  you steal my karma! :)
09:07 moritz_ bacek: sorry, didn't know you were working on it ;-)
09:08 moritz_ bacek++ # patches to rakudo and spec tests
09:08 bacek moritz_: :)
09:33 chris2 joined #perl6
10:06 dmq joined #perl6
10:27 ilogger2 joined #perl6
10:27 benjammy joined #perl6
10:27 BinGOs joined #perl6
10:27 Auzon joined #perl6
10:27 exp_evalbot joined #perl6
10:27 baest joined #perl6
10:27 Helios- joined #perl6
10:27 orafu joined #perl6
10:29 Helios- joined #perl6
10:29 bnjmn-- joined #perl6
10:41 pen1 left #perl6
11:11 Jedai joined #perl6
11:30 braceta joined #perl6
11:36 poletti joined #perl6
11:40 pmichaud pugs:   my $b = hash(3, 4);  say $b.perl;
11:40 exp_evalbot OUTPUT[{("3" => 4),}␤]
11:40 pmichaud pugs:  my $b = hash('x', 4);  say $b.WHAT;
11:40 exp_evalbot OUTPUT[Hash␤]
11:41 pmichaud pugs:  say hash('x', 4).WHAT;
11:41 exp_evalbot OUTPUT[Hash␤]
11:41 pmichaud pugs:  say  { x=>4 }.WHAT;
11:41 exp_evalbot OUTPUT[x        4␤␤]
11:42 pmichaud my @b = hash(3,4);  say $b.perl;
11:42 pmichaud pugs:  my @b = hash(3,4);  say $b.perl;
11:42 exp_evalbot OUTPUT[*** ␤    Unexpected "."␤    expecting "::"␤    Variable "$b" requires predeclaration or explicit package name␤    at /tmp/37vfcLqPFn line 1, column 27␤]
11:42 pmichaud pugs:  my @b = hash(3,4);  say @b.perl;
11:42 exp_evalbot OUTPUT[[{("3" => 4),},]␤]
11:45 rakudo_svn r27918 | pmichaud++ | [rakudo]:
11:45 rakudo_svn r27918 | pmichaud++ | * Fix typo in IO.pir (RT#55032, bacek++).
11:45 pbuetow joined #perl6
12:08 alanhaggai joined #perl6
12:16 braceta joined #perl6
12:24 moritz_ pugs: my @a = <a b c>; say @a.push('d')
12:24 exp_evalbot OUTPUT[4␤]
12:33 pmichaud ....which I find kinda odd -- seems to me it should return @a
12:35 wknight8111 joined #perl6
12:37 pmurias pmichaud: it has the same behaviour as perl5 push
12:37 pmichaud pmurias: okay, it makes more sense then.  :-)
12:37 wknight8111 joined #perl6
12:38 pmichaud I had never used the return value of 'push' in p5 :-)
12:38 pmurias neither did i
12:38 pmurias ;)
12:39 moritz_ but in p5 it's nonsense to return an array because you can't access push as a method call
12:39 moritz_ so no chained method calls at all
12:39 pmichaud right.
12:39 moritz_ so returning self might be sensible, so you can do things like @list.push(3, 4).sort()
12:40 bacek__ pmichaud, moritz_ +1
12:43 pmichaud afk for a bit
12:47 pmurias @list.push(3,4).sort() is a bit confusing
12:47 lambdabot Unknown command, try @list
12:48 moritz_ pmurias: depends on your background ;)
12:49 pmurias moritz_: you use a lot of jQuery?
12:49 moritz_ pmurias: no ;)
12:50 moritz_ but I do chain methods with side effects
12:50 pmurias in p5?
12:51 moritz_ yes
12:51 moritz_ (not a lot, but still some)
12:52 moritz_ in TK apps stuff like $window->Entry(...)->pack(...)
12:54 poletti joined #perl6
12:54 pmurias chained methods are (sometimes) usefull but we should either have a whole bunch of them or none at all
12:58 moritz_ let's ask the other way round: what's the advantage for returning +self instead of self?
12:58 moritz_ s/for/of/
13:13 rdice joined #perl6
13:16 pmichaud pugs:  say List.isa(Seq);
13:16 exp_evalbot OUTPUT[*** No such subroutine: "&Seq"␤    at /tmp/Sywo7Tq49o line 1, column 14-17␤]
13:16 pmichaud pugs doesn't know Seq ?
13:17 moritz_ seems like
13:17 pmurias moritz_: .push shouldn't propably return anything
13:17 pmichaud so, what isa relationship (if any) should there be between List and Seq ?
13:19 iblechbot joined #perl6
13:19 moritz_ I think Seq isa List
13:19 moritz_ Seq         Completely evaluated (hence immutable) sequence
13:19 moritz_ which looks like List + extra stuff
13:19 pmichaud I might do them as unrelated to begin with
13:20 pmichaud well, no.
13:23 * pmichaud thinks.
13:23 * pmichaud decides he will think better with a Dr. Pepper.
13:23 pmichaud er, "Dr Pepper"
13:27 TJCRI joined #perl6
13:28 cmarcelo joined #perl6
13:32 Juerd_ joined #perl6
13:32 pmichaud_ joined #perl6
13:32 wolv joined #perl6
13:34 alanhaggai_ joined #perl6
13:53 renormalist joined #perl6
13:59 yves joined #perl6
14:03 rindolf joined #perl6
14:03 wknight8111 joined #perl6
14:04 yves joined #perl6
14:04 moritz_ I'm off, have a nice weekend ;)
14:05 rindolf moritz_: bye
14:10 jhorwitz joined #perl6
14:22 IllvilJa joined #perl6
14:23 alanhaggai joined #perl6
14:25 justatheory joined #perl6
14:30 FurnaceBoy joined #perl6
15:06 elmex joined #perl6
15:07 pmichaud_ pugs:  my @a = <a b c>;  say @a.kv;
15:07 exp_evalbot OUTPUT[0a1b2c␤]
15:07 pmichaud_ pugs:  say <a b c>.kv;
15:07 exp_evalbot OUTPUT[*** Not a keyed value: VList [VStr "a",VStr "b",VStr "c"]␤    at /tmp/iJ80EcnbOA line 1, column 5-15␤]
15:07 pmichaud_ pugs:  say kv(<a b c>);
15:07 exp_evalbot OUTPUT[*** Not a keyed value: VList [VStr "a",VStr "b",VStr "c"]␤    at /tmp/IM1Xs1DelI line 1, column 5-16␤]
15:12 pmichaud_ pugs:  say <a b c>.elems;
15:12 exp_evalbot OUTPUT[3␤]
15:34 qu1j0t3 joined #perl6
15:37 alanhaggai_ joined #perl6
15:52 meppl joined #perl6
15:58 rakudo_svn r27921 | particle++ | [rakudo] allow leading 't/spec/' path in filenames specified in test list data files
15:59 pmurias @tell mncharity why is elf_f the recommended version instead of elf_f_faster?
15:59 lambdabot Consider it noted.
16:03 pmichaud_ pugs:  say :a(1,2,3).perl;
16:03 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␤]
16:04 pmichaud_ pugs:  say ('a'=>(1,2,3)).perl;
16:04 exp_evalbot OUTPUT[("a" => (1, 2, 3))␤]
16:04 pmichaud_ pugs:  say ('a'=>1).perl
16:04 exp_evalbot OUTPUT[("a" => 1)␤]
16:04 pbuetow what's the 'NL' for?
16:05 [particle] newline
16:05 pbuetow ah ok
16:05 pmichaud_ say always adds a newline.
16:05 pbuetow ywah i know
16:05 [particle] pugs: print ('a'=>1).perl
16:05 exp_evalbot OUTPUT[("a" => 1)]
16:06 pmichaud pugs:  say [:a].perl
16:06 exp_evalbot OUTPUT[[("a" => Bool::True),]␤]
16:06 pmichaud oops.  :-)
16:10 justatheory joined #perl6
16:15 pmichaud pugs:   say (1,).kv;
16:15 exp_evalbot OUTPUT[*** Not a keyed value: VList [VInt 1]␤    at /tmp/gHPr8S3w1H line 1, column 5-12␤]
16:16 pmichaud S29 claims that ".kv" is a method on the Array class/role.
16:17 pmichaud But t/spec/S29-array/kv.t  claims
16:17 pmichaud # (1,).kv works correctly
16:18 pmichaud and (1,) is not an Array.
16:22 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]:
16:24 rakudo_svn r27922 | pmichaud++ | More major refactorings to Array and List.  This moves many of the
16:24 rakudo_svn r27922 | pmichaud++ | array methods out of List and into Array (per S29).  It also
16:24 rakudo_svn r27922 | pmichaud++ | causes a couple of spectest_regression tests to fail; I think
16:24 rakudo_svn r27922 | pmichaud++ | it's due to errors in the tests and I'm seeking clarification.
16:24 rakudo_svn r27922 | pmichaud++ | But I didn't want to hold off on the commit, so that others can
16:24 rakudo_svn r27922 | pmichaud++ | be testing also.
16:24 yoelfe joined #perl6
16:24 pmichaud and I need lunch, so bbiah
16:27 Juerd_ Bon apetit
16:33 alanhaggai joined #perl6
16:49 Psyche^ joined #perl6
16:54 jjore joined #perl6
17:03 vixey joined #PERl6
17:28 ludan joined #perl6
17:32 tobeya joined #perl6
17:34 eternaleye_ joined #perl6
17:37 smtms joined #perl6
17:37 Sartak left #perl6
17:37 pmichaud From S29:
17:38 pmichaud our List multi sort( Ordering $by = &infix:<cmp>, *@values )
17:38 PerlJam joined #perl6
17:38 pmichaud if I do      @array = sort(5,4,7,3,2);
17:38 pmichaud does the $by not bind to the 5 simply because it's not of type Ordering ?
17:39 wolverian there should be another sort that doesn't take a comparator
17:39 ispy_ joined #perl6
17:39 wolverian oh, wait.
17:39 wolverian ignore me. :)
17:40 PerlJam pmichaud: isn't it that those things must come at the end?
17:40 pmichaud pj:  you mean after a slurpy?  no
17:40 pmichaud I think what is meant is
17:41 pmichaud our List multi sort( Ordering *&by = &infix:<cmp>, *@values )
17:41 pmichaud or something like that
17:41 pmichaud where &by is a slurpy block
17:44 alanhaggai_ joined #perl6
17:46 rindolf joined #perl6
17:47 Psyche^ joined #perl6
17:50 melgx joined #perl6
17:52 rakudo_svn r27923 | particle++ | [rakudo] tell update_passing_test_data utility to ignore end-of-line comments in test data files
17:55 rakudo_svn r27924 | pmichaud++ | [rakudo]:
17:55 rakudo_svn r27924 | pmichaud++ | * Fix sort() to look for a block argument (moritz++)
17:55 rakudo_svn r27924 | pmichaud++ | * Resolves one more spectest_regression item.
17:58 TimToady pmichaud: Ordering isn't necessarily Code
17:58 pmichaud TimToady: true.
17:59 TimToady and & will prevent binding to anything that is not Code
17:59 pmichaud okay, that's back to my original question then.
18:01 TimToady yes, the type Ordering prevents binding the optional positional, so it takes its default instead
18:01 pmichaud ouch.
18:01 pmichaud that's going to make parameter binding even more tricky in Parrot.  :-|
18:03 pmichaud but we'll make it work somehow.
18:03 pmichaud probably some sort of multi trickery.
18:03 pmichaud or some wrapping.
18:11 braceta joined #perl6
18:14 TimToady sounds like the same problem of binding being driven by the arguments rather than the signature...
18:16 pmichaud yes.  Unfortunately Parrot doesn't really have a notion of "signature", except for MMD to a small extent.
18:26 rindolf Hi all.
18:26 rindolf Hi TimToady , pmichaud
18:26 pmichaud hello, rindolf
18:26 rindolf pmichaud: what's up?
18:26 pmichaud just working on lists, arrays, pairs, and hashes in rakudo
18:26 pmichaud and waiting for spectest answers :-)
18:27 rindolf pmichaud: ah, Rakudo seems promising.
18:27 rindolf pmichaud: I got banned from @perl.org and @pm.org
18:28 rindolf So now I'm doing cognitive exercises about it.
18:28 pmichaud how exactly does one get banned fr.... never mind, I don't think I want to know.
18:35 araujo joined #perl6
18:38 rakudo_svn r27925 | pmichaud++ | [rakudo]:
18:38 rakudo_svn r27925 | pmichaud++ | * Clean up .perl for Pair objects, pair composer.
18:40 alester joined #perl6
18:49 pmurias rindolf: what did you get banned for? ;)
18:50 FurnaceBoy joined #perl6
18:50 rindolf pmurias: some people complained to the mail admins about posts I made, and they banned me.
18:50 rindolf pmurias: without a warning.
18:50 rindolf pmurias: and without consulting people about it.
18:50 rindolf pmurias: and for both @perl.org and @pm.org
18:51 rindolf pmurias: and the bounce message was uninformative.
18:51 rindolf pmurias: and I got banned instead of just unsubscribed.
18:51 rindolf pmurias: and these people appealed to Authority instead of telling me how they feel.
18:51 rindolf pmurias: and they ignored all my past and present contributions to Perl and FOSS in general.
18:54 poletti joined #perl6
18:59 justatheory joined #perl6
19:02 rakudo_svn r27926 | pmichaud++ | [rakudo]:
19:02 rakudo_svn r27926 | pmichaud++ | * Move .keys, .kv, .pairs, .values back into List class (TimToady++).
19:02 rakudo_svn r27926 | pmichaud++ | * All spectest_regression tests pass again.
19:03 rindolf pmichaud++
19:07 pmichaud pugs:  my %hash = 1;  say %hash.perl;
19:07 exp_evalbot OUTPUT[*** Odd number of elements found where hash expected: VInt 1␤    at /tmp/eNvhibzZxk line 1, column 1-13␤]
19:18 schmalbe joined #perl6
19:24 pmichaud pugs:  my %hash = (a=>1, b=>2, c=>3);  say %hash.perl;
19:24 exp_evalbot OUTPUT[{("a" => 1), ("b" => 2), ("c" => 3)}␤]
19:24 [particle] really need parens there?
19:25 pmichaud in the output?  I dunno.
19:41 ispy_ joined #perl6
20:02 _nike_ joined #perl6
20:02 _nike_ left #perl6
20:10 chris2 joined #perl6
20:15 braceta joined #perl6
20:24 rakudo_svn r27928 | pmichaud++ | [rakudo]:
20:24 rakudo_svn r27928 | pmichaud++ | * Add first version of Hash, hashes, and the hash() composer.
20:24 rakudo_svn r27928 | pmichaud++ | * my %a = (a=>1, b=>2); now works.
20:24 rakudo_svn r27928 | pmichaud++ | * Still need to create {...}  hash composer (but use parens in the
20:24 rakudo_svn r27928 | pmichaud++ |   meantime).
20:28 xdg joined #perl6
20:33 rakudo_svn r27929 | pmichaud++ | [rakudo]:
20:33 rakudo_svn r27929 | pmichaud++ | * Change increment and decrement methods to be named 'succ' and 'pred'.
20:33 rakudo_svn r27929 | pmichaud++ | * Resolves RT#54654.
20:33 armagad_ joined #perl6
20:54 mj41_ joined #perl6
20:55 pmurias @tell mncharity re no-one notice, I mentioned that ^ is the placeholder sigil in the TODO section of README
20:55 lambdabot Consider it noted.
20:59 TimToady pmichaud: no, it shouldn't need parens there, since => is supposed to parse like item assignment
21:00 TimToady @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:00 lambdabot Consider it noted.
21:00 pmichaud rakudo:  my %hash = 1..6;   say %hash.perl;
21:00 exp_evalbot rakudo r27929 OUTPUT[Class 'Perl6Array' already registered!␤current instr.: 'parrot;P6metaclass;new_class' pc 606 (runtime/parrot/library/P6object.pir:378)␤
21:01 pmichaud ick.
21:01 pmichaud looks like evalbot needs a 'make clean' or to regenerate the makefile.
21:02 pmichaud > my %hash = 1..6;  say %hash.perl;
21:02 pmichaud {"1" => 2, "3" => 4, "5" => 6}
21:02 lambdabot Parse error at "=" (column 10)
21:02 Auzon evalbot should regenerate everything real soon now
21:02 Auzon but I'll fire it off manually
21:02 pmurias TimToady: the short name of Foo::Bar is Bar?
21:02 pmichaud the class 'Perl6Array' error is fairly old -- from last night?
21:02 mncharity joined #perl6
21:03 pmurias mncharity: hi :)
21:03 * Auzon checks the build logs
21:03 TimToady well, depends on what you mean by "short name"
21:03 [particle1 joined #perl6
21:03 pmurias the thing WHAT stringifies to
21:03 TimToady Foo::Bar is already the "short name" of the package/module, which also includes ver and auth
21:04 TimToady it always stringifies to Foo::Bar
21:04 pmurias thanks
21:04 TimToady there are places you can just say "Bar" to mean "Foo::Bar", if Bar is in Foo
21:04 [particle]1 joined #perl6
21:05 TimToady when you declare an inner class Bar, it'd by default "our" within the Foo package
21:05 TimToady *it's
21:05 pmurias mncharity: why is elf_f the recommended version?
21:05 TimToady so you can refer to Bar after that, but as a predeclared name the compiler knows it really means Foo::Bar
21:05 Auzon Looks like parrot was just built for evalbot ~2m ago
21:06 Auzon rakudo:  my %hash = 1..6;   say %hash.perl;
21:06 exp_evalbot rakudo r27929 OUTPUT[Class 'Perl6Array' already registered!␤current instr.: 'parrot;P6metaclass;new_class' pc 606 (runtime/parrot/library/P6object.pir:378)␤
21:06 Auzon rakudo:  my %hash = 1..6;   say %hash.perl;
21:06 exp_evalbot rakudo r27929 OUTPUT[Class 'Perl6Array' already registered!␤current instr.: 'parrot;P6metaclass;new_class' pc 606 (runtime/parrot/library/P6object.pir:378)␤
21:07 TimToady basically, package name lookup looks first within the current package, and then in the global namespace
21:07 [particle]1 rakudo: my %hash = (1..6); print %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)␤
21:07 [particle]1 hrmm
21:07 pmichaud the class Perl6Array error tends to arise because jonathan had perl6array.pmc as part of the build
21:08 pmichaud 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:08 [particle]1 pmichaud: any new spectests passing due to the hash code?
21:08 pmichaud [particle]: I haven't looked, really.  I'm hoping others will do that :-)
21:09 [particle]1 okay
21:09 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++
21:09 lambdabot mncharity: You have 3 new messages. '/msg lambdabot @messages' to read them.
21:09 Auzon Looks like evalbot does a make realclean if make returns badly
21:09 mncharity hi pmurias
21:09 [particle]1 Auzon: does it realclean parrot or perl6?
21:09 Auzon Parrot.
21:09 [particle]1 excellent.
21:09 pmichaud and 'make' won't return badly for this -- it still makes.
21:09 pmichaud i.e., make still succeeds, it's just that the resulting executable won't.
21:10 Auzon Hm... no real way to have it know when to clean automatically. OK, I'll do it manually
21:12 * Auzon muses...
21:12 Auzon I guess it could always make realclean, but that seems like overkill...
21:12 pmichaud it should probably clean whenever config/makefiles/root.in changes.
21:12 pmichaud (or realclean)
21:12 REPLeffect_ joined #perl6
21:13 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 mncharity elf: class A { has @.a; }; say A.new.a.perl
21:13 exp_evalbot OUTPUT[[]␤]
21:14 mncharity oh, have defaults now?  feel free to change the recomendation. :)
21:14 mncharity elf: class A { has $.a = 13; }; say A.new.a.perl
21:14 mncharity elf: class A { has @.a; }; say A.new.a.perl
21:14 exp_evalbot OUTPUT[[]␤]
21:14 mncharity doh
21:15 mncharity elf: class A { has $.a = 13; }; say A.new.a.perl
21:15 exp_evalbot OUTPUT[13␤]
21:15 mncharity yay.  pmurias++
21:16 mncharity re 'noticing $^foo', I stand corrected.  breaking TODO out into it's own file...
21:16 sscaffidi joined #perl6
21:17 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 mncharity how does one say  local($P::x) = $P::x;  in p6?
21:18 Auzon rakudo:  my %hash = 1..6;   say %hash.perl;
21:18 exp_evalbot rakudo r27929 OUTPUT[{"1" => 2, "3" => 4, "5" => 6}␤]
21:18 pmichaud yay!
21:19 pmichaud Auzon++
21:19 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:20 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 TimToady context vars are friendlier to threading, I suspect
21:22 xdg joined #perl6
21:22 pugs_svnbot r20580 | pmurias++ | [elf] changed version recommendation
21:23 pmurias mncharity: i think we should add named params to elf ASAP
21:24 Auzon elf: my $var = 2; say $var ~~ 2;
21:24 exp_evalbot OUTPUT[syntax error at (eval 14) line 4, near "$var ~"␤ at ./elf_f_faster line 4461␤]
21:25 kler joined #perl6
21:28 REPLeffect_ joined #perl6
21:29 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 mncharity 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:32 pmurias 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.
21:34 pmichaud pugs:  my %hash = 1..6;  say %hash;
21:34 exp_evalbot OUTPUT[1        23      45      6␤]
21:34 pmurias we can use $foo->foo_named and $foo->full_capture_object and $foo->positional
21:34 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.
21:35 pmurias $foo->foo_NAMED, $foo->foo_CAPTURE, $foo->foo_POSITIONAL is what i meant
21:35 mncharity hmm...
21:37 pmurias any issues?
21:38 mncharity so  f(x)  stays f(x) for positionals,   but becomes &f->foo_blah() for blah.  hmm.
21:38 mncharity &f->blah performance will be poor, but with named args, it already is.
21:38 mncharity you realize elf itself won't be able to use "we didn
21:39 mncharity 't manage to compile them away" named args very much, or performance will collapse...
21:40 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 jferrero joined #perl6
21:41 pmurias not a big problem, namespace items are cheap
21:42 pmurias f_NAMED will call to f with the right arguments to prevent code duplication if that is what worries you
21:42 mncharity I am still unclear on the consequences of the choice, and since it's not KISS, I fear it.
21:42 TimToady what does a referece to a function look like then?
21:43 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.
21:44 pmurias \&foo_NAMED and \&foo_POSITIONAL being the slightly "unboxed" ones
21:44 pmurias mncharity: don't use $X::x
21:45 mncharity re 'what does a referece to a function look like then?', yeah...   multiple functions--
21:45 pmurias function should be stored in $scalars anyway
21:45 mncharity re 'don't use $X::x', then how does f know how it is being invoked?  ie, what @_ actually contains?
21:46 pmurias f is allways invoked with positionals
21:46 pmurias * always
21:46 pmurias f_NAMED gets named arguments and positionals
21:46 pmurias f_CAPTURE gets captures
21:46 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.
21:47 pmurias yes
21:47 pmurias true
21:47 mncharity re separate f, f_N, f_C, see ^^^ 'what does a referece to a function look like then?'
21:47 pmurias probably f_C
21:48 pmurias as it's the most generic one
21:48 mncharity and 10+x slower.
21:48 pmurias you can always unbox it
21:48 pmurias $foo->i_want_the_positional_variant
21:50 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
21:50 mncharity that's the {package CODE; sub NAMED { $X::x=1; my $self=shift; goto $self; }}
21:50 pmurias but you don't pay extra cost on the positional varaint
21:50 pmurias * variant
21:51 mncharity right.  that's definitely a design objective.
21:51 mncharity the if(not($X::x)){}  is fairly cheap.
21:51 pmurias but it's ugly
21:52 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:54 mncharity I definitely prefer your f->NAMED(...) to both  f->(...,0)  and  $X::x-0;f->(...) .
21:54 mncharity *$X::x=0;f->(...)
21:55 pmurias i'll be away for the weekend at a lake with my classmates, but i can implement it afterwards (j2me can wait)
21:56 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:57 mncharity 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?
21:57 mncharity can wait.  not like there isn't a lot else to do. :)
21:58 pmurias fine then
21:58 mncharity summer lakes++
21:59 pmurias i got to go to sleep now, as i'm cycling to the lake in the morning
21:59 pmurias good night
22:01 mncharity good night
22:04 justatheory joined #perl6
22:04 Limbic_Region joined #perl6
22:07 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:07 mncharity good idea though
22:09 mncharity Looks like svnbot is absent. :/
22:09 mncharity or no, just slow I guess.
22:11 pugs_svnbot r20581 | putter++ | [elf] Array.isa(List).  pmichaud++  Broke TODO out of README, and expanded.
22:11 pugs_svnbot r20581 | putter++ | [STD_red] PROBLEMS: Noted :todo (unrelated) is intentionally ignored, and the file may be out of date.
22:14 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.
22:15 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 cognominal_ joined #perl6
22:17 mncharity python probably involves generating bytecodes, and so waits, despite being needed for things like Google Apps.
22:17 justatheory_ joined #perl6
22:18 rakudo_svn r27931 | pmichaud++ | [rakudo]:
22:18 rakudo_svn r27931 | pmichaud++ | * Cleaned up Mapping and Hash code a bit more.
22:19 dduncan joined #perl6
22:38 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:48 dduncan left #perl6
22:50 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.
23:03 slavik joined #perl6
23:04 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:05 TimToady *functions
23:06 TimToady or are you thinking of something more like a coroutine?
23:06 slavik don't know, I just know that haskel allows partially evaluated functions to be moved around, they are called 'thunks' or something
23:06 slavik ie: return sub { x+x; } (without having x+x actually get evaluated)
23:07 slavik lazy evaluation but not only for lists
23:09 TimToady we have "lazy { $x+$x }"
23:09 slavik so "lazy" instead of "sub"?
23:09 TimToady we have sub too, but you have to call a sub explicitly
23:09 slavik you can't return anon subs like in perl5?
23:10 TimToady sure, but you have to invoke those explicitly too
23:10 TimToady just as in p5
23:10 slavik right
23:11 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 slavik ghc 6.8.2, svn-rev 14546:    Invalid grammatical category: "Bool"
23:12 TimToady considering it's been up for discussion for eight years already, there are lots of things that are fairly firmly set already  :)
23:12 slavik kewl
23:12 slavik it also seems like most of the important stuff is covered
23:12 TimToady most of the tweaks these days are based on feedback from the folx trying to implement it
23:12 slavik right
23:13 slavik the direction is there, that's the important part :)
23:25 slavik joined #perl6
23:32 slavik ooh, will pugs allow perl6 to have embedded haskel code? (that would be freaking awesome) :>
23:36 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 mncharity s/on a haskell backend/with a true haskell core linked/
23:37 slavik right
23:37 slavik I am just asking :P
23:39 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:41 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:41 slavik but then this would be parrot, no?
23:43 mncharity there's http://search.cpan.org/~autrijus/Language-Haskell-0.01/lib/Language/Haskell.pm which could be worked on
23:43 lambdabot Title: Language::Haskell - Perl bindings to Haskell - search.cpan.org, http://tinyurl.com/5gzn8u
23:44 mncharity re parrot, no, parrot is a vm, runtime objects, assorted other things too.
23:47 slavik ahh, fair enough
23:47 slavik mncharity: right, sorry ...
23:48 pmichaud_ joined #perl6
23:49 Juerd joined #perl6
23:49 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:50 bacek joined #perl6
23:51 mncharity something like  http://search.cpan.org/~ingy/Inline-0.44/C/C.pod or http://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
23:54 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 mncharity So we could have embedded haskell in perl now... it's just a matter of tuits.
23:56 mncharity (plus, of course, the "would anyone actually use it, and if not, are there better places to trade life for code")

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

Perl 6 | Reference Documentation | Rakudo