Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-06-04

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:13 japhb joined #perl6
00:17 c1sung joined #perl6
00:25 drbean joined #perl6
00:34 bacek joined #perl6
00:47 alanhaggai joined #perl6
01:17 penk joined #perl6
01:23 penk joined #perl6
01:25 Ched- joined #perl6
01:29 pasteling "diakopter" at 209.9.237.164 pasted "[yap6] progress... take a look!" (12 lines, 667B) at http://sial.org/pbot/31193
01:31 diakopter moritz or Auzon: would it be possible to add yap6 to the evalbot as something that can be invoked, but not one that auto-replies to perl6:  ?
01:33 lichtkind joined #perl6
01:34 lichtkind %ziffern = {0, 'null', 1, 'eins'};
01:34 lichtkind is this a block returning a array?
01:36 pugs_svnbot r20642 | diakopter++ | [yap6]
01:36 pugs_svnbot r20642 | diakopter++ | my/our declarations work (but the distinction
01:36 pugs_svnbot r20642 | diakopter++ |    doesn't mean anything yet)
01:36 pugs_svnbot r20642 | diakopter++ | variable declaration is required before using it
01:36 pugs_svnbot r20642 | diakopter++ | making some headway toward generalizing the
01:36 pugs_svnbot r20642 | diakopter++ |    grammar-system so that the rules can be defined
01:36 pugs_svnbot r20642 | diakopter++ |    more declaratively.  use Perl6in5::Grammar; #etc
01:36 pugs_svnbot r20642 | diakopter++ | probably some other improvements I'm forgetting.
02:01 c1sung joined #perl6
02:20 edpratomo joined #perl6
03:27 Lunchy joined #perl6
03:37 snooper joined #perl6
03:38 alanhaggai_ joined #perl6
03:42 r0bby joined #perl6
03:48 redicaps joined #perl6
04:00 Alias_ joined #perl6
04:02 Alias__ joined #perl6
04:08 redicaps left #perl6
04:25 redicaps joined #perl6
04:30 nekobaka joined #perl6
04:31 nekobaka joined #perl6
04:33 yath joined #perl6
04:59 Alias_ joined #perl6
05:08 Auzon diakopter: Yes, we can do that. nqp is implemented in the same way
05:18 diakopter Auzon: neat... point me in the right direction and I can do it
05:18 Auzon Evalbot's source is in pugs/misc/evalbot I believe
05:19 Auzon evalbot.pl is the file to edit.
05:20 Auzon you can diff r20510 and r20497 to find out how I added elf to it.
05:23 * diakopter fights with the parser generator generator
05:27 diakopter breakthrough
05:32 schmalbe joined #perl6
05:38 alanhaggai_ joined #perl6
05:39 erikh joined #perl6
05:39 erikh :)
05:51 alanhaggai joined #perl6
05:51 kolibrie joined #perl6
05:56 justatheory joined #perl6
05:57 moritz_ good morning
05:57 moritz_ diakopter: yap6 has quite high version dependencies on many perl modules... are they really all needed in such new versions?
06:06 diakopter moritz_: no... most of them aren't needed at all
06:07 diakopter that was wishful thinking :D
06:08 moritz_ diakopter: ok, I'll (locally) revert the version to older values, test the stuff, and commit if it works
06:08 moritz_ s/older/lower/
06:15 moritz_ diakopter: Makefile.PL complains about missing 'Compiler.pm'
06:16 diakopter I've never used the Makefile... it's merely stubbed in for an eventuality  there was a reason I volunteered to do it :)
06:17 moritz_ ok, so how do I run a program with yap6?
06:19 stevan_ joined #perl6
06:22 diakopter just pipe the commands on STDIN to sbin/perl6
06:22 diakopter but, the version in pugscode svn does only simple arithmetic and variable declaration/assignment.
06:22 diakopter and 'say'
06:23 diakopter it enforces 'my', too.
06:23 moritz_ I just looked at sbin/perl6
06:23 moritz_ seems like it supports filenames as well
06:23 diakopter yeah, that too.
06:23 moritz_ (which is how the rest of the implementations are handled in evalbot)
06:23 diakopter oh, ok
06:24 diakopter so you'll need File::Slurp
06:25 Alias_ Doesn't Perl 6 have a slurp command yet?
06:25 Alias_ Oh wait, the IO in parrot isn't done, is it
06:25 moritz_ Alias_: it does, but perl 5 does not ;)
06:26 Alias_ If you don't want a dependency, there's a nice convenient one you can cut and past at PPI::Util::_slurp
06:28 moritz_ Alias_: I don't want to change anything, I just want be able to run diakopter's program ;)
06:30 Alias_ ah :)
06:30 Alias_ I think I'll shut up now
06:31 * diakopter prepares to be embarassed
06:32 moritz_ echo 'say 1;' | perl -Ilib  ./sbin/perl6
06:32 moritz_ Adding AST node: ["__PACKAGE__::say",1]
06:32 diakopter cool
06:33 moritz_ echo 'say 1+2;' | perl -Ilib  ./sbin/perl6
06:33 moritz_ Adding AST node: ["__PACKAGE__::say",3]
06:33 diakopter echo 'my $a=4;my $b = 2**(3+$a); say $b'
06:33 moritz_ and it even does constant folding!
06:33 diakopter har
06:33 diakopter _sort_of_
06:34 diakopter but yeah, with the CPStyle, that will be much easier
06:37 pugs_svnbot r20643 | moritz++ | [evalbot] first shot at evalbot'ting yap6
06:37 exp_evalbot joined #perl6
06:38 moritz_ yap6: my $x = 3; say $x;
06:38 exp_evalbot No output (you need to produce output to STDOUT)
06:38 moritz_ urks
06:38 moritz_ Can't open perl script "sbin/perl6": No such file or directory
06:38 moritz_ seems like I screwed up good ;)
06:39 diakopter ha
06:40 pugs_svnbot r20644 | moritz++ | [evalbot] chdir to yap6/src/ before executing
06:40 exp_evalbot joined #perl6
06:40 moritz_ the src/ part was missing
06:40 moritz_ yap6: my $x = 3; say $x;
06:40 exp_evalbot No output (you need to produce output to STDOUT)
06:41 moritz_ reading input file failed at sbin/perl6 line 16.
06:41 diakopter input file on relative path?
06:41 moritz_ no, absolute path
06:41 moritz_ it's a temp file
06:42 * moritz_ is stupid
06:42 pugs_svnbot r20645 | moritz++ | [evalbot] hopefully pass the right filename to yap6
06:43 exp_evalbot joined #perl6
06:43 moritz_ yap6: my $x = 3; say $x;
06:43 exp_evalbot OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$x"]␤Adding AST node: ["__PACKAGE__::assign","\$x",3]␤Adding AST node: ["__PACKAGE__::say",3]␤]
06:43 alanhaggai joined #perl6
06:43 diakopter yap6: my $cool=1; my $moritz=$cool; say $moritz;
06:43 exp_evalbot OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$cool"]␤Adding AST node: ["__PACKAGE__::assign","\$cool",1]␤Adding AST node: ["__PACKAGE__::declare","my","\$moritz"]␤Adding AST node: ["__PACKAGE__::assign","\$moritz",1]␤Adding AST node: ["__PACKAGE__::say",1]␤]
06:44 diakopter perl6: my $cool=1; my $moritz=$cool; say $moritz;
06:44 exp_evalbot kp6 r20645: OUTPUT[1␤]
06:44 exp_evalbot ..pugs: OUTPUT[1␤]
06:44 exp_evalbot ..rakudo r28058: OUTPUT[1␤]
06:44 exp_evalbot ..elf r20645: OUTPUT[1␤]
06:44 diakopter cool; thanks moritz_
06:44 moritz_ diakopter: you're welcome
06:45 diakopter yap6: $cool=1;
06:45 exp_evalbot OUTPUT[Illegal usage: "\$cool has yet to be declared  Syntax Error...!]
06:46 diakopter yap6: my $bigint=2984987298374982798572​98467928379827349872983794283; say $bigint**22
06:46 exp_evalbot OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$bigint"]␤Adding AST node: ["__PACKAGE__::assign","\$bigint","2984987298​37498279857298467928379827349872983794283"]␤  Syntax Error...!]
06:47 diakopter yap6: my $bigint=2984987298374982798572​98467928379827349872983794283; say $bigint**22;
06:47 exp_evalbot OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$bigint"]␤Adding AST node: ["__PACKAGE__::assign","\$bigint","2984987298374​98279857298467928379827349872983794283"]␤Adding AST node:
06:47 exp_evalbot ..["__PACKAGE__::say","281018379062767445​72898116978038929052903584426999223576445​85442601147469086166376420828031039899835​86679589438332442517544242575541618894...
06:47 diakopter har
06:47 diakopter sorry; was just testing the irc constraints there... I hope exp_evalbot didn't get banned. :D
06:48 moritz_ no, it limits the output
06:48 diakopter ah, good :)
06:48 diakopter yap6: our $a=2;
06:48 exp_evalbot OUTPUT[Adding AST node: ["__PACKAGE__::declare","our","\$a"]␤Adding AST node: ["__PACKAGE__::assign","\$a",2]␤]
06:49 moritz_ I tried to think of every security relevant aspect while writing evalbot...
06:49 moritz_ so I took care the output doesn't start with arbitrary characters (not to trigger bot), limit resources etc.
06:51 diakopter yap6: my $a = $b;
06:51 exp_evalbot OUTPUT[Illegal usage: "Undeclared variable \$b  Syntax Error...!]
06:52 diakopter yap6: my $aaaaaaaaaaaaaaaaaaaaaaaaaa​aaaaaaaaaaaaaaaaaaaaaaaaaaa = $b;
06:52 exp_evalbot OUTPUT[Illegal usage: "Undeclared variable \$b  Syntax Error...!]
06:52 diakopter yap6: my $aaaaaaaaaaaaaaaaaaaaaaaaaa​aaaaaaaaaaaaaaaaaaaaaaaaaaa = 1;
06:52 exp_evalbot OUTPUT[Adding AST node: ["__PACKAGE__::declare","my","\$aaaaaaaaaaaaaaa​aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"]␤Adding AST node: ["__PACKAGE__::assign","\$aaaaaaaaaaaaaaaaa​aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",1]␤]
06:52 diakopter nice. this is much more convenient than using a shell.  okay, I'll privmsg it
06:54 moritz_ heh ;)
06:54 moritz_ maybe should set up a REPL ;)
06:54 moritz_ then you'll even see newlines as newlines, not as ␤
06:59 kolibrie joined #perl6
07:07 luqui joined #perl6
07:11 iblechbot joined #perl6
07:12 meppl joined #perl6
07:22 pmurias joined #perl6
07:45 diakopter moritz_: does your evalbot machine have Symbol::Glob :D
07:47 diakopter btw if you install it from CPAN, it has two undocumented prereqs - Class::Std and Class::Std::Utils
08:03 moritz_ diakopter: installing it...
08:04 moritz_ diakopter: done
08:09 diakopter awesome
08:32 epico joined #perl6
08:33 epico left #perl6
08:37 alanhaggai_ joined #perl6
08:41 IngoLiebhaber joined #perl6
08:48 elmex joined #perl6
08:49 IngoLiebhaber2 joined #perl6
08:52 IngoLiebhaber2 mhh is iblechbot gone?
08:54 moritz_ seems like
08:55 moritz_ it did join roughly 4 hours ago, though
08:58 pugs_svnbot r20646 | diakopter++ | [yap6]
08:58 pugs_svnbot r20646 | diakopter++ | more modular rule declaration... some work toward
08:58 pugs_svnbot r20646 | diakopter++ | string literals.
09:00 BinGOs_ joined #perl6
09:07 pmurias diakopter: why did you create so many empty files in yap6?
09:10 diakopter pmurias: Just placeholders for the coding I do in my brain before I type it
09:12 chris2 joined #perl6
09:14 luqui joined #perl6
09:29 alanhaggai joined #perl6
09:31 redicaps left #perl6
09:59 ruoso joined #perl6
10:13 hcchien joined #perl6
11:13 moritz_ rakudo: my &a = sub { 1 }; say a();
11:13 exp_evalbot rakudo r28058 OUTPUT[1␤]
11:13 moritz_ is that valid?
11:13 moritz_ pugs requires binding for that
11:14 moritz_ which somehow makes sense, because if you acess a(), you use the container, not the contents of the variable
11:14 moritz_ and assignment to the container is binding
11:21 ruoso &a is no longer sub invocation in p6 iirc
11:21 ruoso it's just a variable name
11:22 moritz_ ruoso: yes, but a() invokes the sub bound to &a
11:23 ruoso which is a container that happens to have been assigned sub { 1 }
11:24 ruoso rakudo: say VAR(&a)
11:24 exp_evalbot rakudo r28058 OUTPUT[Scope  not found for PAST::Var 'a'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
11:24 ruoso pugs: say VAR(&a)
11:24 exp_evalbot OUTPUT[*** ␤    Unexpected ")"␤    expecting "::" or signature value␤    Variable "&a" requires predeclaration or explicit package name␤    at /tmp/Y5jZjHAE1b line 1, column 11␤]
11:24 moritz_ pugs: my &a; say VAR(&a)
11:24 exp_evalbot OUTPUT[<SubPrim(&)>␤]
11:24 moritz_ rakudo: my &a; say VAR(&a)
11:24 exp_evalbot rakudo r28058 OUTPUT[Could not find non-existent sub VAR␤current instr.: '_block11' pc 34 (EVAL_11:21)␤
11:25 ruoso pugs: my &a; VAR(&a).STORE(sub { 1 })
11:25 exp_evalbot OUTPUT[*** No such method in class Sub: "&STORE"␤    at /tmp/SNvhqw4QgV line 1, column 8 - line 2, column 1␤]
11:26 ruoso pugs: my &a; &a.STORE(sub { 1 })
11:26 exp_evalbot OUTPUT[*** No such method in class Sub: "&STORE"␤    at /tmp/EwvsLLp82J line 1, column 8 - line 2, column 1␤]
11:26 ruoso that seems to be the problem...
11:26 ruoso pugs doesn't use &a as a variable...
11:27 ruoso but am I correct? is &a really a variable?
11:27 ruoso yes I am
11:27 ruoso it is a variable
11:28 moritz_ yes, & is a valid sigil
11:28 moritz_ does Callable
11:29 ruoso if it is a variable it is a container
11:29 ruoso if it is a container, it must have STORE, right?
11:30 moritz_ presumably
11:30 moritz_ so assignment to a &a variable should work?
11:32 moritz_ there's only one test for it in t/
11:32 moritz_ t/var/constant.t 162:        try { &wobble = { 23 } };
11:33 moritz_ and that's for testing that 'wobble' is constant, not that the assignment actually works
11:34 braceta joined #perl6
11:34 ruoso but that would result in a different failure
11:35 ruoso pugs: my &a is readonly; &a = { 23 }
11:35 exp_evalbot OUTPUT[*** Can't modify constant item: VStr "MkCode {isMulti = True, subName = \"&\", subType = SubPrim, subOuterPads = [], subInnerPad = MkPad (padToList []), subPackage = , subAssoc = AIrrelevantToParsing, subParams = [], subBindings = [], subSlurpLimit = [], subReturns = (mkType \"Any\"),
11:35 exp_evalbot ..subLValue = False, subBody = Prim ([Pugs.AST.Internals...
11:35 moritz_ aye
11:35 ruoso hmm
11:35 moritz_ pugs: my &a is readonly; &a := { 23 };
11:35 exp_evalbot RESULT[\:() "$_" := "Scalar" #<Scalar:0xb712fbac>␤    "&?BLOCK" := "Sub" #<Sub:0xb6604cec> {, "&a" := "Sub" #<Sub:0xb7a8a928>, "$_" := "Scalar" #<Scalar:0xb7170dc4>␤                                                                             "@_" := "Array" #<Array:0xb71d236c>␤
11:35 exp_evalbot ..                                               ...
11:35 moritz_ pugs: my &a is readonly; &a := { 23 }; say a()
11:35 exp_evalbot OUTPUT[23␤]
11:35 moritz_ pugs: my &a = { 23 }; say a()
11:35 exp_evalbot OUTPUT[*** Can't modify constant item: VStr "MkCode {isMulti = True, subName = \"&\", subType = SubPrim, subOuterPads = [], subInnerPad = MkPad (padToList []), subPackage = , subAssoc = AIrrelevantToParsing, subParams = [], subBindings = [], subSlurpLimit = [], subReturns = (mkType \"Any\"),
11:35 exp_evalbot ..subLValue = False, subBody = Prim ([Pugs.AST.Internals...
11:36 ruoso but it seems the problem in pugs is clear..
11:36 ruoso pugs: my $a = sub { 23 }; say $a();
11:36 exp_evalbot OUTPUT[23␤]
11:36 ruoso &a was supposed to be a variable just like $a
11:36 ruoso for some reason, pugs is special casing it
11:37 ruoso pugs: my $a; VAR($a).STORE(sub { 23 }); say $a();
11:37 exp_evalbot OUTPUT[*** No such method in class Scalar: "&STORE"␤    at /tmp/K4N9XS0HW4 line 1, column 8-33␤]
11:37 ruoso uh?
11:38 moritz_ I don't think pugs implements that correctly
11:38 moritz_ it just does assignment and binding wihtout calling STORE
11:38 ruoso oh... ok... it special cases everything then ;)
11:39 moritz_ yes
11:39 moritz_ pugs seemes to have the "get 90% of real world cases right" philosophy
11:40 moritz_ which seems to be a quite popular approach for implementing a Perl 6 compiler
11:40 moritz_ because the specced behaviour is often hard to get right, hard to understand and doesn't promise quick results
11:52 diakopter moritz_: which Test.pm does each implementation use/favour?
11:53 moritz_ diakopter: pugs uses ext/Test/, rakudo its own
11:54 moritz_ kp6 also has a hand-rolled Test.pm
11:54 diakopter hrm
11:54 moritz_ kp6's is in v6/v6-KindaPerl6/src-modules/Test.pm
11:55 moritz_ that a very primitive one ;)
12:02 alanhaggai joined #perl6
12:07 justatheory joined #perl6
12:07 bacek joined #perl6
12:09 pmurias S12:443 C<VAR> is a no-op on a non-scalar variables and values
12:14 diakopter pugs: say "2"~(say 3)~"4"
12:14 exp_evalbot OUTPUT[3␤214␤]
12:14 diakopter pugs: say "2"~(say "3")~"4"
12:14 exp_evalbot OUTPUT[3␤214␤]
12:14 diakopter pugs: say " 2 "~(say " 3 ")~" 4 "
12:14 exp_evalbot OUTPUT[ 3 ␤ 2 1 4 ␤]
12:15 moritz_ the argument list is evaluated before any output is made
12:15 diakopter it says the 3 first, then it cats the 2, the result of say3 and the 4.
12:15 moritz_ but I don't think it has to be this way
12:16 diakopter say say 4
12:16 moritz_ it is allowed to lazily evaluated them, and print each item of the arg list immediately
12:16 diakopter pugs: say say 4
12:16 exp_evalbot OUTPUT[4␤1␤]
12:16 diakopter pugs: say say say say 3
12:16 exp_evalbot OUTPUT[3␤1␤1␤1␤]
12:16 diakopter pugs: say !say say !say 3
12:16 exp_evalbot OUTPUT[3␤␤1␤␤]
12:17 diakopter pugs: say([say 5])
12:17 exp_evalbot OUTPUT[5␤1␤]
12:17 diakopter pugs: say([say 5].perl)
12:17 exp_evalbot OUTPUT[5␤[Bool::True,]␤]
12:18 diakopter so Bool::True stringifies to 1
12:18 diakopter pugs: say((say 5).perl)
12:18 exp_evalbot OUTPUT[5␤Bool::True␤]
12:18 diakopter pugs: say({say 5}.perl)
12:18 exp_evalbot OUTPUT[:() "$_" := "Scalar" #<Scalar:0xb7121448>␤    "&?BLOCK" := "Sub" #<Sub:0xb6604dac> {"$_" := "Scalar" #<Scalar:0xb71d2d4c>␤                                          "@_" := "Array" #<Array:0xb71d02f8>␤                                          "&?ROUTINE" := "Sub" #<Sub:0xb6604dac>␤
12:18 exp_evalbot ..                              "&?BLOCK" := "Sub...
12:19 diakopter pugs: {say}
12:19 exp_evalbot OUTPUT[␤]
12:19 diakopter pugs: {say}.say
12:19 exp_evalbot OUTPUT[<SubBlock(<anon>)>␤]
12:20 diakopter pugs: {say}.perl
12:20 exp_evalbot RESULT[":() \"\$_\" := \"Scalar\" #<Scalar:0xb684b314>\n    \"\&?BLOCK\" := \"Sub\" #<Sub:0xb6604cec> \{, , \"\$_\" := \"Scalar\" #<Scalar:0xb71d2d98>\n                                              \"\@_\" := \"Array\" #<Array:0xb71d048c>\n
12:20 exp_evalbot ..\"\&?ROUTINE\" := \"Sub\" #<Sub:0xb6604cec>\n                ...
12:20 diakopter pugs: {say}.WHAT
12:20 exp_evalbot RESULT[::Block]
12:20 moritz_ the serialization of code in pugs is... well... suboptimal ;)
12:21 diakopter pugs: {say}.WHAT?
12:21 exp_evalbot OUTPUT[*** ␤    Unexpected "?"␤    expecting term postfix or operator␤    at /tmp/48yUldpzQH line 1, column 11␤]
12:21 diakopter {say}!this
12:21 diakopter ooo it didn't like that
12:21 diakopter pugs: {say}!this
12:21 exp_evalbot OUTPUT[*** Odd number of elements found where hash expected: VCode (MkCode {isMulti = False, subName = "<anon>", subType = SubBlock, subOuterPads = [PRuntime {pr_pad = MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb6607bec>, pe_flags = MkEntryFlags
12:21 exp_evalbot ..{ef_isContext = True}, pe_store = <ref:0xb660a214>}),("@_",...
12:21 diakopter ok ok
12:22 diakopter hm; why did it want that to be a hash?
12:23 * diakopter tails to work
12:26 pjcj joined #perl6
12:48 ruoso pmurias, re: no-op VAR on non-scalar.... does that mean that &a = sub { 1 } is invalid?
12:52 ruoso I always thought that every variable could be used as scalar...
12:53 ruoso like...
12:53 ruoso @a = @b
12:53 lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
12:53 ruoso I would STORE in '@a' a copy of the items of '@b'
12:54 ruoso pugs: @a.STORE(1,2,3,4)
12:54 exp_evalbot OUTPUT[*** ␤    Unexpected "."␤    expecting "::"␤    Variable "@a" requires predeclaration or explicit package name␤    at /tmp/GF22Y7LEIi line 1, column 3␤]
12:54 ruoso pugs: my @a; @a.STORE(1,2,3,4)
12:54 exp_evalbot OUTPUT[*** No such method in class Array: "&STORE"␤    at /tmp/2m15yMUaGx line 1, column 8 - line 2, column 1␤]
12:59 ruoso that's odd... so every list-to-list assignement needs to be made in more than one step...
12:59 ruoso I was expecting STORE to be available to do that...
12:59 moritz_ ruoso: don't rely on an implementation to test your understanding of the specs
13:00 ruoso moritz_, I'm actually looking at S29
13:03 bacek pugs: my @a.STORE(1..5); say ~@a;
13:03 exp_evalbot OUTPUT[*** ␤    Unexpected "@a"␤    expecting "=", ".=", context, ":" or "("␤    at /tmp/TwxucELM5N line 1, column 4␤]
13:03 ruoso pugs: my $a; VAR($a).STORE(1..5); say $a;
13:03 exp_evalbot OUTPUT[*** No such method in class Scalar: "&STORE"␤    at /tmp/Bpe7autOzh line 1, column 8-27␤]
13:04 ruoso oh sure... pugs doesn't have STORE...
13:04 ruoso kp6: my $a; VAR($a).STORE(1..5); say $a;
13:04 exp_evalbot kp6 r20646: OUTPUT[syntax error at position 20, line 1 column 20:␤my $a; VAR($a).STORE(1..5); say $a␤                    ^ HERE␤]
13:04 bacek pugs: my @a=(1..5); my @b=@a; @a[0]=7; say ~@a; say ~@b;
13:04 exp_evalbot OUTPUT[7 2 3 4 5␤1 2 3 4 5␤]
13:05 ruoso pugs: my $a; my $b = (1,2,3); VAR($a).STORE($b); say $a;
13:05 exp_evalbot OUTPUT[*** No such method in class Scalar: "&STORE"␤    at /tmp/86xZKKM6zV line 1, column 25-42␤]
13:05 ruoso kp6: my $a; my $b = (1,2,3); VAR($a).STORE($b); say $a;
13:05 exp_evalbot kp6 r20646: OUTPUT[123␤]
13:05 ruoso kp6: my @a; my $b = (1,2,3); VAR(@a).STORE($b); say $a;
13:05 exp_evalbot kp6 r20646: OUTPUT[␤]
13:05 ruoso kp6: my @a; my $b = (1,2,3); VAR(@a).STORE($b); say @a;
13:06 exp_evalbot kp6 r20646: OUTPUT[123␤]
13:06 ruoso kp6: my @a; my $b = (1,2,3); @a.STORE($b); say @a;
13:06 exp_evalbot kp6 r20646: OUTPUT[␤]
13:06 bacek pugs: my $a=(1..5); my @b=$a; say ~@b;
13:06 exp_evalbot OUTPUT[1 2 3 4 5␤]
13:06 * bacek thinks that everything just works...
13:07 ruoso bacek, the question is if every variable is a container, and if every container can STORE
13:07 ruoso S12 seems to imply that @a can't STORE
13:08 ruoso the thing is...
13:08 moritz_ TimToady mentioned that the scalar container forwards methods to its contents, while all other containers don't
13:09 moritz_ so @a.STORE only works, if STORE is specced in the role that the '@' sigil implies
13:09 moritz_ which is Positional, iirc
13:09 ruoso If I can't VAR(@a).STORE(...), then I can't replace the array inside a variable, which means that @a = (1,2,3); @a = (2,3,4) would not destroy the first array, but replace the items on that same array
13:10 ruoso which is odd
13:11 moritz_ let's wait for the allmighty TimToady to clarify it ;)
13:11 ruoso I was expecting to implement @a = (1,2,3) as VAR(@a).STORE(1,2,3), which can actually replace the array
13:11 ruoso and would make a real difference on bind × assign
13:20 meppl joined #perl6
13:23 ruoso ok... thinking better... I realised I'm confusing things out...
13:24 ruoso every variable points to a container, this is how bind can work. binding works by replacing the container...
13:24 ruoso but this is not necessarly visible to the language
13:25 jhorwitz joined #perl6
13:25 ruoso VAR($a) is necessary because all other variables have alternative access methods to the values... @a[0] or %a<foo>
13:25 ruoso but this is at syntax level
13:26 TJCRI joined #perl6
13:26 ruoso therefore there's no way to confuse when you're calling a method on a value or on the variable itself
13:27 ruoso $a.foo is always a method call on the value inside the scalar, while @a.foo is always a method call on the variable @a
13:27 ruoso which means
13:28 ruoso $a.foo is actually ____RESOLVE_VARIABLE_NAME___('$a').FETCH.foo
13:29 ruoso and
13:29 ruoso @a.foo is actually ____RESOLVE_VARIABLE_NAME___('@a').foo
13:29 lambdabot Unknown command, try @list
13:29 wknight8111 joined #perl6
13:29 ruoso not that yet, actually...
13:30 ruoso $a.foo is actually ____RESOLVE_VARIABLE_NAME___('$a').cell.FETCH.foo
13:30 ruoso @a.foo is actually ____RESOLVE_VARIABLE_NAME___('@a').cell.foo
13:30 cmarcelo joined #perl6
13:31 ruoso @a := @b is ___RESOLVE...___('@a').cell = ___RESOLVE...___('@b').cell
13:31 ruoso where ___RESOLVE...___ is the implementation specific way of resolving the variable name...
13:32 ruoso or, trying to keep the API sane...
13:32 smtms joined #perl6
13:32 ruoso @a := @b is ___RESOLVE...___('@a').STORE(_​__RESOLVE...___('@b').FETCH())
13:32 ruoso @a.foo is ____RESOLVE_VARIABLE_NAME___('@a').FETCH.foo
13:32 iblechbot joined #perl6
13:32 ruoso $a.foo is ____RESOLVE_VARIABLE_NAME___('$a').FETCH.FETCH.foo
13:33 * moritz_ is missing the ___METHOD_DISPATCH for calling foo ;-)
13:33 ruoso well... if we're going that way... we're missing the __METHOD_DISPATCH for the __RESOLVE...__ also
13:34 ruoso ;)
13:34 ruoso but you think I got my sanity back?
13:35 moritz_ no, that's lost forever ;)
13:35 ruoso heh
13:37 ruoso which is the syntax for looking for a variable by name in p6?
13:39 ruoso does that exposes the variable container itself?
13:39 pmurias ruoso: you should be able to do @a.STORE(...) or equivalent
13:39 ruoso pmurias, STORE doesn't seem to be part of the Array API
13:41 pmurias how can i assing multiple values into an array?
13:42 pmurias to get a variable by name you can use ::{'name'}
13:43 pmurias S03:1734
13:44 pmurias where is the Array API defined?
13:44 ruoso S29
13:45 pmurias seems to miss postifx:<[]> at least
13:48 pmurias ruoso: the ___RESOLVE_VARIABLE_NAME___ seems to be some sort of method on the current lexical pad
13:48 ruoso yes..
13:49 ruoso ::{'$name'} is that same thing? or is that only for package variables
13:49 moritz_ only for package vars iirc, same as in p5
13:49 pmurias no
13:50 moritz_ although I'm not entirely sure, because you can access pseudo-packages like ::OUTER
13:50 moritz_ which are lexical pad
13:51 ruoso MY is optional to limit the lookup
13:51 pmurias it's S02:1734
13:51 pmurias he null pseudo-package is reserved to mean the same search list as an ordinary
13:51 ruoso ::('$foo') looks up for any variable visible by this scope
13:52 pmurias name search
13:52 ruoso ::('$MY::foo') looks only for variable defined in this scope
13:52 ruoso ::('MY::$foo') actually
13:52 ruoso and ::('OUR::$foo') looks only for package variables
13:53 ruoso so....
13:53 ruoso the last question is now...
13:53 ruoso does ::('...') returns the container itself?
13:53 pmurias yes
13:54 pmurias or rather no ;)
13:54 ruoso so @a := @b is the same as ::('@a').STORE(::('@b').FETCH())
13:54 pmurias looks reasonable
13:55 ruoso oh... actually it looks like I have to imply the context when using ::
13:55 ruoso it seems that the above code is not legal...
13:55 pmurias use ::<@a> then
13:55 ruoso although I would advocate it for accessing the container itself
13:55 ruoso pmurias, I mean It should have a sigil before
13:56 ruoso $::<@a>
13:56 ruoso instead of
13:56 ruoso ::<@a>
13:56 pmurias no
13:56 pmurias ::<@a> is legal
13:56 [particle] :: is a sigil, and ::() is an operator
13:56 pmurias it's a diffrent thing
13:57 TJCRI left #perl6
13:57 pmurias it's expalined at S02:1734
13:58 ruoso @a[0] could be written as ::('@a').postfix:[](0)
13:58 pmurias *explained
13:58 moritz_ why is just everything in S02? ;-)
13:58 pmurias ruoso: is ::('@a') legal?
13:58 ruoso or would it be
13:58 ruoso @a[0] could be written as ::('@a').FETCH.postfix:[](0)
13:58 moritz_ isn't [0] a postcircumfix?
13:58 pmurias moritz_: it's Bits and Pieces and there are a lot of those ;)
13:59 diakopter Here's my version of statement list: rule stmtList { $Statement  -  o(($StmtTrm - $StmtList) | ($StmtTrm - $Block - o($NewLine - $StmtList)));
13:59 diakopter }
13:59 ruoso pmurias, I'm looking at the specs in the browser, could you please provide me a quote instead of the line number?
13:59 diakopter (where "-" means 'concatenate' (mandatory follow) and o() means optional
14:00 diakopter )
14:00 pmurias ruoso: ok
14:00 moritz_ ruoso: just use the irc logs, there the line number points to the right piece in the spec
14:00 ruoso moritz_, thanks
14:00 pmurias http://perlcabal.org/syn/S02.html#line_1734
14:00 lambdabot Title: S02
14:02 ruoso ok... that implies that ::('@a') is really the same as @a
14:03 pmurias ruoso: can one use () brackets instead of {}?
14:04 ruoso pmurias, both seem to be used in S02
14:04 ruoso pmurias, but ::{} seems to be used only for package lookup
14:10 diakopter revised stmtList: ($Statement  -  o(($StmtTrm - $StmtList) | ($StmtTrm - $Block - o($BlockList)))) | ($Block - o($BlockList))
14:11 ruoso joined #perl6
14:12 ruoso gah... i hate pressing ctrl+alt+backspace by accident
14:20 pmurias ruoso: what were you trying to press?
14:20 acmoore joined #perl6
14:21 ruoso I change desktops using ctrl+alt+arrows
14:21 pmichaud (rakudo doesn't implement VAR() yet, fwiw)
14:21 ruoso then I want to backspace on the text editor
14:21 ruoso and I do it too fast
14:21 broquaint joined #perl6
14:28 pmurias diakopter: why don't you use strict? ;)
14:39 moritz_ rakudo: subset Even of Int where { $_ % 2 == 0 }; my Even $x = 2; say $x
14:39 exp_evalbot rakudo r28059 OUTPUT[2␤]
14:40 moritz_ rakudo: subset Even of Int where { $_ % 2 == 0 }; my Even $x = 3; say $x
14:40 exp_evalbot rakudo r28059 OUTPUT[Type mismatch in assignment.␤current instr.: 'parrot;Perl6Object;infix:=' pc 65 (src/gen_builtins.pir:51)␤
14:40 moritz_ YaY
14:41 r0bby joined #perl6
14:54 ruoso I think when SMOP gets there, there will be another implementation specific macro to get the variable container, as there is for ___RI___($obj)
14:55 ruoso so @a := @b can be translated to ___VC___('@a').STORE(___VC__('@b').FETCH()) in SMOP
14:56 ruoso and ::('@a') is actually ___VC__('@a').FETCH
15:00 pugs_svnbot r20647 | moritz++ | [spec] added test for 'subset' with code assertions
15:03 moritz_ pugs: say 3.5 ~~ 3..4
15:03 exp_evalbot OUTPUT[␤]
15:09 pugs_svnbot r20648 | moritz++ | [spec] tests for subset with ranges
15:09 pugs_svnbot r20649 | avar++ | 4 tests were erroneously marked as a parsefail on rakudo, 2 of them fail though.
15:10 ispy_ joined #perl6
15:12 pugs_svnbot r20650 | avar++ | Rakudo can parse is(int('3e4d5'), 3e4, "int('3e4d5') is 3e4");, removed as parsefail
15:16 avar pmichaud: `todo "reason"# mark "todo" because "not ok" is expected'
15:16 avar Why wouldn't one just want those to show up as failed in the test output?
15:17 avar not ok is good, skipping the entire file because of a parse failure isn't
15:17 pmichaud I don't understand the question.
15:17 moritz_ avar: because one wants a clean output of "make spectest_regression"
15:17 pmichaud "todo" means "we know this fails, and we'll fix it eventually but not right now."
15:18 moritz_ if the output of a test run isn't clean, it's harder to track new regressions
15:20 pmichaud I'd like us to get rid of the "parsefail" and "can't parse" error messages, though
15:20 pmichaud it should be "rakudo can't parse 3e4d5"  or "CATCH not implemented"  instead of "can't parse"
15:20 pmichaud and ideally with an RT ticket associated with it :-)
15:20 pmichaud e.g., "CATCH not implemented, RT#55555"
15:21 avar oh well, I broke the test suite then:)
15:23 bacek pugs: say $!
15:23 exp_evalbot OUTPUT[␤]
15:23 bacek rakudo: say $!
15:23 exp_evalbot rakudo r28059 OUTPUT[Null PMC access in clone()␤current instr.: 'parrot;List;clone' pc 1670 (src/gen_builtins.pir:1265)␤
15:23 bacek gotcha!
15:24 pmichaud known bug.  :-)
15:25 bacek pmichaud, how old?
15:25 pmichaud bacek: we already know that rakudo doesn't quite handle $_, $!, and $/ properly.
15:25 pmichaud haven't had a chance to fix them.
15:26 bacek pmichaud, ok.
15:27 avar sh-3.1$ ../../parrot perl6.pbc -e 'say int(Inf) eq Inf '
15:27 avar 0
15:27 avar sh-3.1$ ../../parrot perl6.pbc -e 'say int(-Inf) eq -Inf'
15:27 avar 1
15:27 avar == says they're both equivalent
15:27 pmichaud Inf not implemented.
15:28 pmichaud or, at least, the implementation isn't well defined yet in rakudo/Parrot.
15:28 avar it's passed to parrot's iseq(string, string)
15:29 pmichaud well, yes, since you used 'eq'  :-)
15:30 ispy_ joined #perl6
15:33 avar the test suite did
15:36 pmichaud right now   rakudo probably thinks that 'Inf' is a type, since it begins with a capital letter.
15:36 pmichaud so essentially this is all comparing undefs.  :-P
15:37 ruoso doesn't it complains about unknown types?
15:37 [particle] that's "advanced"
15:37 [particle] rakudo doesn't have a registry for that yet
15:37 pmichaud we don't have a good mechanism yet for looking up types, so we cheat at the moment.
15:38 ruoso oh... I see...
15:38 alanhaggai joined #perl6
15:38 ruoso this is one important confusing point
15:38 ruoso because there is class and there is package
15:39 ruoso they are not the same thing, but one implies the other
15:39 ruoso or not...
15:39 meppl good night
15:40 pmichaud right, but so far it hasn't been an issue for us.
15:40 [particle] parrot does NameSpace has-a Class
15:41 [particle] but rakudo is free to do whatever on top of that
15:41 ruoso I think you have two namespace hashes actually... one for Package and other for Class/Type/Role/Whatever
15:41 pugs_svnbot r20651 | moritz++ | [spec] re-fudged some failing test (unfudged by avar++)
15:42 armagad joined #perl6
15:44 ruoso I know a class must have a package
15:45 ruoso because the default method dispatch assumes that
15:45 PerlJam you mean a class is a package.
15:45 ruoso PerlJam, not really...
15:46 moritz_ a class implies a package
15:46 moritz_ just like a module implies a package
15:46 ruoso a syntatically-defined-class implies a package
15:46 PerlJam or perhaps "class does package"
15:46 ruoso a programatically-defined-class doesn't
15:48 ruoso a foreign-language-class also doesn't imply a package
15:48 ruoso but you still must have a way to find it
15:48 alanhaggai_ joined #perl6
15:49 ruoso I think the "NameSpace has Class, Package, Role ..." thing might be the way to do it
15:49 ruoso like p5 does with globs
15:50 ruoso then you can register a named Class defined within an anonymous package
15:52 ruoso or maybe I just lost my mind again
15:52 ruoso but PerlJam is probably right... a Class is a Package
15:52 orafu joined #perl6
15:53 PerlJam Well, according to S10 "modules and classes are declared with separate keywords, but they're still just packages with extra behaviors."
15:54 moritz_ PerlJam: oh come on, everybody can settle things by quoting the specs ;-)
15:54 PerlJam :)
15:55 ruoso pugs: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say a.bar();
15:55 exp_evalbot OUTPUT[*** No such subroutine: "&a"␤    at /tmp/jPt49V0EKI line 1, column 97-104␤]
15:55 ruoso pugs: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar();
15:55 exp_evalbot OUTPUT[1␤]
15:55 ruoso pugs merges both...
15:55 ruoso rakudo: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar();
15:55 exp_evalbot rakudo r28059 OUTPUT[Could not find non-existent sub return␤current instr.: 'parrot;Foo;bar' pc 218 (EVAL_11:110)␤
15:55 ruoso rakudo doesn't
15:56 ruoso kp6: class Foo { method bar { return baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar();
15:56 exp_evalbot kp6 r20651: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/Ki​ndaPerl6/Runtime/Perl5/MOP.pm line 345␤    KindaPerl6::Runtime::Perl5::MO​P::__ANON__('HASH(0x824cafc)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Ki​ndaPerl6/Runtime/Perl5/MOP.pm line 169␤
15:56 exp_evalbot ..main::DISPATCH('HASH(0x824cafc)', 'APPLY') called at compiled/perl5-kp6-mp6/lib/Kin...
15:57 moritz_ rakudo: class Foo { method bar {  baz() } }; module Foo { sub baz { 1 } }; my $a = Foo.new(); say $a.bar();
15:57 exp_evalbot rakudo r28059 OUTPUT[1␤]
15:57 moritz_ rakudo is just missing return()
15:57 ruoso ah
15:57 ruoso ok
15:57 moritz_ which would make another 100+ tests pass
15:57 moritz_ or probably much more
15:58 [particle] we have all we need to create return for rakudo except tuits iirc
15:58 moritz_ is it implemented in PAST?
15:58 PerlJam moritz_: watch it with the 4 letter words.
15:58 [particle] no, it needs to go there first
15:59 PerlJam moritz_: for instance, time travel is possible; we *just* need a wormhole   ;)
16:00 moritz_ I concure, implementing perl 6 is mostly blocking on tuits
16:00 ruoso hmm... in the end there isn't much difference from Class and Module
16:00 ruoso except for Syntax, of course
16:00 moritz_ ruoso: modules don't support polymorphism and inheritance I suspect
16:01 ruoso moritz_, neigther do classes... it's the dispatching of a particular object that does
16:01 [particle] unless mixed in
16:01 pmurias ruoso: modules don't have a .HOW()
16:02 ruoso of course they do...
16:02 ruoso they are objects too
16:02 pmurias /me--
16:03 ruoso and that makes things even more complicated
16:03 ruoso because if I'm supposed to merge Classes and Modules with the same name
16:03 ruoso into a single package
16:03 ruoso (as it would be natural in P5)
16:04 ruoso there's no point in having them at all (again, except for syntax)
16:04 pmurias you mean of having a distinction?
16:04 ruoso in the runtime sense...
16:05 ruoso the difference is that method invocation is different from sub invocation
16:05 moritz_ really? isn't method invocation just a sub invocation with a fixed 'self'?
16:06 sscaffidi joined #perl6
16:06 ruoso but method invocation implies OO semantics (inheritance and stuff)
16:06 ruoso sub invocation doesn't
16:06 ruoso and I think that's the purpose of submethod, which is a sub that have a fixed self
16:07 * moritz_ wonders why ruoso unifies everything but can't unify method and sub calls
16:07 moritz_ Grand Unified Perl 6 of Everything
16:07 PerlJam moritz_: what's the "self" in a sub call.
16:07 ruoso moritz_, because there must be some way of differentiating them...
16:07 PerlJam ?
16:07 ruoso because sub doesn't inherit
16:07 moritz_ PerlJam: dunno, never really thought of it
16:08 Southen_ joined #perl6
16:08 PerlJam moritz_: if you can come up with a good enough answer I may be swayed towards believing the unification of subs and methods is possible and maybe even desirable.
16:08 moritz_ PerlJam: maybe the package?
16:09 moritz_ but I'm too distracted to actually think it through
16:09 moritz_ (and I lack OO knowledge for it)
16:09 [particle] module Foo { sub new(...) { ... } }; my $x = Foo.new; # can this work?
16:09 PerlJam ruoso: subs not inheriting is easy though.  Just make sure whatever class the sub belongs to doesn't have a parent.
16:10 ruoso [particle], yes... but in theory, it's not inheritable
16:10 ruoso PerlJam, the problem is when you mix a module with a class
16:11 [particle] ruoso: are you sure you don't have to call Foo::new?
16:12 ruoso [particle], I am... method dispatch falls back to subroutine dispatch, placing the invocant as first argument
16:12 [particle] ah, right. ok.
16:12 pmurias can one have both a a sub foo and a method foo
16:12 pmurias ?
16:12 ruoso I don't think so
16:13 ruoso at least now that I realised Module and Class must be merged in runtime
16:13 elmex_ joined #perl6
16:14 diakopter pmurias: :P  actually it can use strict now that I gave up on the require-time symbol table mods
16:14 PerlJam yes, you can have a sub foo and a method foo (Because the method belongs to a particular class)
16:14 ruoso pugs: module Foo { sub bar { say 'Hi' } }; class Bar is Foo { method foo { self.bar() } }; Foo.new.foo
16:14 exp_evalbot OUTPUT[*** No such method in class Foo: "&foo"␤    at /tmp/igYTDbq6gj line 1, column 86 - line 2, column 1␤]
16:14 ruoso pugs: module Foo { sub bar { say 'Hi' } }; class Bar is Foo { method foo { self.bar() } }; Bar.new.foo
16:14 exp_evalbot OUTPUT[Hi␤]
16:15 [particle] diakopter: can you make parrotvm.org point to a parrot-related site, instead of perl 6-related?
16:15 moritz_ [particle]: I think that would break many links to the parrot svn mirror
16:15 ruoso I'm not sure pugs behaviour is correct...
16:16 [particle] moritz_: i don't want the svn diffs pointing somewhere else, just the front page
16:16 [particle] when someone types http://parrotvm.org, it's confusing to land on a page about perl 6
16:16 lambdabot Title: Perl6 Community Development Server
16:17 diakopter is it a good sign that the best syntax highlighter in my text editor for STD.pm is to tell it it's Ruby?
16:17 moritz_ diakopter: use vim + perl6.vim
16:18 diakopter I don't know if Notepad++ will use perl6.vim
16:18 vixey @karma Notepad
16:18 lambdabot Notepad has a karma of 2
16:18 moritz_ that's cheating
16:18 diakopter [particle]: I don't know; currently it's all on the same vhost in apache2
16:18 moritz_ just like C--
16:18 diakopter (Notepad++)++
16:19 diakopter [particle]: do you want to buy the domain from me? :P  (kidding)
16:19 moritz_ ;)
16:19 * moritz_ has secured rakudo.de
16:19 moritz_ and perl-6.de, I was too late for perl6.de
16:20 diakopter [particle]: I guess it could be on a separate vhost from the perlsix.* domains
16:20 alanhaggai joined #perl6
16:20 diakopter its config file would merely need duplicated.
16:20 [particle] i'm really weak with dns stuff, so i trust you know what you're talking about :)
16:20 diakopter since SVN::Web uses a common cache, it wouldn't be any more of a resource bog
16:21 [particle] (common cache)++
16:21 diakopter TimToady: you around?  I have some suggestions for simplifying the statement/terminator/expression handling in STD.pm
16:21 pugs_svnbot r20652 | moritz++ | [t] updated deprecated-syntax.pod
16:22 Khisanth hrm some stuff is already deprecated?
16:22 [particle] stuff gets deprecated all the time
16:22 elmex joined #perl6
16:23 [particle] when better syntax or more abstractions are found
16:23 [particle] .oO(i don't think there's ever been a deprecation in perl 6 because something is too abstract)
16:24 moritz_ Khisanth: in that file some artifacts of the old test suite are documented. Some of it had been legal Perl 6 before, some never was
16:24 diakopter people deprecate Perl 6 all the time :)
16:24 diakopter along with denigrate...
16:25 Khisanth heh
16:26 [particle] perl 5 is self-deprecating
16:26 Khisanth well I expected thing to be deprecated(instead of removed) when things are changed but you want to keep backwards compatibility but I am not sure what would exist that would need backwards compatibility at this point
16:26 moritz_ diakopter: the German perl community is very anti Perl 6 biased :/
16:27 moritz_ Khisanth: the whole point of Perl 6 is to break backwards compatibilty. Otherwise we could just have morphed Perl 5 into what we want
16:27 * Patterner likes Perl6
16:27 diakopter actually, I take that back.  the C# highlighting is far superior; the function list it generates is most complete.
16:28 Khisanth moritz_: that would make deprecation even stranger!
16:28 diakopter and yet, Pugs seems to run Perl 5 code without problem, even after 'use v6'
16:29 moritz_ pugs: use v6; print "yes" if "\n" =~ m/./
16:30 exp_evalbot OUTPUT[*** ␤    Unexpected "m"␤    There is no =~ operator in Perl 6 -- did you mean ~~ (match) or ~= (concat-assign)?␤    at /tmp/bclp6wXUoE line 1, column 32␤]
16:30 moritz_ pugs: use v6; print "yes" if "\n" ~~ m/./
16:30 exp_evalbot OUTPUT[yes]
16:30 moritz_ diakopter: I can't confirm that
16:31 Khisanth diakopter: but is that with or without embedding perl5? :)
16:37 sscaffidi_ joined #perl6
16:42 diakopter moritz_: ok.  I guess I meant its ability to 'use' Perl 5 modules.
16:43 Psyche^ joined #perl6
16:46 diakopter my point is that even though backward compatibility is broken, as TimToady said, the /usr/bin/perl that implements Perl 6 must be able to run Perl 5 as well.  And the ability to import (at least many) Perl 5 modules, whether with perl5 embedded or linked or caged or virtualized or whatever, kindof makes the broken backward compatibility a non-issue.
16:50 diakopter besides, many (most) places don't upgrade their perl5 anyways for production systems, for fear of breaking things (because they don't have tests or don't have time to test or whatever).  At my previous employer, I built several special builds of a newer perl for several systems... Some of the processes were chaining three builds of perl5.
16:51 Alias__ joined #perl6
16:51 diakopter I meant (most?)
17:03 Alias__ joined #perl6
17:04 rakudo_svn r28060 | particle++ | [rakudo] eval: propagate $! to caller (bacek++)
17:20 ruoso diakopter, I'm not sure anymore that we'll have /usr/bin/perl as perl 6 (such as rakudo or any other implementation)
17:20 Alias_ joined #perl6
17:21 ruoso diakopter, I, now, tend to believe that we'll have perl 5.12 embedding perl 6 (whichever implementation) on the moment some code does "use v6";
17:22 ruoso and probably p5 will in fact be morphed, but to support different runloops and interpreters
17:22 avar what makes you think that?
17:23 ruoso we have too many modules that uses XS
17:23 ruoso that's not going away
17:23 avar No I mean the part about 5.12 and p5 being morphed
17:23 ruoso there are already tricks inside p5 to implement method dispatching as new OPs
17:23 xinming ruoso: What I believe is, we might have a perl 5 implementation based on bootstraped perl 6. ;-)
17:24 ruoso xinming, p5 has too much magic to be re-implemented
17:24 ruoso and having alternative dispatchings in the interpreter is the key of merging the execution of different interpreters
17:24 xinming and the perl 6 is bootstraped by perl 5. so, the original perl 5 still lives, but with changed role.
17:25 xinming well, just guessing. :-)
17:26 ruoso TimToady pointed that there are some parts of p5 that uses the C stack... once that is fixed, and different dispatching mechanisms can be integrated in p5
17:26 ruoso we could have the execution being switched from p5 and, i.e., smop
17:26 ruoso without extra overhead
17:28 xinming ruoso: from your words, IMHO It'll probably take over 6 year to have a useful perl 6. >_<
17:28 ruoso xinming, not really...
17:28 ruoso you'll just have /usr/bin/rakudo, /usr/bin/smop, /usr/bin/perl6
17:29 xinming ruoso: well, Just my logic. you said about 5.12. :-D
17:29 ruoso the point is... it's not the same runtime, therefore, it's not the same language...
17:30 ruoso at the point we have perl 6 runtime done, we can start interoperating perl5 with perl6
17:30 ruoso (actually we don't need to wait before we start it...)
17:31 ruoso but there are some important differences in the p5 interpreter for this 'runtime merge' to work well...
17:31 * diakopter ponders
17:31 ruoso we'll probably have the p6 implementations successfully embedding p5 and vice-versa
17:32 ruoso but that won't mean that we can have /usr/bin/perl pointing to a perl6 implementation
17:32 Auzon rakudo: my $sub = sub {say "1234"}; $sub();
17:32 exp_evalbot rakudo r28060 OUTPUT[1234␤]
17:32 Auzon hi all
17:32 ruoso hi Auzon
17:32 moritz_ hi Auzon
17:32 xinming hi Auzon
17:33 Auzon I'm writing tests for sprintf, and I loathe how system dependent it is.
17:36 Auzon perl6: say sprintf('%d', 1234);
17:36 exp_evalbot kp6 r20652: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/Ki​ndaPerl6/Runtime/Perl5/MOP.pm line 345␤    KindaPerl6::Runtime::Perl5::MO​P::__ANON__('HASH(0x824bd9c)', 'APPLY', 'HASH(0x8e4dce8)', 'HASH(0x8e522e0)') called at
17:36 exp_evalbot ..compiled/perl5-kp6-mp6/lib/K​indaPerl6/Runtime/Perl5/MOP.pm line 169␤        main::DISPATCH('HASH(0x824bd9c)', 'APPLY', 'H...
17:36 exp_evalbot ..pugs: OUTPUT[1234␤]
17:36 exp_evalbot ..rakudo r28060: OUTPUT[Could not find non-existent sub sprintf␤current instr.: '_block11' pc 35 (EVAL_10:19)␤
17:36 exp_evalbot ..elf r20652: OUTPUT[1234␤]
17:36 ruoso Auzon, it shouldn't be much, unless "use locale" is in effect (assuming "use locale" is valid Perl 6)
17:36 Auzon pugs: say sprintf('%u', -1);
17:36 exp_evalbot OUTPUT[*** Ix{Integer}.index: Index (-1) out of range ((0,15))␤    at /tmp/e1f8fnTGjH line 1, column 1-22␤]
17:38 Auzon ruoso: The difference I found (which is from P5, but P6's sprintf is very similar to the P5 version from what I understand) is negative numbers in the unsigned types. On a 32 bit computer, they differ from a 64 bit computer
17:38 Auzon elf: say sprintf('%u', -1)
17:38 exp_evalbot OUTPUT[4294967295␤]
17:39 ruoso Auzon, well... but that type of cast is expected to be system dependent anyway
17:39 ruoso I could even argue that it deserves a warning
17:39 Auzon Mine gives 18446744073709551615, since I'm running 64 bit.
17:40 Auzon But yeah, a warning would make sense.
17:40 moritz_ I don't think any implementation does warnings yet
17:41 Auzon %e, %f, %g, and some others could benefit from using regexes with testing, but I'm uncertain how stable regexes are across implementations
17:42 moritz_ Auzon: do it anyway. They will stabilize
17:45 Auzon alright.
17:52 [particle] that's what fudge is for!
17:52 * moritz_ always thought that fudge was for eating ;)
17:52 Lorn joined #perl6
17:53 [particle] perl 6 compilers have to eat, too
17:54 moritz_ and test suite maintainers ;)
17:54 * moritz_ prepares in #perl6-soc report
17:55 ruoso but about interoperating p5 and p6... I'm curious to see how SMOP::P6Opaque+Moose::MetaInstance::SMOP::P6Opaque will behave in p5 (once it's implemented in SMOP and embeded in p5)
17:56 stevan_ ruoso: is there any p5 work involved in your SMOP grant :)
17:56 Auzon Out of curiosity, is it feasible to reimplement P5 regexes (minus code execution) in Parrot?
17:56 ruoso stevan_, nope... but it shouldn't be hard after the grant work is finished...
17:56 moritz_ Auzon: surely much more feasible than ordinary perl 5, and I think a subset is already done
17:56 moritz_ Auzon: perl 5 regexes are tested quite thoroughly
17:57 stevan_ ruoso: I am specifically wondering if your design allows for possibly replacing some of the Moose/MOP internals with some of the SMOP goodness
17:57 ruoso stevan_, in theory yes.
17:57 stevan_ since SMOP is based (somewhat) on MO, there is perhaps enough commonality in the underlying designs
17:57 rakudo_svn r28061 | pmichaud++ | [rakudo]:
17:57 rakudo_svn r28061 | pmichaud++ | * Refactor handling of exported methods into !EXPORT sub.
17:57 stevan_ and in the lower level components
17:58 ruoso stevan_, SMOP goes to the same abstraction level that MO....
17:58 ruoso nothingmuch was my zen master during this base design ;)
17:58 [particle] Auzon: PGE already has a Perl5Regex front end, but it hasn't been hooked up to rakudo yet
17:58 stevan_ re: Moose::MetaInstance::SMOP::P6Opaque - there is no some prior art on meta-instance extensions (MooseX::InsideOut and MooseX::GlobRef), so you might want to take a look :)
17:58 Lorn_ joined #perl6
17:59 stevan_ ruoso: coming to YAPC::NA and/or OSCON?
17:59 ruoso stevan_, no... it's kinda hard for a brazillian to get into the US this days ;)
18:00 cjfields joined #perl6
18:00 stevan_ ruoso: ah, ok
18:00 stevan_ I will write a letter to the state department asking for them to pick you up, you might have to stay in cuba a little while though
18:00 ruoso stevan_, but about the metainstance... I would need SMOP and SMOP::P6Opaque p5 modules first ;)
18:00 ruoso stevan_, heh
18:01 ruoso stevan_, that after finishing the grant work (which have p6opaque as the major milestone)
18:01 stevan_ ruoso: well if you make them decoupled enough, couldnt we maybe re-use the C code for SMOP::p6opaque?
18:01 ruoso stevan_, sure sure... the idea is really to embed smop inside p5
18:01 stevan_ :)
18:02 ruoso I'm curious on how the polymorphic-eval thing will behave with p5
18:02 stevan_ not very well I suspect
18:02 ruoso there are some tricks involving new OP definitions...
18:02 stevan_ although you should talk to clkao and nothingmuch about their recent perlguts diving
18:02 ruoso that should be saner to do than trying with XS
18:03 stevan_ yes
18:03 stevan_ nothingmuch was also playing with LLVM and p5 recently too, had some interesting results
18:03 ruoso interoperating them?
18:03 stevan_ compiling perl with LLVM
18:03 ruoso ah... ok...
18:03 stevan_ gcc-llvm to be exact
18:04 stevan_ was faster then native compile (according to perlbench)
18:04 stevan_ and llvm bytecode too
18:04 pugs_svnbot r20653 | diakopter++ | [yap6]
18:04 pugs_svnbot r20653 | diakopter++ | updated ROADMAP & TODO - the ROADMAP is more interesting.
18:05 stevan_ he can explain it much better then I can,. but it sounded very interesting
18:05 ruoso indeed ,it sounds
18:05 diakopter ruoso: have you seen libFIRM
18:05 ruoso diakopter, nope...
18:05 diakopter take a look sometime...
18:06 ruoso stevan_, what worries me more is if the missing stacklessness in p5 won't be a major problem interacting with smop
18:06 stevan_ diakopter: sounds not unsimilar to ML-RISC
18:06 stevan_ missing stacklessness?
18:07 diakopter oh, I didn't realize they'd released a free c-frontend
18:07 stevan_ diakopter: basically, build a intermedite graph repr and then apply aggresive optimizations to it
18:07 ruoso stevan_, I'm not completely aware of it yet... TimToady told me some parts of p5 are not stackless (in the C stack)
18:07 stevan_ hmm... i am no perlguts expert, but as far as I am aware the optree is stackless
18:07 pugs_svnbot r20654 | Auzon++ | [gsoc_spectest] Moved elems.t to spec area, added smartlink. Added 25 sprintf tests.
18:08 stevan_ maybe the regexp engine?
18:08 rakudo_svn r28063 | pmichaud++ | [rakudo]:
18:08 rakudo_svn r28063 | pmichaud++ | * Add more improvements to List (bacek++)
18:08 rakudo_svn r28063 | pmichaud++ | * Two additional subtests in t/spec/S29-list/grep.t now pass.
18:08 rakudo_svn r28063 | pmichaud++ | * Patch courtesy Vasily Chekalkin <bacek@bacek.com>
18:08 ruoso I didn't dive into it yet to find out what it is...
18:08 stevan_ ask around on #p5p someone will surely know
18:08 ruoso TimToady warned me that it could require a recompiled p5
18:10 ruoso I'll do it... as soon as I have something that will actually be testeable in p5
18:12 ruoso stevan_, but you made me curious... I'm going to ask there anyway... ;)
18:27 diakopter oh, I thought of a way to get around having to predeclare all these rules and rulerefs
18:27 schmalbe joined #perl6
18:28 diakopter have the first source filter write the generated predeclarations to another .pm as a mixin to the original and then use that .pm.... we'll see if it works.
18:29 cjfields joined #perl6
18:30 thestarslookdown joined #perl6
18:32 diakopter at the least, it will find the mixin the next run :P
18:46 lichtkind joined #perl6
18:47 lichtkind pugs: say 3;
18:47 exp_evalbot OUTPUT[3␤]
18:47 lichtkind ah
18:48 lichtkind pugs: %h = 3 => 'g'; + %h;
18:48 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "%h" requires predeclaration or explicit package name␤    at /tmp/DpDP5oeFbu line 1, column 3␤]
18:48 lichtkind pugs: %h = (3 => 'g'); + %h;
18:48 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "%h" requires predeclaration or explicit package name␤    at /tmp/kUxQPQG2lN line 1, column 3␤]
18:49 lichtkind pugs: my  %h = (3 => 'g');  %h.kv;
18:49 exp_evalbot RESULT[("3", "g")]
18:49 lichtkind pugs: my  %h = (3 => 'g');  %h.elems;
18:49 exp_evalbot RESULT[1]
18:49 lichtkind pugs: my  %h = (3 => 'g');  %h;
18:49 exp_evalbot RESULT[{("3" => "g"),}]
18:49 lichtkind pugs: my  %h = 3 => 'g';  %h;
18:49 exp_evalbot RESULT[{("3" => "g"),}]
18:49 lichtkind pugs: my  %h = 3 => 'g';  ~ %h;
18:49 exp_evalbot RESULT["3\tg\n"]
18:50 lichtkind pugs: my  %h = 3 => 'g';  + %h;
18:50 exp_evalbot RESULT[1]
18:50 lichtkind pugs: my  %h = 3 => 'g';  +%h;
18:50 exp_evalbot RESULT[1]
18:50 lichtkind pugs: my  %h = 3 => 'g';  ? %h;
18:50 exp_evalbot RESULT[Bool::True]
18:50 lichtkind pugs: my  %h = 3 => 'g';  %h;
18:51 exp_evalbot RESULT[{("3" => "g"),}]
18:51 lichtkind pugs: my  %h = 3 => 'g';  %h.keys;
18:51 exp_evalbot RESULT[("3",)]
18:51 lichtkind pugs: my  %h = 3 => 'g';  %h.pairs;
18:51 exp_evalbot RESULT[(("3" => "g"),)]
18:51 lichtkind pugs: my  %h = 3 => 'g';  %h.length;
18:51 exp_evalbot OUTPUT[*** No such method in class Hash: "&length"␤    at /tmp/zrrtkKGlch line 1, column 21-30␤]
18:52 lichtkind pugs++
18:52 lichtkind pugs: my  %h = 3 , 'g';  %h.pairs;
18:52 exp_evalbot RESULT[(("3" => "g"),)]
18:54 lichtkind sorry for poluting chat but my build dont work properly
18:56 b_jonas joined #perl6
18:56 diakopter lichtkind: you can msg the bot directly
18:57 lichtkind diakopter: how?
19:09 moritz_ lichtkind: /msg exp_evalbot pugs: say "do something"
19:14 braceta joined #perl6
19:16 moritz_ #perl6-soc in 15m
19:22 * ruoso home &
19:23 moritz_ TimToady++ # comparing Perl 6 with Klingon armies ;)
19:24 TimToady alas, my brain hasn't been good for much beyond that this week...
19:35 meppl joined #perl6
19:38 pmichaud pugs:   say (1).elems;
19:38 exp_evalbot OUTPUT[1␤]
19:38 IllvilJa joined #perl6
19:38 pmichaud pugs:   say 1.elems;
19:38 exp_evalbot OUTPUT[1␤]
19:38 pmichaud (thanks, pugs, evalbot)
19:38 pmichaud pugs: say undef.elems;
19:38 exp_evalbot OUTPUT[1␤]
19:44 mj41_ joined #perl6
19:45 alanhaggai_ joined #perl6
19:46 lambdabot joined #perl6
19:47 cjfields Is run.pugscode.org down?
19:48 moritz_ seems like
19:48 cjfields pugs: -v
19:48 exp_evalbot OUTPUT[*** No such subroutine: "&v"␤    at /tmp/4iFM1824OD line 1, column 1 - line 2, column 1␤]
19:48 cjfields d'oh
19:48 moritz_ pugs: say $?PUGS_VERSION
19:48 exp_evalbot OUTPUT[Perl6 User's Golfing System, version 6.2.13, October 17, 2006 (r18093)␤]
19:49 Khisanth implementation specific globals?
19:50 moritz_ at the moment, yes :(
19:51 cjfields latest pugs subversion is r20654, guess it isn't building easily
19:52 moritz_ cjfields: the changes that tried to adapt it to ghc 6.8.2 broke the build
19:52 sscaffidi joined #perl6
19:53 Khisanth pugs: $]
19:53 cjfields I thought so; I've been having problems building it with ghc 6.8.2
19:53 exp_evalbot OUTPUT[*** ␤    Unexpected "]"␤    expecting "::"␤    at /tmp/DaoFir5I6b line 1, column 2␤]
19:56 chris2 joined #perl6
19:59 araujo joined #perl6
20:01 pen1 joined #perl6
20:07 sscaffidi joined #perl6
20:07 xinming_ joined #perl6
20:13 crats joined #perl6
20:32 pugs_svnbot r20655 | moritz++ | [spec] fixed subset-range.t
20:39 ruoso joined #perl6
20:40 lichtkind /msg exp_evalbot pugs: @a = 1..4; say "@a[]"
20:40 pugs_svnbot r20656 | pmurias++ | [std5] replaced magic numbers with DEBUG::constant_name
20:40 rakudo_svn r28073 | Whiteknight++ | [rakudo] Removing trailing whitespace for t/codingstd/trailing_space warnings
20:41 lichtkind pugs: @a = 1..4; say "@a[]"
20:41 exp_evalbot OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "@a" requires predeclaration or explicit package name␤    at /tmp/Df0gEiwNwN line 1, column 3␤]
20:41 lichtkind /msg exp_evalbot @a = 1..4; say "@a[]"
20:43 pmurias TimToady: i have changed the debugging magic numbers, revert if i have done something incorrectly
20:45 ruoso btw... I've just realised that embedding SMOP in p5 is actually more important than I ever realised before..
20:47 cognominal_ perl6:  say '' ~~ / $ /
20:47 exp_evalbot kp6 r20656: OUTPUT[syntax error at position 7, line 1 column 7:␤say '' ~~ / $ ␤       ^ HERE␤]
20:47 exp_evalbot ..pugs: OUTPUT[␤]
20:47 exp_evalbot ..rakudo r28073: OUTPUT[␤]
20:47 exp_evalbot ..elf r20656: OUTPUT[syntax error at (eval 14) line 3, near """ ~"␤ at ./elf_f_faster line 4492␤]
20:48 cognominal_ perl6:  say 'a' ~~ / a $ /
20:48 exp_evalbot kp6 r20656: OUTPUT[syntax error at position 8, line 1 column 8:␤say 'a' ~~ / a $ ␤        ^ HERE␤]
20:48 exp_evalbot ..pugs: OUTPUT[␤]
20:48 exp_evalbot ..rakudo r28073: OUTPUT[a␤]
20:48 exp_evalbot ..elf r20656: OUTPUT[syntax error at (eval 14) line 3, near ""a" ~"␤ at ./elf_f_faster line 4492␤]
20:49 cognominal_ perl6:  say ?('' ~~ / $ /)
20:49 exp_evalbot kp6 r20656: OUTPUT[syntax error at position 4, line 1 column 4:␤say ?('' ~~ / $ /␤    ^ HERE␤]
20:49 exp_evalbot ..pugs: OUTPUT[1␤]
20:49 exp_evalbot ..rakudo r28073: OUTPUT[1␤]
20:49 exp_evalbot ..elf r20656: OUTPUT[syntax error at (eval 14) line 3, near """ ~"␤ at ./elf_f_faster line 4492␤]
20:52 renormalist joined #perl6
20:55 renormalist joined #perl6
20:56 pmurias ruoso: what are the problems caused by stackiness in interacting with smop?
20:56 ruoso not with smop, but with the thing stacking...
20:56 ruoso once that smop might want to call that interpreter again
20:58 ruoso but it looks like smop will be easily integrated into the p5 runloop
21:05 diakopter urk - what is dalek doing talking in #perl6
21:06 moritz_ diakopter: nothing?
21:06 diakopter oh, I'm getting irsii/screen artifacts.  first time in many many hours.
21:07 diakopter irssi
21:08 moritz_ diakopter: I sometimes get them too, when switching between channels
21:24 kaether joined #perl6
21:28 [particle]1 joined #perl6
21:32 tcliou_ joined #perl6
21:36 donaldh joined #perl6
21:41 pugs_svnbot r20657 | moritz++ | [spec] fudged one more test
22:01 rakudo_svn r28074 | particle++ | add eval_dies_ok and eval_lives_ok (bacek++ moritz++)
22:02 rakudo_svn r28075 | particle++ | [rakudo] more tests passing due to eval_dies_ok and eval_lives_ok (moritz++ bacek++)
22:17 rhr joined #perl6
22:20 xinming joined #perl6
22:36 IllvilJa joined #perl6
22:44 jferrero joined #perl6
22:48 sri_work joined #perl6
22:52 pugs_svnbot r20658 | Auzon++ | [gsoc_spectest] Revived t/TASKS for the tasks directly related to the test suite. I will be watching this file for test requests.
22:55 pugs_svnbot r20659 | diakopter++ | [yap6]
22:55 pugs_svnbot r20659 | diakopter++ | Added hand-drawn rules for blocks (incl subs/variants)
22:55 pugs_svnbot r20659 | diakopter++ | Refactored rules to work more like a full-blown re engine
22:55 pugs_svnbot r20659 | diakopter++ | Take a look at the diff..... it's fun.
22:56 diakopter <-- decommuter
23:05 simcop2387 joined #perl6
23:07 IllvilJa joined #perl6
23:28 meppl joined #perl6
23:31 Auzon pugs: say ('%x' x 10).perl
23:31 exp_evalbot OUTPUT["\%x\%x\%x\%x\%x\%x\%x\%x\%x\%x"␤]
23:31 Auzon pugs: my @a = 'a' .. 'i'; say sprintf('%x' x 10, @a);
23:31 exp_evalbot OUTPUT[*** Insufficient arguments to sprintf␤    at Prelude.pm line 668, column 13-53␤]
23:31 Auzon pugs: my @a = 'a' .. 'i'; say sprintf(('%x' x 10), @a);
23:31 exp_evalbot OUTPUT[*** Insufficient arguments to sprintf␤    at Prelude.pm line 668, column 13-53␤]
23:32 Auzon pugs: my @a = 'a' .. 'i'; say sprintf(('%x' x 10), *@a);
23:32 exp_evalbot OUTPUT[*** ␤    Unexpected "a"␤    expecting term postfix, operator, ":" or ")"␤    at /tmp/NOK3MM0AJM line 1, column 48␤]
23:34 Auzon perl6: my @a = 'a' .. 'i'; say sprintf(('%x' x 10), @a);
23:34 exp_evalbot kp6 r20659: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/Ki​ndaPerl6/Runtime/Perl5/MOP.pm line 345␤    KindaPerl6::Runtime::Perl5::MO​P::__ANON__('HASH(0x824bfac)', 'APPLY', 'HASH(0x8e524d0)', 'HASH(0x8e521c4)') called at
23:34 exp_evalbot ..compiled/perl5-kp6-mp6/lib/K​indaPerl6/Runtime/Perl5/MOP.pm line 169␤        main::DISPATCH('HASH(0x824bfac)', 'APPLY', 'H...
23:34 exp_evalbot ..pugs: OUTPUT[*** Insufficient arguments to sprintf␤    at Prelude.pm line 668, column 13-53␤]
23:34 exp_evalbot ..rakudo r28075: OUTPUT[Could not find non-existent sub sprintf␤current instr.: '_block11' pc 92 (EVAL_11:32)␤
23:34 exp_evalbot ..elf r20659: OUTPUT[Argument "a" isn't numeric in range (or flip) at (eval 14) line 3.␤Use of uninitialized value in range (or flip) at (eval 14) line 3.␤Argument "i" isn't numeric in range (or flop) at (eval 14) line 3.␤Use of uninitialized value in range (or flop) at (eval 14) line 3.␤Use of
23:34 exp_evalbot ..uninitialized value in sprintf at ./elf_f_faster line 261.␤Use of...
23:35 Auzon duhhh.
23:35 Auzon perl6: my @a = 10 .. 20; say sprintf(('%x' x 10), @a);
23:35 exp_evalbot kp6 r20659: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/Ki​ndaPerl6/Runtime/Perl5/MOP.pm line 345␤    KindaPerl6::Runtime::Perl5::MO​P::__ANON__('HASH(0x824bfac)', 'APPLY', 'HASH(0x8e524d0)', 'HASH(0x8e521c4)') called at
23:35 exp_evalbot ..compiled/perl5-kp6-mp6/lib/K​indaPerl6/Runtime/Perl5/MOP.pm line 169␤        main::DISPATCH('HASH(0x824bfac)', 'APPLY', 'H...
23:35 exp_evalbot ..pugs: OUTPUT[abcdef10111213␤]
23:35 exp_evalbot ..rakudo r28076: OUTPUT[Could not find non-existent sub sprintf␤current instr.: '_block11' pc 92 (EVAL_11:32)␤
23:35 exp_evalbot ..elf r20659: OUTPUT[Use of uninitialized value in range (or flip) at (eval 14) line 3.␤Argument "" isn't numeric in sprintf at ./elf_f_faster line 261.␤Use of uninitialized value in sprintf at ./elf_f_faster line 261.␤Use of uninitialized value in sprintf at ./elf_f_faster line 261.␤Use of
23:35 exp_evalbot ..uninitialized value in sprintf at ./elf_f_faster line 261.␤Use of uni...
23:37 Auzon Originally, I thought @a.sprintf('%x ' x @a.elems); would be a neat idea. But I no longer see a use for it.
23:38 Auzon well, @a.sprintf('%x') was my original idea. But map() solves that.
23:41 TimToady pugs: say [10..20].fmt('%x')
23:41 exp_evalbot OUTPUT[a b c d e f 10 11 12 13 14␤]
23:41 Auzon Yeah, that. :)
23:41 rakudo_svn r28078 | pmichaud++ | [rakudo]:
23:41 rakudo_svn r28078 | pmichaud++ | * More List class refactoring.  This commit temporarily breaks
23:41 rakudo_svn r28078 | pmichaud++ |   S29-list/sort.t due to an odd Parrot bug, which I'm looking at
23:41 rakudo_svn r28078 | pmichaud++ |   now.
23:42 TimToady pugs: say [10..20].fmt('%x').join('')
23:42 exp_evalbot OUTPUT[␤]
23:42 Auzon pugs: say [10..20].fmt('%x').perl
23:42 exp_evalbot OUTPUT["a b c d e f 10 11 12 13 14"␤]
23:42 TimToady pugs: say [10..20].fmt('%x').join
23:42 exp_evalbot OUTPUT[␤]
23:42 TimToady hmm
23:43 TimToady pugs: say [10..20].fmt('%x').elems
23:43 exp_evalbot OUTPUT[1␤]
23:43 TimToady that seems wrongish
23:43 Auzon I don't see .fmt in S29 either.
23:44 Auzon pugs: say [10..20].fmt('%x', "\n")
23:44 exp_evalbot OUTPUT[a␤b␤c␤d␤e␤f␤10␤11␤12␤13␤14␤]
23:44 TimToady S02:1348
23:44 Auzon yep, that's where I saw that
23:45 TimToady say "foo".join('')
23:45 TimToady pugs: say "foo".join('')
23:45 exp_evalbot OUTPUT[␤]
23:45 TimToady that's wrong
23:45 TimToady pugs say join('', 'foo')
23:46 Auzon pugs: say join('', 'foo')
23:46 exp_evalbot OUTPUT[foo␤]
23:46 Auzon perl6: say join('',  'foo'); say 'foo'.join('');
23:47 exp_evalbot kp6 r20659: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/Ki​ndaPerl6/Runtime/Perl5/MOP.pm line 345␤    KindaPerl6::Runtime::Perl5::MO​P::__ANON__('HASH(0x824be5c)', 'APPLY', 'HASH(0x8e4f0d8)', 'HASH(0x8e536d0)') called at
23:47 exp_evalbot ..compiled/perl5-kp6-mp6/lib/K​indaPerl6/Runtime/Perl5/MOP.pm line 169␤        main::DISPATCH('HASH(0x824be5c)', 'APPLY', 'H...
23:47 exp_evalbot ..pugs: OUTPUT[foo␤␤]
23:47 exp_evalbot ..rakudo r28078: OUTPUT[foo␤Method 'join' not found for invocant of class 'Perl6Str'␤current instr.: '_block11' pc 72 (EVAL_10:25)␤
23:47 exp_evalbot ..elf r20659: OUTPUT[Undefined subroutine &GLOBAL::join called at (eval 14) line 3.␤ at ./elf_f_faster line 4492␤]
23:48 TimToady pugs: say ('foo').join('')
23:48 exp_evalbot OUTPUT[␤]
23:50 Auzon t/spec/S29-list/join.t (smartlinked to join in S29) claims that join should fail on strings, and S29 doesn't say one way or the other
23:52 TimToady pugs: say ['foo'].join('')
23:52 exp_evalbot OUTPUT[foo␤]
23:52 TimToady the others are arguable, I guess
23:53 TimToady pugs: say 'foo'.elems
23:53 exp_evalbot OUTPUT[1␤]
23:53 Auzon pugs: my $foo = 'bar'; $foo.join(',').say
23:53 exp_evalbot OUTPUT[,␤]
23:53 Auzon pugs: my $foo = 'bar'; ($foo).join(',').say
23:53 exp_evalbot OUTPUT[,␤]
23:53 Auzon pugs: my $foo = 'bar'; [$foo].join(',').say
23:53 exp_evalbot OUTPUT[bar␤]
23:54 bacek_ joined #perl6
23:54 Auzon The difference between join(',', $foo) and $foo.join(',') seems odd.
23:54 TimToady yes, I think so too
23:55 TimToady so maybe join needs to be more like elems
23:56 Auzon It would be easier in many regards (especially for explaining) if $foo.bar(',
23:56 TimToady basically, I think Object should probably define default methods that are biased to particular types
23:56 Auzon if $foo.bar(',') was equal to bar(',', $foo) or something similar
23:56 TimToady much like $a+$b is most generically coercing to numeric
23:57 TimToady so too the most generic .join should presume a list
23:57 TimToady more specific types may, of course, override that
23:58 pmichaud interestingly,  S29 doesn't define 'join' on lists
23:58 pmichaud only on Str
23:58 pmichaud and earlier today I couldn't find any examples of .join on a list.
23:58 TimToady pugs: say list('foo').join('')
23:58 exp_evalbot OUTPUT[␤]
23:59 pmichaud (in the synopses)
23:59 TimToady pugs: say list('foo',).join('')
23:59 exp_evalbot OUTPUT[␤]
23:59 TimToady pugs: say ('foo','bar').join('')
23:59 Auzon pmichaud: S29 does define join on in the List section, down a few pages.
23:59 exp_evalbot OUTPUT[foobar␤]
23:59 TimToady definitely something bogus going on there...
23:59 Auzon pugs: say ('foo').join(',');
23:59 exp_evalbot OUTPUT[,␤]

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

Perl 6 | Reference Documentation | Rakudo