Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-02-03

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:01 Psyche^ is now known as Patterner
00:25 macli left perl6
01:10 ofer0 joined perl6
01:11 ofer0 joined perl6
01:42 svnbot6 r15168 | Darren_Duncan++ | ext/Set-Relation/ : renamed operator project_all_but() to remove(), and removed its select_all_but() alias
02:04 jrockway joined perl6
02:05 jrockway joined perl6
02:09 DebolazX joined perl6
02:24 Aankhen`` joined perl6
02:24 justatheory joined perl6
02:28 DebolazY joined perl6
02:42 Khisanth joined perl6
02:45 dmq joined perl6
03:39 thestarslookdown joined perl6
04:03 amnesiac joined perl6
04:09 nicodaemos joined perl6
04:10 nicodaemos joined perl6
04:12 gnuvince_ joined perl6
04:21 justatheory joined perl6
05:44 nipra joined perl6
05:57 thestarslookdown joined perl6
06:01 ashleyb joined perl6
06:14 BooK joined perl6
06:21 jisom joined perl6
07:30 devogon joined perl6
07:34 DebolazX joined perl6
07:35 reZo joined perl6
07:52 DebolazY joined perl6
08:09 iblechbot joined perl6
08:24 nipra joined perl6
08:38 Belaf joined perl6
08:39 larsen_ joined perl6
08:50 bernhard joined perl6
09:04 DebolazX joined perl6
09:12 DebolazY joined perl6
09:19 elmex joined perl6
09:42 bjoern_ joined perl6
09:44 pasteling "bjoern_" at 84.56.243.184 pasted "Removing left recursion from CFGs using derivatives" (73 lines, 2K) at http://sial.org/pbot/22789
09:45 bjoern_ If anyone with insight into formal languages, left recursion, and ideally Brzozowski's "Derivatives of Regular Expressions" could have a look at that, that would be great.
09:51 dduncan left perl6
09:53 dmq theres a couple of good articles on perlmonks about left-recursion elimination. and the one i wrote isnt really the one i mean.
09:59 bjoern_ if any of them has actual computer code that automates the process, I'd appreciate pointers, so far I could not find anything.
09:59 bjoern_ Note though that above I propose an algorithm to do this that is extremly easy to implement for me (compared to any kind of standard algorithm), if it actually works.
10:09 chris2_ joined perl6
10:10 chris2_ is now known as chris2
10:21 polettix joined perl6
10:24 svnbot6 r15169 | szabgab++ | smartlinks.pl - add option --dir to traverse t directory
10:24 svnbot6 r15170 | szabgab++ | add "elems" to perl6.vim
11:05 VanilleBert joined perl6
11:06 ludan joined perl6
11:22 polettix is now known as poletti
11:26 devogon joined perl6
11:29 poletti is now known as polettix
11:39 iblechbot joined perl6
12:04 bonesss joined perl6
12:16 bjoern_ To reformulate my question above. Is it true that for a left-recursive pattern p its non-left-recursive equivalent is `p1 followed by zero or more of p2` where: p1 is p if it wasn't allowed to start with an instance of itself, and p2 is what is left of p after matching an instance of itself.
12:19 explorer joined perl6
12:32 buetow joined perl6
12:35 b00t joined perl6
13:01 rgs Juerd++ # nice posts on P5P
13:25 Juerd rgs: Thanks
13:27 shay morning folks (IST)
13:27 Juerd shay: Right. Good localtime. Let's get you that feather account :)
13:28 shay Juerd, morning :P
13:30 Juerd shay: You've got mail.
13:30 shay Juerd, checking, thanks
13:42 elmex joined perl6
13:47 wilx` joined perl6
13:52 explorer joined perl6
13:55 bonesss joined perl6
14:04 rindolf joined perl6
14:17 shay Juerd, is there a copy of the SVN repository somewhere in feather? or should every user get a copy of it?
14:19 shay oh, I guess that it's in /data/svn
14:26 Juerd shay: Absolutely, but you're better off using the svk repository provided by Audrey
14:27 Juerd shay: See http://feather.perl6.nl/
14:27 lambdabot Title: Perl6 Community Development Server
14:27 Juerd http://feather.perl6.nl/svk.html
14:27 lambdabot Title: SVK on Feather
14:44 weinig|bbl is now known as weinig
15:17 shlomif joined perl6
15:19 shay Juerd, awesome, thanks
15:20 Juerd Thank you for contributing :)
15:21 shay Juerd, the pleasure is all mine, altough I'm not too experienced, just trying to add my drop on the ocean ;)
15:33 shlomif is now known as rindolf
15:49 kanru joined perl6
15:54 drupek12167 joined perl6
16:02 rfordinal joined perl6
16:08 mr_ank joined perl6
16:09 cognominal joined perl6
16:09 rgs joined perl6
16:09 avar joined perl6
16:09 TimToady joined perl6
16:10 shay joined perl6
16:10 cdfh joined perl6
16:10 pjcj joined perl6
16:13 marmic joined perl6
16:13 spoop joined perl6
16:14 buubot joined perl6
16:15 rashakil_ joined perl6
16:15 reZo joined perl6
16:16 stef_ joined perl6
16:16 weinig is now known as weinig|bbl
16:17 rashakil_ joined perl6
16:17 svnbot6 joined perl6
16:17 fridim joined perl6
16:17 rashakil__ joined perl6
16:18 fridim joined perl6
16:34 explorer joined perl6
16:36 LibertyBasic joined perl6
17:05 putter joined perl6
17:06 weinig|bbl is now known as weinig
17:06 putter what an aptly named module
17:06 lambdabot putter: You have 1 new message. '/msg lambdabot @messages' to read it.
17:06 putter use overload
17:07 putter 7 minutes -> 12 seconds by use()ing less overload.
17:08 putter @tell gaal awesome!
17:08 lambdabot Consider it noted.
17:08 putter (ffi on p5 waking up)
17:12 TimToady mornin'
17:13 rindolf Hi TimToady
17:13 rindolf TimToady: it's 19:13 here.
17:14 TimToady we're slow out here...it's only 09:13, er :14
17:14 rindolf TimToady: will you send an armed goon to force Ask Bjorn Hansen to reply to my XML::RSS emails?
17:15 rindolf Or else I'm going to re-implement it in Intercal.
17:15 TimToady must be frustrating; most of the world is waiting for California to wake up most of the time
17:15 rindolf TimToady: actually, I sent him these emails like a week ago.
17:15 rindolf But I think he's been on vacation.
17:15 Belaf joined perl6
17:15 rindolf I spotted him on Jabber, but he didn't replyy.
17:15 TimToady armed goons like to go on vacation too--where is he?
17:16 rindolf TimToady: I think he's back home.
17:16 TimToady then I'll send the armed goons back home.  :)
17:17 rindolf TimToady: :-)
17:23 dmq fo.o.ba.r.|+ba.z.bo.p.|+.
17:24 dmq er, sorry. wrong window.
17:24 PartclCoke TimToady: Hio.
17:24 dmq still reverse polish regexes are hard to read.
17:25 turrepurre joined perl6
17:26 putter lol
17:28 dmq ive been tinkering with the algorithm in the regex article of late.
17:28 dmq seeing what would be involved to hack it into perl when possible.
17:32 * putter slogs away at getting yet_another_regex_engine ast populated enough to pass p5's re_tests.
17:32 dmq ah.
17:32 rindolf putter: does it pass Regexp::Common? ;-)
17:32 putter Funny you should ask that...
17:32 dmq heh, its not clear if blead passes Regexp::Common.
17:33 putter Anyone know the status of bleadperl's attempt to make the regexp engine overridable?
17:33 dmq er, me?
17:33 dmq oh you want to know what it is?
17:33 dmq :-)
17:33 dmq its mostly pluggable. what do you want to know
17:33 putter I'm afraid the only real test of a p5 regex engine is to swap it into perl and throw lots of re intensive modules at it.
17:34 dmq yes.
17:34 dmq building perl with a given implementation is a reasonably good test.
17:34 dmq but still not complete.
17:34 dmq youd want to pass pat.t as well
17:35 dmq have a look at the tests listed under the test-reonly target in the win32 makefile.
17:35 putter last time I looked at it, there was all sorts of pain.  accessing a variable from inside the compile hook was enough to cause a later segfault.
17:35 putter s/it/the regex hooks/
17:35 dmq how long ago was that?
17:36 * putter svn log's re:override...
17:36 dmq if it didnt involve creating a regexp_engine structure then its long enough ago that it doesnt matter.
17:37 putter Q1 '06
17:37 dmq no too early almost for sure.
17:37 putter nifty
17:37 dmq nowadays you should be able to create a regexp_engine structure and it should work.
17:38 putter blead doesn't pass R::C?!?
17:38 dmq i dunno, but given a bug i found recently in how (??{}) works i wouldnt be surprised.
17:39 dmq its a good point actually i should try R::C on blead again. I havent done that in ages.
17:39 * putter was just now implementing (??{}).... small world
17:39 dmq BTW, you can have a look at re:engine::PCRE
17:39 dmq well, want a bit of insight into a structural issue that exists currently in the engine?
17:40 putter sure! :)
17:40 dmq remember that a given regex can PL_curpm, AND be the current regex, AND be executing as the result of a (??{}) all at the same time.
17:40 dmq and if they store capture data in the regexp struct, well, things go boom.
17:41 putter indeed
17:41 dmq especially as you have to factor in that a (??{}) could die anytime.
17:41 dmq :-)
17:41 dmq yet cant be localized afaik.
17:42 dmq actually, strike that last comment, i havent worked it out yet. it could be wrong.
17:42 putter yet_another only uses the "real" p5 engine for "leaf" expressions.  anything backtrackable, groups, and code things are all reimplemented in vanilla p5.
17:43 dmq ah.
17:43 putter bonus is one should be able to transliterate it to run on top of any languages pcre.
17:43 dmq is it a BNFA like perl?
17:43 dmq 'backtracing NFA'?
17:44 putter brute force tree of anonymous subs
17:45 dmq bruteforce?
17:45 putter have to leave stuff for the parser folks to do.  I just want to bootstrap.
17:45 nipra joined perl6
17:46 dmq er, ok. :-)
17:47 putter brute force == absolutely no attempt to be smart.  no parser theory, no compilation, no tables and states, no memoization or packratting, no... nothing.  just try, and backtrack, and try, and...
17:47 dmq right. gotcha.
17:47 nwc10 joined perl6
17:48 nwc10 I've no idea if this is old hat [particularly given that dmq is here :-)]
17:48 nwc10 timtoady: dmq pointed me to http://swtch.com/~rsc/regexp/regexp1.html
17:48 lambdabot Title: Regular Expression Matching Can Be Simple And Fast
17:48 dmq im looking into about as opposite a set of material as you can get and still be on the same subject.
17:48 putter is there an "official" name for (?(N)t|f)  constructs?
17:48 dmq IFTHEN
17:48 putter phone bbiab
17:48 dmq er,
17:48 dmq wait
17:49 dmq conditional patterns.
17:49 dmq nwc10: yes its a good article, im actually working on it right now actually.
17:50 dmq using thompsons algorithm.
17:50 nwc10 I've gone back to 5.8.9
17:50 dmq gone back?
17:50 TimToady nwc10: it was linked last week from PM
17:50 nwc10 ah righto
17:51 nwc10 you can see where I don't look :-)
17:51 TimToady putter: it's the "conditional" construct
17:51 TimToady oh, dmq answered it already...
17:51 dmq wrong at first. :-)
17:52 TimToady no, I meant putter's Q
17:52 TimToady oh, you did too, nevermind
17:52 TimToady still too early, obviously...
17:52 dmq ive been thinking of how to expand his code to handle unicode. its not so clear.
17:53 nwc10 look at how plan9 had done it
17:53 TimToady putter's code? oh, thompson's...
17:53 nwc10 potentially pike's stuff in plan 9 is as interesting
17:53 dmq the plan 9 stuff uses utf-16 iirc.
17:54 dmq in perl5 anyway you have to deal with ascii and utf8 together in some kind of reasonable way.
17:54 nwc10 seems to also mention UTF-8 in http://swtch.com/plan9port/unix/
17:54 lambdabot Title: Unix Software from Plan 9
17:54 nwc10 ASCII isn't your problem. 8 bit is
17:54 nwc10 well, our
17:54 TimToady not knowing the encoding is the only real problem.
17:54 dmq well whatever you want to call the high bit char set that isnt utf8 in perl5. ;-)
17:55 nwc10 if they're doing switchable (16 bit) widechars vs UTF-8, then I think it's the same logic as would be needed for switchable 8 bit "wide" chars and UTF-8
17:55 nwc10 but I'm not really thinking that hard here
17:56 dmq im trying to avoid having a state that needs more than 256 transitions coming out of it without doing anything painful.
17:57 nwc10 yes, I did start to think that that could be hell
17:57 dmq so i was thinking of maybe converting high bit ascii to utf8, then using the full utf8 representation byte by byte in the nfa.
17:57 TimToady many engines just pretend it's bytes and merely put extra constraints on where the character boundaries are considered "real"
17:58 TimToady Jperl did that with JIS, iirc
17:58 nwc10 it does seem a simple way, and if all your date is valid UTF-8, you can't get partial matches
17:58 dmq yeah, that was kinda my thinking too, and if you used utf8 then you dont need to worry about it. and it makes case insensitive matches easier.
17:58 dmq since you would use the same logic for highbit as for case folding...
18:00 dmq the other question is what needs to happen with thompsons algorithm for capturing.
18:00 dmq i guess open,close becomes a state with a side effect.
18:01 TimToady there is literature on that subject.
18:01 dmq yes
18:02 TimToady "tagged transitions" is one thing they call them, if I recall
18:02 dmq i think you can extrapolate what needs to happen from how you handle $& in a floting match
18:03 TimToady yeah, implicit .*? on the front...
18:03 TimToady which a lot of people mistake for implicit .*
18:03 nwc10 me being one of them
18:04 dmq or fake it, and just make a fail transition result in a swap back to the start state, at the same time as updating the "start position" to the current point.
18:04 TimToady I'm still not sure the concept of minimal matches can be fit cleanly into true regular expressions...
18:04 TimToady rsc seemed to think so.
18:05 nwc10 but there was a lot that didn't fit into the margins of that paper
18:05 nwc10 and no plan surives first contact with the enemy
18:05 TimToady troo nuff
18:05 dmq ? (X|), ?? (|x)
18:05 TimToady I see no enemy here <ow! quit it!>
18:05 dmq im not sure how you would do * or + tho.
18:06 TimToady | is unordered in real regex
18:06 dmq right, good point.
18:06 dmq nods.
18:06 TimToady * is primitive
18:07 TimToady x+ is xx*
18:07 dmq yes
18:07 TimToady and {n,m} reduces to some sequnce of x x? or x*
18:07 nwc10 but I got a bit scared that those could become rather long
18:08 TimToady s:31st/<null>/e/
18:08 dmq yes.
18:08 TimToady well, yes, that's where you get your famous state explosion.
18:08 dmq rsc seemed to think that was not an issue, but didnt seem to say how.
18:10 TimToady well, state explosion is not an issue when you calculate your states on the fly only for the current piece of data.
18:10 TimToady as all modern greps do, for instance.
18:11 Schwern joined perl6
18:11 weinig is now known as weinig|away
18:11 dmq yeah, but the algorithm hes done constructs an nfa and then converts it to a dfa on the fly, so the DFA states wont explode, but the NFA states will be fixed. they arent lazily evaluated.
18:12 putter .
18:12 TimToady ?
18:13 dmq i guess you only /need/ to unroll a {n,m} so that its at most as long as the longest non {n,m} branch that it can coevaluate with.
18:14 TimToady that's just ordinary state collaps
18:14 TimToady e
18:15 dmq like /foo|a{1000}/ only needs to be full decomposed into the NFA form for /foo|aaaX/ where x is a special state that must match a{997}
18:15 dmq ordinary state collapse?
18:16 TimToady that's no good for /arf|a{1000}/
18:16 TimToady you might start another arf in the middle a{1000}
18:16 putter synced
18:16 putter :)
18:17 TimToady yes, your parallel NFA execution gets to that point and throws away all the unreachable states, and then is just linear to the end of a{1000} with one state, that's all.
18:17 TimToady trying not to unroll into NFA is a false economy
18:18 TimToady just unroll it, and let it keep its one state, and then it can also handle the case where /arf|a{1000}/ has to start splitting states again.
18:18 rashakil joined perl6
18:19 dmq unroll it into 1000 NFA nodes?
18:19 TimToady and it only has to do that if it sees 'a' in the data
18:21 TimToady could unroll lazily too, I suppose
18:22 TimToady but for some patterns maybe that's where you just throw it over to the backtracking engine.
18:23 dmq yeah.
18:23 TimToady at least if you can prove that a{1000} will stay one state
18:24 TimToady this is basically what we're trying to figure out with the P6 engine, how far we can push DFAness and then smoothly transition to a procedural approach
18:24 dmq yeah.
18:24 TimToady hopefully without much explicit guidance
18:25 TimToady that's what all this "longest token" stuff is about, basically.
18:25 TimToady though we really want to push it a little beyond that.
18:25 dmq you are switching from leftmost longest to longest token, or at least encouraging it?
18:25 dmq that makes sense.
18:25 TimToady we are requiring it for | and disabling it with ||
18:26 TimToady | becomes declarative, || procedural
18:26 dmq whcihc i would call encouragment. (ie changing the smantics of |)
18:27 TimToady I'd call it "old age and treachery"  :)
18:27 dmq heh
18:28 TimToady most of the time the naïve user won't even notice the difference, except it running faster (hopefully)
18:28 TimToady and the expert user will be instructed to use || if they really want leftmost
18:29 dmq can i do that in perl 5.10?
18:29 dmq ;-)
18:29 TimToady anyway, it also fits in with the meaning of | and || outside regex in P6
18:30 TimToady I suspect p5p might notice if you tried to do it treacherously.  :)
18:30 weinig|away is now known as weinig
18:30 dmq yes but you are allowed to issue get out of jail cards.
18:31 dmq :-)
18:31 dmq still, maybe a new (?...) construct could change the meaning of |
18:31 TimToady that doesn't mean the jailor will respect it
18:32 dmq maybe (?|foo|bar) has the nonshortcircuit behaviour.
18:32 TimToady more likely a pragma, I'd think, since you'd want to write a grammar with it.
18:32 TimToady and because the P6 interpretation of | extends to subrules!
18:32 dmq well with a pragma you might as switch in a new engine.
18:33 TimToady all is fair if you predeclare
18:33 dmq anyway, i must run and get groceries.
18:33 TimToady hey, that's kinda catchy...
18:33 dmq hmm (?|...|...) kinda makes sense...
18:33 TimToady later
18:34 dmq ciao
18:39 * putter tries to think of a stable language with multimethods that folks could use to start building rx optimization infrastructure....
18:39 putter it being much easier to transliterate something working than to start from scratch
18:40 putter CL anyone?
18:40 nwc10 although dogfood forced progress
18:41 nwc10 unless it tastes so bad it kills you
18:41 TimToady CL doesn't really have true multis, I think
18:42 TimToady it just has a way of emulating nested switch statements left to right.
18:43 nwc10 why is d next to s on a QUERTY keyboard?
18:43 TimToady putter: on the subject of derived grammars, I'm basically coming to the conclusion that deriving from mutable grammars is a Bad Idea.
18:43 TimToady samnes if I know...
18:44 nwc10 :-)
18:45 TimToady no, you're supposed to reply "no dhit"
18:45 putter TimToady: re mm, my objective is just to avoid a visitor-based infrastructure.  which CL mm should be good enough for.
18:45 nwc10 sorry.
18:45 TimToady I do not recognize this word "dorry"
18:46 putter re Bad Idea, ... I *like* bad ideas in cs.  ;)
18:47 putter but ok, any particular reason?
18:47 nwc10 Gah. tricky to utter anything coherent without a certain pair of letters
18:47 nwc10 (note the time gap)
18:47 TimToady when I say "use MyGrammar" I want it to stay consistent all the way through this lexical scope.
18:47 TimToady I don't want someone changing the grammar halfway through
18:48 TimToady also, mutable grammars (see magic hashes) make you reinvent dispatch
18:48 putter phone bbiab
18:49 TimToady note also that you didn't succeed.
18:49 TimToady you blew it on the last letter
18:50 nwc10 gah yes
18:54 TimToady putter: so I think grammar munging maps to mixin semantics, but I think we'll need to be lazy about recalculating our longest-token engine, or every new sub declaration will force recalculation.
18:54 TimToady well, arguably every declaration changes the recognized language, including "my $foo".
18:55 TimToady but we could probably finesse non-macro defintions not to recalculate even without laziness, I suppose
18:57 TimToady it's easy to visualize how deriving a new anonymous grammar and adding a production to it hides any corresponding production in the parent grammar
18:58 TimToady the sticky point (and this is where the hashes were (mis)-aimed) is enumerating all the currently visible rules so that the longest-token/DFA analysis can happen
19:00 TimToady so I think we still need some kind of regex registry that transitively calculates the set of currently visible regex given some entry point or other.
19:00 putter back
19:00 nwc10 left perl6
19:01 * TimToady has been talking to himself...
19:01 putter :)
19:02 TimToady has TimToady been making any sense at all?
19:02 putter me too.  but it's like tickling, you just don't get the same synergy.
19:02 putter unless you introduce a time delay
19:02 putter pondering...
19:04 putter one thought: I start from the point of not worrying that the implementation will have to be smart to be efficient.  as long as we're no where near "a sufficiently smart compiler can" illusions, I expect the implementation to necessarily be complex anyway, so I don't mind paying a bit for right thingness.
19:04 TimToady and instead of having %prefix := { '+' => rule {...}, ... } there are methods with names like "parse_prefix:<+>"
19:05 TimToady since "prefix:<+>" is the name of the actual operator, not the rule that parses it.
19:06 TimToady re one thought: yes, but I try not to step across the little line marked "possible/impossible".
19:06 TimToady and mutable grammars are balanced close to that line.
19:06 putter re consistency, I like being able to mutate, but agree it should be scoped.
19:07 TimToady especially if someone can mutate them while I'm using them.
19:07 TimToady s:3rd/<sp>/ else /
19:09 TimToady anyway, it'd be nice not to have the grammar recalculation tied into some kind of external event notification.
19:09 TimToady even if it were sane
19:09 putter re mutate while using, isn't that just the same as eval()?  easy for the compiler to spot, and if that means no optimization happens, well, that's the tradeoff the user has to make.
19:09 TimToady another thought, perhaps deriving from a grammar is more like "does"
19:10 TimToady (with the implied semantics that if you "does" a class it takes an immutable snapshot of it for the role)
19:10 TimToady and the role doesn't see subsequent changes to the class that was snapshotted
19:11 jisom joined perl6
19:11 putter (for redsix I did just such even notification, because I wanted to build up the grammar incrementally, and didn't want to worry about the order in which things were constructed)
19:11 putter s/even/event
19:12 TimToady well, that's definitely the Rubyesque approach.  :)
19:12 putter :)
19:13 TimToady hoping to give the optimizer a little more rope to hang you with here, though.
19:14 putter re enumeration, well, i've already mentioned the   expression__infix<+>  gets sucked into an <expression> is everything with prefix 'expression__' idea.
19:14 TimToady could go as far as to say that grammars are all roles, and only every have anonymous classes generated from them when you're actually compiling.
19:14 putter which sounds like parse_prefix:<+>, or no?
19:14 TimToady this is very like the declarative / procedural distinction we're getting for regex.
19:15 allbery_b joined perl6
19:15 putter if a class does a grammar, what happens when that class is inherited from?
19:16 TimToady how would that be different from doing any other role?
19:17 TimToady < putter> which sounds like parse_prefix:<+>, or no?
19:18 TimToady yes, except
19:18 TimToady I was thinking you'd never write parse_ yourself
19:18 TimToady that'd just be "macro prefix:<+>" or some such.
19:19 TimToady so we can also hang all the same properties that the user might, such as precedence
19:19 TimToady and the parse_ form would autogen from that
19:20 TimToady but yes, it could autogen both a parse_-ish form and a <prefix> rule
19:21 putter re autogen, agreed
19:21 TimToady except that the <prefix> has to regen when you derive
19:21 TimToady and the parse_ form doesn't
19:21 TimToady well, <prefix> regens if anything in prefix_* overrides, I guess
19:22 TimToady but arguably all subs are prefix:<foo> underneath
19:22 rindolf left perl6
19:23 putter re "how would that be different from doing any other role" ... so the argument would be, if you use %foo in a regex, instead of a <foo>, ... the user is making the equivalent of the %foo vs %.foo distinction in coding a sub???
19:23 * putter 's brow is furrowed
19:24 thepler joined perl6
19:25 TimToady I guess (with similar furrows, I guess)
19:25 TimToady our %foo in role %A is A::<%foo>
19:26 TimToady I think...
19:26 TimToady sometimes it's hard to know what's auto-generic in a role...
19:27 TimToady so I'm probably wrong, and it's $?CLASS::<%foo>
19:28 TimToady that's probably sane
19:28 putter i suppose if one can say both %foo and %.foo in a grammar, things are simply as they are in roles...
19:29 putter can one say %foo in a role?
19:29 * putter needs to review roles, memory fuzzy
19:29 TimToady I remember them well, and am still fuzzy.  :)
19:29 putter lol
19:33 TimToady well, I think I'll see how far I can drive the idea that if you say "macro" in a grammar, it's defining a token from the user's point of view.
19:34 TimToady but that's probably a stupid idea.
19:34 TimToady how would we tell that from a macro to be used in the grammar?
19:34 TimToady hmm
19:34 TimToady ss/used in/used by/
19:35 TimToady maybe "token prefix:<+>" can be recognized specially
19:36 TimToady token prefix:<-> is equiv(&prefix:<+>) { <expr> } or some such hybrid
19:39 TimToady with some additional declaration that establishes any policy that applies to all prefix: while letting the actual <prefix> autogen.
19:40 TimToady k, I think this is closer to fitting in my brain.  perhaps if my head were to get bigger it would help...
19:40 putter another possible exploration/thought experiment path: say there were no grammars.  just a set of parser special forms (macros i guess, "rule <name> <pattern>", etc),  that expanded as vanilla methods or subs, with particular type signatures.  with name conventions or some tagging so that one could spot them all using reflection.
19:40 TimToady well, that's essentially what we have
19:41 TimToady prefix:<+> is just naming convention
19:41 TimToady and we'd really like everything to just be methods underneath
19:41 TimToady albeit with an implicit object that is the "current match we're attempting"
19:42 putter any sub, rather than method, regex()?
19:42 * putter tries to picture a multi-method regex...
19:43 TimToady I can imagine <foo: bar> sub-multi-ing based on the type of bar, but it would still be primary on the current match object, I think.
19:43 putter what is the current thinking on the connection between regex and subs/methods?  ie, how does one implement a  <mumble args>  as a sub?
19:43 TimToady so it's still "multi method" not "multi sub", I expect
19:44 TimToady well, a parse is just an object instantiation of a grammar class.
19:44 TimToady so it's $parse.mumble(args)
19:45 * putter ponders "a parse is just an object instantiation of a grammar class"...
19:45 TimToady I could be lying, of course.  :)
19:45 TimToady but delusion is more likely
19:45 putter a useful strategy to test understanding and stimulate thought
19:46 putter :)
19:48 putter ...two more ast node types to go...
19:48 TimToady it might well actually be the Match object that comes in as $parse, but I presume that Match knows its current Rule and/or Grammar object and can delegate
19:57 weinig is now known as weinig|bbl
19:58 elmex joined perl6
20:14 simcop2387 joined perl6
20:23 IllvilJa joined perl6
20:38 SamB joined perl6
20:45 asz joined perl6
20:54 explorer joined perl6
20:56 justatheory joined perl6
21:09 Aankhen`` joined perl6
21:12 justatheory_ joined perl6
21:22 Aankh|Clone joined perl6
21:23 justatheory joined perl6
21:27 turrepurre joined perl6
21:29 justatheory joined perl6
21:33 justatheory joined perl6
21:35 explorer joined perl6
21:39 svnbot6 r15171 | putter++ | misc/pX/Common/yet_another_regex_engine - progress.  p5 re_tests is now 12 sec and 90% okay.  As always, see README.
21:39 putter regards pointers to regex papers, could we add them to READTOO?
21:39 dduncan joined perl6
21:39 justatheory joined perl6
21:41 putter @tell ashleyb Performance issues resolved.  Profiling turned out to be a hard task than I anticipated when I suggested it, as most perl profiling tools were choking. :/  project_planning/TASKS has easier and more "incremental improvement" bitesized suggestions.
21:41 lambdabot Consider it noted.
21:41 putter dinner &
21:41 dmq btw putter what version of re_tests is that?
21:42 PartclCoke #parrot needs lambadabot.
22:01 jisom_ joined perl6
22:02 jisom joined perl6
22:05 justatheory joined perl6
22:05 scw joined perl6
22:33 ilogger2 joined perl6
22:40 justatheory joined perl6
23:00 justatheory joined perl6
23:08 Psyche^ joined perl6
23:14 justatheory joined perl6
23:15 justatheory joined perl6
23:24 Psyche^ is now known as Patterner
23:36 justatheory joined perl6
23:38 justatheory joined perl6
23:39 larsen_ joined perl6
23:43 justatheory_ joined perl6
23:43 [M]erk joined perl6
23:56 justatheory joined perl6

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

Perl 6 | Reference Documentation | Rakudo