svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com Set by avar on 16 November 2006. |
|||
00:01
Psyche^ is now known as Patterner
00:25
macli left
01:10
ofer0 joined
01:11
ofer0 joined
|
|||
svnbot6 | r15168 | Darren_Duncan++ | ext/Set-Relation/ : renamed operator project_all_but() to remove(), and removed its select_all_but() alias | 01:42 | |
02:04
jrockway joined
02:05
jrockway joined
02:09
DebolazX joined
02:24
Aankhen`` joined,
justatheory joined
02:28
DebolazY joined
02:42
Khisanth joined
02:45
dmq joined
03:39
thestarslookdown joined
04:03
amnesiac joined
04:09
nicodaemos joined
04:10
nicodaemos joined
04:12
gnuvince_ joined
04:21
justatheory joined
05:44
nipra joined
05:57
thestarslookdown joined
06:01
ashleyb joined
06:14
BooK joined
06:21
jisom joined
07:30
devogon joined
07:34
DebolazX joined
07:35
reZo joined
07:52
DebolazY joined
08:09
iblechbot joined
08:24
nipra joined
08:38
Belaf joined
08:39
larsen_ joined
08:50
bernhard joined
09:04
DebolazX joined
09:12
DebolazY joined
09:19
elmex joined
09:42
bjoern_ joined
|
|||
pasteling | "bjoern_" at 84.56.243.184 pasted "Removing left recursion from CFGs using derivatives" (73 lines, 2K) at sial.org/pbot/22789 | 09:44 | |
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:45 | |
09:51
dduncan left
|
|||
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:53 | |
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 | |
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
10:10
chris2_ is now known as chris2
10:21
polettix joined
|
|||
svnbot6 | r15169 | szabgab++ | smartlinks.pl - add option --dir to traverse t directory | 10:24 | |
r15170 | szabgab++ | add "elems" to perl6.vim | |||
11:05
VanilleBert joined
11:06
ludan joined
11:22
polettix is now known as poletti
11:26
devogon joined
11:29
poletti is now known as polettix
11:39
iblechbot joined
12:04
bonesss joined
|
|||
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:16 | |
12:19
explorer joined
12:32
buetow joined
12:35
b00t joined
|
|||
rgs | Juerd++ # nice posts on P5P | 13:01 | |
Juerd | rgs: Thanks | 13:25 | |
shay | morning folks (IST) | 13:27 | |
Juerd | shay: Right. Good localtime. Let's get you that feather account :) | ||
shay | Juerd, morning :P | 13:28 | |
Juerd | shay: You've got mail. | 13:30 | |
shay | Juerd, checking, thanks | ||
13:42
elmex joined
13:47
wilx` joined
13:52
explorer joined
13:55
bonesss joined
14:04
rindolf joined
|
|||
shay | Juerd, is there a copy of the SVN repository somewhere in feather? or should every user get a copy of it? | 14:17 | |
oh, I guess that it's in /data/svn | 14:19 | ||
Juerd | shay: Absolutely, but you're better off using the svk repository provided by Audrey | 14:26 | |
shay: See feather.perl6.nl/ | 14:27 | ||
lambdabot | Title: Perl6 Community Development Server | ||
Juerd | feather.perl6.nl/svk.html | ||
lambdabot | Title: SVK on Feather | ||
14:44
weinig|bbl is now known as weinig
15:17
shlomif joined
|
|||
shay | Juerd, awesome, thanks | 15:19 | |
Juerd | Thank you for contributing :) | 15:20 | |
shay | Juerd, the pleasure is all mine, altough I'm not too experienced, just trying to add my drop on the ocean ;) | 15:21 | |
15:33
shlomif is now known as rindolf
15:49
kanru joined
15:54
drupek12167 joined
16:02
rfordinal joined
16:08
mr_ank joined
16:09
cognominal joined,
rgs joined,
avar joined,
TimToady joined
16:10
shay joined,
cdfh joined,
pjcj joined
16:13
marmic joined,
spoop joined
16:14
buubot joined
16:15
rashakil_ joined,
reZo joined
16:16
stef_ joined,
weinig is now known as weinig|bbl
16:17
rashakil_ joined,
svnbot6 joined,
fridim joined,
rashakil__ joined
16:18
fridim joined
16:34
explorer joined
16:36
LibertyBasic joined
17:05
putter joined
17:06
weinig|bbl is now known as weinig
|
|||
putter | what an aptly named module | 17:06 | |
lambdabot | putter: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
putter | use overload | ||
7 minutes -> 12 seconds by use()ing less overload. | 17:07 | ||
@tell gaal awesome! | 17:08 | ||
lambdabot | Consider it noted. | ||
putter | (ffi on p5 waking up) | ||
TimToady | mornin' | 17:12 | |
rindolf | Hi TimToady | 17:13 | |
TimToady: it's 19:13 here. | |||
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? | ||
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 | ||
rindolf | TimToady: actually, I sent him these emails like a week ago. | ||
But I think he's been on vacation. | |||
17:15
Belaf joined
|
|||
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? | ||
rindolf | TimToady: I think he's back home. | 17:16 | |
TimToady | then I'll send the armed goons back home. :) | ||
rindolf | TimToady: :-) | 17:17 | |
dmq | fo.o.ba.r.|+ba.z.bo.p.|+. | 17:23 | |
er, sorry. wrong window. | 17:24 | ||
PartclCoke | TimToady: Hio. | ||
dmq | still reverse polish regexes are hard to read. | ||
17:25
turrepurre joined
|
|||
putter | lol | 17:26 | |
dmq | ive been tinkering with the algorithm in the regex article of late. | 17:28 | |
seeing what would be involved to hack it into perl when possible. | |||
putter slogs away at getting yet_another_regex_engine ast populated enough to pass p5's re_tests. | 17:32 | ||
dmq | ah. | ||
rindolf | putter: does it pass Regexp::Common? ;-) | ||
putter | Funny you should ask that... | ||
dmq | heh, its not clear if blead passes Regexp::Common. | ||
putter | Anyone know the status of bleadperl's attempt to make the regexp engine overridable? | 17:33 | |
dmq | er, me? | ||
oh you want to know what it is? | |||
:-) | |||
its mostly pluggable. what do you want to know | |||
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. | ||
dmq | yes. | 17:34 | |
building perl with a given implementation is a reasonably good test. | |||
but still not complete. | |||
youd want to pass pat.t as well | |||
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. | ||
s/it/the regex hooks/ | |||
dmq | how long ago was that? | ||
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. | ||
putter | Q1 '06 | 17:37 | |
dmq | no too early almost for sure. | ||
putter | nifty | ||
dmq | nowadays you should be able to create a regexp_engine structure and it should work. | ||
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. | ||
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 | |||
dmq | BTW, you can have a look at re:engine::PCRE | ||
well, want a bit of insight into a structural issue that exists currently in the engine? | |||
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. | ||
and if they store capture data in the regexp struct, well, things go boom. | |||
putter | indeed | 17:41 | |
dmq | especially as you have to factor in that a (??{}) could die anytime. | ||
:-) | |||
yet cant be localized afaik. | |||
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. | ||
dmq | ah. | 17:43 | |
putter | bonus is one should be able to transliterate it to run on top of any languages pcre. | ||
dmq | is it a BNFA like perl? | ||
'backtracing NFA'? | |||
putter | brute force tree of anonymous subs | 17:44 | |
dmq | bruteforce? | 17:45 | |
putter | have to leave stuff for the parser folks to do. I just want to bootstrap. | ||
17:45
nipra joined
|
|||
dmq | er, ok. :-) | 17:46 | |
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
|
|||
nwc10 | I've no idea if this is old hat [particularly given that dmq is here :-)] | 17:48 | |
timtoady: dmq pointed me to swtch.com/~rsc/regexp/regexp1.html | |||
lambdabot | Title: Regular Expression Matching Can Be Simple And Fast | ||
dmq | im looking into about as opposite a set of material as you can get and still be on the same subject. | ||
putter | is there an "official" name for (?(N)t|f) constructs? | ||
dmq | IFTHEN | ||
putter | phone bbiab | ||
dmq | er, | ||
wait | |||
conditional patterns. | 17:49 | ||
nwc10: yes its a good article, im actually working on it right now actually. | |||
using thompsons algorithm. | 17:50 | ||
nwc10 | I've gone back to 5.8.9 | ||
dmq | gone back? | ||
TimToady | nwc10: it was linked last week from PM | ||
nwc10 | ah righto | ||
you can see where I don't look :-) | 17:51 | ||
TimToady | putter: it's the "conditional" construct | ||
oh, dmq answered it already... | |||
dmq | wrong at first. :-) | ||
TimToady | no, I meant putter's Q | 17:52 | |
oh, you did too, nevermind | |||
still too early, obviously... | |||
dmq | ive been thinking of how to expand his code to handle unicode. its not so clear. | ||
nwc10 | look at how plan9 had done it | 17:53 | |
TimToady | putter's code? oh, thompson's... | ||
nwc10 | potentially pike's stuff in plan 9 is as interesting | ||
dmq | the plan 9 stuff uses utf-16 iirc. | ||
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 swtch.com/plan9port/unix/ | ||
lambdabot | Title: Unix Software from Plan 9 | ||
nwc10 | ASCII isn't your problem. 8 bit is | ||
well, our | |||
TimToady | not knowing the encoding is the only real problem. | ||
dmq | well whatever you want to call the high bit char set that isnt utf8 in perl5. ;-) | ||
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 | |
but I'm not really thinking that hard here | |||
dmq | im trying to avoid having a state that needs more than 256 transitions coming out of it without doing anything painful. | 17:56 | |
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. | ||
TimToady | many engines just pretend it's bytes and merely put extra constraints on where the character boundaries are considered "real" | ||
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 | ||
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. | ||
since you would use the same logic for highbit as for case folding... | |||
the other question is what needs to happen with thompsons algorithm for capturing. | 18:00 | ||
i guess open,close becomes a state with a side effect. | |||
TimToady | there is literature on that subject. | 18:01 | |
dmq | yes | ||
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 | ||
TimToady | yeah, implicit .*? on the front... | 18:03 | |
which a lot of people mistake for implicit .* | |||
nwc10 | me being one of them | ||
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... | ||
rsc seemed to think so. | |||
nwc10 | but there was a lot that didn't fit into the margins of that paper | 18:05 | |
and no plan surives first contact with the enemy | |||
TimToady | troo nuff | ||
dmq | ? (X|), ?? (|x) | ||
TimToady | I see no enemy here <ow! quit it!> | ||
dmq | im not sure how you would do * or + tho. | ||
TimToady | | is unordered in real regex | 18:06 | |
dmq | right, good point. | ||
nods. | |||
TimToady | * is primitive | ||
x+ is xx* | 18:07 | ||
dmq | yes | ||
TimToady | and {n,m} reduces to some sequnce of x x? or x* | ||
nwc10 | but I got a bit scared that those could become rather long | ||
TimToady | s:31st/<null>/e/ | 18:08 | |
dmq | yes. | ||
TimToady | well, yes, that's where you get your famous state explosion. | ||
dmq | rsc seemed to think that was not an issue, but didnt seem to say how. | ||
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 | |
as all modern greps do, for instance. | |||
18:11
Schwern joined,
weinig is now known as weinig|away
|
|||
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:11 | |
putter | . | 18:12 | |
TimToady | ? | ||
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:13 | |
TimToady | that's just ordinary state collaps | 18:14 | |
e | |||
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 | |
ordinary state collapse? | |||
TimToady | that's no good for /arf|a{1000}/ | 18:16 | |
you might start another arf in the middle a{1000} | |||
putter | synced | ||
:) | |||
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 | |
trying not to unroll into NFA is a false economy | |||
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 | ||
18:18
rashakil joined
|
|||
dmq | unroll it into 1000 NFA nodes? | 18:19 | |
TimToady | and it only has to do that if it sees 'a' in the data | ||
could unroll lazily too, I suppose | 18:21 | ||
but for some patterns maybe that's where you just throw it over to the backtracking engine. | 18:22 | ||
dmq | yeah. | 18:23 | |
TimToady | at least if you can prove that a{1000} will stay one state | ||
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. | ||
TimToady | hopefully without much explicit guidance | ||
that's what all this "longest token" stuff is about, basically. | 18:25 | ||
though we really want to push it a little beyond that. | |||
dmq | you are switching from leftmost longest to longest token, or at least encouraging it? | ||
that makes sense. | |||
TimToady | we are requiring it for | and disabling it with || | ||
| becomes declarative, || procedural | 18:26 | ||
dmq | whcihc i would call encouragment. (ie changing the smantics of |) | ||
TimToady | I'd call it "old age and treachery" :) | 18:27 | |
dmq | heh | ||
TimToady | most of the time the naĆÆve user won't even notice the difference, except it running faster (hopefully) | 18:28 | |
and the expert user will be instructed to use || if they really want leftmost | |||
dmq | can i do that in perl 5.10? | 18:29 | |
;-) | |||
TimToady | anyway, it also fits in with the meaning of | and || outside regex in P6 | ||
I suspect p5p might notice if you tried to do it treacherously. :) | 18:30 | ||
18:30
weinig|away is now known as weinig
|
|||
dmq | yes but you are allowed to issue get out of jail cards. | 18:30 | |
:-) | 18:31 | ||
still, maybe a new (?...) construct could change the meaning of | | |||
TimToady | that doesn't mean the jailor will respect it | ||
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. | ||
and because the P6 interpretation of | extends to subrules! | |||
dmq | well with a pragma you might as switch in a new engine. | ||
TimToady | all is fair if you predeclare | 18:33 | |
dmq | anyway, i must run and get groceries. | ||
TimToady | hey, that's kinda catchy... | ||
dmq | hmm (?|...|...) kinda makes sense... | ||
TimToady | later | ||
dmq | ciao | 18:34 | |
putter tries to think of a stable language with multimethods that folks could use to start building rx optimization infrastructure.... | 18:39 | ||
it being much easier to transliterate something working than to start from scratch | |||
CL anyone? | 18:40 | ||
nwc10 | although dogfood forced progress | ||
unless it tastes so bad it kills you | 18:41 | ||
TimToady | CL doesn't really have true multis, I think | ||
it just has a way of emulating nested switch statements left to right. | 18:42 | ||
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. | ||
samnes if I know... | |||
nwc10 | :-) | 18:44 | |
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. | ||
nwc10 | sorry. | ||
TimToady | I do not recognize this word "dorry" | ||
putter | re Bad Idea, ... I *like* bad ideas in cs. ;) | 18:46 | |
but ok, any particular reason? | 18:47 | ||
nwc10 | Gah. tricky to utter anything coherent without a certain pair of letters | ||
(note the time gap) | |||
TimToady | when I say "use MyGrammar" I want it to stay consistent all the way through this lexical scope. | ||
I don't want someone changing the grammar halfway through | |||
also, mutable grammars (see magic hashes) make you reinvent dispatch | 18:48 | ||
putter | phone bbiab | ||
TimToady | note also that you didn't succeed. | 18:49 | |
you blew it on the last letter | |||
nwc10 | gah yes | 18:50 | |
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 | |
well, arguably every declaration changes the recognized language, including "my $foo". | |||
but we could probably finesse non-macro defintions not to recalculate even without laziness, I suppose | 18:55 | ||
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:57 | ||
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 | 18:58 | ||
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
|
|||
TimToady has been talking to himself... | 19:01 | ||
putter | :) | ||
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. | ||
unless you introduce a time delay | |||
pondering... | |||
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:<+>" | ||
since "prefix:<+>" is the name of the actual operator, not the rule that parses it. | 19:05 | ||
re one thought: yes, but I try not to step across the little line marked "possible/impossible". | 19:06 | ||
and mutable grammars are balanced close to that line. | |||
putter | re consistency, I like being able to mutate, but agree it should be scoped. | ||
TimToady | especially if someone can mutate them while I'm using them. | 19:07 | |
s:3rd/<sp>/ else / | |||
anyway, it'd be nice not to have the grammar recalculation tied into some kind of external event notification. | 19:09 | ||
even if it were sane | |||
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. | ||
TimToady | another thought, perhaps deriving from a grammar is more like "does" | ||
(with the implied semantics that if you "does" a class it takes an immutable snapshot of it for the role) | 19:10 | ||
and the role doesn't see subsequent changes to the class that was snapshotted | |||
19:11
jisom joined
|
|||
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 | |
s/even/event | |||
TimToady | well, that's definitely the Rubyesque approach. :) | 19:12 | |
putter | :) | ||
TimToady | hoping to give the optimizer a little more rope to hang you with here, though. | 19:13 | |
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. | ||
putter | which sounds like parse_prefix:<+>, or no? | ||
TimToady | this is very like the declarative / procedural distinction we're getting for regex. | ||
19:15
allbery_b joined
|
|||
putter | if a class does a grammar, what happens when that class is inherited from? | 19:15 | |
TimToady | how would that be different from doing any other role? | 19:16 | |
< putter> which sounds like parse_prefix:<+>, or no? | 19:17 | ||
yes, except | 19:18 | ||
I was thinking you'd never write parse_ yourself | |||
that'd just be "macro prefix:<+>" or some such. | |||
so we can also hang all the same properties that the user might, such as precedence | 19:19 | ||
and the parse_ form would autogen from that | |||
but yes, it could autogen both a parse_-ish form and a <prefix> rule | 19:20 | ||
putter | re autogen, agreed | 19:21 | |
TimToady | except that the <prefix> has to regen when you derive | ||
and the parse_ form doesn't | |||
well, <prefix> regens if anything in prefix_* overrides, I guess | |||
but arguably all subs are prefix:<foo> underneath | 19:22 | ||
19:22
rindolf left
|
|||
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
|
|||
TimToady | I guess (with similar furrows, I guess) | 19:25 | |
our %foo in role %A is A::<%foo> | |||
I think... | 19:26 | ||
sometimes it's hard to know what's auto-generic in a role... | |||
so I'm probably wrong, and it's $?CLASS::<%foo> | 19:27 | ||
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... | ||
can one say %foo in a role? | 19:29 | ||
putter needs to review roles, memory fuzzy | |||
TimToady | I remember them well, and am still fuzzy. :) | ||
putter | lol | ||
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:33 | |
but that's probably a stupid idea. | 19:34 | ||
how would we tell that from a macro to be used in the grammar? | |||
hmm | |||
ss/used in/used by/ | |||
maybe "token prefix:<+>" can be recognized specially | 19:35 | ||
token prefix:<-> is equiv(&prefix:<+>) { <expr> } or some such hybrid | 19:36 | ||
with some additional declaration that establishes any policy that applies to all prefix: while letting the actual <prefix> autogen. | 19:39 | ||
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. | ||
TimToady | well, that's essentially what we have | ||
prefix:<+> is just naming convention | 19:41 | ||
and we'd really like everything to just be methods underneath | |||
albeit with an implicit object that is the "current match we're attempting" | |||
putter | any sub, rather than method, regex()? | 19:42 | |
putter tries to picture a multi-method regex... | |||
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? | ||
TimToady | so it's still "multi method" not "multi sub", I expect | ||
well, a parse is just an object instantiation of a grammar class. | 19:44 | ||
so it's $parse.mumble(args) | |||
putter ponders "a parse is just an object instantiation of a grammar class"... | 19:45 | ||
TimToady | I could be lying, of course. :) | ||
but delusion is more likely | |||
putter | a useful strategy to test understanding and stimulate thought | ||
:) | 19:46 | ||
...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
20:14
simcop2387 joined
20:23
IllvilJa joined
20:38
SamB joined
20:45
asz joined
20:54
explorer joined
20:56
justatheory joined
21:09
Aankhen`` joined
21:12
justatheory_ joined
21:22
Aankh|Clone joined
21:23
justatheory joined
21:27
turrepurre joined
21:29
justatheory joined
21:33
justatheory joined
21:35
explorer joined
|
|||
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,
justatheory joined
|
|||
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. | ||
putter | dinner & | ||
dmq | btw putter what version of re_tests is that? | ||
PartclCoke | #parrot needs lambadabot. | 21:42 | |
22:01
jisom_ joined
22:02
jisom joined
22:05
justatheory joined,
scw joined
22:33
ilogger2 joined
22:40
justatheory joined
23:00
justatheory joined
23:08
Psyche^ joined
23:14
justatheory joined
23:15
justatheory joined
23:24
Psyche^ is now known as Patterner
23:36
justatheory joined
23:38
justatheory joined
23:39
larsen_ joined
23:43
justatheory_ joined,
[M]erk joined
23:56
justatheory joined
|