Check your feather email | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com | www.treehugger.com/files/th_images/paradigm.jpg [set by audreyt on 2006-08-29 05:26:57 -0700]
Set by Akwa|user on 14 September 2006.
00:16 prism joined 00:49 Aankhen`` joined 00:58 ofer0 joined 01:03 frederico joined
buu TimToady: Hrm, you around? 02:08
Actually I guess I can punt it to p5p maybe
02:14 Aankh|Clone joined 02:22 weinig is now known as weinig|zZz 02:31 Aankh|Clone is now known as Aankhen`` 03:17 fglock joined 03:20 jdv79 left
fglock anyone else is having problems logging into openfoundry svn? 03:26
TimToady I just did an svn up and it worked (though there wasn't anything to get). 03:30
but that's probably anonymous 03:31
03:32 justatheory joined 03:33 xinming joined
fglock yes, svn up works, but I can't commit 03:35
maybe it's because I'm trying to commit the Python parser :)
03:57 lambdabot joined 04:32 awwaiid joined 05:15 BooK_ joined 05:29 mdiep_ joined 05:31 cerculetz joined 05:39 jeffz joined 05:42 awwaiid joined 05:43 jeffz left 05:51 Aankh|Clone joined
TimToady yeah, I can't commit either... 05:57
audreyt same here
expect it to be fixed tomorrow morning 05:58
which is 20 hours from now
I fixed test parsefails
TimToady wait, it is tomorrow morning where you are...
audreyt down to ~400 fails now
TreyHarris would you like a commit bit? i hear audreyt can give you one...
TimToady what's the symbol for rolling one's eyes?
audreyt++
audreyt TimToady: U+2681 06:00
06:00 Aankhen`` joined
TimToady I've done something to S29 that's likely to be controversial... 06:00
⚁ 2681 DIE FACE-2
audreyt ... "you rolled a 2"
TimToady which is to turn reverse the args on split, and take away the default. 06:01
$string.split($delim)
split($string: $delim)
but never split($delim, $string)
audreyt that's already the case...
oh
you simply exported the split?
TimToady yeah.
audreyt it might be unpopular, seeing how @x.map(&x) but map(&x, @x). 06:02
TimToady I think it's more consistent, and we can warn if $string looks like $delim
anyway, I think split is getting de-emphasized in any event
TreyHarris well, multis can make both map(&x: @x) and map(@x: &x) work, no?
but split, both args are strings... 06:03
TimToady yes, but split($x,$y)
audreyt unless we say one end always must be regex...
TimToady (for the function form)
TreyHarris well, split($re: $str) could be multi then, but that might be too confusing
TimToady on the one hand we'll mostly see .split(/pat/) 06:04
there is no default pattern anymore for split.
because splitting into words is now done with the corresponding function that
specifies what you *want* to match, not what is in the crevices. 06:05
that function used to be named .words
audreyt perhaps split(Regex, Str) is the only form and split(Str, Str) is deliberately an error
TimToady but at the moment it is named .comb
audreyt that tells people to use Str.split(*)
TimToady that's what I was saying
audreyt .comb for "combining"?
TimToady no, for "comb through looking for the good bits" 06:06
or to arrange in a comb structure.
I've been spending most of the day in the thesaurus trying to find the right word
audreyt .comb suggests combining to me, nevertheless...
TimToady except you're doing the opposite of interpolation, whatever that is. 06:07
.extract is the closest English word for that concept, but it's too long.
and doesn't imply plurality like comb.
etymologically, comb has not much to do with combine, unless maybe you go back to IndoEuropean... 06:08
but there's honeycomb as well.
basically in IE it was a repeating structure, I think. Need to look it up in my AmHer 06:09
combers as in ocean waves is also the repeating pattern idea. 06:10
audreyt *nod*
so split(rx/x/, "xxx") still works?
TimToady no 06:11
audreyt ok...
TimToady it's "xxx".split(/x/) or split("xxx", /x/) with the direct object of the verb in the correct place.
audreyt but &map stays as-is? 06:12
TimToady yes
we could not export split, and then it'd require split("xxx": /x/) 06:13
that might be more acceptable, really
audreyt I'd find that survivable.
yes.
TimToady as I say, split is really inside out from what you usually want anyway.
audreyt nod.
TimToady unless you're processing the passwd file
even CSV can more easily be expressed with comb than split, I think. 06:14
once you start handling quotes
06:15 Aankh|Clone joined
TimToady .comb(/pat/,$n) is really short for .match(rx:c:global:x(0..$n)/pat/) 06:15
though the :c is implied by the :g
might go as far as to make :c short for :comb in regex 06:16
:continue is not terribly accurate
or precise, or something
hmm, except .comb implies :global, and :c doesn't 06:17
.comb(/./) is a really easy way to split to chars. 06:19
should be able to comb anything that can convert to Str, like arrays and filehandles. 06:21
+$*IN.comb is word count on stdin
06:29 cerculetz left
wolverian TimToady, why doesn't the /foo/ in .split(/foo/) not mean $_~~/foo/? 06:33
er, one negation less :)
(possibly a silly question.) 06:35
TimToady because /foo/ is rx/foo/ unless you put it into a context that forces evaluation. 06:36
m/foo/ forces immediate evaluation, but so does putting into string or numeric context. 06:37
(or boolean) 06:38
at that point it fastens onto $_ if nobody's given it any better idea.
making split not be a macro was one of the reasons for formulating it that way. 06:39
In P5 the parser essentially has to rewrite the first argument. 06:40
when you write split(/^/) that gets turned into split(/^/mg) by the time the runtime gets it. 06:41
actually, it's worse than that because of having to undo the implicit $_ =~ 06:42
so we just clean all that up in P6
audreyt *nod* 06:44
TimToady ت 06:49
audreyt as in, backlogged and agreed with the reasoning.
TimToady well, it's all straight out of A5... 06:50
wolverian it's been a few years since I read that... :) 06:52
thanks!
07:00 pdcawley joined
pdcawley seen obra? 07:01
jabbot pdcawley: obra was seen 4 hours 49 minutes 34 seconds ago
07:01 awwaiid joined 07:03 pdcawley joined
TimToady 07:10
pdcawley Is there any documentation (apart from the source) on using madskills? 07:11
pdcawley is trying to work out how to implement the rest of a refactoring engine... 07:12
audreyt TimToady: I wonder if f([,] \(1,2,3), \(4,5,6)); should simply become f(1,2,3,4,5,6) without the need of = 07:14
if it should not, then the example
@args = \@foo, 1, 2, 3
lambdabot Avast!
audreyt as currently in S03 can't be made to work...
@args = (scalar @foo, 1, 2, 3) # maybe change it to that, then 07:15
lambdabot Aye
TimToady pdcawley: not that I know of, though Nick might have made some notes while installing it in 5.9 07:22
audreyt: I wonder if we should scrap [,] and go with |<< 07:23
pdcawley So, no B::MadProps yet?
audreyt that will make me happy as currently prefix:= is made both special-macro _and_ regular function app
pdcawley Or do the various B modules get the madprops stuff for free?
TimToady madprops was specifically avoiding anything to do with B
audreyt to satisfy the [,] =$x
requirement
(anything less won't work)
and if we can demagicaklize =, that's certaily a win 07:24
TimToady I started trying to hack B to return madprops and gave up.
pdcawley Ah.
TimToady madprops are just dumped out as an XML file at the moment via dump.c
audreyt though |<< also needs to be magickal, but we can explain the magick much easier 07:25
pdcawley So I get at madprops by doing '...; dump' ? 07:26
TimToady then the nomad script runs over that and moves stuff around in the tree to slightly less insane locations.
pdcawley Ah... found the mad subdirectory :) 07:27
TimToady setenv PERL_MADSKILLS=1 if I recall
pdcawley Yup. Configure asks me about that now. 07:28
Ah, but not about the environment. 07:29
TimToady then [,] degenerates to the listop form of [...], fwiw 07:30
and can go back to returning a scalar.
audreyt yes. 07:31
TimToady demagic on = is good too.
audreyt malaire can be happy then
he was quite confused why [,] doesn't seem at all reductive :)
TimToady it was redactive. :) 07:32
audreyt redactive? :)
TimToady a redactor is someone who edits historical texts because they think they know better. 07:33
audreyt lol
TimToady
audreyt my $x = \( 1; 2 ); 07:36
f(0, |$x, 3);
should this expand naively?
f(0, 1; 2, 3)
TimToady we try to be smart about named... 07:37
or maybe our approach to that is also naive...
audreyt perhaps always-naive make sense 07:38
TimToady it could also mean f(0,1,3 <== 2)
audreyt yes, that's another possibility
TimToady but then what is f(0, |$x, |$x) 07:39
audreyt 0,1,1 ; 2,2
presumably
TimToady or 0,1,1; 2; 2
audreyt yeah.
TimToady ತ⋎ತ 08:02
audreyt capture merging implemented... 08:04
using the naive approach for now
g'nite :)
08:32 prefiks joined 08:37 marmic joined 09:06 bernhard joined 09:09 iblechbot joined
nothingmuch audreyt: you up? 09:15
3/w 21
beh
ayrnieu tries to fit "3/w 21" into a/s/l 09:25
audreyt nothingmuch: hihi 09:29
nothingmuch hi ho 09:30
/w 21 is /window 21
and 3 is a typo
audreyt ok :)
readine MO::Overview
nothingmuch okies 09:32
audreyt how's your schedule? 09:37
I relenged quite a bit so far today
will go to dinner in 20 minutes and back in maybe 2hr
then hack for another 4hr and then sleep, and then hack for another 16hr :) 09:38
09:40 mozzz joined
nothingmuch audreyt: i can't hack much today 09:41
i accidently made friday my weekend
so i need to work today
and tomorrow
but the rest of thhe week i should have time
audreyt oh ok
so it seems Tuesday is best for MI hacking 09:42
I'll focus on grokking your tests and releng tomorrow then
and bounce you questions here
nothingmuch sure thing 09:44
i'm going to keep working on it, low pri
i want to finish the ag parent finding protocol
with a private method
09:57 rodi joined 10:16 buetow joined
bernhard ?eval -"-aaa"' 10:48
evalbot_r13586 Error: Unexpected "'" expecting term postfix, comment, operator, statement modifier, ";" or end of input
bernhard ?eval -"-aaa"
evalbot_r13586 -0.0
Juerd - is strictly numeric in the current implementation. I don't know if this is spec or wrong. 10:49
?eval -"foo"
evalbot_r13586 -0.0
Juerd For all I care, it stays numeric. I've never used -string except for the bareword case, but APIs that require that suck anyway, especially considering :pairs.
bernhard ?eval +"-aaa" 10:51
evalbot_r13586 0.0
Juerd ?eval -"0xff" 10:54
evalbot_r13586 -255.0
Juerd Perfect.
11:02 chris2 joined 11:09 penk joined 11:11 renormalist joined 11:18 kane-xs joined 11:51 foo\ joined 11:53 revdiabl1 joined 11:54 rindolf joined
rindolf Shanah Tovah Lambdacamels! 11:54
nothingmuch audreyt: any comments on the overview? missing bits i could clarify, etc? 11:56
rindolf Hi nothingmuch 11:57
ingy: here?
nothingmuch hi rindolf 11:58
he's probably sleeping
11:58 knewt joined
nothingmuch it's around 5-5 am there 11:58
4-5
rindolf nothingmuch: I see. 12:00
nothingmuch: where does ingy live?
miyagawa_ rindolf: I guess he's in seattle
rindolf miyagawa_: I see. 12:01
12:01 integral_ joined, integral_ is now known as integral 12:03 pdcawley joined
rindolf miyagawa_: weren't you the first CPAN Author to have over 100 CPAN distros? 12:03
miyagawa_ not sure I'm the first one. There're Simon, Audrey and AdamK. But yeah i have 100+ distros now :) 12:04
rindolf miyagawa_: nice.
ofer0 hey rindolf, how are you doing?
rindolf Hi ofer0
ofer0: I'm fine.
ofer0: Shanah Tovah!
12:04 nnunley_ joined
ofer0 Shana Tova! 12:04
rindolf ofer0: I have posted new entry in my homesite's blog. 12:05
ofer0 Can you please link me?
rindolf ofer0: sure.
ofer0: community.livejournal.com/shlomif_h.../3573.html
lambdabot Title: shlomif_hsite: New Additions to the Site, tinyurl.com/gvqxe
ofer0 rindolf, Thanks!
rindolf www.shlomifish.org/open-source/nostalgia/ - some of my old C++ code. 12:06
lambdabot Title: Shlomi Fish' Ancient Code, tinyurl.com/j5o7x
rindolf ofer0: do you have an RSS reader?
ofer0 Yes
12:27 elmex joined, ofer0 joined 12:45 xdg joined
rindolf ofer0: then you can subscribe to it. 12:52
ofer0: or you can subscribe to www.shlomifish.org/me/blogs/agg/shl...regate.xml which is my aggregated feed. 12:53
lambdabot tinyurl.com/mxbft
audreyt @tell TimToady Maybe sub (\$x) {...} is now sub (*|x) {...} for consistency? 13:00
lambdabot Consider it noted.
clkao capture syntax changed?
audreyt @tell TimToady That will also play well with |<< replacing [,], effectively making \ thec constructor and | the destructor
lambdabot Consider it noted.
audreyt clkao: TimToady just added a new sigil to perl6... we're dealing with its consequences 13:01
clkao aaaaah
pdcawley What's the new sigil?
audreyt |
pdcawley Used for?
audreyt for captures 13:02
pdcawley has been away from Perl 6 for too long... 'captures'?
13:02 markstos joined
rindolf Hi clkao 13:02
obra pdcawley: pong
pdcawley Hi obra: I'm busy hacking away on the refactoring hack. 13:03
nothingmuch wonders if we have / and - for captures
so that we can have the spinner op
pdcawley Making it a little less hacky I hope (turns out we can do it without having to write anything out to a file by parsing $@ from an eval "$code; 1" 13:04
audreyt pdcawley: perlcabal.org/~audreyt/Capture.html
obra cool
nothingmuch 404
audreyt refresh
nothingmuch still 404
audreyt can't be 13:05
nothingmuch now it works
pdcawley obra: I think we can use a similar trick for 'rename variable'
Find the declaration of the variable. Change it.
then keep evalling the code parsing the error and changing the entry at the given line until it compiles again.
nothingmuch captures are one of the prettier refactorings Perl 6 has gone through
it's gaal's fault, right?
audreyt I think it's my fault :) but @Larry came up with that name 13:06
nothingmuch ah
audreyt++
@Larry++
lambdabot Unknown command, try @list
nothingmuch gaal++ # for good measure ;-)
pdcawley audreyt: Is this somewhat akin to smalltalk's reification of a message?
nothingmuch pdcawley: no that's my hobby ;-)
pdcawley But allowing for custom parsing of an argument list?
audreyt pdcawley: it's reifying whatever that can occur in a call
it's a call without the message :) 13:07
er, the method/sub name.
pdcawley With deferred evaluation in the caller's context?
audreyt no, it's pre-evaluated
the caller may flatten it differently.
but it's ultimately a XML-node-like structure 13:08
nothingmuch think of it as a superbind
audreyt with one tag, some positionals, some nameds
nothingmuch when you're binding the values on the right side into a $something
obra pdcawley: I'd worry a bit about the code transforms needed for rename variable
nothingmuch and you don't know what that something is yet
a capture is a generalization of all the $somethings
pdcawley obra: I'll worry about it as I write the tests:
obra :)
pdcawley Can Perl 6's eval take an environment argument as well? 13:12
"So, I have this code block, but I want to evaluate it in *this* context"
Ruby has some neat tricks you can do with eval. Ferinstance, you can do 'some_object.instance_eval(&block)' and the block gets evaluated as if it were a an instance method, ie, self is bound to 'some_object'.
remarkably handy for DSLy type tricks.
Juerd Perl 6's eval evals strings, not coderefs. 13:14
audreyt it doesn't seem to me like the same thing as eval taking an environment argument.
.instance_eval is easier than reifying the execution context
Juerd I expect that you can supply methods in variables in .
$foo.$method(...)
audreyt sure, that's already available at this moment
Juerd Uhhuh 13:15
It's in Perl 5, so there must be something like it in Perl 6 :)
audreyt ?eval my $meth = 'sqrt'; 4.$meth()
evalbot_r13586 2.0
Juerd ?eval my $meth = method { sqrt $^a }; 3.$meth()
evalbot_r13586 Error: No compatible subroutine found: "&method"
nothingmuch what's the prospect for signature inference by means of capture flatenning?
Juerd Oh, too bad :) 13:16
nothingmuch simple cases will be inferrable, right?
audreyt signature inference?
nothingmuch like sub foo (\$args ) { bar(|$foo, :extra("bar") }
infers that foo's signature is bar's signature minus the named param 'extra'
audreyt probably. I wonder if TimToady will agree with my latest refactoring idea 13:17
nothingmuch which was?
audreyt sub foo (*|args) { bar(|args, :extra<bar>) }
I think it's significantly cleaner
nothingmuch syntactically?
audreyt yeah
nothingmuch ah
yes, it looks prettier ;-)
but it's not semantically different, right?
and sub foo ( |args ) is simply a sub which takes one capture as it's argument, right? 13:18
which must be called as foo( \( $bar ) ) etc?
audreyt yup
nothingmuch ok
nothingmuch crawls back into his hole 13:19
13:26 prism joined, crem_ joined 13:32 pdcawley joined 13:34 shachaf_ joined 13:41 jferrero joined 13:44 qmole joined 13:45 frederico joined 13:59 weinig|zZz is now known as weinig
audreyt @tell TimToady I wonder if scalar(1) makes a mutable scalar and item(1) makes simply 1... 14:10
lambdabot Consider it noted.
nothingmuch audreyt: ann can't commit the summaries for some reason
it keeps asking her for her password
it's likely an svk problem
but i thought you might know something 14:11
audreyt nothingmuch: openfoundry.org is down until 12 hours in the future
nothingmuch ah, good to know
oops, i told her too late, she already mailed you 14:12
14:13 prism joined 14:16 foo\ joined
Juerd audreyt: I thought scalar was gone. 14:35
14:42 weinig is now known as weinig|bbl
TimToady ot 14:56
lambdabot TimToady: You have 3 new messages. '/msg lambdabot @messages' to read them.
TimToady it's probably Scalar vs item
Scalar : item :: Array : list 14:57
xerox Oh, how is '::' called in this context? 14:59
integral : = "is to", :: = "as". "Scalar is to item as Array is to list"
xerox I knew there was a variation on a/b = c/d from long time, but I couldn't find it anywhere. OK cool. 15:00
TimToady audreyt: actually I was thinking about |$tell where | is like * but means "slurp everything but don't slurp anything" in a lookaheadish way. But maybe that's just (|foo) $self:... or something 15:02
but gotta run & 15:03
clkao btw, svk 2.0tp1 is now on cpan. i am writing the release notes ;) 15:05
xdg clkao: ++ 15:11
nothingmuch audreyt: any input on the overview thingy? 15:19
clkao: when do we get darcs style cherry picking? ;-) 15:20
clkao nothingmuch: christmas 15:21
probably next ;)
nothingmuch not for my birthday? *sniff* *sob*
actually, for my birthday you could make me buy an ice a\xe
axe
that'd be a nicer present =)
clkao heh 15:27
gaal nothingmuch: gotta clean that fridge more often... 15:28
lambdabot gaal: You have 1 new message. '/msg lambdabot @messages' to read it.
gaal lambdabot: @messages 15:29
lambdabot lanny said 18h 24m 25s ago: On porting DIEHARD. Um... no. :)
gaal heh.
rindolf Hi gaal 15:35
gaal, nothingmuch: where did you spend Rosh Hashanah's eve?
nothingmuch nothingmuch: i meanrt that clkao should invite to hike in .tw
rindolf: at home
rindolf nothingmuch: with your ext. family? 15:36
nothingmuch nope
our ceremonial activities ended at apples and pomgrendates
rindolf nothingmuch: I see.
nothingmuch grenades
beh
spelling is hard, let's go shopping
.q 1` 15:37
bah
keyboard transposed
obra 15:41
15:41 agentzh joined
clkao obra: hi 15:42
nothingmuch desperately wants *someone* to bash MO::Overview 15:43
there must be *something* wrong
nothingmuch makes a puppy face to all present
lumi Um, it.. sucks.. for some reason I'm unwilling to divulge?
obra clkao: got throug hsecurity by 3:40
nothingmuch thanks lumi, that really helped =) 15:44
gaal url?
nothingmuch nothingmuch.woobling.org/MO/lib/MO/Overview.pod
lambdabot tinyurl.com/law9f
clkao obra: not too bad eh 15:45
obra would be better if there were powerpoints that let me sit somewhere at a table
clkao lounge?
15:45 larsen joined
rindolf Hmmm... one of the perl-5.9.4 tests ( s../ext/POSIX/t/sysconf.t ) segfaults on my machine. 15:46
Let me try bleadperl.
obra clkao: no lounge tillsize gets here. lest I strand her.
nothingmuch
.oO( 10 passengers * 4oz of gellatenous explosives is enough to depressurize a plane and kill everyone if placed on the plexiglass windows, right?
16:00
)
www.tsa.gov/travelers/airtravel/pro...ems.shtm#1
lambdabot Title: TSA: Permitted and Prohibited Items, tinyurl.com/mydvw
16:01 prism joined 16:03 soisoisoi joined 16:07 mauke_ joined 16:09 prism joined 16:22 mauke_ is now known as mauke 16:23 Psyche^ joined 16:39 Psyche^ is now known as Patterner 16:48 Xenobius joined 16:51 Xenobius left 17:09 fglock joined 17:11 ajs_ joined 17:15 rodi joined
audreyt nothingmuch: sorry, was busy triaging and havn't looked at MO yet 17:22
have to sleep now though
triaged 84 test files; all parsefails fixed; up to 11448 ok compared to 10349 today morning 17:23
17:23 mako132_ joined
audreyt implemented quite a few things as well (===, try{...} catches IO errors too, 0_123, capture splicing) 17:23
wolverian audreyt++ 17:24
audreyt another 120 tests to go... 17:25
hopefully can be finished by tomorrow
but sleep first. :) *wave* &
Juerd: btw, now t/ is spec-based, I'll simply rm t/Dialects if you're okay with it... 17:26
17:26 penk joined
TimToady night! 17:26
17:29 mdiep joined 17:31 justatheory joined 17:32 gunya joined
agentzh audreyt++ audreyt++ 17:33
nothingmuch audreyt: fairynuff 17:35
prism sorry all for the join/part of ^daemon daemon^ I seem to be logged on from more than one machine 17:36
17:46 agentzh left
rindolf Hi TimToady 17:49
18:10 Aankhen`` joined 18:19 mozzz left 18:33 nperez joined 18:35 Aankh|Clone joined, araujo joined 18:42 putter joined 18:43 SCalimlim joined
putter re "Capture", I realize we are all getting used to it, but I suggest it is still an unfortunate name. 18:43
lambdabot putter: You have 1 new message. '/msg lambdabot @messages' to read it.
putter 1- "capture" already has a meaning in cs, and this isn't it 18:44
18:46 revdiabl1 is now known as revdiablo 18:47 revdiablo joined
putter 2- the english meaning doesnt quite line up - the noun form of "capture" refers to the act of capturing itself, rather than the loot. and has assorted implications (violent removal) which are inapplicable. 18:47
3- at least some people have cognitive dissonance between "capture" and "closure".
So I suggest we stay in a mode of "we are calling it 'Capture', but looking for a better name. any ideas?".
18:49 mako132_ joined
putter I might suggest "Actuals", for actual arguments, but it already has a different meaning in finance, and plural names sacrifice the ability to easily refer to pluralities. 18:50
:( 18:51
Hopefully someone will have a brainstorm at some point?
SCalimlim I don't like "capture" much either, but I don't like "actuals" either 18:52
er, one too many "either"s in there 18:53
18:56 weinig|bbl is now known as weinig 18:57 Odin-LAP joined
putter nothingmuch: comments coming 18:58
19:00 Aankh|Clone is now known as Aankhen`` 19:18 Limbic_Region joined 19:20 elmex joined
Juerd audreyt: I'm okay with that 19:21
audreyt: I won't have any time to deal with it anyway :(
19:23 prism joined
nothingmuch putter: awesome 19:30
19:30 zakharyas joined, Alchemy joined 19:31 prism joined
gaal Booty? 19:33
pasteling "putter" at 66.30.119.55 pasted "some comments on MO Overview" (64 lines, 2.5K) at sial.org/pbot/19937 19:36
19:37 elmex joined
putter goes to search the Snn to figure out what attribute grammars are... 19:38
no joy. 19:40
"attribute grammars", anyone?
gaal I didn't know either. 19:41
is this related to the parsing technology Allison was working on? 19:43
# en.wikipedia.org/wiki/Attribute_grammar
lambdabot tinyurl.com/jnjl5
gaal s/on/with/ 19:44
putter I fuzzily recall the question comming up before. My impression is it wasn't the first thing I thought of, ANTLR-like silly argument passing in parse engine games.
gaal I don't know ANTLR. 19:45
putter My impression is "attribute grammar" is one of those unfortunate phrases that gets used for a variety of different things.
re pedia, looking...
gaal hmm
putter www.haskell.org/tmrwiki/WhyAttribut...marsMatter 19:47
lambdabot Title: WhyAttributeGrammarsMatter - TmrWiki, tinyurl.com/h5byl
19:47 mako132_ joined
putter including section "What are attribute grammars?". 19:47
re ANTLR, www.antlr.org/ 19:48
lambdabot Title: ANTLR Parser Generator
putter re ANTLR... well, I've found it very difficult to use, and an indictment of the current state of parser tech. 19:50
gaal because LL(k) in general is harder to write than infinite backtrack? 19:51
or because of more technical reasons?
19:54 ^daemon joined
putter re attribute grammars, so it looks like declarative composable tree crawling. 19:55
19:57 ofer0 joined
rindolf Hi gaal 19:58
gaal hello
putter re ANTLR, 19:59
and yacc, and... most everything but a few low profile universal parsers, 20:00
you don't write a grammar, you right "machine code" to control a particular parser engine. 20:01
Success profoundly depends on understanding exactly what the parser engine is doing as a result of your instructions.
And minor changes in grammar can have completely non-linear non-local impacts in how you have to express the grammar. 20:02
:/ 20:03
gaal I wonder what came of the ghci debugger SoC, because if it was successful, that + Parsec would rule. 20:04
putter greps for SoC...
gaal google summer of code, sorry.
integral there was a post to the haskell mailing list on that. Sounds like it'll probably be merged to GHC
putter haskell.org/haskellwiki/GHC/GHCiDebugger 20:05
lambdabot Title: GHC/GHCiDebugger - HaskellWiki, tinyurl.com/lxsxa
integral that's really rather cool 20:06
gaal safeCoerce, lol! though I wonder how is it different from Generics.cast? 20:07
(...why does it take a GHC.Session arg?) 20:08
putter a related problem: 20:10
Match objects should really have a link to what rule created them.
Then a parse is an ast.
Having to embed code in rules to create an ast both reduces their generality and flexibility, and makes optimization a pain. 20:11
gaal I need to finish rereading S05, but I think there's a way to get exactly that.
putter 's ears perk, checks...
I don't see it. The once was a concept of :parsetree, which did both class tagging and what is now :keepall, but :keepall got broken out and the rest disappeared. 20:16
gaal p6-l it, it sounds too useful to miss.
theorbtwo I think a parsetree is more or less the default.
Without an explicit return, a rule returns a Rule, which is probably a |capture now. 20:17
putter a regexp match returns a Rule?!? if so, that's startling. 20:18
the issue is when a regex is run against a string, it returns a tree of matches, but the individual matches are not tagged with what rule generated them. 20:19
so groveling over the resulting tree is vastly harder than if this information was not thrown away. 20:20
like writing XSLT with all the nodes crushed down to a single node type. 20:21
20:21 jferrero joined
gaal I'm off to bed... & 20:21
putter g'night gaal
you want to be able to walk the match tree resulting from, say, parsing some language, and say "if this is an expression node, do x; if literal, do y". 20:23
currently you would have to do something like add { $<tag> = 'literal' } to the literal rule, etc. 20:24
which means the regex optimizer has to be able to recognize that construct, so it doesn't interfere with optimization.
20:24 fglock joined
putter though that might be doable, and is thus an alternative to having Match's remember their rules. 20:25
fglock putter: hi
putter hi fglock! 20:26
fglock hmm - hash-dispatched subrules have 'KEY' - which is kind of a tag of the current rule 20:27
wolverian so, do we still have Foo|Bar as a type signature, or is that a junction?
fglock wolverian: I think it is a junction operation that results into a signature 20:28
into a type 20:29
putter ie, both :)
wolverian so I don't get two instances of the interpreter from then on? :)
putter lol
in copenhagen perl6... 20:30
wolverian it seems like a fairly intuitive special case, in any case 20:31
20:32 rindolf joined
putter so fglock, where are we with the pcr switch + fleshing out 20:32
fglock putter: maybe named rules could make Matches with KEY=>"method_name"
putter re special case, why special? just how the type algebra is defined. 20:33
fglock putter: I can't wait for your backtracking implementation :)
putter fglock: it would be nice to get the rule object itself. then you can ask it for its name, grammar, etc.
20:33 rindolf joined
putter hmm, it's not "rule" anymore 20:34
fglock putter: I've been working a bit with emitting plain p5 regex - it actually work in many cases
putter is there a name for "named regex"?
fglock grammar methods?
putter before your work, the state was... what? individual leaf nodes like \d get their own regexp call (or implementation)? so the change is combining adjacent ones? 20:35
fglock we need both implementations - plain p5regex only works for unnamed p6regex 20:36
because backtracking in p6 works differently
putter re being unhappy with names, the "Grammar" (p6 mixin) vs "grammar" (the broader parsing concept), still bugs me. ;) 20:37
putter doesn't understand fglock's last two lines...
fglock putter: if you have a named p6regex with /.*/, it will backtrack until the *caller* rule matches 20:39
putter rx/\d\d/ can become two nodes (digit,digit), or one, (p5able-regex('\d\d')), and emit as (eat('\d'),eat('\d')) or as (eat('\d\d')). no? 20:40
fglock for example, you can have / x <ws> \s y /
yes
putter (the number of nodes and how it emits are independent options)
fglock but compare with: ' regex some_digits { \d+ }; rx/ <some_digits> \d / ' 20:41
putter so one takes primitive, non-repeating leaf nodes, and combines them up until one hits a quantifier or... couple of other things. 20:42
fglock <some_digits> must backtrack on the caller context
yes, there are a few other things to consider 20:43
putter re some_digits, indeed, its \d+ can only easily eat('\d').
fglock it must stop before the last \d, or the caller would fail 20:44
putter "easily" because the rx// could do global (multiple rule) optimization, or one could indeed eat('\d+') if it were givin a wrapper which remembered the last match, and shrank it each time the wrapper was backtracked into. 20:45
A wrapper may or may not be faster, depending on how complex the underlying regexp is.
fglock the problem is how do you 'shrink' a p5regex 20:46
putter s/shrank it/shrank it and ran the regexp again/
re shrink, you shrink the target string, eg, 20:47
fglock but this would create problems with <before> and <after>, for example
and <at> & others 20:48
putter "123" ~~ /above example/ first matches \d+ with "123". then \d fails, we backtrack, and /\d+/ is matched against a chop()ed "123", namely "12". which matches, we proceed, and win.
basically each regex gets both a staring pos, and a must-be-done-by pos. 20:49
fglock how about rx/\d+?/ - it needs to start small, and then grow instead of shrink 20:53
putter there you can just do /\d+?/ the first time, remember its .to, and then on failure, start at .to with another \d. 20:55
or more simply, just do \d the first time, etc. 20:56
fglock not too different from current pcr regex 20:57
putter there we are managing the backtracking ourselves, and don't get any ->p5regexp benefit. re not too different, yes
oh, so that raises one other idea,
while in general we need to manage backtracking, captures, etc, it could be useful sometimes to separate the "finding match" from the "ok, found match, lets do the p6-ish stuff". 20:58
fglock pcr has a dsl for the first part, and a wrapper for the second part 20:59
putter Ie, rx/foo(bar)hee/ first runs p5/foobarhee/ , and only once it finds a match, does it start at that location and do the full p6 version. 21:00
the p5 version can suck in the definitions of subrules. 21:01
s/suck in/inline/ 21:02
fglock but it would need to do this at runtime
putter well, the usual "has this changed since compile time, if not, use the stashed optimized version", but yes 21:03
not clear it's worth doing "if has changed".
fglock it depends on how you have subclassed the grammar 21:04
putter explain?
oh, 21:05
fglock you may have redefined <ws> to include pod, for example
putter rules are mixins, yes?, so each child grammar gets distinct Rule objects. maybe? if not, then yes, the Rule needs to have a stash indexed by which grammar it is being used in. 21:06
fglock in the pcr/v6.pm implementation, rules are plain p5 methods 21:07
(class methods) 21:08
putter no problem. almost all of these musings are "stuff for version 2". ie, one can live with much simpler, if somewhat slower, implementations. and even if they stay methods, one can just use them to index a objects elsewhere (err, called "inside-out objects" maybe?). 21:09
21:10 Aankhen`` joined
putter s/inside-out objects/inside-out design pattern/. 21:10
which brings us back to what pcr needs done to it right now. 21:11
what's the current priority list look like, given that audreyt seems to be targetting a release early next week
?
perhaps not worth fiddling at all with the runtime in that time frame, no? 21:12
fglock fixing infinite loops if there are any left
putter "left" as in remaining, or "left" as in left recursions? :) 21:13
fglock remaining :)
putter what else? 21:14
fglock special-casing '+' and '+?' implementations would be great - it currently calls 'concat' recursively 21:16
putter what else? :) 21:17
fglock fix the compile-time capture counter 21:18
putter what is the state of the t/rules, err, now t/regex smoke using pcr?
putter goes to look... 21:19
fglock there are some unimplemented features, like ignore-case and such
not too difficult to fix
putter re smoke, iblech++ as always
a lot of skipping going on... 21:21
oh, before I forget, my one-liner on the p5 regexp engine performance is "C; some things are blazing *pc++; some good analysis (trie's); dumb - but otherwise the analysis/optimization is not very aggressive". so the ideal is to do our own aggressive optimization, and then farm out the low level to p5. 21:26
www.geocities.com/mparker762/clawk#regex has some nice optimizations, but suffers from "at phase n we need the information we threw away at phase n-m :(". 21:29
lambdabot Title: REGEX/CLAWK/LEXER Packages, tinyurl.com/r9tnv
putter anyway, so let's see... 21:30
fglock we could join the current code into a single emitter, which tried to emit p5regexp, and if that fails, emits ratchet code, and if all else fails, emits high-level backtracking code 21:31
putter repeats are parsed now, yes? is there an implementation?
fglock repeats == quantifiers?
putter if not, have you seen backtrack_api.pl's sub_repeat? could its core be easily transcribed to be used in pcr? 21:32
oops, sorry. ranges
of all the quantifiers, ? * + ?? *? +? {x..y} {x} {x..}, only the ranges aren't working, yes? 21:33
oops, left out {x..y}? , non-greed range 21:34
fglock you can plug the range into the backtracking state - it might work 21:35
putter you mean a range, as in p6 Range? 21:36
fglock yes - I included it in the parser, btw 21:37
it only needs the emitter code 21:38
putter ok, looks like my next task is to become familiar with the pcr runtime.
fglock trying again to commit... 21:44
21:56 rodi joined
fglock audreyt, kolibrie: $$<foo> is fixed in v6.pm (but svn commits are down) 22:03
hmm - $$<foo>.chars doesn't work because .method is tighter than $ 22:07
putter evening &
fglock $<foo>.chars - works 22:09
22:33 larsen joined 22:37 weinig is now known as weinig|food
Juerd ?eval "€".chars 22:37
?eval "€".bytes
evalbot_r13586 1
3
Juerd I thought evalbot used to be faster than this.
22:56 nothingmuch joined 23:17 bsb joined 23:35 weinig|food is now known as weinig|bbl 23:42 gunya joined 23:45 mjk joined