6.2.11 released! | pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6
Set by wolverian on 12 February 2006.
00:06 wilx`` is now known as wilx 00:15 Ovid joined 00:41 drbean left 00:44 kanru joined 00:52 putter joined
putter quiet woot. "say 3;" parses. 00:52
now for the "minor matter" of writing a operator precedence parser... 00:53
00:57 xinming joined
putter oh, that's just fun. got rev 9000. :) 01:07
svnbot6 r9000 | putter++ | regexp_engine_demo.pl checkpoint. "say 3;" parses.
r9000 | putter++ | perl -w regexp_spike.pl will parse file regexp_spike_target.p6.
r9000 | putter++ | Next step: making <expr> an operator-precedence parser.
xinming I'll do an empty commit to get the 9999 :-) 01:14
01:18 grayson joined 01:23 kanru joined 01:24 kanru joined
putter ;) 01:34
Juerd Playing with sparse files is fun. 01:39
A 1 GB fully sparse file, after mkfs.ext3 on it, takes up 47 MB on disk
Copy that with --sparse=always to force the cp to find out where holes can de put, the resulting file is just 232 kB in size :) 01:40
Still md5sum'ing correctly, so still representing the empty 1 GB filesystem.
The funny thing is that gzip results in an 1.1 MB file.
So sparseness works better than gzip, for this kind of file. Which I find funny, because it means gzip isn't quite as good as it could be. 01:41
putter db file? 01:45
xinming really frustrating after hear about the IQ of audreyt is over 180. :-/ 01:48
she is really different. :-) 01:49
Kattana only if you iq is normal ;) 01:52
xinming I just got 135. :'(
Kattana teehee 01:53
01:55 stennie joined, stevan_ joined
sky___ audreyt: ? 02:28
02:34 justatheory joined 02:37 pasteling joined 04:25 avar joined 04:54 drbean joined 05:31 binary42 joined
audreyt sky___: ?? 05:32
dduncan ximming, where did you hear about that IQ thing? 05:33
audreyt dduncan: it's random media rumour that's been around for more than ten years; please simply ignore 05:35
dduncan okay
Kattana humble too, however can mere mortals compete ;P 05:39
05:39 vell joined
audreyt competition is overrated anyway 05:40
Kattana competition ftw.
audreyt not sure which expansion of the ftw acronym do you mean here 05:42
Kattana for the win of course, we are talking competition. 05:43
audreyt according to wikipedia, that could've also meant "competition fscks the world" :) 05:44
but okay :)
Kattana wikipedia is not a reliable source of information :P
audreyt too true :p 05:45
gaal do I need symbols in the fakeEnv for asYAML? If I do, that introduces a circular ref Pugs.AST.Internals <-> Pugs.AST.Pad 05:48
(initSyms)
audreyt it probably doesn't 05:49
webmind Kattana, neither is the dutch dictionairy.. still loads of people use it :)
gaal Pugs.AST.Internals already uses Pugs.AST.{Prag,Pos,Scope}, adding .Pad triggered an error.
audreyt gaal: just newTVar mkPad [] 05:51
don't install any syms
gaal oh, mkPad lives in AST.Pad too 05:53
05:57 drbean left 06:03 NeHo joined 06:04 NeHo left
audreyt but it's just listToPad 06:05
which is in AST.Internals
so use listToPad would do
gaal solved that, I think (I just use MkPad Map.empty, since there's nothing to put there) 06:11
but now I need an "evaluate" function
audreyt easy 06:19
eval <- asks envEval
and then use eval
06:29 grayson joined
audreyt bbiab, beach :) & 06:38
svnbot6 r9001 | gaal++ | WIP towards VRef asYAML instance. Breaks the build. 06:42
06:45 spo0nman joined
svnbot6 r9002 | audreyt++ | * Unbreak the build. :-) 06:48
06:52 gaal joined
sky___ audreyt: remember balas asked about a poem in my parents apartment 06:58
07:17 r0nny joined 07:28 Cryptic_K joined
lypanov xinming: i did an iq test one day and got ~119 07:28
xinming: several weeks later i took another test,
xinming: 142
xinming: the difference? for the second on i'd had coffee
s/on/one/
07:31 iblechbot joined 07:52 drrho joined, integral joined, meppl joined 07:55 marmic joined 07:56 nnunley_ joined
azuroth lypanov: maybe you just had withdrawal symptoms slowing you down, on the first 08:04
08:04 f joined 08:11 kane_ joined 08:27 bsb joined 08:28 K_ joined
svnbot6 r9003 | Darren_Duncan++ | r2459@darren-duncans-power-mac-g4: darrenduncan | 2006-02-15 00:27:13 -0800 08:31
r9003 | Darren_Duncan++ | /ext/Rosetta : updated all copyright notices to rename 'Rosetta database portability library' to 'Rosetta DBMS framework'
08:39 elmex joined
lypanov azuroth: ;) 08:47
09:08 Copernic joined 09:15 lypanov is now known as lisppaste 09:16 lisppaste is now known as lypanov 09:26 sintigan joined 10:07 usr-src joined 10:12 G2 joined 10:26 Copernic left 10:28 clkao joined 10:48 nnunley joined
nnunley Hrm. How does one escape % in a p6 rule? 10:49
I'm getting hit by the dynamic rule dispatch expansion.
azuroth $a = '%'; /$a/ # dodgy 10:51
nnunley Very. 10:53
I can use the escaped ascii value.
10:54 grayson joined
azuroth hmm. I'm not sure of a better way 10:54
11:12 gaal joined
audreyt wouldnt \% work? 11:56
11:57 iblechbot joined
azuroth I assumed not, simply because nn was asking :-) 11:58
bsb nnunley: Pm post on escaping '#' groups.google.com/group/perl.perl6....7851089e1f
nnunley PGE doesn't current support escaping % yet. Donno if that's a bug or a feature. 12:03
At least, not with \%
12:04 Aankhen`` joined
audreyt probably a bug 12:07
azuroth <{ '%' }> would this work?
audreyt or just <'%'> 12:08
azuroth ahh yeah 12:09
12:14 iblechbot_ joined
azuroth night all! 12:17
audreyt night azuroth
svnbot6 r9004 | gaal++ | Pugs.AST.Internals: fromYAML for VRef and Map 12:23
13:00 lao joined 13:08 drbean joined 13:14 kolibrie joined
audreyt ?eval my @a; @a = (1, 2, \@a); @a.yaml; 13:14
13:14 evalbot_8999 is now known as evalbot_9004
evalbot_9004 "--- \n- 1\n- 2\n- \n - 1\n - 2\n - ~\n" 13:14
svnbot6 r9005 | audreyt++ | * Dumping recursive Yaml structures now Really Works (tm) 13:17
lypanov w00t 13:18
audreyt ?eval my @a; @a = (1, 2, \@a); @a.yaml; 13:19
13:19 evalbot_9004 is now known as evalbot_9005
evalbot_9005 "--- \&1 \n- 1\n- 2\n- *1\n" 13:19
svnbot6 r9006 | audreyt++ | * unbreak "make ghci" 13:20
13:25 kisu joined 13:26 mncharity joined, mncharity is now known as putter
putter operator fixity is just a way of underhandedly declaring different left and right precedences? so postcircumfix:<[ ]> is <==given-precedence is-parsed/ \[ <expr> \] / eof-precedence==> ? 13:29
circumfix: is just a term: but with an is-parsed() ? and giving precedence doesn't make sense in either case? 13:30
comments welcome. :) 13:31
Unless I hit the dreaded yawning pit of yacks (not to be confused with the easily bypassed benign pit of yawning yacks), I hope to have the regexp-engine-become-parser architecture-definition spike wrapped up today. I hope. 13:33
Err, s/yacks/yaks/ No comment. 13:34
Just soo no comment.
audreyt mm yawning yaks 13:35
wolverian hmm, I'm debating whether I should apply for an OSS summer project - like google's summer of code. deadline for the applications is today.. 13:36
any good ideas for such a project are welcome, of course. I thought of Pugs, but I'm not sure if I can project right now what kind of work it'll need in summer. 13:37
audreyt sure you could... you can fill in "integration with CPAN modules" or "integration with Parrot" or something that will always hold true :) 13:38
wolverian true enough.. I'm not very good at C though.
and I'm still learning Haskell. :)
audreyt CPAN modules requires p5/p6, not C/Hs :)
wolverian I guess. coding the base modules would be interesting. 13:39
thanks, I think that's it. audreyt++ # great ideas
audreyt :D 13:41
13:41 pjmm joined
wolverian it's only 1800ā‚¬/month, and paid only on completed work, but at least I can work at home.. 13:41
not bad for a summer job, I think. 13:42
audreyt yup
wolverian the artistic license is OSI approved, right? 13:43
whiteg yes 13:44
svnbot6 r9007 | audreyt++ | * Prelude.pm is now parsed/compiled to YAML:
r9007 | audreyt++ | ./pugs -CParse-YAML src/perl6/Prelude.pm
r9007 | audreyt++ | though the emitted tree is lacking many nodes due to unfilled
r9007 | audreyt++ | instances in Pugs.AST.Internals. Once we fill them in it'd work!
wolverian whiteg, thanks.
whiteg :)
wolverian I wonder why the project page doesn't mention 'free software' anywhere.. only open source. :) ah well, corporate sponsoring and all.
Odin- "OSS summer project"?
wolverian yes, arranged by www.coss.fi/en/ 13:45
whiteg .fi ? 13:46
wolverian finland
whiteg is at finland...
wolverian oh? are you a student? then you can apply. the instructions are only on the finnish page, though 13:47
whiteg well, I can find someone translating the Finnish into English
wolverian: Thanks.
wolverian you're welcome 13:48
13:54 pjmm left
svnbot6 r9008 | gaal++ | DrIFT.YAML - very minor cleanups 14:02
14:08 evalbot_9005 is now known as evalbot_9008, f is now known as fandango
audreyt gaal: nopaste.snit.ch:8001/6567 14:22
14:23 putter joined
wolverian hm, is case preferred over if? 14:23
and why does 'el node' crack me up :) 14:24
gaal wolverian: in this case there are several values, so case is less clumsy 14:25
wolverian maybe I read 'le node'.. I don't know.
audreyt it's just a sketch that doesn't run :)
wolverian gaal, right. makes sense
gaal and in general, you can pattern match with case
wolverian true enough. haven't needed it yet myself. I think I'm going to battle NodeMap now
putter wonders if unshaved yaks are a kind of feeping creature (of creeping featurism fame) 14:27
stevan_ dodges several of putters unshaved yaks as they bounce around the room 14:28
14:29 Nouk joined
audreyt so, the two missing parts that should happen before hackathon, after yaml-blessed prelude: 14:30
1. hoisting lexical pads into VCode -- that is, make symbols into properties of the surrounding block 14:31
2. base on that, takes Exp (parse tree) and generates an PILN-compatible object space image
the image needs to be in yaml, so that it can be loaded on the perl5 objectspace site 14:32
and for the perl5 runtime to take over after that
depending on whether we get around to do that, it may make sense to serialize the entire Env (parser's environment state) into YAML as well, so that the BEGIN{} block can run in perl5 runtime (or js runtime) as well
once that's done, the part that really needs haskell would be Parsec 14:33
14:33 avar joined
audreyt and it can be switched out to other rules-based implementation as another separate effort (i.e. they won't get tangled up) 14:34
I've got drawings here. needs to encode it to .png :)
putter :) 14:45
re BEGIN, oh yes please :)
audreyt cool :) 14:46
prelude->yaml compilation is coming rsn
(with luck, in 5 minutes)
putter ghahhh. it's going to take me longer to get all the expr Match objects all nicely connected than it took to write the d*mn parser itself. sigh.
lypanov audreyt: whats that mean?
audreyt: serialization of the prelude source?
its in p6? less parse time? 14:47
audreyt lypanov: well, currently we serialize it into haskell
and compile it along with pugs
which takes ~10 minutes on average machines 14:48
it's done to save parse time, yes
and also enable us to write most of builtin functions in p6
putter neat. and the "one really can parse in p5" proof of concept should be finished today too. parsing happenings in pugs-land. no, I didn't say that - performance acceptance trials first.
audreyt putter: ask for Perl6::Rules comaintainship from damian? :) 14:49
putter audreyt: did my earlier-described hypothesis about what fixity means sound plausible?
audreyt putter: fixity has an operational definition in OpTable 14:50
putter doesn't do CPAN... due to inability to separate contribution from (lack of) willingness to maintain... but someone else is encouraged to... 14:51
audreyt putter: I think there are assumptions encoded in those rules, so I'm not sure if desugaring circums into top-down parses works
especially
\[ <expr> \]
backtracks
until it can find a expr snippet that is followed by \] 14:52
whilst the token-level optable parser does not ever backtrac
lypanov audreyt: what would happen instead? you said "compile it along with pugs" would it be compiled at a different time? 14:54
audreyt: so old process == parse, make .hs. compile
audreyt: new process == parse, dump to yaml, use at runtime?
audreyt hm, no, not like that 14:55
old process ==
compile pugs once
use that pugs to parse Prelude.pm 14:56
and save it as a .hs file
the ncompile pugs again
link the .hs with it
into the final executable
new process ==
compile pugs once and that's it
for each .pm file, there could be a .pm.yml image that coes with it 14:57
lypanov ouch. oo. much much nicer then
audreyt not unlike .pyc files
lypanov anything that decreases time for first compile == teh roxor
integral could just do what perl5 does and have .pmc files with a 'use YamlLoader' header
lypanov (it put me off so much that i haven't compiled since...)
audreyt lypanov: actually there are two not widely known flags
in config.yml, precompile_prelude: false
lypanov audreyt: i use both of them
audreyt plus "make unoptimised"
lypanov audreyt: its still very slow unfortunately on my ibook 12" 14:58
audreyt ah right
ppc is teh slow
in that case, your life should get much better after this round of work
lypanov yup,
not only is gcc teh suck on ppc, but ppc is teh suck itself
so double teh suck
putter oh, that's fine. it's... let's see if I can do this... no that didn't work, how about... \+ <expr> \+ postcircumfix with an input stream of "3 + 2+2 + 3; the greedy <expr> eats 2+2, and then the parse fails. lacking token backtracking, you can't nudge it to just match 2... and that example doesnt work either. sigh.
but it's not <expr> which is top-down, but the tokens under it. the question is whether those tokens are parsed in the context of the entire input stream, or in isolation. 15:00
lypanov wishes he had chopsticks with him, makes dipping mini cookies in tea easier 15:01
putter oo, re example, infixcircumfix ( ie, . [ . ] . ) with type restrictions on the third, right-hand side argument? 15:02
audreyt it's called ternary, putter. 15:03
putter so 3 + 2+2 + 3.0 works as (+ 3 (ternary:thing 2) 2 3.0) if you can backtrack into thing, because the greedy <expr> in ternary:thing ($a,$b,Int $c) is parsed(/ \+ <expr> \+ /) will... oh, this is just too confusing. back to hacking. this is just a spike. if tokens need to be backtracked into, beyond mere expr backltracking , we can do that too. 15:06
audreyt k. 15:08
but it's specced as not.
okay. prelude->yaml compilation is officially There. 15:09
committing.
15:09 drbean left
svnbot6 r9009 | audreyt++ | * Prelude-YAML compilation works: 15:11
r9009 | audreyt++ | time ./pugs -CParse-YAML src/perl6/Prelude.pm > Prelude.yml
r9009 | audreyt++ | takes 12 seconds on my laptop, resulting in a 533036-bytes
r9009 | audreyt++ | file which we may or may not want to install as part of pugs's lib.
r9009 | audreyt++ | on the other hand, it's 16k when gzipped, and 8k when bzipped.
lypanov hehe 15:13
teeesny
s/sn/ns/
15:15 Qiang joined
audreyt brb, food 15:17
putter yay audreyt! 15:18
15:23 comet^ joined 15:24 justatheory joined
putter So, the purpose of the "regexp engine built using recursive-descent p5 subs" spike, which has now been lengthened to a "and a p6 parser engine built on it, using p6's dynamic statement/expr/operator/token scheme", is to allay doubts that we could go this path and have acceptable time/space performance. 15:29
15:29 fglock joined
putter If folks could suggest test cases, ideally daunting doubt-allaying ones ;), that would be much appreciated. 15:30
for the regexp engine, any p5 regexp (no lookbehind) and input string. for the parser... well, maybe that one's mine... 15:31
integral 'aaaaaaaaabbbbbaaab' =~ /^(?:a|b)*b/ # I've used this before 15:32
fglock putter: I'm making some experiments with my own prototype parser - do you have a link for a very simple example that needs backtracking, so I could make some tests?
putter (only infix ops work, and statement decls, so maybe I'll clutter up the tables with 10-ish odd statements and 50ish odd infix ops of assorted precedences, and and gen up a cluttered source file of 50k or so. sound plausible? 15:33
15:35 TMTOWTDIt joined
putter integral: thanks! :) 15:36
integral what's nice is that is skips past optimisations in the perl5 regexp engine :) So it really is testing backtracking on alternations. And P::RD sucks at it ;) 15:37
it also means you build up a big stack of backtracking locations too if you're not smart 15:38
putter fglock: p6 source examples which require backtracking... not that I can think of. I've been approaching the parser part of the spike as an exercise in architecture, considering the backtracking aspect of things a "been there, done that, it's demonstrated by the underlying regexp backtracking tests". hmm... 15:39
integral: ah, neat! at someone's suggestion, i was doing "aaaaaaaaaaxaaab" =~ /((a)*)+b/ ... but that last little bit isn't enough to confuse p5 (but is pcre). with 500 "a"s, takes 10ish sec and 200mb. 3ish sec with non-capturing parens. which seems pretty good? 15:41
integral doesn't sound too bad 15:44
for such exaggerated numbers :)
fglock putter: I'm sorry I'm working by myself instead of helping you, but I felt I needed to experiment with things first 15:45
15:47 vel joined, Cryptic_K joined
fglock my idea was - hand-write a parser that can read the regexp syntax, and then write the parser using itself - I'm seeing how far I can go 15:49
putter fglock: re sorry, oh, that's fine. experimentation is great. though, it -has- been lonely, snif. ;) 15:52
Juerd There already is a parser that can read perl5 regex syntax. 15:53
svnbot6 r9010 | putter++ | misc/pX/Common/regexp_try.pl added to let folks easily exercise the regexp engine. perl ./regexp_try.pl REGEXP [ STRING | --file FILENAME ]
r9010 | putter++ | Renamed the misnamed two "regexp_spike*" files to "parser_spike*".
putter fglock; you saw Regexp;;Parser? it's a "hand-write a parser that can read the regexp syntax
putter goes to try integral's case with the new ./regexp_try.pl... 15:54
fglock putter: I'll look, thanks. btw, I will use this for a test case: ( 'a'x500 . 'bbbbbaaab' ) =~ /^((?:a|b)*)b/; print $1,"\n"; 15:55
putter fglock: thanks! :) will do. 15:56
integral: the 100 a case takes about 1 sec. the 500 a case produced an annoying quantity of "Deep recursion warnings (which kick in I think when things are 100 calls deep). I'll try to silence those... 15:57
15:59 SamB joined, hexmode joined
putter oh, no, those are stats for a different expression. trying yours for real now... ;) 15:59
integral: are you sure that's the test case... ? the engine does the "1000 leading a's" string in 0.2 sec. or did I get the test string wrong? 16:05
integral hmm? I normally benchmark these things in a loop, with Benchmark...
It was more designed to just test some features rather than take ages alone 16:06
putter ah, ok.
yeah, regexp_try.pl should use Benchmark... any volunteers ;)
Oh, it could also separate the compile ( my $r = compile($re) || die; ) from the match ( my $m = match($r,$str); ) ... 16:07
svnbot6 r9011 | putter++ | Silenced "deep" recursion warnings in regexp_engine_demo.pl. 16:11
putter So Benchmark doesn't have a "time THIS, running as many times as fit in TIME, but run atleast once, however long it takes"? or am I just missing it...? is there another benchmarker? 16:15
integral yes, -10 as the number of times to iterate.
err, -$seconds rather
putter ah, ok, thanks. 16:16
svnbot6 r9012 | putter++ | regexp_try.pl can now do Benchmark. And the argument order has changed to match p5's =~. 16:29
r9012 | putter++ | perl regexp_try.pl [STRING|--file FILENAME] REGEXP [--bench [DURATION-SEC]]
putter thinks reversing the sense of duration, DURATION-SEC, was a bad idea... 16:32
16:33 stevan joined
putter integral: so, the 1000 a case runs in... of what use is N reps/sec? sigh. anyway to ask Benchmark for seconds? Anyway, 33/sec. 16:34
16:34 G2 joined
putter and the suggestion that there are gc issues, as the 400-ish reps accumulated a great deal of memory. 16:35
fglock does this make sense? - if I make /a*/ return an iterator, then I can make /a*./ backtrack without using a stack
integral putter: it's just for comparison surely? 16:36
and you could somehow guess it's equivalence to a line per second figure I guess
16:40 vel joined
putter fglock: I don't think you can special-case x*, which would make your question equivalent to "can I make all my regexps return interators"... hmm... one challenge will be to make this (?{local $x = 2;}) a (?{$x++}) do the right thing... 16:41
integral: it has the same feeling as using non-metric units... a needless opacity between me and what the numbers mean. I understand time. I know what a microsecond is. Giving me benchmark results in Hz... just doesnt seem the right thing. 16:43
integral I use regexps quite often when iterating over big files 16:44
so /sec measurements work for me
putter ah
that makes sense. wish it gave both. 16:45
fglock putter: I'm special-casing "plural" regexps (ones that contain * and +); about the code - wouldn't it fail anyway? 16:46
putter /<arbitrary_rule>*/ 16:48
16:49 chris2 joined
fglock <arbitrary_rule>* would return a list, which I'll try in this order: @list, @list[0..$#list-1], @list[0..$#list-2], ... until the whole regex match or fail 16:52
I'm not sure if it is supposed to try all possible combinations, like @list[1..$#list], @list[1..$#list-1] and so on 16:54
PerlJam fglock: what are you trying to do?
fglock PerlJam: I'm making some experiments with a backtracking parser 16:55
16:56 Nouk joined
putter fglock: given /<a>+<b>/ and rule a :p5 { (?{local $x=34;}) } and rule b :p5 { (?{ say $x }) }... 34 should get say()ed. _if_ you are trying to do a fully p5/6 compatible regexp engine. but of course, one can do specialized engines which only handle a subset of the regexp constructs. eg, no embedded code. or mutant embedded code with different semantics. 17:02
17:04 TMTOWTDIt left, grayson joined
fglock putter: what if it needs backtracking, and you were incrementing $x every time? since $x is 'local', it behaves like a global, right? 17:05
(I'm not sure about the meaning of 'local', probably) 17:06
putter the "say $x" is actually in the scope of the "local $x = 34". "down", even though it syntactically kind of looks like one has come back up from the "scope" containing the local() (the "(?{...})") before getting to the say$x. maybe the key idea is the brackets in (?{ }) are just part of the regexp token syntax. they are not a block. 17:09
PerlJam putter: you're confusing me. What language are you writing? Perl5 or Perl6? Perl6 has no "local", it's now called "temp" or perhaps you meant "state"? 17:12
(and perl5 has no "say")
(And this is why I stopped writing perl6 for a while--it was affecting my perl5 code :-)
integral (use feature 'say'; say "5.10 includes say";} 17:13
17:14 lisppaste3 joined
PerlJam integral: sure, but is it "print plus newline" or "print plus ORS"? ;-) 17:15
integral the latter is rather pointless since print outputs the ORS anyway
putter fglock: sorry for the confusion. you're right, the local()s should have been temp()s. the same kind of issue shows up in p5 code, but there you don't have rules. a pure p5 example would be /(?{local $x=3})(?{print $x})/ 17:17
17:18 fglock_ joined
putter I'm not sure whether p5 lets your quantify a (?{}). but (a(?{...}))* should be fine. 17:18
(I added the "a" there to make it not a "zero length and can't fail so does nothing" expression) 17:20
PerlJam putter: well, perl6 doesn't have (?{...}) either, it's just {...}
putter perl -we '$x=0;"aaa" =~ /(?:a(?{local $x=$x+1}))*(?{print $x})/;' prints 3 17:21
PerlJam: you're right. fglock: sorry for making things even more confusing ;) 17:22
fglock_ I made a test with backtracking, I'm trying to paste it here... (my other computer lost the network connection)
putter: oh, ok - no problem 17:23
so I'll try to finish my test program
should I upload it, even if it useless at the moment?
17:27 Amnesiac joined
putter that's what misc/pX/Common is for...:) experiment in community coding... we'll see if it works... 17:29
or if it doesn't (eg, perhaps Common will get too cluttered), then we'll see if it can be mutated into something which works... (eg, folks use personal dirs more than Common, but still perhaps usefully? avoiding the current coupling of ownership to "chunk of functionality / corner of pugs" 17:31
fglock_ I'm trying to find a proper filename 17:35
putter good names ++ 17:36
integral a
fglock_ it is a "what a regex compiler could compile a regex to" 17:37
compiled_parser.pl ? this is much more than it actually is 17:39
backtracking worked :) 17:44
putter iterator_engine?
fglock_ ok 17:45
svnbot6 r9013 | fglock++ | * misc/pX/Common/iterator_engine.pl - an experimental parser 17:50
r9013 | fglock++ | that backtracks using List operations
fglock_ putter: would you check if this program makes sense for you? 17:56
putter fglock_: looking... 18:01
svnbot6 r9014 | putter++ | perl parser_spike.pl , which parses parser_spike_target.p6, now prints something resembling a parse tree, including for "3 + 4 * 5". 18:02
gaal putter++ ! 18:03
PerlJam heh, for some reason I was trying to type "make" and it came out as "mame". I wonder what subconscious stuff made *that* happen ;-) 18:04
gaal put the blame on make 18:06
audreyt maim
gaal May M - a monadic type that reflects mutinous computation 18:07
wolverian what's the process for disambiguating a type variable in haskell? is there a common method or does it vary? 18:11
audreyt disambiguating? 18:12
wolverian i.e. fixing Ambiguous type variable `t' in the constraint: ...
audreyt use :: is normal
(term :: Type)
wolverian thought so. I can't find a type for it
audreyt "it"? 18:13
wolverian DynGraph g
giving that to graphviz'
audreyt DynGraph is a constraint
you should type it as Gr 18:14
(term :: Gr)
wolverian oh, duh. thanks. should I put that in the function that returns the graph, or keep the function's type as a constraint?
audreyt yes. 18:15
(i.e. both works)
wolverian thanks again. :)
audreyt np :)
wolverian works, awesome :) 18:16
svnbot6 r9015 | fglock++ | iterator_engine.pl - bugfix 18:17
putter gaal: :) 18:18
fglock: so the pieces are... input stream, find :)... a cache of the current values of all the regexp nodes?? given iterators, why isnt the entire state either on in the iterators or the stack? sub ab { while($a=a()){while($b=b()){ yield combine($a,$b) }} } ? 18:23
s/find/fine/
svnbot6 r9016 | audreyt++ | * Pugs.AST.Internals: Dumping Pairs and Hashes. 18:28
fglock_ putter: it's not using iterators. It is recombining the nodes in (@matched, @tail), instead of backtracking 18:30
putter I think I'm going to punt on non-infix fixities. So modulo any architectually-interesting bugs, both the regexp engine spike and parser, err, spike-extension, are now feature complete. Next there's the "minor matter" of groveling around for insight. And after that, back down to the bottom I think - clean backtracking api, then self-hosting regexp engine, then a new parser spike. 18:31
fglock_ the way you wrote it is more elegant 18:32
putter Any and all comments, criticisms, feedback, remarks, thoughts, observations, musings, etc, etc, on the regexp or parser files in misc/pX/Comment, would be most welcome. ;) 18:39
kolibrie my recent pugs compilations (most recently r9007) make successfully, but running ./pugs displays the banner and then seg faults 18:43
any ideas what I need to do to get it to not seg fault? 18:44
audreyt kolibrie: hmm, gdb?
putter (bearing in mind the objective of course... the code is, well, by design, ready to be thrown away as soon as it was written)
audreyt might be readline related
putter kolibrie: what os, version?
kolibrie audreyt: what do I type? 18:45
putter: debian unstable on i686
putter is a bit amazed that something as "simple" as readline could be the cause of so much pain...
putter tries to remember what the folk-remedy for that was... 18:46
you're running 6.4.0, yes?
err, ghc 6.4.0
kolibrie putter: I think so 18:47
putter is 6.4.1 on unstable?
kolibrie I compiled myself, months ago 18:48
fglock_ putter: re "a cache of the current values of all the regexp nodes" - the hash works like a "namespace" for rules 18:49
(I mean the %rules hash) 18:50
putter note to (collective) self - let's document these known problems and related workarounds so we don't have to rely on wetware memory... :/
kolibrie putter: looks like ghc6 version 6.4.1 is in unstable 18:51
putter kolibrie: I believe it is sufficient to upgrade to 6.4.1. Alternately, it should also be sufficent to edit Makefile.PL in pugs, the test for readline, and disable it. You will then have a non-readline pugs, which you can call with rlwrap, to get readline back. 18:52
kolibrie putter: how odd 18:53
putter 6.4.1 is the current "stable" version from a ghc point of view
why odd?
or..., in *which* way odd? ;) 18:54
kolibrie I don't mind upgrading - do I need to do anything to my compiled version before installing via apt?
putter knows very little about debian...
kolibrie just thought it was a strange recipe for success 18:57
19:00 elmex joined
fglock_ has someone written a grammar file for grammar/rule ? 19:01
putter kolibrie: ah, yes
19:02 avar joined
putter fglock_: I think Pm has one (more?) in the parrot distribution. there another one in misc/Grammars/rx_grammar, but it's quite verbose. 19:04
fglock_ is this usable? svn.perl.org/perl6/grammar/trunk/Grammar.perl6
ok
19:05 LTjake joined
putter re Grammar.perl6, as reference/raw material, sure. as something you would execute, less so. 19:07
thanks, I'd forgotten about that 19:08
putter tries to remember why the backtracker is local()izing a bunch of variables at each choice point, rather than just doing it prior to modification, in the vicinity of that modification... 19:10
fglock_ about "rule name { [<word>|<[\.\:]>]+ }" - <word> is not defined, neither \., \: etc. Is there a place I can find those definitions, or is it just "internals"
19:11 LTjake left
rafl Does anyone know a document that describes how nested data structures in perl 6 work? Preferably in contrast to Perl 5. 19:11
putter dev.perl.org/perl6/doc/design/syn/S09.html "data structures" doesn't? 19:13
fglock_ putter: re backtracker - which file/line is it?
PerlJam rafl: if the Synopsis doesn't do it for you, we can probably answer some questions too. 19:14
putter fglock_: word is defined by the prelude. and the default \ handler defined by the prelude does the usual "it just the char, without any special meaning".
bsb putter, fglock_: (backlogging) Is the $^R localized var any use to you?
see www.perlmonks.org/index.pl?node_id=286981 19:15
putter fglock_: all over :) just grep around for local( in regexp_engine_demo.pl
bsb: looking... 19:16
svnbot6 r9017 | audreyt++ | * Data.Yaml.Syck: parseYamlFS -- faststring-based yaml parsing 19:17
fglock_ putter: re backtracker - it may be because you really want them to be modified globally, except when it is backtracking? 19:25
putter bsb: neat. i like "(?!)" as fail. one posibility which comes to mind is using Regexp::Genex for testing. rather than just testing one regexp/string pair, one could ask p5 to give a whole bunch of strings which are all supposed to match some regexp, and try them all. :)
bsb: oh, and I *very* impressed you manage a clean PASS, after two years, relying on both spec and unspec p5 regexp behavior. ;) 19:27
bsb Once again, japhy did most of the work. 19:28
all the hard work anyway 19:29
putter fglock_: hmm... I think it was simply because of... some combination of "I started down that path, and it worked, and it made this particular app simpler" (the current issue being it doesnt generalize too well), and you get some destructive interference effects between goto()s and local(). at least on my old perl. 19:30
gaal don't tell anyone, but audreyt has just gone into the shower with her laptop again 19:33
putter bsb: have you ever seen a qr which allows you to set $/,$1,$2,etc from embedded code? that reliably works I mean. :) I've tried some obvious things over the years, but it aways ended up more trouble than it was worth, due to fragility. ie, it would almost always work, and then I'd hit some oddball exception. though perhaps 5.9's are more stable? 19:34
wolverian gaal, her laptop is water proof?!
putter gaal: *lol*
mil-spec laptops ++ 19:35
bsb: being able to do so would finally allow you to use a non-standard p5 regexp engine, without affecting client code. (or being silly with source filters) 19:36
rafl putter, PerlJam: Well. What I'm mainly interested in are arrays of arrays and of hashes and so on. Nested structures in contrast to p5.
bsb putter, can't say I do 19:37
putter :(
bsb Maybe you could transform via YAPE::Regexp or the newer one
putter rafl: aside from changes that affect a single array/hash in isolation, I can't immediately think of anything which is different in p6 regards *nesting* them... 19:38
oh, well, nesting is p5's way of doing multidimensional arrays, and p6 has a new mechanism... 19:39
rafl How does that look like?
putter goes to look at dev.perl.org/perl6/doc/design/syn/S09.html ... 19:40
bsb putter: so you want to do ($/, $1, $2, $3) = @results_from_elsewhere? 19:41
putter A multidimensional array is indexed by a semicolon list, which is really a list of pipes in disguise. Each sublist is a slice/pipe of one particular dimension. So @array[0..10; 42; @x] is really short for @array.postcircumfix:<[ ]>( <== 0..10 <== 42 <== @x );
putter has more reading to do to figure out what that means...
bsb: I'd like to have a $qr with my own object in it, such that "aaa" =~ $qr is indistinguishable from (well, at least superficially resembles:) the effect of $qr containing a normal p5 qr//. 19:44
I think that was it. That would mean you just have to source filter the "/.../", "m(.)...\1", etc. But don't have to worry about =~ and expression rearrangement. I think that was it. sound reasonable? 19:46
rafl: ah, Multidimensional argument list binding and Pipe operators in dev.perl.org/perl6/doc/design/syn/S06.html 19:49
bsb: so, yes. ;) i think. 19:51
svnbot6 r9018 | audreyt++ | * Data.Yaml.Syck: emitYaml now uses faststrings, resulting 19:53
r9018 | audreyt++ | in another 4x speedup.
r9019 | fglock++ | iterator_engine.pl - starting to use function composition;
r9019 | fglock++ | starting a 'Prelude'
putter audreyt: so *3* second Prelude compilation!?! 19:56
audreyt the emitter part of it
putter ah, right
duh 19:57
fglock_ does regex alternation backtrack? like in (a|b)b... - if ab matches, but bb was a better choice, can it change? 20:00
avar it matches the first possible of the set
20:01 robkinyon joined
fglock_ avar: but what if this makes the match fail, while the other choice would work? 20:01
avar <avar> it matches the first possible of the set
if "ab" is not possible then it'll fall back on "bb"
fglock_ ok 20:04
svnbot6 r9020 | fglock++ | iterator_engine.pl knows '<word>' 20:26
r9019 | fglock++ | iterator_engine.pl - starting to use function composition;
r9019 | fglock++ | starting a 'Prelude'
r9021 | gaal++ | * change pugs' YAML emission client code to use audreyt++'s speedupped FastString 20:29
audreyt ?eval 1 20:34
20:34 evalbot_9008 is now known as evalbot_9021
evalbot_9021 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46. 20:34
svnbot6 r9022 | audreyt++ | * relax optimized settings for FPS 20:35
audreyt ?eval 1
evalbot_9021 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46.
svnbot6 r9023 | audreyt++ | * relax the same flags for Data.Yaml.Syck as well. 20:38
audreyt ?eval 1
evalbot_9021 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46.
svnbot6 r9024 | audreyt++ | * unbreak the build by adding FPS to cabal. 20:41
audreyt ?eval 1 20:43
20:43 evalbot_9021 is now known as evalbot_9022
evalbot_9022 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46. 20:43
audreyt ?eval 1 20:48
20:48 evalbot_9022 is now known as evalbot_9024
evalbot_9024 1 20:48
audreyt ?eval my @a; @a = (1, 2, \@a); @a.yaml 20:49
evalbot_9024 "\d[1975](fc\d[8]- 1\n- 2\n- *1\n"
20:50 dduncan joined
audreyt ?eval eval("--- 1\n", :lang<yaml>) 20:51
evalbot_9024 ""
svnbot6 r9025 | audreyt++ | * repair YAML parsing's memory problem by making an explicit copy. 21:17
r9026 | audreyt++ | * Fix memory corruption on emitting as well. 21:20
audreyt okay. loading the prelude .yml is now benched as 2secs 21:28
dumping is 4
on my laptop
probably still a bit heavy compared to the <0.5sec performance of precompiled prelude 21:29
but beats the >10sec nonprecompiled-prelude easily
if it's still too slow, we can improve it further tomorrow
but now I need to sleep :)
g'nite *wave*
lypanov sleep well audreyt
rafl Juerd: ping 21:34
Juerd pong 21:35
rafl: pong 21:37
webmind g/win 29
oops
21:38 Khisanth joined
rafl Juerd: You said in Berlin that you deal with IBM stuff.. can you sell me an ultra bay thingy for my X41? 21:39
21:40 DesreveR joined
Juerd rafl: Yes, but very probably not within two weeks :) 21:50
rafl Juerd: probably -v :-) 21:51
Juerd rafl: Three weeks it usually takes. I'll phone tomorrow. 21:53
Luxury thinkpads aren't sold much in .nl, so they don't keep any stock. 21:54
Only your average R* and T* models, and accessories for them, are available quickly.
xinming dduncan: I read a brief introduction about her mother's book <<The war in growth>> (The book name is translated by meaning), and the brief introduction mentioned the IQ of audreyt. :-) 21:57
dduncan boing boing 21:58
rafl Juerd: Thank you! 21:59
dduncan according to audreyt, this IQ thing was a 10 year old rumor, and we should ignore it
she told me yesterday just after I asked the question
xinming dduncan: :-) 22:00
stevan xinming: what does it say about her IQ? 22:01
Juerd What does IQ stand for in this context?
stevan Intelligence Quotient (i assume)
xinming stevan: Over 180. :-) 22:03
stevan xinming: is there an english translation of this? 22:04
xinming hmm, Well, She is also a hard working guy. No doubt she is so excellent
stevan: No. :-) 22:05
stevan oh well
stevan is not sure you can accurately measure intelligence anyway
whiteg that book is over 10 years 22:06
It should not have any meaning now 22:07
xinming stevan: hmm, for creative thing or other thing, It is correct. But for thinking in logic, It's not true, :-)
stevan according to some sites a score that high occurs 1 in a million,... that sounds like our audreyt ;)
whiteg xinming: actually, even the publisher in taiwan no longer publish it now.
stevan xinming: there are many kinds of intelligence, and there is no way to accurately measure them 22:08
xinming whiteg: I'll republish it in mainland If I have chance. :-P
Juerd An IQ number is worthless without knowing its standard deviation. 22:09
stevan I have known some very very smart people in my life, some of whom would probably do really bad on a traditional IQ test
whiteg In taiwan, students with that IQ score happens almost every year..
xinming stevan: That's why I say, to test the scrore about 'thinking in logic', The result is believable. :-)
Juerd With a z-score of 2, the IQ would be 148 given sd=24, but only 130 given sd=15, while these two values should be considered equal. 22:10
whiteg: It's called evolution :)
webmind 'more then half scores above average' ;)
Juerd Whoa!
whiteg Juerd: sadly they don't write perl.:P 22:11
Juerd (Not true, by the way... the mean has shifted, while the tests have not yet. The current worldwide average is around 104 at sd=15.)
webmind it increases ?
I'm amazed :)
xinming webmind: I think so.
Juerd webmind: Yes, evolution.
Apparently the world can't keep up with .tw 22:12
integral webmind: either that or it shows the tests are biased towards learned knowledge :)
webmind must meet the wrong people on the streets :)
integral, I think the latter
xinming Math knowledge will help you in IQ test. :-P
webmind uhuh
Juerd webmind: Well, psychiology teaches that people flock together in groups of intelligence, within other groups... 22:13
(nothing implied, just observing.)
xinming: Especially recognising fibonacci sequences assures one of a few extra points ;) 22:14
webmind but not nesceserly(sp?) in higher levers of intelligence
sili well, i'm glad that fibonacci numbers are abused in CS to the point i can name off the first 247
Juerd Hmmm
Intelligence lever... :)
webmind levels
Juerd pulls the lever.
PerlJam sili: Well ... what are they? ;)
webmind typo :)
22:15 hexmode joined
Juerd I'll compete with sili: 1 1 3 5 8 13 21 22:15
Woohoo :)
ehm
Forgot 2 :)
1 1 2 3 5 8 13
hexmode bitl
Juerd Someone else do the remaining 240, please :P
xinming Whenever I see the numbers in these sequence. I'll hide... :-) 22:16
webmind 21 34 55 89
xinming hides..
stevan take the more "intelligent" approach and writes a program to calculate them ;)
sili 1 1 2 3 5
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
muahaha
good ol /exec
Juerd sili: Still not at 247 ;) 22:17
sili don't make me flood
Juerd See topic ;)
sili heh.
stevan wonders if "reading" helps on the IQ test more than the fib sequence :P 22:18
22:18 iblechbot joined
sili take the sample mensa test 22:18
it's fun
stevan for some definition of "fun"
PerlJam mensa is a load of crap. 22:19
sili PerlJam: but they're so l33t
stevan hateses tests
integral it's always people who're not in it who say that! ;-)
xinming stevan: I don't think so, As the IQ test are mostly gathered with such questions like... what the next pic is... what the next number is...
webmind stevan, and reading it a learned skill :)
PerlJam integral: sure, but even though my IQ qualifies me to be one of the mensa elite, they have always seemed like a bunch of self-congratulatory pricks. And so I've never been interested in joining such a group. 22:20
sili don't want to be part of a club that wants you as a member? 22:21
stevan brain is bigger than all of yours (of course that could be the elephantitis) 22:23
22:23 Amnesiac joined
sili stevan: or your regular ol tumor 22:23
stevan :)
IMO, knowledge is useless unless you can actually apply it and no test can measure you ability to do that and do it effectively, only your actions can 22:25
sili this channel is just too profound for me
stevan in other words, what good is a mensa membership if you can't hold a job
sili jobs are overrated 22:26
legalized slavery, i say
xinming stevan: You are right, Knowledge is mostly useless unless you know how to use it.
stevan: For the normal people. Computers are useless. because They don't know how to make moeny from it. :-P
stevan xinming: depends on what you mean by normal, in america many jobs require some kind of computer interaction, even ones not traditionally associated with computers 22:29
PerlJam stevan: For those people, computers are just furniture that they interact with :) 22:30
xinming stevan: hmm, I just tell the truth in China. :-/ 22:31
stevan true, although that is becoming less and less so
xinming: and I for america :)
stevan held many different kinds of jobs before getting into programming
and they were all very boring :) 22:32
speaking of which, I have to go assemble a bunch of IKEA shelves now, so I bid you all a good $localtime 22:33
stevan &
22:34 thorin joined 22:43 amv_ is now known as amv 22:46 larsen joined 22:47 putter joined 22:50 grayson joined
putter steven: ping? 22:53
stevan putter: pong (but only for a moment, I am building shelves) 22:55
22:55 clkao joined
putter hi steven. I need you tell me I'm insane, to wit, 22:55
we have backtracking with not too shoddy performance,
so structural matching is a no brainer, and will make writing the compiler easier,
stevan putter: you are insane (that is a high compliment in #perl6 of course)
putter but if we have ok backtracking....
why not add unification? 22:56
resolution is a easy I suspect,
so given bt and unification... prolog on p5 :)
stevan putter: sorry, I so not a parser/regexp guy, I have no idea what you are talking about :)
ooohh,.. prolog in p5 :)
that I understand :)
putter lol
stevan is it CPAN-able? 22:57
I think it would be really cool if all the elements of the spike were CPAN-able
putter as long as local() lookup doesnt go glacial as it gets used a lot, I'm thking
don't see why not
stevan even cooler :) 22:58
putter ooo, no. spike == throw-away code. but once shown to work, one can do a non-throwaway version
stevan yes, that is what I mean
I mean after all,.. Perl 5 needs a really good set of compiler tools :) 22:59
I got Class::MOP working using C3 dispatch in like 10 minutes this morning, roles are my next thing to try,
putter yeah, I'm being distracted by the new shiny thing rather than working on non-throwaway code. or no, that's not fair. it's helping me think about how the real code should be structured.
stevan after that transcoding Perl 6 classes to P5 might be really simple
putter stevan++ yay 23:00
I was going to ask you about that.
It would also be nice if one could mixin (no pun intended) one of the multimethod modules
stevan the recent Class::MOP has a test with an example of Scala style mixins, but it is not an official "feature" of the MOP 23:01
putter even with the parser-spike, it would have been easy to add a statement_control:<class_declaration>... at which point it would be so tempting to...
stevan anyway,.. I have to build shelves or I am in trouble with the $wife :) 23:02
I should be back online later this evening though, about 9 our time
putter oh, I really didn't mean mixins. sorry. meant, some combo of MOP and C3 and C::MultiMethods::Pure(?), which would give something like a whole package of sub/multi/method/multimethod capabilities. 23:03
stevan oh
putter ok. bye
enjoy, and may you avoid donating blood to the process.
stevan Class::Multimethods::Pure worked with the old metamodel,.. and should work with MOP
putter awesome 23:04
stevan however, C::MM::Pure is very slow, and needs to handle "next METHOD" to really work
23:05 kisu joined
stevan I tend to doubt that Luke has much time these days for it (I think he has moved onto other things more interesting to him) 23:05
Class::Multimethods might be an option too, even though it uses manhattan distance
IIRC they only really vary in how they handle edge cases 23:06
anyway,.. gotta go,.. will talk later
putter ah. hmm... ok. we'll figure something out. maybe should do "real" dispatch, integrated with the object system (inherited, etc) anyway
later &
avar how is multiple class inheritance handled in p6? 23:07
23:10 justatheory joined
azuroth is [2,3,4] a sublist of [2,3,4]? 23:10
wolverian it's a subset, but not a proper subset. I assume it's similar to lists.. 23:12
s/to lists/with lists/
putter avar: depending on what aspect(s) you are interested in, dev.perl.org/perl6/doc/design/syn/S12.html could be a good place to start. 23:19
Khisanth but that isn't even a list!
23:19 Limbic_Region joined
wolverian Khisanth, depends on the language. 23:20
azuroth Khisanth: I'm doing my haskell homework :-) 23:21
bsb "Lady with 5 Master Degrees Unemployed for 2 Years" 23:29
www.standartnews.com/archive/2004/1...4251_2.htm
as you said stevan
bye 23:30
23:30 bsb left