Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-06-19

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:15 felipe joined #perl6
00:29 Auzon perl6: my $foo = 'a'; my $bar = 'b'; say <<$foo $bar>>
00:29 p6eval kp6 r20874: OUTPUT[syntax error at position 46, line 1 column 46:␤my $foo = 'a'; my $bar = 'b'; say <<$foo $bar>␤                                              ^ HERE␤]
00:29 p6eval ..pugs: OUTPUT[ab␤]
00:29 p6eval ..rakudo r28528: OUTPUT[Statement not terminated properly at line 1, near ">"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
00:29 p6eval ..elf r20874: OUTPUT[$␤]
00:29 Auzon elf gets points for creativity.
00:30 mncharity joined #perl6
00:51 jan__ joined #perl6
00:52 ruoso joined #perl6
00:56 meppl good night
01:11 pugs_svnbot r20875 | putter++ | [STD_red] Improve operator name handling.  Unbreaks elf.
01:14 pugs_svnbot r20876 | putter++ | [elf] Cleaning up elf_f_src/ .  Moved run-tests to elfish/run-tests/ .  Pugs t/ svn revision added to output.
01:21 lichtkind joined #perl6
01:22 lichtkind perl6: $a = do { 3; leave; 5; }
01:22 p6eval kp6 r20876: OUTPUT[Can't locate object method "new" via package "Leave" (perhaps you forgot to load "Leave"?) at compiled/perl5-kp6-mp6/lib/K​indaPerl6/Grammar/Control.pm line 843, <> line 1.␤]
01:22 p6eval ..pugs: OUTPUT[*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$a" requires predeclaration or explicit package name␤    at /tmp/tbe8P2Mzgb line 1, column 3␤]
01:22 p6eval ..rakudo r28528: OUTPUT[Scope  not found for PAST::Var '$a'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
01:22 p6eval ..elf r20876: OUTPUT[Useless use of a constant in void context at (eval 113) line 3.␤Undefined subroutine &GLOBAL::leave called at (eval 113) line 4.␤ at ./elf_f_faster line 4656␤]
01:29 pugs_svnbot r20877 | putter++ | [elf] Cleaning up elf_f_src/ .  Moved some experimental files to a new elfish/elf_f_work/, and added README guidance on using them from there.
01:53 SamB joined #perl6
02:01 lichtkind i thought bare blocks dont execute in perl 6?
02:15 Coleoid .
02:20 Coleoid rakudo: my $simple = 'begin'; say;
02:20 p6eval rakudo r28528 OUTPUT[␤]
02:21 Coleoid rakudo: .= 'begin'; say;
02:21 p6eval rakudo r28528 OUTPUT[Syntax error at line 1, near ".= 'begin'"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
02:21 Coleoid rakudo: $_ = 'begin'; say;
02:21 p6eval rakudo r28528 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block11' pc 0 (EVAL_10:3)␤
02:21 Coleoid Er,
02:22 Coleoid rakudo: say 'begin'
02:22 p6eval rakudo r28528 OUTPUT[begin␤]
02:23 Coleoid rakudo: $_ = 'begin'; say $_
02:23 p6eval rakudo r28528 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block11' pc 0 (EVAL_12:3)␤
02:23 Coleoid rakudo: $_ = 'begin'; say $_;  #perhaps a missing semicolon?
02:23 p6eval rakudo r28528 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: '_block11' pc 0 (EVAL_10:3)␤
02:24 Coleoid ...
02:30 Coleoid Okay, I'm getting interested in Rakudo given current news, yet this failure is pretty rudimentary.
02:30 Coleoid And I don't know how to get from here, to seeing if there's a test for something like this already in the spectests...
02:32 Coleoid ...or something like this already in the bug tracking for Rakudo, which is RT?  At some URL?
02:33 Coleoid So I'm glad for any pointers I can get from the folks here.
02:35 Coleoid Meantime, I'm searching for the pointers.  Perhaps my difficulties are characteristic of multiple folks, and somehow this gap I'm yurking around in can be narrowed?
02:37 Coleoid rakudo: say "Until later, thanks for the improvements!";
02:37 p6eval rakudo r28528 OUTPUT[Until later, thanks for the improvements!␤]
02:40 bacek rakudo: my $a = 'hello'; say $a;
02:40 p6eval rakudo r28528 OUTPUT[hello␤]
02:40 bacek rakud: sub hello { say 'hello, ' ~ $_ }; hello('world')
02:41 bacek rakudo: sub hello { say 'hello, ' ~ $_ }; hello('world')
02:41 p6eval rakudo r28528 OUTPUT[hello, world␤]
02:41 bacek Coleoid: there is no $_ at top-level module (yet)
02:42 Coleoid bacek:  Thanks!  Top-level module of Rakudo as a whole?
02:43 bacek Coleoid: hmm... I didn't quite understand your question...
02:43 Coleoid rakudo:  sub inner { $_ = 'inner'; say }; inner();
02:43 p6eval rakudo r28528 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: 'inner' pc 33 (EVAL_11:21)␤
02:44 Coleoid I'm not sure what you mean by 'top-level'.
02:44 bacek rakudo:  sub inner { $_ = 'inner'; say $_; }; inner();
02:44 p6eval rakudo r28528 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: 'inner' pc 33 (EVAL_10:21)␤
02:45 Coleoid rakudo:  sub inner { $a = 'inner'; say $a }; inner();
02:45 p6eval rakudo r28529 OUTPUT[Scope  not found for PAST::Var '$a'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
02:45 Coleoid rakudo:  sub inner { my $a = 'inner'; say $a }; inner();
02:45 p6eval rakudo r28529 OUTPUT[inner␤]
02:46 Coleoid rakudo:  sub inner { my $_ = 'inner'; say }; inner();
02:46 p6eval rakudo r28529 OUTPUT[too few arguments passed (0) - 1 params expected␤current instr.: 'inner' pc 33 (EVAL_11:21)␤
02:46 bacek Coleoid: support for $_ is still rudimentary in rakudo.
02:46 Coleoid Well.
02:50 bacek rakudo: say <1..10>:sort { $^b <=> $a }
02:50 p6eval rakudo r28529 OUTPUT[Statement not terminated properly at line 1, near ":sort { $^"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
02:50 bacek rakudo: say <1..10>.sort { $^b <=> $a }
02:50 p6eval rakudo r28529 OUTPUT[Statement not terminated properly at line 1, near "{ $^b <=> "␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
02:51 Coleoid rakudo: say <1..10>.sort { $b <=> $a }
02:51 p6eval rakudo r28529 OUTPUT[Statement not terminated properly at line 1, near "{ $b <=> $"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
02:51 bacek rakudo: say <1..10>.sort({ $^b <=> $a })
02:51 p6eval rakudo r28529 OUTPUT[Scope  not found for PAST::Var '$a'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤
02:51 bacek rakudo: say <1..10>.sort({ $^b <=> $^a })
02:51 p6eval rakudo r28529 OUTPUT[Method 'sort' not found for invocant of class 'Perl6Str'␤current instr.: '_block11' pc 45 (EVAL_12:22)␤
02:51 bacek what???
02:52 bacek rakudo: say (1..10).sort({ $^b <=> $^a })
02:52 p6eval rakudo r28529 OUTPUT[Method 'sort' not found for invocant of class 'Range'␤current instr.: '_block11' pc 63 (EVAL_14:25)␤
02:52 Coleoid Saner!
02:52 bacek someone broke it...
02:52 bacek rakudo sya sort { $^b <=> $^a }, 1..10;
02:53 bacek rakudo: say sort { $^b <=> $^a }, 1..10;
02:53 p6eval rakudo r28529 OUTPUT[10987654321␤]
02:53 bacek rakudo: say ~sort { $^b <=> $^a }, 1..10;
02:53 p6eval rakudo r28529 OUTPUT[10 9 8 7 6 5 4 3 2 1␤]
02:54 bacek rakudo: say  ~grep { $_ %2 }, sort { $^b <=> $^a }, 1..10;
02:54 p6eval rakudo r28529 OUTPUT[9 7 5 3 1␤]
02:54 Coleoid Here's a working '$_'...
02:54 Limbic_Region joined #perl6
02:55 bacek rakudo: say  ~grep { $^yak % 2 }, sort { $^b <=> $^a }, 1..10;
02:55 p6eval rakudo r28529 OUTPUT[9 7 5 3 1␤]
02:55 Coleoid ...which works the same auto-named as a parameter.
02:56 bacek rakudo: say  (grep { $^yak % 2 }, sort { $^b <=> $^a }, 1..10).reduce { $^a+$^b }
02:56 p6eval rakudo r28529 OUTPUT[Statement not terminated properly at line 1, near "{ $^a+$^b "␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
02:56 bacek pugs: say  (grep { $^yak % 2 }, sort { $^b <=> $^a }, 1..10).reduce { $^a+$^b }
02:56 p6eval OUTPUT[*** ␤    Unexpected "{"␤    expecting operator, ":" or ","␤    at /tmp/H608OSTsWT line 1, column 63␤]
02:56 bacek rakudo: say  (grep { $^yak % 2 }, sort { $^b <=> $^a }, 1..10).reduce{ $^a+$^b }
02:56 p6eval rakudo r28529 OUTPUT[too few arguments passed (0) - 2 params expected␤current instr.: '_block11' pc 0 (EVAL_14:3)␤
02:57 bacek rakudo: say  reduce {$^a+$^b }, grep { $^yak % 2 }, sort { $^b <=> $^a }, 1..10
02:57 p6eval rakudo r28529 OUTPUT[25␤]
02:57 bacek pugs: say  (grep { $^yak % 2 }, sort { $^b <=> $^a }, 1..10).reduce{ $^a+$^b }
02:57 p6eval OUTPUT[*** Cannot cast from VList [] to Pugs.AST.Internals.VCode (VCode)␤    at /tmp/XFMRn0YyIp line 1, column 6 - line 2, column 1␤]
03:16 diakopter woo hoo! I got the recursive-descent parser (* that can handle left recursive non-terminals, both direct and indirect) working!  :D :D
03:17 diakopter so now grammars can have left associate operators specified in the exact same syntax as right-associative ones.
03:17 diakopter without transforming
03:18 diakopter oh, and the packrat/memoization comes with that.
03:23 mncharity Auzon, et al: Is there an up-to-date set of regex tests?
03:23 pugs_svnbot r20878 | putter++ | [elf] Elf has had two variants, only very slightly different.  The default one used Moose, the faster one not.  The two have been merged, with the default one now not.  elf_f_faster no longer exists - use the similar elf_f.
03:23 pugs_svnbot r20878 | putter++ | Motivation - the low startup latency is nice, and with a dearth of development resources, the time when Moose would most help is now distant, so supporting both doesn't currently seem worth the complexity cost.
03:25 mncharity diakopter: could you remind me... are you working on something which is strictly a p6 parser, or a general regex engine?
03:26 diakopter mncharity: well, it's turned into a general regex engine
03:27 mncharity have a test suite?
03:27 diakopter since that's what's needed to translate STD.pm into a readable Perl6in5::Grammar
03:27 diakopter mncharity: ha
03:27 diakopter I only *just* got the memoizing working
03:28 diakopter and the output format (ast and actions and such) has yet to be formulated fully
03:28 diakopter so in other words, there still would be nothing to test against, so no. :)
03:28 diakopter it's still untestable.
03:29 mncharity I find it very hard to tell how real, and the related - how usable(ie, fast), regex engine implementations are, without seeing some kind of test suite results.
03:29 mncharity re still untestable, ah, ok.
03:29 diakopter yeah...
03:29 mncharity packrat++
03:30 diakopter well, my first guess about its speed is that it will be slower than most for most things, but faster than most on a few things... namely situations where naturally left recursive constructs are usually translated into a bottom-up parser system, or right-recursive equivalents
03:30 mncharity have you considered targeting p6 rather than p5?  :)
03:31 diakopter mncharity: no, but I don't see where you're going with that :)
03:31 mncharity long term, it would be nice to have a grammar compiler which analyzed the grammar, and perhaps even path stats, and assembled an optimized implementation tuned for that specific grammar.
03:32 diakopter but that's only a slightly special case of standard compiler optimization steps....
03:33 * diakopter thinks a bit on "path stats"
03:33 diakopter oh
03:34 diakopter I think what you mean by that is a profile of how interdependent various rules are... and which ones are used all the time.
03:35 mncharity re only slightly special, I suspect not.  It's a rather specialized domain, and thus likely to have domain-specific optimizations possible.
03:35 diakopter for instance, the unspace rule has to run at nearly every character position :)
03:35 mncharity yes
03:35 diakopter mncharity: ok, I haven't read about those... urls?
03:36 diakopter or keyphrases?
03:36 mncharity for some grammars, just compiling to C, or Inline::C, could be a dramatic win.  who needs yacc...
03:39 mncharity re urls, hmm, there's a very good question I don't have an answer for.  Are there any wizzy survey papers on the current state of parsing??  Dunno.   My fuzzy impression is aside from localized activity, eg, around packrat, or "attribute grammars" (some meanings), and functional programming folks, the field as a whole is off in book land.
03:39 mncharity ie, dead
03:40 diakopter heh
03:41 diakopter my next task is to figure out how to make operator precedence easier to declare in this grammar system
03:41 diakopter I think that should come before the tree generation/manipulation
03:42 mncharity on my not-short list of "things I hope p6 will accomplish" is shake up parsing land.  there's really no excuse for not having good General Parsers readily available.  but the pragmatics of getting adoption and support community has killed the attempts I've seen over the years.
03:42 diakopter mostly b/c TimToady kept challenging me on that
03:42 diakopter TimToady: thanks for challenging me so much
03:43 mncharity with concequences like ruby making language design decisions based on what bison can deal with.  which pragmatically makes sense... but is an unfortunate place for us as a field to be.
03:43 mncharity re challenge, :)
03:44 diakopter also, he challenged me to table tennis
03:44 mncharity just to see "yet another way to do it", you might look at the redsix opp if you haven't already.
03:45 mncharity My fuzzy recollection is it could backtrack through the opp, and have n-part tokens (ala smalltalk), which might contribute interesting ideas.
03:46 mncharity re n-part, ie, rather than just  x ?? x !! x , you could have arbitrary   x A x B x C x D x ...  with assorted precedences.
03:47 diakopter mncharity: ah
03:47 Auzon mncharity: I'm not certain about the status of the regex tests
03:47 * mncharity tries to remember how to restart the evalbot...
03:47 Auzon Most tests so far have been up to date
03:47 mncharity elf: say 3
03:47 p6eval OUTPUT[sh: ./elf_f_faster: No such file or directory␤]
03:47 Auzon evalbot control restart
03:47 mncharity evalbot control restart
03:47 p6eval joined #perl6
03:47 mncharity elf: say 3
03:47 diakopter patrick explained to yapc how he implemented ??!! in pge
03:47 mncharity elf: say 3
03:47 p6eval OUTPUT[3␤]
03:48 mncharity *nod*
03:48 mncharity Auzon: tnx :)
03:48 diakopter combination of unless and if)
03:49 diakopter but for detection, yeah, that's interesting.
03:49 mncharity Auzon: re tests, hmm, ok.  so old  |  have been changed to || and | tests added?
03:50 * Auzon looks
03:50 diakopter mncharity: ha, so you're saying A,B,C,D... could each have its own precedence.. :P  or individually be optional... or be optional in weird groupings...
03:51 DietCoke joined #perl6
03:51 * diakopter looks at DietCoke
03:52 mncharity :)  at least for redsix, no optionality or weirdness.  just n sub-tokens, each with their own left and right precedences, and some other tweakable constraints which seemed needed given the fuzzy understanding of how to parse p6 which existed at the time.
03:52 mncharity ie, whitespace sensitivity.
03:52 diakopter ah ok
03:53 diakopter so basically, all issues that a recursive descent parser (with whitespace sensitivity) understands
03:53 lichtkind perl6: my @a = gather { take 5; leave 5; take 3  }
03:53 mncharity err... only if you encode precedences in the tree.  rd can't do opp otherwise, no?
03:54 p6eval kp6 r20878: OUTPUT[Can't locate object method "new" via package "Leave" (perhaps you forgot to load "Leave"?) at compiled/perl5-kp6-mp6/lib/K​indaPerl6/Grammar/Control.pm line 843, <> line 1.␤]
03:54 p6eval ..pugs: RESULT[[5, 3]]
03:54 p6eval ..rakudo r28535: OUTPUT[Null PMC access in type()␤current instr.: 'parrot;Perl6;Grammar;Actions;statement_prefix' pc 115190 (src/gen_actions.pir:10907)␤
03:54 p6eval ..elf r20878: OUTPUT[Type of arg 1 to Private::gather must be block or sub {} (not null operation) at (eval 117) line 5, near "})"␤ at ./elf_f line 3826␤]
03:54 diakopter mncharity: btw, I guess I didn't tell you, the grammar syntax for Perl6in5 (yap6) has whitespace-ness built into the pattern definitions... so you don't need a distinction betweeen rule/token
03:54 lichtkind seemes very wrong to me
03:54 lichtkind i mean  the result of pugs
03:54 diakopter lichtkind: 'leave' is known to be pugsbug
03:55 diakopter Auzon: are there many tests on 'leave'?
03:55 Auzon Yes.
03:55 lichtkind so result should be [5] oder [5,5] ?
03:55 Auzon see t/builtins/control_flow/leave.t
03:56 diakopter mncharity: yes, I meant handled by explicit encoding like that, yeah
03:56 diakopter I think it should still be handled that way, except without having to specify the extra "fall-through" rule at each layer.
03:57 diakopter in other words, nest the rules in an "opp()" parser generator, which does all the fall-throughs automatically.
03:58 mncharity with packrat to pick up the pieces... hmm...
03:58 diakopter that way, opp() can also generate the flexibility needed to support interlayer insertion
03:58 Auzon What's packrat?
03:59 diakopter packrat refers to a memoization technique of recursive descent parsers, by which they can achieve linear parse times on general input.   except left-recursive stuff.  except now it can.
03:59 diakopter thanks to those researchers who wrote the paper from which I implemented that algorithm
03:59 Auzon Oh, I thought it was some regex library or something.
04:00 mncharity a "packrat parser" basically remembers what happened when rule x was applied at position p... so when some other part of the grammar asks about it for the nth time, you don't have to recompute it for the nth time.
04:00 Auzon I remember you talking about such reductions in the past, but I'm not far enough in my CS studies to have seen it
04:01 mncharity figuring out how that interacts with a p6 grammar, where rules may be passing dynamically scoped information between themselves... may require a large set of grammars to yield a "I
04:01 mncharity 'm sorry, don't know how to compile that for my rat"./
04:02 diakopter I did some informal tests.... for chains of nested left-associate rules (things handled by left-recusive rules), parse times still increase more quickly than linear... but rarely will you have 90 nested left associative things (where I started noticing the time increase)
04:02 mncharity hmm... could still memoize everything which didn't play games, inside the framework of a parser which didn't depend on being able to memoize everywhere.
04:02 diakopter mncharity: but a grammar's generation can't be dependent on input
04:03 diakopter a modification to an existing grammar could...
04:03 diakopter but not the initial one
04:03 diakopter otherwise, please explain...
04:05 diakopter mncharity: there is a don't-memoize-me version of parser() called parser2()
04:05 mncharity if  rule foo { <{let($x)=$global_mumble++;}> }  then foo isn't idempotent, and can't be memoized.
04:05 mncharity or whatever the syntax for embedded code is.  i'm fuzzy.
04:05 diakopter but that introduces what TimToady calls an immediate stopper
04:06 diakopter essentially ends the compilation unit
04:06 mncharity you mean for '|' "longest token match"?
04:06 diakopter <{}>
04:06 zhangsoft joined #perl6
04:07 mncharity ah, I didn't realize you were only going for linear on |, but not || (backtracking).
04:07 diakopter I'm still not clear on ||
04:07 mncharity p6 || is the p5 |
04:07 diakopter right, so, standard recursive descent, right?
04:08 mncharity it got renamed :/
04:08 diakopter standard alternation, I mean
04:08 diakopter ?
04:08 mncharity re standard rd, modulo that it's past midnight and I'm increasingly fuzzy, I believe so.
04:09 mncharity yes
04:09 diakopter but | is now what?
04:09 mncharity re standard alternation.
04:09 mncharity re | ...  I'm less than entirely clear.
04:10 diakopter I mean... standard alternate chooses "first match"
04:10 mncharity yes
04:10 diakopter || chooses "hungriest match"
04:10 mncharity err, no.
04:10 diakopter I mean
04:10 mncharity s/yes//
04:10 diakopter least hungry match
04:11 * diakopter backtracks
04:11 diakopter er, backpedals
04:11 mncharity err, yes.  saw your "I"(eye) as an '|' vertical bar.  very end-of-dayish just now.
04:11 diakopter ok :D
04:12 diakopter ok... currently | in Perl6in5 does longest-match
04:12 mncharity "I mean" !=  "| ... <rest is definition of |>"    sigh
04:12 diakopter in fact, so do '.' and '-'
04:13 diakopter there's also "first-match"
04:13 diakopter I guess there needs to be a symbol for that (since I obviously can't overload ||)
04:13 Auzon mncharity: I won't be handling regexes until the end of July. I can move it up on my schedule if you question the regex tests.
04:14 mncharity so to handwave fuzzily, yes, rx || is standard regular expression | alternation.  and rx | is longest match... for some fuction "longest match" defined on rx primitives, which I'm quite fuzzy on.
04:14 mncharity *function
04:15 diakopter actually I just realized, without the left-recursive ability, the LTM function wasn't yet complete
04:15 diakopter but now it is
04:16 mncharity Auzon: re move it up, no need for me.  optimize your own productivity.  TimToady may need a test suite at some point, but I'm fuzzy on how general/complete his engine is supposed to be, or what the timeframe is.
04:16 mncharity Might be "would help now", or might be "unneeded".  dunno.
04:16 diakopter but I can overload '|='  :P
04:17 mncharity Auzon: re move up, might check with TimToady and pm if that didn't already happen.
04:17 zhangsoft joined #perl6
04:18 diakopter oh! there is a postfix + that's overloadable... I wonder how overload returns its arguments to distinguish it from unary prefix...
04:18 mncharity s/pm/pmichaud/
04:18 nekobaka left #perl6
04:18 Auzon mncharity: I can easily swap S03 and S05 (so S05 would be in 1 week and S03 would be towards the end). I gave S0[2345] 1.5 weeks each because they're more detailed.
04:19 diakopter heh
04:20 diakopter I'd give S05 around 20 weeks
04:20 mncharity beware that rx's are their own language, of daunting complexity.  I always underestimate it, even after applying several levels of "correct for always underestimating it" corrections.
04:20 Auzon diakopter: I guess, but I only have 12 weeks total.
04:21 diakopter Auzon: :P surely you won't leave us to go back to *school* :P
04:21 mncharity the pugs regex tests are by far the largest group of tests in the suite... and they are woefully incomplete.
04:22 Auzon diakopter: It seems that I will ;) but I'll still be around and helping. Just not for 20+ hours a week
04:22 mncharity end of day for me.
04:22 mncharity good night and have fun :)
04:22 Auzon good night, mncharity.
04:22 meteorjay joined #perl6
04:23 diakopter mncharity: oh, I thought longest match would just be longest number of characters....
04:23 diakopter heh
04:23 diakopter I guess it could be "# of terminals"
04:24 diakopter actually
04:25 diakopter it has to be, highest number of characters eaten, with *fewest* number of terminals breaking ties.
04:25 lichtkind joined #perl6
04:25 diakopter TimToady: correct me where wrong, plz
04:26 lichtkind pugs: print if $_ % 2 for 1..10;
04:26 p6eval OUTPUT[*** ␤    Unexpected "for"␤    expecting operator␤    at /tmp/Te0HBAwUAv line 1, column 17␤]
04:29 diakopter audreyt: are you around to clarify LTM
04:34 * diakopter ->(bed=>1)
04:36 alester joined #perl6
05:02 Eevee joined #perl6
05:10 stevan_ joined #perl6
05:13 iblechbot joined #perl6
05:49 barney joined #perl6
06:48 Psyche^ joined #perl6
06:56 mncharity joined #perl6
06:57 _Maghnus joined #perl6
06:57 mncharity a very quick note.  I was way too negative about the | to || rename.  p5 re was a vast improvement over the diverse crud which went before, setting a new and better standard, and no doubt p6 rx will do it again.  I look forward to working with them.
06:57 mncharity &
07:15 snail joined #perl6
07:49 penk joined #perl6
07:54 luqui joined #perl6
07:58 elmex joined #perl6
08:04 alc joined #perl6
08:31 sri_work joined #perl6
08:32 sri_work joined #perl6
08:35 moritz_ perl6: say 'x' x 5
08:35 p6eval kp6 r20878: OUTPUT[xxxxx␤]
08:35 p6eval ..pugs: OUTPUT[xxxxx␤]
08:35 p6eval ..rakudo r28536: OUTPUT[xxxxx␤]
08:35 p6eval ..elf r20878: OUTPUT[Undefined subroutine &GLOBAL::infix_x called at (eval 115) line 3.␤ at ./elf_f line 3826␤]
08:38 moritz_ elf: say 'x' x 5
08:38 p6eval OUTPUT[Undefined subroutine &GLOBAL::infix_x called at (eval 115) line 3.␤ at ./elf_f line 3826␤]
08:38 pugs_svnbot r20879 | moritz++ | [elf] added infix:<x>
08:38 moritz_ elf: say 'x' x 5
08:38 p6eval OUTPUT[Undefined subroutine &GLOBAL::infix_x called at (eval 115) line 3.␤ at ./elf_f line 3826␤]
08:39 moritz_ do I have to recompile elf_f?
08:39 * moritz_ tries 'make bootstrap'
08:40 pmurias joined #perl6
08:43 moritz_ elf: say 'x' x 5
08:43 p6eval OUTPUT[xxxxx␤]
08:43 pugs_svnbot r20880 | moritz++ | [elf] recompiled after implementing infix:<x>
08:43 moritz_ YaY, first successful elf contribution
08:48 meppl joined #perl6
08:49 pugs_svnbot r20881 | moritz++ | [spec] start adding a few regex tests. This first one tests that longest
08:49 pugs_svnbot r20881 | moritz++ | alternatives wins
08:58 pugs_svnbot r20882 | moritz++ | [spec] more tests for longest alternatives in regexes
09:24 rakudo_svn r28537 | jonathan++ | [rakudo] Start refactoring 'does' to be more in line with STD.pm. This gets rid of trait_or_does, making does just be a trait_auxiliary.
09:38 pugs_svnbot r20883 | moritz++ | [spec] tests for single quotes (from from_perl6_rules)
09:45 pmurias joined #perl6
09:46 pmurias moritz_: re contribiution, where there any previous unsuccesfull ones? ;)
09:47 moritz_ pmurias: no, just unsucessful tries to build/run it (but mncharity++ was very helpful)
09:47 moritz_ perl6: say [('a') xx 2].perl
09:47 p6eval kp6 r20883: OUTPUT[no method 'APPLY' in Class 'Undef'␤ at compiled/perl5-kp6-mp6/lib/Ki​ndaPerl6/Runtime/Perl5/MOP.pm line 345␤
09:47 p6eval ..pugs: OUTPUT[["a", "a"]␤]
09:47 p6eval ..rakudo r28537: OUTPUT[["a", "a"]␤]
09:47 p6eval ..elf r20883: OUTPUT[Undefined subroutine &GLOBAL::infix_xx called at (eval 117) line 3.␤ at ./elf_f line 3828␤]
09:47 pmurias found your text task? ;)
09:50 moritz_ pmurias: perhaps ;) but I don't know if I can add multi infix:<xx> (@a, $b) is p5, because you can't pass an array as first arg in p5
09:52 pmurias moritz_: shouldn't xx be written in p6?
09:53 moritz_ multi sub infix:<xx>(@a, Int $b) { return gather { take @a for ^$b }}
09:53 moritz_ that would even be lazy as soon as gather...take is implemented correctly
09:56 pmurias yes
09:56 pmurias you wrote a perl5 gather,take module if i recall correctly ;)
09:57 moritz_ pmurias: yes. Perl6::GatherTake
09:57 moritz_ the only lazy one on CPAN - the others are all just syntactic sugar
10:10 pmurias infix:<x> couldn't have been implemented in perl6 too
10:10 pmurias it would be less efficient likely
10:11 moritz_ ENOSENSE
10:11 moritz_ I think you have a superfluous negation in that sentence ;)
10:12 pmurias moritz_: yes
10:12 moritz_ ok, then I know what you mean ;)
10:13 moritz_ pmurias: should stuff like that go into Prelude.pm?
10:14 pmurias yes
10:15 * moritz_ tries that
10:18 moritz_ elf: say 2, 3
10:18 p6eval OUTPUT[2␤3␤]
10:18 rindolf joined #perl6
10:18 moritz_ that's wrong, actually ;)
10:19 moritz_ perl6: say 2, 3
10:19 p6eval kp6 r20883: OUTPUT[23␤]
10:19 p6eval ..pugs: OUTPUT[23␤]
10:19 p6eval ..rakudo r28537: OUTPUT[23␤]
10:19 p6eval ..elf r20883: OUTPUT[2␤3␤]
10:21 moritz_ bootstrapping...
10:23 pmurias moritz_: do you set STD_RED_CACHEDIR?
10:24 pugs_svnbot r20884 | moritz++ | [elf]
10:24 pugs_svnbot r20884 | moritz++ |  * implemented infix:<xx> in Perl 6
10:24 pugs_svnbot r20884 | moritz++ |  * fixed say. It should print just one newline, not one after each arg.
10:24 pugs_svnbot r20884 | moritz++ |    Could probably be simplified even more
10:27 moritz_ elf: say (1, 2) xx 2
10:27 p6eval OUTPUT[Undefined subroutine &GLOBAL::push called at ./elf_f line 638.␤ at ./elf_f line 3835␤]
10:27 moritz_ ouch
10:28 moritz_ maybe I should use the method form instead
10:28 wknight8111 joined #perl6
10:29 pmurias yes
10:31 Jedai joined #perl6
10:36 pugs_svnbot r20885 | moritz++ | [elf] use method form for push() in the Prelude
10:38 moritz_ elf: say (1, 2) xx 2
10:38 p6eval OUTPUT[Undefined subroutine &GLOBAL::push called at ./elf_f line 638.␤ at ./elf_f line 3835␤]
10:38 Ara4n joined #perl6
10:38 moritz_ perl6: say 1, 2;
10:38 p6eval kp6 r20885: OUTPUT[12␤]
10:38 p6eval ..pugs: OUTPUT[12␤]
10:38 p6eval ..rakudo r28537: OUTPUT[12␤]
10:38 p6eval ..elf r20885: OUTPUT[12␤]
10:38 moritz_ at least that's fixed
10:39 moritz_ don't know why it doesn't like my push method, though
10:39 moritz_ elf: say (1, 2) xx 2
10:39 p6eval OUTPUT[Undefined subroutine &GLOBAL::push called at ./elf_f line 638.␤ at ./elf_f line 3835␤]
10:39 moritz_ pmurias: any idea?
10:44 zhangsoft left #perl6
10:50 Auzon joined #perl6
10:55 pmurias moritz_: was afk
10:56 LCamel joined #perl6
10:57 pmurias moritz_: looks like elf_f was missing from commit
10:58 moritz_ pmurias: thanks, I forgot to make if_bootstrap_scceeded
10:58 pugs_svnbot r20886 | moritz++ | [elf] update elf_f
10:58 moritz_ elf: say (1, 2) xx 2
10:58 p6eval OUTPUT[1␤]
10:59 moritz_ elf: ((1, 2) xx 2).perl.say
10:59 p6eval OUTPUT[1␤]
10:59 * moritz_ is stupid
11:00 moritz_ still, even with my stupidity the result should bei 1,2 not 1
11:00 pmurias elf: ([1,2] xx 2).perl.say
11:00 p6eval OUTPUT[[1,2]␤]
11:00 pmurias elf: say ([1,2] xx 3)
11:01 p6eval OUTPUT[12␤]
11:01 moritz_ Maghnus: I'm about to fix that
11:01 moritz_ sorry, pmurias
11:01 moritz_ where did my tab-key go?
11:02 pmurias np
11:02 pmurias elmex: say 1 xx 6
11:02 pmurias sorry
11:02 elmex pmurias: 1
11:02 pmurias elf: say 1 xx 6
11:02 p6eval OUTPUT[1␤]
11:02 elmex elf: say sex
11:03 pmurias pugs: say 1 xx 6
11:03 p6eval OUTPUT[Undefined subroutine &GLOBAL::sex called at (eval 117) line 3.␤ at ./elf_f line 3835␤]
11:03 p6eval OUTPUT[111111␤]
11:03 moritz_ elf: [1,2] xx 2
11:03 pugs_svnbot r20887 | moritz++ | [elf] infix:<xx>: return multiplied list, not the original one ;)
11:03 p6eval RESULT[[[1,2],[1,2]]␤]
11:04 moritz_ elf: (1,2( xx 2
11:04 p6eval OUTPUT[Parse error in: /tmp/Po58p0JI2y␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: (1,2( xx 2␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:98:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤  STD_red/std.rb:210:in `_U...
11:04 moritz_ elf: (1,2 xx 2
11:04 p6eval OUTPUT[Parse error in: /tmp/emnPBexGX2␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: (1,2 xx 2␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:98:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤  STD_red/std.rb:210:in `_UN...
11:04 moritz_ d'oh
11:04 moritz_ elf: (1,2) xx 2
11:04 p6eval RESULT[[1,1]␤]
11:04 pmurias elmex: elmex [1,2] xx 3
11:04 pmurias ef: [1,2] xx 3
11:04 pmurias elf: [1,2] xx 3
11:04 p6eval RESULT[[[1,2],[1,2],[1,2]]␤]
11:05 moritz_ I'm not the only one with either broken self or keyword ;)
11:05 pmurias keyword?
11:05 moritz_ s/word/board/ ;-)
11:05 moritz_ omg
11:05 moritz_ I should really just shut up for today, and avoid IRC like hell
11:06 donaldh joined #perl6
11:06 pmurias perltidy++ #making generated code readable
11:07 rakudo_svn r28538 | jonathan++ | [rakudo] Big refactor of package declration code. This brings us closer to STD.pm and also breaks one enormous method down into several smaller ones, which should make the code easier to extend and maintain.
11:13 mjk joined #perl6
11:21 tcliou joined #perl6
11:21 LCamel_ joined #perl6
11:34 iblechbot joined #perl6
11:41 a-jing joined #perl6
11:41 a-jing left #perl6
11:42 chris2 joined #perl6
11:47 DietCoke joined #perl6
11:55 Psyche^ joined #perl6
11:58 redicaps joined #perl6
12:18 pbuetow joined #perl6
12:19 pugs_svnbot r20888 | pmurias++ | [sm0p] actions work
12:22 pugs_svnbot r20889 | diakopter++ | [yap6] another interim checkin; I should've done this in a branch...
12:24 pmurias TimToady: would it be wise to overload operators on the matches (Cursors realy) returned from STD5?
12:26 kanru joined #perl6
12:26 * diakopter ponders n-ary operator rule constructors
12:45 |Jedai| joined #perl6
12:45 rakudo_svn r28540 | jonathan++ | [rakudo] Get !keyword_does to take a role PMC rather than a name, making it re-usable. Also switch from ident to name in a couple of places, which will help us get namespace things right later on.
12:48 lichtkind joined #perl6
12:48 lichtkind is an bare block executed?
12:48 lichtkind syn says yes but a larry talk once said no
12:49 moritz_ lichtkind: it is context dependent
12:55 Lorn joined #perl6
13:24 b_jonas joined #perl6
13:35 jan__ joined #perl6
13:37 pmurias ls
13:37 pmurias sorry
13:41 alanhaggai joined #perl6
13:48 wknight8111 joined #perl6
13:52 wolv joined #perl6
14:11 pmichaud Auzon: (S05 tests) -- note that we have a fair number of tests in the parrot repo already (derived from the ones from Pugs)
14:11 pmichaud the ones in the parrot repo are up-to-date.
14:12 pmichaud at any rate, I'm not in any hurry for S05 tests -- I'd much rather have S03 tests earlier
14:22 * DietCoke ~~ to pmichaud.
14:22 * DietCoke found a picture on his phone of you, me and allison.
14:23 * DietCoke guesses it was Kennedy.
14:24 pmichaud heh
14:24 pmichaud must've been
14:25 DietCoke perljam?
14:25 pmichaud I doubt it.
14:25 DietCoke was looking for his email addy.
14:26 pmichaud oh
14:26 pmichaud duff@pobox.com
14:26 b_jonas take care with mail addresses, this channel has a public log on the web
14:26 rindolf b_jonas: so?
14:26 pmichaud yes, I know, but I also know his addr is public already :-)
14:27 DietCoke spam filters ho!
14:27 rindolf b_jonas: spammers also install malware to harvest addresses.
14:27 rindolf b_jonas: I already got 11 spam messages to my new GMail account.
14:27 b_jonas rindolf: oh sure, but it might still increase the volume
14:27 b_jonas it's not like a yes or no thing
14:27 rindolf b_jonas: and they subscribe to mailing lists to harvest the addresses from there.
14:28 rindolf b_jonas: yes.
14:28 b_jonas sure, I use spam filters and stuff too
14:28 b_jonas and still get spam
14:28 b_jonas not surprisingly
14:28 rindolf b_jonas: I have a mailto:shlomif@iglu.org.il address on many places, and I can handle my spam using spam assassin.
14:28 rindolf http://p3m.org/pfn/1561 - what horrible code.
14:28 lambdabot Title: p3m.org/pfn paste from "udinesh5" at 122.166.34.242...
14:28 rakudo_svn r28546 | jonathan++ | [rakudo] Implement basic use of does operator for mixing in a role to an existing object at runtime. This was most neatly done with a dynop, so this check-in also adds a dynops file for Rakudo. make makefile will be required to build after this check-in.
14:29 b_jonas rindolf: sure, but you can't really know that about nother person
14:29 rindolf b_jonas: OK.
14:29 rindolf I think GMail's spam filter has many false positives.
14:29 rindolf Many ham messages are marked as spam there.
14:30 rindolf http://www.shlomifish.org/philosophy/phil​osophy/closed-books-are-so-19th-century/ - I made this accessible from the rest of the site today.
14:30 lambdabot Title: Why Closed Books are So 19th-Century, http://tinyurl.com/5gvmdl
14:30 b_jonas rindolf: probably yes
14:31 b_jonas it's diffult to tell how many because I don't check all of the mails marked as spam
14:31 rindolf b_jonas: yes, neither do I.
14:33 cornelius_ joined #perl6
14:39 diakopter pmichaud: I'm wondering how much of S05:Longest Token Matching are implementation detail suggestions as opposed to specifications...
14:40 pmichaud I haven't looked at it that closely yet.  But to me they have the feel of "specifications"
14:40 DietCoke S05?
14:40 DietCoke ... wrong bot.
14:41 pmichaud s/yet/lately.
14:41 diakopter http://www.perlcabal.org/syn/S​05.html#Longest-token_matching
14:41 lambdabot Title: S05
14:42 moritz_ b_jonas: at least the logger that I maintain obfuscate email addresses
14:43 b_jonas moritz_: ah, I didn't know that
14:43 b_jonas nice
14:43 b_jonas I hope it doesn't have much false positives
14:43 moritz_ the @ is replaced an @ image
14:43 pugs_svnbot r20890 | jnthn++ | [spectest] Some tests for mixing in roles with 'does'.
14:43 b_jonas ah, I see
14:43 moritz_ if it's iin something that looks like an email address
14:43 moritz_ nobody complained about false positives for now
14:44 diakopter well, I'm starting to get a clear(er) picture of the goal for which the author is striving, but it seems that much of the description has to do with "how to ensure we don't leave anything hanging on the right side when parsing, when using a predictive parser backed by NFA..."
14:44 b_jonas there's a mailing list where I've once sent a shell script, lost the email, and can't get it back because the archives webpage removes something in it irreversibly that's not actually an email address but it thinks it is
14:45 diakopter pmichaud: plz see above. in other words, it seems to me that much of the logic/constructs described in this section aren't necessary when using a recursive descent parser.
14:46 revdiablo joined #perl6
14:46 diakopter that is, the specified behaviors can be provided in other (probably simpler) ways
14:46 pmichaud except I think the point of the description is to say "here's where regexes aren't doing recursive descent"
14:46 moritz_ b_jonas: don't think I fell into that trap. If somebody needs to have large excerpts from the logs and copy & paste doesn't help, I can just spit out some SQL for them ;)
14:47 rakudo_svn r28547 | jonathan++ | [rakudo] Add (passing) mixins test to Rakudo passing list.
14:47 diakopter pmichaud: thanks; I'll think on that and re-read with that perspective
14:47 pmichaud recursive descent isn't prohibited, it's just that one uses || instead of | when one wants the traditional rec-descent way of looking at things
14:48 pmichaud but to get DFA longest-token matching semantics, one uses |
14:48 pmichaud and in particular, I think that STD.pm relies on longest-token matching semantics to work properly.
14:49 b_jonas moritz_: good
14:51 diakopter pmichaud: but currently in yap6, | checks all the alternatives and returns the one that matches the most characters...?
14:52 diakopter pmichaud: though of course there can be another alternator that does first-match
14:52 pmichaud how would yap6 handle   "if(2+3)"  ?
14:52 diakopter pmichaud: I guess my point is, recursive descent doesn't necessarily imply first-match
14:53 toddr joined #perl6
14:53 pmichaud (doesn't imply first match)  I agree.
14:53 diakopter pmichaud: it doesn't know about "if", but it does parse  "say say 3" correctly.
14:53 diakopter (as say(say(3)))
14:54 pmichaud right... but I'm curious how one would distinguish "if(2)" from "if (2)"
14:54 diakopter oh
14:55 diakopter I've built into the alternation/concatenation operators knowledge about mandatory/disallowed/optional whitespace
14:56 diakopter so you just have to encode the rule correctly.  is "if(2)" not allowed (must there be a space between if and ()?
14:56 pmichaud yes, but "if(2)" is an expression while  "if (2)" is a statement.
14:56 pmichaud i.e., "if(2)" gets parsed by the <EXPR> rule, and "if (2) ..."  is statement_control:if
14:57 moritz_ oh my.
14:57 diakopter what's the behavior of if(2) - I mean, what does that do?
14:57 pmichaud calls a function called 'if'.
14:57 diakopter ohhh, ok, now I see what you're asking
14:57 pmichaud perl6 doesn't have reserved words.
14:58 pmichaud anyway, I haven't studied it in detail, so "if" might be not an example of what I'm trying to describe.
14:58 rakudo_svn r28548 | jonathan++ | [rakudo] Fix to make $foo does (R1, R2) working.
14:58 pmichaud But I do know tha TimToady mentioned at one point that he could simplify STD.pm because of having LTM implemented.
14:58 diakopter pmichaud: no, you have a good point.  I'll think on it a bit and reply here.
14:59 diakopter moritz_: oh my?
14:59 moritz_ diakopter: that will become a FAQ
15:01 diakopter pmichaud: oh.  this is simpler than I first imagined... Perl6in5's equivalent (before grammar-bootstrapping) statement control rule would require the whitespace, and token {<function_name_equiv> '(' etc..}  would be the start of one of the options of function invocation pattern
15:03 pmurias rindolf: do you receive much critisism for your essays?
15:03 pugs_svnbot r20891 | moritz++ | [spec] added test for sequential alternations (||) in regexes
15:03 diakopter (where I'm using "token" as Perl6in5's equivalent to don't-allow-whitespace
15:03 diakopter )
15:04 rindolf pmurias: a lot of people comment on them.
15:07 diakopter pugs: say;
15:07 p6eval OUTPUT[␤]
15:07 diakopter hrm, that's going to be tricky
15:09 diakopter pugs: say say;
15:09 p6eval OUTPUT[␤1␤]
15:09 pugs_svnbot r20892 | moritz++ | [spec] tests for interpolated sequential alternations ( ||@list )
15:11 diakopter pugs: sub if { say 3; }; if() if if();
15:11 p6eval OUTPUT[*** ␤    Unexpected "if"␤    expecting operator or bare or pointy block construct␤    at /tmp/fcE6kcl6g0 line 1, column 25␤]
15:12 diakopter pugs: sub if { say 3; }; if 1 { if() };
15:12 p6eval OUTPUT[*** ␤    Unexpected "};"␤    expecting operator or bare or pointy block construct␤    at /tmp/F23g9OK4sk line 1, column 32␤]
15:12 diakopter pugs: sub if { say 3; }; if 1 { if() }
15:12 p6eval OUTPUT[*** ␤    Unexpected "}"␤    expecting operator or bare or pointy block construct␤    at /tmp/zKjOME5hS2 line 1, column 32␤]
15:12 diakopter pmichaud: pugs doesn't like a declaration of a sub named 'if'
15:12 pugs_svnbot r20893 | moritz++ | [spec] test for longest alternation match with interpolation in regex
15:18 pmichaud "Dear IIT.  Your wireless access sucks."
15:19 TJCRI joined #perl6
15:19 pmichaud pugs is likely out of date on "if()"  But I know it's a sub call -- TimToady even mentioned it in his keynote.
15:20 pmichaud It's even in S03.
15:20 diakopter pmichaud: ok
15:20 pmichaud if $a == 1 { say "yes" }            # preferred syntax
15:20 pmichaud if ($a == 1) { say "yes" }          # P5-ish if construct
15:20 pmichaud if($a,$b,$c)                        # if function call
15:21 diakopter pugs: if say { say 3 } { say 4 }
15:21 p6eval OUTPUT[␤3␤4␤]
15:21 udinesh5 joined #perl6
15:22 udinesh5 will i get help to know where i am going wrong in a perl script ?
15:22 udinesh5 i am newbie
15:22 diakopter pugs: if !say { say 3 }
15:22 p6eval OUTPUT[␤]
15:22 moritz_ udinesh5: only if your script is written in Perl 6
15:22 moritz_ udinesh5: if it's perl 5 (most likely), try #perl or #perlhelp or http://www.perlmonks.org/
15:22 lambdabot Title: PerlMonks - The Monastery Gates
15:25 diakopter pugs: say 4 if !say { say 3 }
15:25 p6eval OUTPUT[<SubBlock(<anon>)>␤]
15:25 diakopter pmichaud: :) see pugs above... I think this is an ambiguity in the grammar...
15:27 diakopter it should've said "3" then <SubBlock(<anon>)>...
15:27 diakopter pugs: say { say 3 }
15:27 p6eval OUTPUT[<SubBlock(<anon>)>␤]
15:27 diakopter pugs: { say 3 }
15:27 p6eval OUTPUT[3␤]
15:28 diakopter moritz_: (anyone), shouldn't it say 3 then 1 (2 evals above)
15:29 moritz_ diakopter: no, don't think - blocks aren't evaluated if they are in the argument list of a sub
15:29 moritz_ diakopter: otherwise you couldn't get a map {$code}, @stuff working
15:29 diakopter moritz_: oh. thanks :)
15:29 udinesh5 left #perl6
15:31 TimToady that's one of the reasons we distinguish statements from expressions
15:33 TimToady but note that we can't really add the implicit .() to a bare block until we see how it ends, since {...}.() is an expression
15:34 diakopter ok.  so bare blocks are executed inline only in a statement list
15:35 diakopter TimToady: (& pmichaud & moritz_) thanks for the clarifications/corrections
15:35 diakopter (& pugs)
15:35 moritz_ diakopter: you're welcome ;)
15:36 TimToady you too :)
15:38 cjfields joined #perl6
15:38 rakudo_svn r28549 | jonathan++ | [rakudo] Get initialization of one-attribute roles working ($thingy does Answer(42)).
15:40 pugs_svnbot r20894 | jnthn++ | [spectest] A couple more mixin tests, for does (R1, R2) and does Answer(42) usage.
15:41 diakopter pugs: say { say 4; }.()
15:41 p6eval OUTPUT[<SubBlock(<anon>)>␤*** Cannot cast from VBool True to Pugs.AST.Internals.VCode (VCode)␤    at /tmp/nLpAEV8hW3 line 1, column 1 - line 2, column 1␤]
15:41 diakopter pugs: say ({ say 4; }.())
15:41 p6eval OUTPUT[4␤1␤]
15:41 diakopter that precedence isn't right...?
15:42 moritz_ why not?
15:42 diakopter shouldn't the one without the parens have the same output as the last one?
15:42 moritz_ uhm, yes
15:42 moritz_ (I thought you were referring to the last eval)
15:42 diakopter right, so the precedence inference is wrong on the first one
15:42 diakopter ok
15:44 diakopter pugs: say ({ say 4; }.({ say 3 }.({ say 2 })))
15:44 p6eval OUTPUT[4␤1␤]
15:44 diakopter that's not right either, I think..? it should've said '3' first
15:45 diakopter or do anonymous sub executions not take arguments?
15:46 moritz_ diakopter: only if you declare them (-> $args, {...}), or if they use $_ or $^a or some such
15:47 pmichaud 50% packet loss and train to airport is here
15:47 pmichaud bbl
15:48 diakopter but in that case, I would think they would at least be evaluated before it decides whether to use them as arguments...?
15:48 diakopter if not, that's some magic...
15:48 r0bby joined #perl6
15:49 moritz_ why evaluated? the arity of a block is determined at compile time, I think
15:51 diakopter pugs: say ({ say 2; $_ }.({ say 3; $_ }.({ say 4 }).()))
15:51 p6eval OUTPUT[3␤4␤2␤1␤]
15:51 diakopter that's pretty darn lazy...
15:52 diakopter not evaluating the argument before it's accessed
15:52 diakopter (for the deepest nesting.  it does do the first nesting before "say 2")  curiouser ** and
15:53 * diakopter waits for another rebuke :D
15:55 alanhaggai joined #perl6
15:56 diakopter TimToady: any clue about pugs' last?  or is it a pugsbug?
15:57 moritz_ diakopter: lists are lazy by default
15:57 moritz_ diakopter: and argument lists are lists, aren't they?
15:59 moritz_ elf: say 1 xx 4
15:59 p6eval OUTPUT[1111␤]
15:59 moritz_ elf: say 2,3 xx 4
15:59 p6eval OUTPUT[23333␤]
16:06 scrottie joined #perl6
16:29 shlomif joined #perl6
16:34 alester joined #perl6
16:35 diakopter moritz_: ok, but my 2nd point... it should've printed 2341.
16:35 rakudo_svn r28551 | jonathan++ | [rakudo] Get lookup of subs with & sigil working again, so we can do &foo.arity. Do this in a way that should work once we add lexical subs.
16:50 cspencer joined #perl6
16:51 alanhaggai joined #perl6
16:53 shlomif joined #perl6
17:00 Jedai joined #perl6
17:05 rakudo_svn r28552 | jonathan++ | [rakudo] Allow declaration of type variables with the :: sigil; Now 'my ::Foo = Int; my Foo $x; say $x.WHAT' gives Int.
17:08 diakopter pmichaud: to more fully answer your question from earlier, because 'if (<cond>)' will always be longer (by the one character) than 'if(<cond>)', it will win the alternation between the function call and the conditional pattern...
17:42 REPLeffect_ joined #perl6
18:08 lichtkind joined #perl6
18:11 Lorn_ joined #perl6
18:15 sri_work_ joined #perl6
18:16 ruoso joined #perl6
18:16 pugs_svnbot r20895 | diakopter++ | [yap6] added short-circuiting alternation as a special case of longest match alternation. Used the only other overloadable Perl operator with the same precedence as '|'.
18:18 * ruoso in Brasil already
18:21 valkyr0 joined #perl6
18:26 pmurias joined #perl6
18:27 pmurias ruoso: the sm0p grammar works (returns the c code), i haven't plugged it in yet
18:27 ruoso cool
18:27 ruoso is it faster?
18:28 pmurias haven't benchmarked yet
18:28 Khisanth o_O you can write subs named if,while,until,... ?
18:29 moritz_ Khisanth: yes
18:29 pmurias ruoso: but it would be hard for it to be  slower
18:29 ruoso heh
18:30 ruoso if it takes less than 5 seconds for the blocks in the tests, then it's faster ;)
18:30 ruoso (for each one, actually)
18:31 pmurias ruoso: do you have 5.10?
18:32 ruoso not yet... but I have to do the transition today on my machine
18:32 Khisanth sounds like it will make debugging a PITA
18:32 ruoso (which means a lot of modules to recompile)
18:33 pmurias Khisanth: why?
18:33 Khisanth assuming someone decides to be that foolish :)
18:35 diakopter pmurias: I'm coining 'lrule' as "lambda rule"...
18:35 diakopter (another top-level type declaration in this grammar syntax)
18:36 pmurias diakopter: example please
18:37 lichtkind_ joined #perl6
18:38 REPLeffect_ joined #perl6
18:39 diakopter pmurias: lrule commalist { -( plus( ',' ) ) - opt( $_[1], $_[0] ) };
18:40 diakopter rule blkPrmsList { opt( prmDecl ) };
18:40 diakopter oops
18:40 pmurias ruoso: i should have used KP6sm0p.p6 not KP6Grammar.pm?
18:40 diakopter rule blkPrmsList { opt( commalist( prmDecl ) ) };
18:40 diakopter ...this just might work!
18:41 ruoso pmurias, the KP6 version was changed to make it work... it isn't the ideal implementation
18:42 diakopter in that example, $p (the self-referent for each rule) gets unshifted into @_
18:42 diakopter oops, I mean self-reference
18:43 diakopter which makes lrule capable of generating both left- and right-recursive parsers
18:43 rakudo_svn r28555 | jonathan++ | [rakudo] Implement generic subs/methods. You can now collect the type of a parameter by writing a signature like 'sub foo(::T $x) { ... }', and then use T within that method to refer to that type.
18:44 diakopter ... this will clean up Parser.pm a lot...
18:46 Auzon backticks are dead, correct?
18:47 Eevee think so, hope so, not positive
18:48 Auzon Larry wrote to the list that they are reserved for user-defined stuff
18:50 pugs_svnbot r20896 | pmurias++ | [sm0p] sm0p_with_actions does dump the match object unless --horizontal or --vertical options are given
18:50 pmurias ruoso: is KP6Grammar.pm enough?
18:50 pmurias ruoso: it's misc/sm0p/sm0p_with_actions if you want to plug it in
18:51 diakopter is there a term for self-currying?
18:52 ruoso KP6sm0p is the one that is used....
18:52 ruoso the others shouldn't be that different...
18:52 pmurias diakopter: what does self-reference have to do with lambdas?
18:52 ruoso but they might have some small things that were only fixed/implemented in the version being used
18:53 pmurias fix is used for recursion in the lambda calculus
18:55 pmurias diakopter: got confused with the typed lambda calculus
18:59 tuxdna joined #perl6
18:59 ruoso pmurias, btw... I'm still finishing that project...
18:59 ruoso It should end in late june
19:00 ruoso and I'll be able to get back to smop in the start of july
19:02 pmurias ruoso: what are you creating?
19:03 ruoso it's a SOAP+XMPP application with web interfaces for public service scheduling
19:03 ruoso that places where you get a numbered ticket that is later called on a video screen
19:03 ruoso it's a system to handle all that
19:05 Limbic_Region joined #perl6
19:11 diakopter pmurias: wait 'till you see sub lrule
19:22 FurnaceBoy joined #perl6
19:28 cookys joined #perl6
19:44 TimToady hi, guys, you're on the screen at Google-Chi, (though no one's here yet...)
19:44 diakopter lrule is a parser generator generator
19:44 diakopter ohai
19:45 PerlJam What's Google-Chi?  Sounds ominous. :)
19:45 fullermd It's a calming exercise done by groups of people in the park every morning, where they all slowly and serenely search websites.
19:47 PerlJam fullermd: hmm.  I was pronouncing it as google-ki rather than google-chee.  That might have something to do with it.
19:48 TimToady (the tech-talk here is in 15 minutes)
19:50 diakopter information overload warm-up
19:53 yath what tech talk?
19:54 TimToady a google-tech-talk-kinda thing
19:54 Khisanth google expanding into martial arts? :)
19:54 TimToady of course, I'll be talking about the part that isn't googletech
19:55 TimToady (yet)
19:55 scrottie hi Google =)
19:55 yath TimToady: hmm, what exactly is the topic? ;)
19:55 scrottie btw, thanks for sending us Vint Cerf to Google Phoenix.  Most enjoyable!
19:55 TimToady I kinda thought I might talk about Perl 6 today
19:55 TimToady (for a change)
19:55 yath ah, how surprising :)
19:56 diakopter as opposed to talking about it yesterday?
19:56 scrottie Can you stream video?  I couldn't take notes fast enough the first time.
19:56 TimToady it's a shorter talk, so I took out all the Japanese
19:56 scrottie That means less time to write.
19:57 scrottie I'm fighting with SWIG... I'm tryin' to make this go.
19:58 zaphar_ps joined #perl6
19:58 zaphar_ps lol sitting waiting for Larry to talk at google
19:59 * DietCoke ~~ at TimToady.
19:59 Auzon joined #perl6
19:59 wolverian what's the talk about? is it stupid to ask? :)
19:59 scrottie you're laughing and the jokes haven't even started yet?
19:59 zaphar_ps well you know
19:59 scrottie good to have an audiance in a good mood!
19:59 TimToady you guys should be running cool snippets for the folks coming in
20:00 Alias_ joined #perl6
20:00 zaphar_ps I had to miss YAPC so I had to come to this one :-(
20:00 zaphar_ps family vacation came at the wrong time
20:00 TimToady we all have our faults
20:00 DietCoke perl6: 'Hi, google'.say
20:01 p6eval kp6 r20896: OUTPUT[Hi, google␤]
20:01 p6eval ..pugs: OUTPUT[Hi, google␤]
20:01 p6eval ..rakudo r28560: OUTPUT[Hi, google␤]
20:01 p6eval ..elf r20896: OUTPUT[Hi, google␤]
20:01 * DietCoke supposes he should learn some perl6. =-)
20:01 Auzon pugs: multi postfix:<!> (Int $a) {[*] 1 .. $a}; say 6!; # One of my favorite P6 snippets
20:01 p6eval OUTPUT[720␤]
20:02 pmurias TimToady: what did you talk about previously?
20:03 TimToady okay, talk starting, bye
20:03 Auzon Bye TimToady
20:03 pmurias good luck ;)
20:03 Auzon perl6: say [~] <m oo se>
20:03 Auzon oh cool.
20:03 p6eval joined #perl6
20:04 rhr_ pugs: -> $X { -> $proc { $X.( -> $arg { $proc.($proc).($arg) } ) }.( -> $proc { $X.( -> $arg { $proc.($proc).($arg) } ) }) }.(-> $func { -> $n { $n==0 ?? 1 !! $n*$func.($n-1) } }).(5).say
20:04 p6eval OUTPUT[120␤]
20:06 rakudo_svn r28563 | jonathan++ | [rakudo] Improvements/optimizations to rebless_subclass op from chromatic++.
20:11 Auzon pugs: say :60[1,0,0]
20:11 p6eval OUTPUT[3600␤]
20:11 Auzon pugs: say :60[1,1,1]
20:11 p6eval OUTPUT[3661␤]
20:11 Auzon perl6: say :60[1,1,1]
20:11 p6eval kp6 r20896: OUTPUT[syntax error at position 4, line 1 column 4:␤say :60[1,1,1␤    ^ HERE␤]
20:11 p6eval ..pugs: OUTPUT[3661␤]
20:11 p6eval ..rakudo r28563: OUTPUT[Method 'pasttype' not found for invocant of class 'PAST::Var'␤current instr.: 'parrot;Perl6;Grammar;Actions;rad_number' pc 99622 (src/gen_actions.pir:3506)␤
20:11 p6eval ..elf r20896: OUTPUT[Unknown rule: rad_number␤It needs to be added to ast_handlers.␤ at ./elf_f line 1900␤]
20:12 Auzon perl6: say <<<a> <b>>>
20:12 p6eval kp6 r20896: OUTPUT[syntax error at position 12, line 1 column 12:␤say <<<a> <b>>␤            ^ HERE␤]
20:12 p6eval ..pugs: OUTPUT[*** ␤    Unexpected end of input␤    at /tmp/oyMXBG64q1 line 2, column 1␤]
20:12 p6eval ..rakudo r28563: OUTPUT[Statement not terminated properly at line 1, near ">>>"␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤
20:12 p6eval ..elf r20896: OUTPUT[Use of uninitialized value in concatenation (.) or string at ./elf_f line 3425.␤syntax error at (eval 115) line 3, near "> )"␤ at ./elf_f line 3835␤]
20:14 mofino is it ready?  can I convert my whole being to perl6 yet?
20:15 mofino (no)
20:16 DietCoke you go ahead and try, we could use the bug reports.
20:18 stevan_ joined #perl6
20:22 * diakopter hopes we're still on the screen
20:22 pugs_svnbot r20897 | diakopter++ | [yap6] added a function that generates functions that generate
20:22 pugs_svnbot r20897 | diakopter++ | parser generators that curry themselves.  8]
20:43 rakudo_svn r28564 | jonathan++ | [rakudo] Add ops to CLEANUP.
21:05 FurnaceBoy joined #perl6
21:06 pugs_svnbot r20898 | Auzon++ | Vim syntax highlighting: Removed backticks. Attempted to add attribute support to qq and q (qq:!s"" and such)
21:18 jferrero joined #perl6
21:28 donaldh joined #perl6
21:29 pmurias joined #perl6
21:33 pmurias diakopter: why did you add an unused tmp variable?
21:36 diakopter pmurias: same reason as all through Parser.pm ... b/c the things I read said that it's necessary to hold the reference before calling weaken()
21:36 diakopter I'm updating heavily currently; last rev was way broken (of course)
21:37 pmurias yes but i's held in stub
21:37 pmurias * it's
21:38 diakopter oh
21:38 diakopter pmurias: you're up late
21:39 pmurias diakopter: yes
21:39 pmurias 20 to 12
21:39 pmurias 23:41
21:39 pmurias diakopter: you mean i'm talking nonsense ;)
21:40 diakopter pmurias: no
21:40 valkyr0 joined #perl6
21:40 diakopter I've nearly got this.. probably 10 minutes
21:42 pmurias can't sleep, don't have to get up early too
21:42 diakopter pmurias: question
21:42 pmurias go on
21:42 diakopter where in Grammar.pm did you have rule() defining what each_rule_name()
21:43 diakopter I mean, the sub entry should be defined somewhere, right?
21:43 pmurias $Perl6in5::Grammar::{$name} = sub() {$stub};
21:43 diakopter ok.
21:44 diakopter the source filter causes it to be predeclared.. ah ok.
21:44 diakopter ahh, I see where I messed up
21:45 pmurias the lrules have a different prototype
21:45 pmurias * should have
21:46 diakopter yep :) I had just realized that
21:49 araujo joined #perl6
21:50 pmurias diakopter: why do you weaken $stub?
21:51 pmurias what other reference keeps it alive?
21:54 pmurias it = the sub points to
21:54 pmurias s/sub/$stub/
21:55 diakopter I was reading the mailing list archives for MJD's HOP book, and someone there recommended it
21:55 diakopter and if I remember correctly, said they weren't sure why it worked, but that it did.
21:55 diakopter b/c of a bug in perl GC when anonymous subs are used recursively
21:55 diakopter allegedly
21:56 rakudo_svn r28567 | jonathan++ | [rakudo] First cut at implementing anonymous enums.
21:57 pmurias diakopter: i would just throw it out
21:57 moritz_ and use perl 5.10.0, which hopefully fixed it ;)
21:59 pmurias diakopter: yap6 is broken now?
22:00 diakopter pmurias: yeah, like always ;)
22:00 diakopter pmurias: what prototype do lrules need if they need to accept a "subroutine entry"
22:01 pmurias none
22:03 pmurias prototypes are used for achieving stange parsing
22:03 pmurias * strange
22:04 diakopter committed
22:04 pugs_svnbot r20899 | diakopter++ | [yap6] some progress on lrule()
22:04 pmurias should yap6 work?
22:05 diakopter no... lrule() is still slightly broken.
22:05 diakopter but a lot less so.
22:05 pmurias is lrule essential?
22:05 diakopter I was going to use it to convert a lot of the constructors in Parser.pm to grammar rules, since they really belong in the grammar section, not the parser.
22:06 diakopter and also so that recursive parser generators can be auto-generated
22:07 diakopter with an eye toward eventually being able to generate any grammar...
22:07 diakopter at runtime.
22:07 pmurias diakopter: you should definitly remove weaken,as it's gets you nothing and is really just looking for trouble
22:07 diakopter I removed one of them in the last commit
22:09 pmurias it might be cleaner to have a this parser combinator (right terminology) instead of passing the currently defined rule as the first parameter
22:09 diakopter oh, I found my error
22:11 diakopter pmurias: can you restate your last
22:13 pmurias wait
22:14 pmurias lrule commalist { -( plus( ',' ) ) - opt( $_[1], this )
22:14 pmurias };
22:15 diakopter this?
22:16 diakopter ok, I see what you were saying, but I can't imagine how to construct this()
22:17 pmurias i'm sleeping now, will do it tomorrow if you have yap6&lrule in a working state
22:17 pmurias g'night
22:19 diakopter pmurias: thanks
22:26 diakopter decommutation
22:31 Auzon joined #perl6
22:44 cjfields left #perl6
22:51 valkyr0 joined #perl6
23:00 rindolf joined #perl6
23:16 pugs_svnbot r20900 | diakopter++ | [yap6] incremental progress on lrule().  I *think* the only blocking problem now is a discontinuity in the grammar.
23:17 meppl joined #perl6
23:51 bacek joined #perl6

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

Perl 6 | Reference Documentation | Rakudo