Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-03-24

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:23 merlyn joined perl6
00:30 vel joined perl6
00:31 vel joined perl6
00:48 Quell joined perl6
00:56 justatheory joined perl6
01:01 GabrielVieira joined perl6
01:01 GabrielVieira buH
01:09 ruoso joined perl6
01:16 jisom joined perl6
01:22 TimToady ruoso: <foo> always captures.  Use <?foo> to suppress named capture.
01:32 arcady increasingly complicated syntax...
01:32 svnbot6 r9715 | fglock++ | pX//PCR - /opp.pl - operator precedence parser prototype
01:40 vel joined perl6
01:47 amnesiac joined perl6
01:47 justatheory joined perl6
03:19 hexmode joined perl6
03:22 Quell joined perl6
03:23 vel joined perl6
04:09 FurnaceBoy_ joined perl6
04:18 jisom_ joined perl6
04:18 mako132_ joined perl6
04:30 Khisanth joined perl6
04:43 qu1j0t3 joined perl6
04:50 jisom joined perl6
04:56 iblechbot joined perl6
05:40 christo joined perl6
05:54 christo left perl6
06:22 vel joined perl6
06:26 zamolxes joined perl6
06:27 LumberCartel joined perl6
06:45 drrho joined perl6
06:56 GeJ joined perl6
06:56 GeJ good morning folks
07:00 LumberCartel Hello GeJ.
07:08 elmex joined perl6
07:10 ghenry joined perl6
07:13 Aankhen`` joined perl6
07:44 GeJ joined perl6
08:06 Draconit_ joined perl6
09:23 ingy I just realized you can `use Module::Compile;` to force any module into a pmc
09:24 ingy which is kind of cool
09:24 ingy it reads correctly, for sure
09:25 elmex joined perl6
09:26 gaal audreyt: ping
09:26 ingy gaal: I think she said she's at $job for 2 more hours
09:27 gaal k, thanks. (I have the weirdest bug with YAML::Syck, but I'm not very lucky in narrowing it down)
09:28 gaal also, moose.
09:31 xinming joined perl6
09:31 ingy gaal: sorry about your bug... elk
09:32 ingy I have a nasty bug of my own...
09:32 ingy also, elk.
09:33 gaal also, #moose
09:34 * ingy joins #elk
09:37 ingy gaal: ping
09:38 rgs #elk ?
09:38 gaal ingy: ponk
09:38 ingy rgs, yeah!
09:38 rgs I suppose you're on #moose too.
09:38 ingy should <Foo::DATA> dwim?
09:39 gaal I don't think it does in p5....?
09:39 * ingy goes to see how he did it in Spoon
09:39 gaal rgs: you'd think that eh!
09:39 rgs Text after __DATA__ but may be read via the filehandle C<PACKNAME::DATA>,
09:39 rgs where C<PACKNAME> is the package that was current when the __DATA__
09:39 rgs token was encountered.
09:40 gaal urp? but there be more than one!
09:40 gaal file1: package Moose; __DATA__ xyzzy   file2: package Moose; __DATA__ xyzzyier
09:40 gaal which one wins?
09:40 rgs "wins" ?
09:41 rgs by default DATA means __PACKAGE__::DATA
09:41 gaal which DATA do I get if I read Moose::DATA from somewhere that 'use'd both?
09:41 ingy that's what I thought
09:41 rgs then you can have seek() problems
09:41 ingy why is everything always so frickin hard?
09:41 gaal rgs: but file ne namespace
09:41 * ingy hates programming
09:42 rgs gaal: yes, but as __DATA__ stops compilation anyway, you have to cope
09:42 gaal nonono
09:42 rgs perl 6 is better for that
09:42 gaal I meant,
09:42 * rgs hates programmers
09:42 gaal I have two files that enter the same namespace
09:42 rgs aah.
09:42 rgs interesting situation.
09:42 ingy easy to test
09:42 rgs the last parsed one wins
09:43 gaal ah, totally unpredictable. joy (hardly unexpected)
09:44 ingy better that way I think
09:44 theorbtwo Are you generating these files?  Then put the data in strings, not __DATA__.
09:44 rgs I suppose you can close Package::DATA to get what you want
09:44 gaal there should be better ways to talk about compilation units than to conflate them with packages
09:44 rgs certainly
09:45 gaal (I say that every once in a while :/)
09:45 gaal ?eval "here I am"
09:51 nothingmuch joined perl6
09:54 ingy I'm an idiot
09:54 ingy but y'all knew that
09:54 gaal but we love you anyhow
09:54 ingy yeah yeah
09:55 ingy the good news is that the DATA section now works correctly in both .pm and .pmc
09:56 ingy and its tested
09:56 ingy the bad news is that you can't (currently) compile the DATA section
09:56 ingy it is exempt from compilation
09:57 ingy which is the right default behavior
09:57 ingy but it'd be nice to do it if you wanted to
09:58 ingy but I can add that some day
09:58 ingy the problem is that if you Filter the DATA section it kills the DATA file handle
09:59 ingy which may be a bug in F::U::C
09:59 nothingmuch what if you reseek it?
09:59 ingy nothingmuch: that'd be too simple :p
09:59 nothingmuch IIRC the data file handle is basically the same filedescriptor that perl(1) uses to read the .pm
09:59 nothingmuch and if it sees __DATA__ it stops reading, and makes it into a filehandle
10:00 nothingmuch if you're filtering that it keeps reading
10:00 ingy so you'd need to know that correct byte offset
10:00 nothingmuch so you need to reset it when you're done playing with it
10:00 nothingmuch my $offset = tell DATA;
10:00 nothingmuch ....
10:00 nothingmuch seek $offset, 0;
10:01 nothingmuch seek DATA, $offset, 0;
10:01 ingy patch for another day
10:02 ingy you should see that parsing gymastics M::C is doing to find the __DATA__ line
10:03 nothingmuch seek DATA, -length("__DATA__"), SEEK_CUR; ?
10:04 nothingmuch btw, 0 in the other seek means SEEK_SET
10:04 nothingmuch there's also SEEK_END
10:04 ingy I have to get away from @annoying_people_in_this_cafe
10:04 ingy &
10:04 nothingmuch how are they annoying?
10:04 Southen_ joined perl6
10:05 ingy nothingmuch: don't start with me
10:05 ingy I'm in a terrible mood from running a blue pen through the dryer
10:06 nothingmuch ouch
10:06 nothingmuch i'm really interested though
10:06 nothingmuch what are they doing? bugging you every 2 mins/
10:07 ingy nothingmuch: knock it off
10:08 nothingmuch okay okay
10:27 happyman joined perl6
10:33 rgs_ joined perl6
10:42 integral joined perl6
10:44 rgs joined perl6
11:00 KingDiamond joined perl6
11:21 svnbot6 r9716 | szabgab++ | add Hebrew name of Gabor
11:33 svnbot6 r9717 | fglock++ | pX/PCR/opp.pl - new methods
11:36 szbalint :)
11:48 GeJ integral: thank you, you're a true møøse indeed
11:48 GeJ ...better
11:48 integral rofl :)
11:51 ingy elk
11:59 iblechbot joined perl6
12:00 chris2 joined perl6
12:13 nothingmuch joined perl6
12:27 Aragone is now known as Arathorn
12:37 Aankh|Clone joined perl6
12:41 GeJ I'm getting confused. Is there some doc about the proper use of moose and elk. Are they specced?
12:56 Arathorn they're not perl6, are they? (other than being backports of perl6ish ideas into cpan?)
12:57 chihchun joined perl6
13:13 Aankh|Clone is now known as Aankhen``
13:15 svnbot6 r9721 | fglock++ | pX/PCR/opp - implemented prefix/circumfix/postcircumfix/..., left/right/list/...
13:23 gabor529 joined perl6
13:30 svnbot6 r9722 | fglock++ | * pX/../Pugs-Compiler-Rule/opp.pl - operator precedence parser
13:30 svnbot6 r9722 | fglock++ | - cleanup, more examples
13:36 Limbic_Region joined perl6
13:36 nnunley joined perl6
13:44 pmichaud joined perl6
13:45 fglock pmichaud: hi!
13:45 pmichaud hello, fglock
13:47 fglock pmichaud: I'm prototyping an op precedence parser - it builds a p6 grammar
13:47 pmichaud excellent
13:47 pmichaud how do you mean "it builds a p6 grammar", though?
13:48 fglock pmichaud: run http://svn.openfoundry.org/pugs/misc​/pX/Common/Pugs-Compiler-Rule/opp.pl
13:49 nnunley Hrm.... The tests against rule2 in misc/pX/Common/Pugs-Compiler-Rule/t/06-subrule.t look wrong to me.  (<rule1>*) should only have one capture, which is made up of 0 or more matchines on rule1, right?
13:49 * pmichaud svn up's
13:50 fglock nnunley: right - I'll fix it later, sorry
13:50 nnunley I can commit the fix, actually.  Just confirming that I understood it correctly.
13:51 pmichaud fglock: interesting.  It looks like it'll end up being slow to execute, though (rec-descent parsing usually is)
13:51 elmex joined perl6
13:51 fglock pmichaud: yes - but it can be optimized a bit, for eliminating redundant comparisons
13:52 svnbot6 r9724 | nnunley++ | Fix the capture syntax.
13:52 Limbic_Region that's what makes pugs pugs - optimized for fun -Ofun
13:52 pmichaud I originally built the p6 rules parser using rec-descent, and it was really slow -- much slower than I expected
13:52 Limbic_Region become feature complete first - then worry about speed
13:52 pmichaud hmmm, what is        rule r3 { <r2> <[> <parse> <]> }   ?
13:53 pmichaud specifically, the   <[>   and <]>   ...?
13:53 fglock pmichaud: it will be \[ and \] when I cleanup the code...
13:53 pmichaud ah, okay
13:53 Juerd Maybe that should have been <'['> (which terribly breaks my fingers)
13:53 pmichaud makes sense
13:53 Juerd (And that's why I want bare '[' in regexes, without the surrounding <>)
13:55 pmichaud I finished my rewrite of the opp in Parrot last night so that it'll be able to handle listops
13:55 fglock pmichaud: I'm trying to find out how to implement 'is parsed'
13:55 Juerd And then bare $foo can interpolate as a *rule*, because "$foo" would be very intuitive and simple to type
13:55 fglock pmichaud: cool
13:55 pmichaud fglock: I haven't completely figured out 'is parsed'  yet myself :-)
13:57 Qiang joined perl6
14:00 fglock pmichaud: I'll make a try :)
14:03 elmex_ joined perl6
14:03 svnbot6 r9725 | fglock++ | pX/PCR/opp - added 'is parsed'
14:04 fglock I just found some bugs
14:06 theorbtwo There's a place for optimization ideas when initially writing code.
14:06 theorbtwo That place is comments.
14:06 fglock pmichaud: it looks ok now
14:09 svnbot6 r9726 | fglock++ | pX/PCR/opp.pl - all rules are optional
14:12 elmex__ joined perl6
14:38 justatheory joined perl6
14:53 kisu joined perl6
14:54 cheburawka1 joined perl6
14:54 cheburawka1 left perl6
14:55 chris2 joined perl6
15:13 vel joined perl6
15:16 svnbot6 r9727 | szabgab++ | more string related test
15:16 svnbot6 r9727 | szabgab++ | split.t fails now in one place, maybe due to a bug in is_deeply ?
15:35 siosiosios joined perl6
15:45 turrepurre joined perl6
16:04 rindolf joined perl6
16:07 hexmode joined perl6
16:13 rindolf How do I do type annotations in Perl 6?
16:13 rindolf Hi all! BTW.
16:16 PerlJam hello rindolf.
16:18 nothingmuch rindolf: see synopsis 6, and 4 i think
16:18 nothingmuch or maybe that's 2
16:18 nothingmuch anyway, it's all in the synopses
16:20 xinming joined perl6
16:24 gabor529 should $a.tr work the same way as $a.trans or is tr gone ?
16:30 FurnaceBoy joined perl6
16:33 TimToady if tr still exists, it's only as a quote-like operator.  The method is always .trans.
16:41 PerlJam If y/// goes away, I'll be fine with that, but I've grown accustomed to tr/// and its mnemonicness.
16:48 Lorn__ is now known as Lorn_
16:59 nnunley joined perl6
17:02 GabrielVieira joined perl6
17:03 GabrielVieira hi
17:16 DesreveR joined perl6
17:17 bernhard joined perl6
17:22 FurnaceBoy hi
17:24 GabrielVieira :)
17:25 jisom joined perl6
17:34 amnesiac joined perl6
17:36 SamB joined perl6
17:48 ruoso joined perl6
17:49 Guest37849 joined perl6
18:01 ghenry joined perl6
18:01 ruoso fglock, about test 06-subrule.t... the "fix" of the test in fact hidden the bug I wanted to show...
18:02 KingDiamond joined perl6
18:03 ruoso fglock, I added 2 more tests to reveal the problem again...
18:03 svnbot6 r9728 | iblech++ | Usual svn props.
18:03 svnbot6 r9729 | ruoso++ | two more tests to 06-subrule.t... quantified subrules should return an array
18:09 ruoso in /(<rule>*)/... should $0 be an ARRAY, or only $0<rule>?
18:10 justatheory joined perl6
18:14 rindolf nothingmuch: what is Q&D?
18:16 rindolf nothingmuch: in the context of http://search.cpan.org/dist/Test​-TAP-Model/lib/Test/TAP/Model.pm
18:17 nothingmuch joined perl6
18:18 TimToady ruoso: ordinarily $0 would represent a string, if you're matching against a string.
18:19 svnbot6 r9730 | iblech++ | * Restored PIL2JS so my planned live-demo at the Augsburger Linux-Infotag 2006
18:19 svnbot6 r9730 | iblech++ |   (tomorrow; http://www.luga.de/Aktionen/LIT-2006/) works :)
18:19 svnbot6 r9730 | iblech++ |   * The %PackageName::EXPORTS hashes are not declared properly on the
18:19 svnbot6 r9730 | iblech++ |     -CPIL1-side, causing JS to abort while trying to access one of these
18:19 svnbot6 r9730 | iblech++ |     hashes. Worked around.
18:19 svnbot6 r9730 | iblech++ |   * use(...) is macro, defined in the P6 Prelude; it's no longer a magical
18:19 svnbot6 r9730 | iblech++ |     Pugs.Prim. Remedy:
18:19 svnbot6 r9730 | iblech++ |     * Manually declare a &use macro via -e 'macro use'...
18:19 svnbot6 r9730 | iblech++ |     * Use -e 'use Foo;' instead of -MFoo (-M circumvents our macro).
18:19 svnbot6 r9730 | iblech++ |     * (This is done automatically in PIL2JS.pm.)
18:19 svnbot6 r9730 | iblech++ | * Remaining problem (requiring DrIFT skills):
18:19 svnbot6 r9730 | iblech++ |   Compiling Test.pm fails, as pugs attempts to emit a VCode. This is because
18:19 svnbot6 r9730 | iblech++ |   there isn't a DrIFT instance for emitting VCodes.
18:19 svnbot6 r9730 | iblech++ |   Adding a dummy instance works around this problem -- see
18:19 svnbot6 r9730 | iblech++ |   perl5/PIL2JS/vcode-emission-hack.patch -- but unfortunately I don't know how
18:19 svnbot6 r9730 | iblech++ |   to integrate this hack into src/Pugs/Internals.hs, from which
18:19 svnbot6 r9730 | iblech++ |   src/Pugs/AST/Internals/Instances.hs is generated from.
18:19 svnbot6 r9730 | iblech++ | * Summary: With perl5/PIL2JS/vcode-emission-hack.patch applied, PIL2JS works
18:19 svnbot6 r9730 | iblech++ |   again! :)
18:20 ruoso TimToady, but... what if <rule> returns a hash?
18:20 ruoso TimToady, like in P::C::R/t/06-subrule.t
18:20 ruoso TimToady, ok, this test does not returns a test
18:21 ruoso a hash, I mean
18:21 ruoso but basically... rule rule1 { \w }... rule rule2 { (<rule1>*) }...
18:21 ruoso if I match rule2 with abc
18:22 ruoso which would be the value of $0
18:22 ruoso "abc"?
18:22 ruoso or an array?
18:22 ruoso even if $0<rule1> is an array?
18:23 TimToady "abc".  $0<rule1> would, I think, be the array of <rule2> match objects.
18:23 TimToady Now if you'd said (<rule1>)* it'd be the other way.
18:24 TimToady Or, actually, $0 would just be "a", $1, "b", etc.
18:24 TimToady assuming my caffeine level is high enough to actually think rationally.
18:25 ruoso $0 = 'a', $1 = 'b' is a little weird...
18:25 TimToady I'm not thinking straight.  $0 would hold the array of matches in that case.
18:26 TimToady there's only one paren there, so it and everything it matches is accessed through $0.
18:26 TimToady s/paren/parenpair/
18:27 TimToady S05 should be clear on these things, but if not, we need to fix it.
18:28 TimToady bbiab--obviously need more caffeine...
18:28 ruoso TimToady, what I don't understand is what happens when in (<subrule>*) the subrule returns a hash....
18:29 ruoso what would $0 looks like
18:29 TimToady returns as in { return %foo } ?
18:29 TimToady or returns as in the Match object has named subrules?
18:29 TimToady those are different cases.
18:30 ruoso TimToady, as in rule { \w { return { char => 'a' } }
18:30 TimToady the first case you'd use $0<subrule>()<subkey> while the second is just $0<subrule><subsubrule>
18:30 TimToady unless there's an extra [0] in the middle there or some such.
18:31 ruoso but... what would $0 looks like? the string that matched? even if I explict returned something differrent?
18:33 TimToady $0 is always a Match object.  You can use $0 as a string, it's going to evaluate { char => 'a' } in a string context if that is what is returned from a top-level rule.  If it's returned from a lower-level rule, it's hidden in the %$/ somewhere, and the top level is just the matched string.
18:33 svnbot6 r9731 | ruoso++ | better defined tests
18:34 TimToady caffeine &
18:34 svnbot6 r9732 | ruoso++ | oops... the third test is redundant
18:45 Limbic_Region joined perl6
18:46 TimToady s{hidden in the %$/}{hidden in the %$0}
18:50 elmex joined perl6
18:54 TimToady Juerd: bare $foo must *not* interpolate as a rule, or you break $1
18:55 * Limbic_Region offers TimToady 3 quarters, 2 dimes and a nickel
18:56 TimToady Thief to Judge: "But Your Honor, I thought the change would do me good."
18:57 Limbic_Region Judge to Thief: "So you won't mind doing a time in SingSing"
18:57 Limbic_Region err s/time/dime/
18:57 Limbic_Region wow - that lost any possibility for humor
18:57 TimToady and we give no quarter in that quarter...
18:59 TimToady Limbic_Region: the problem with "feature complete before fast" when it comes to recursive descent parsers is that it's really hard to insert new precedence levels, whereas if you target operator precedence in the middle from the start, it becomes almost trivial.
19:00 mago joined perl6
19:02 TimToady Juerd: and while '[' is pretty, I really am trying to resist the urge to turn every non-alphanumeric character into a metacharacter...
19:11 Limbic_Region TimToady - then it isn't feature complete if one of your features is adaptability
19:15 TimToady one could define "adaptability" as the ability to withstand not being feature complete.
19:15 Limbic_Region yeah - I understand pmichaud's perspective
19:16 Limbic_Region he went down that road - discovered that it didn't meet his needs for 2 reasons (speed and adaptability)
19:16 Limbic_Region and was trying to help fglock out
19:17 TimToady indeed. pm is just dishing out what I "dished in" to him some time back...  :)
19:18 Limbic_Region some lessons are better learned first hand
19:18 Limbic_Region see
19:18 TimToady certainly.
19:18 Limbic_Region you learned it by doing it wrong first, pmichaud learned it by doing it wrong first, and now fglock will
19:19 TimToady which is basically the general course of parsing technology in CompSci in general, except...
19:20 TimToady that CS over-reacted and went to pure bottom-up (partly because of hardware limitations).
19:20 TimToady but I think the most humane way of parsing is a mixture of bottom up and top down.
19:20 nothingmuch http://nothingmuch.woobling.org/Context-Handle/
19:20 nothingmuch please comment, anyone
19:21 * Limbic_Region is interested in hearing more but has to wander off for a bit
19:21 Phiend joined perl6
19:29 TimToady nothingmuch: personally I think use of "Want" is a code smell, since it will always break eventually in any language that is not completely lazy.  But maybe that's just me...
19:29 rindolf nothingmuch: hi!
19:29 rindolf nothingmuch: can I ask you some questions about Test::TAP::Model and Test::TAP::HTMLMatrix?
19:31 nothingmuch hi rindolf
19:31 nothingmuch sure
19:31 nothingmuch TimToady: that's why i tried to encapsulate it
19:31 rindolf nothingmuch: what is the purpose of the run() method?
19:31 rindolf nothingmuch: I don't see it called anywhere.
19:31 nothingmuch TimToady: i would like code smell to stay in just one place =)
19:31 nothingmuch preferably a module with a responsible maintainer
19:31 nothingmuch (not me ;-)
19:31 nothingmuch rindolf: it's what runs tests
19:31 TimToady sounds good--kinda like my approach to dwimmery: try to keep it all in one place
19:32 nothingmuch remember that this Test::TAP::Model is a subclass of Straps
19:32 nothingmuch or is it the other run?
19:32 TimToady (or in three or four places, in the case of Perl 6)
19:32 nothingmuch TimToady: i've typed wantarray, Want, want("FOO") and all that too many times when I was just trying to delegate.. that's what this module is solving
19:32 rindolf nothingmuch: there isn't a run in Straps either.
19:32 nothingmuch rindolf: look at the example in the top of the dist
19:32 nothingmuch then it's akin to run_tests in Harness itself
19:33 nothingmuch i don't really remember
19:33 nothingmuch but if it's there it's being used ;-)
19:33 nothingmuch especially with such an important name
19:33 nothingmuch in which package is this run?
19:33 nothingmuch run
19:33 nothingmuch This method runs the list of tests returned by get_tests.
19:33 nothingmuch this is from the TTM docs
19:33 rindolf nothingmuch: it's in Test::TAP::Model
19:34 nothingmuch okay
19:34 nothingmuch so that's the docs
19:34 rindolf nothingmuch: is it part of the Pugs usage?
19:34 nothingmuch i think it's a refactoring on top of Straps
19:34 nothingmuch no, TTM is completely generic
19:34 nothingmuch it's got nothing to do with pugs
19:35 rindolf nothingmuch: I See.
19:35 rindolf nothingmuch: so it's part of the interface, but not used by Pugs.
19:35 nothingmuch right
19:35 nothingmuch oh
19:35 nothingmuch no
19:35 rindolf nothingmuch: I see.
19:35 nothingmuch it's part of the interface
19:35 nothingmuch it may be used by pugs
19:35 nothingmuch i can't remember
19:35 nothingmuch oh
19:35 nothingmuch i remember
19:36 nothingmuch if you subclass Test::TAP::Model and you provide the get_tests method
19:36 nothingmuch then ->run will invoke run_tests( $self->get_tests );
19:37 nothingmuch this is both documented and readable in source, btw
19:39 rindolf nothingmuch: yes
20:08 svnbot6 r9733 | fglock++ | * pX/PCR/opp.pl - optimized for less backtracking
20:25 macli joined perl6
20:33 GeJ joined perl6
20:48 ruz joined perl6
20:52 osfameron joined perl6
20:52 sky_ joined perl6
20:58 lisppaste3 joined perl6
21:20 svnbot6 r9734 | iblech++ | * Added my updated "Perl 6, genau jetzt!" talk for the 6. Augsburger
21:20 svnbot6 r9734 | iblech++ |   Linux-Infotag 2006 to docs/talks/README.
21:20 svnbot6 r9734 | iblech++ | * BTW, Audrey, you might be interested in my takahashi->LaTeX-preprocessor:
21:20 svnbot6 r9734 | iblech++ |   http://xrl.us/takahashi2latex
21:20 svnbot6 r9734 | iblech++ |   See http://xrl.us/lit06perl6sources for example sources (:sy off; very long
21:20 svnbot6 r9734 | iblech++ |   lines). :)
21:30 gaal iblech! :)
21:40 pasteling "fglock" at 200.17.89.80 pasted "grammar generated by the opp.pl" (8 lines, 296B) at http://sial.org/pbot/16480
21:53 ruoso fglock, I was, at home, working out to make 'concat' rule op stop generating a new match object, but add the sub-matches to the parent match if match... what do you think about it
21:53 ruoso ?
21:54 gaal iblech: got a test case for Test.pm not being broken?
21:56 gaal ah, got it
21:59 weinig joined perl6
22:02 fglock ruoso: it worked this way - but it is simpler to just create 'binary' matches
22:03 ruoso fglock, to create, maybe... to use it later... certinly not... :)
22:03 ruoso 06-subrule.t now represents the need for it...
22:03 ruoso fglock, actually I was in doubt of * being implemented with [+]?
22:04 ruoso isn't it the opposite?
22:04 ruoso I mean, .+ is a shortcut to ..*
22:06 fglock ruoso: I'm too tired to find out :) - I just came from class
22:06 TimToady Not if . is really (foo).  (foo)+ is different from (foo)(foo)*
22:07 ruoso fglock, but take a look at 06-subrule.t later... this is my point now...
22:07 TimToady It's the same general "you can rewrite this as that provided you ignore side effects" trick.
22:08 TimToady 0 < func() < 10, or func() += 10 are other cases
22:08 ruoso TimToady, I see...
22:09 theorbtwo OTOH, .+ really is exactly eqiv to .{1,}, for any value of C<.>.
22:09 theorbtwo Erm, however you say that in p6-rules.
22:10 theorbtwo ...and just plain . is equiv to .{1,1}.
22:10 TimToady yes.  at one point we distinguised .? from .**{1} but lately we unified those too.
22:11 TimToady /guised/guished/
22:11 theorbtwo .**{1} ?
22:11 TimToady s/^/s/
22:11 TimToady p5's .{1} is written .**{ something returning range }
22:11 TimToady where 1 is a degenerate range
22:11 nothingmuch joined perl6
22:11 theorbtwo Ah, right.
22:12 TimToady but it's a general closure, as most anything in curlies is these days.
22:13 TimToady sorry, I meant .**{0..1} above there to be equiv to .?
22:14 TimToady Initial A5 had .? returning scalar that might be undef, but now it always returns a list of 0 or 1 elements, just like .**{0..1}
22:15 theorbtwo Ah, I grok now.
22:18 PerlJam .**{0..1}  looks like so much syntax for something so simple
22:18 fglock ruoso: .* tries inf,..2,1,0 ('.+' or null); .*? tries 0,1,2... (null or '+?')
22:19 ruoso fglock, ok...
22:19 FurnaceBoy joined perl6
22:20 theorbtwo PerlJam: So write .?, which is exactly the same thing.
22:21 TimToady PerlJam: the point is to Huffman code it according to frequence of usage, and the general form just isn't used often enough to justify a shorter syntax, especially since we want the closure to actually be a closure, but recognizably not of the other closure forms.
22:23 theorbtwo Hm, .*{closure} or .x{closure} is numonic with the "times" operator.
22:23 TimToady but ambiguous with .* {closure} unless you force space there.
22:23 TimToady ** is illegal in current regexen, at least.
22:24 TimToady but yes, .*{...} is certainly one of the forms we considered...
22:24 theorbtwo OK.
22:25 * theorbtwo isn't seriously suggesting things, just kind of thinking aloud.
22:25 TimToady np
22:25 theorbtwo ...while avoiding thinking about how to represent "nets" in ktechlab.
22:26 theorbtwo (Think wires && edges on a graph.)
22:32 chromatic joined perl6
22:32 chromatic http://www.oreillynet.com/onlamp/blog/20​06/03/inside_parrots_compiler_tools.html
22:32 chromatic I figured that a short explanation of TGE and such might be interesting.
22:33 PerlJam chromatic++
22:33 fglock chromatic: I was about to ask where I could read about p6 parsing strategies
22:34 chromatic Reading the Punie code is instructive, once you know what the pieces are and how they fit together... if you know PIR.
22:36 PerlJam There are far too many P-things these days parrot ponie punie past post pir pasm  pppppp
22:37 PerlJam chromatic: Does that mean that there's a punie-explained post in the future? :)
22:37 chromatic Possibly.
22:38 chromatic Perhaps.
22:38 chromatic Potentially.
22:39 nothingmuch http://nothingmuch.woobling.​org/Config-PackageGlobal-OO/
22:39 nothingmuch please comment
22:42 fglock I'm looking for an explanation on where to use bottom-up/operator-precedence/top-down in p6 parsing
22:43 fglock I have a general idea, but maybe someone have written about this
22:43 PerlJam fglock: that would be an interesting post too, if someone would write it up.
22:45 fglock left perl6
22:46 fglock joined perl6
22:48 TimToady fglock: http://groups.google.com/group/perl.perl6.compil​er/browse_thread/thread/acbfb437f6b8e270/7e4f081​b5148c6b3?lnk=st&amp;q=larry+wall+three+top+down​+bottom+up+parser&amp;rnum=1#7e4f081b5148c6b3
22:48 TimToady has some about it.
22:50 * PerlJam is trying to cajole pmichaud into writing a short article on it, but he's too busy.
22:50 * nothingmuch quotes TimToady from the hackathon:
22:50 nothingmuch top down when needed
22:50 nothingmuch bottom up when possible
22:50 nothingmuch jsut like the dynamic/static issue =)
22:51 nothingmuch if the parser fails bottom up it will try again top down
22:51 nothingmuch for better errors
22:51 nothingmuch and other stuff which I don't remember
23:05 ruoso joined perl6
23:23 pdcawley_ joined perl6
23:45 Khisanth joined perl6
23:49 * ruoso preparing a talk about the monastery

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

Perl 6 | Reference Documentation | Rakudo