Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-02-15

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:06 wilx`` is now known as wilx
00:15 Ovid joined perl6
00:41 drbean left perl6
00:44 kanru joined perl6
00:52 putter joined perl6
00:52 putter quiet woot.  "say 3;" parses.
00:53 putter now for the "minor matter" of writing a operator precedence parser...
00:57 xinming joined perl6
01:07 putter oh, that's just fun.  got rev 9000. :)
01:07 svnbot6 r9000 | putter++ | regexp_engine_demo.pl checkpoint.  "say 3;" parses.
01:07 svnbot6 r9000 | putter++ | perl -w regexp_spike.pl  will parse file regexp_spike_target.p6.
01:07 svnbot6 r9000 | putter++ | Next step: making <expr> an operator-precedence parser.
01:14 xinming I'll do an empty commit to get the 9999 :-)
01:18 grayson joined perl6
01:23 kanru joined perl6
01:24 kanru joined perl6
01:34 putter ;)
01:39 Juerd Playing with sparse files is fun.
01:39 Juerd A 1 GB fully sparse file, after mkfs.ext3 on it, takes up 47 MB on disk
01:40 Juerd 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 Juerd Still md5sum'ing correctly, so still representing the empty 1 GB filesystem.
01:40 Juerd The funny thing is that gzip results in an 1.1 MB file.
01:41 Juerd 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:45 putter db file?
01:48 xinming really frustrating after hear about the IQ of audreyt is over 180. :-/
01:49 xinming she is really different. :-)
01:52 Kattana only if you iq is normal ;)
01:52 xinming I just got 135. :'(
01:53 Kattana teehee
01:55 stennie joined perl6
01:55 stevan_ joined perl6
02:28 sky___ audreyt: ?
02:34 justatheory joined perl6
02:37 pasteling joined perl6
04:25 avar joined perl6
04:54 drbean joined perl6
05:31 binary42 joined perl6
05:32 audreyt sky___: ??
05:33 dduncan ximming, where did you hear about that IQ thing?
05:35 audreyt dduncan: it's random media rumour that's been around for more than ten years; please simply ignore
05:35 dduncan okay
05:39 Kattana humble too, however can mere mortals compete ;P
05:39 vell joined perl6
05:40 audreyt competition is overrated anyway
05:40 Kattana competition ftw.
05:42 audreyt not sure which expansion of the ftw acronym do you mean here
05:43 Kattana for the win of course, we are talking competition.
05:44 audreyt according to wikipedia, that could've also meant "competition fscks the world" :)
05:44 audreyt but okay :)
05:44 Kattana wikipedia is not a reliable source of information :P
05:45 audreyt too true :p
05:48 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 gaal (initSyms)
05:49 audreyt it probably doesn't
05:49 webmind Kattana, neither is the dutch dictionairy.. still loads of people use it :)
05:49 gaal Pugs.AST.Internals already uses Pugs.AST.{Prag,Pos,Scope}, adding .Pad triggered an error.
05:51 audreyt gaal: just newTVar mkPad []
05:51 audreyt don't install any syms
05:53 gaal oh, mkPad lives in AST.Pad too
05:57 drbean left perl6
06:03 NeHo joined perl6
06:04 NeHo left perl6
06:05 audreyt but it's just listToPad
06:05 audreyt which is in AST.Internals
06:05 audreyt so use listToPad would do
06:11 gaal solved that, I think (I just use MkPad Map.empty, since there's nothing to put there)
06:11 gaal but now I need an "evaluate" function
06:19 audreyt easy
06:19 audreyt eval <- asks envEval
06:19 audreyt and then use eval
06:29 grayson joined perl6
06:38 audreyt bbiab, beach :) &
06:42 svnbot6 r9001 | gaal++ | WIP towards VRef asYAML instance. Breaks the build.
06:45 spo0nman joined perl6
06:48 svnbot6 r9002 | audreyt++ | * Unbreak the build. :-)
06:52 gaal joined perl6
06:58 sky___ audreyt: remember balas asked about a poem in my parents apartment
07:17 r0nny joined perl6
07:28 Cryptic_K joined perl6
07:28 lypanov xinming: i did an iq test one day and got ~119
07:28 lypanov xinming: several weeks later i took another test,
07:28 lypanov xinming: 142
07:28 lypanov xinming: the difference? for the second on i'd had coffee
07:28 lypanov s/on/one/
07:31 iblechbot joined perl6
07:52 drrho joined perl6
07:52 integral joined perl6
07:52 meppl joined perl6
07:55 marmic joined perl6
07:56 nnunley_ joined perl6
08:04 azuroth lypanov: maybe you just had withdrawal symptoms slowing you down, on the first
08:04 f joined perl6
08:11 kane_ joined perl6
08:27 bsb joined perl6
08:28 K_ joined perl6
08:31 svnbot6 r9003 | Darren_Duncan++ |  r2459@darren-duncans-power-mac-g4:  darrenduncan | 2006-02-15 00:27:13 -0800
08:31 svnbot6 r9003 | Darren_Duncan++ |  /ext/Rosetta : updated all copyright notices to rename 'Rosetta database portability library' to 'Rosetta DBMS framework'
08:39 elmex joined perl6
08:47 lypanov azuroth: ;)
09:08 Copernic joined perl6
09:15 lypanov is now known as lisppaste
09:16 lisppaste is now known as lypanov
09:26 sintigan joined perl6
10:07 usr-src joined perl6
10:12 G2 joined perl6
10:26 Copernic left perl6
10:28 clkao joined perl6
10:48 nnunley joined perl6
10:49 nnunley Hrm.  How does one escape % in a p6 rule?
10:49 nnunley I'm getting hit by the dynamic rule dispatch expansion.
10:51 azuroth $a = '%'; /$a/ # dodgy
10:53 nnunley Very.
10:53 nnunley I can use the escaped ascii value.
10:54 grayson joined perl6
10:54 azuroth hmm. I'm not sure of a better way
11:12 gaal joined perl6
11:56 audreyt wouldnt \% work?
11:57 iblechbot joined perl6
11:58 azuroth I assumed not, simply because nn was asking :-)
11:58 bsb nnunley: Pm post on escaping '#' http://groups.google.com/group/perl.perl6.language/browse_frm/thread/a77800f24913354e/75f87e7851089e1f
12:03 nnunley PGE doesn't current support escaping % yet.  Donno if that's a bug or a feature.
12:03 nnunley At least, not with \%
12:04 Aankhen`` joined perl6
12:07 audreyt probably a bug
12:07 azuroth <{ '%' }> would this work?
12:08 audreyt or just <'%'>
12:09 azuroth ahh yeah
12:14 iblechbot_ joined perl6
12:17 azuroth night all!
12:17 audreyt night azuroth
12:23 svnbot6 r9004 | gaal++ | Pugs.AST.Internals: fromYAML for VRef and Map
13:00 lao joined perl6
13:08 drbean joined perl6
13:14 kolibrie joined perl6
13:14 audreyt ?eval my @a; @a = (1, 2, \@a); @a.yaml;
13:14 evalbot_8999 is now known as evalbot_9004
13:14 evalbot_9004 "--- \n- 1\n- 2\n- \n  - 1\n  - 2\n  - ~\n"
13:17 svnbot6 r9005 | audreyt++ | * Dumping recursive Yaml structures now Really Works (tm)
13:18 lypanov w00t
13:19 audreyt ?eval my @a; @a = (1, 2, \@a); @a.yaml;
13:19 evalbot_9004 is now known as evalbot_9005
13:19 evalbot_9005 "--- \&1 \n- 1\n- 2\n- *1\n"
13:20 svnbot6 r9006 | audreyt++ | * unbreak "make ghci"
13:25 kisu joined perl6
13:26 mncharity joined perl6
13:26 mncharity is now known as putter
13:29 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:30 putter circumfix: is just a term: but with an is-parsed() ?   and giving precedence doesn't make sense in either case?
13:31 putter comments welcome. :)
13:33 putter 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:34 putter Err, s/yacks/yaks/   No comment.
13:34 putter Just soo no comment.
13:35 audreyt mm yawning yaks
13:36 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:37 wolverian 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:38 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.
13:38 wolverian and I'm still learning Haskell. :)
13:38 audreyt CPAN modules requires p5/p6, not C/Hs :)
13:39 wolverian I guess. coding the base modules would be interesting.
13:39 wolverian thanks, I think that's it. audreyt++ # great ideas
13:41 audreyt :D
13:41 pjmm joined perl6
13:41 wolverian it's only 1800€/month, and paid only on completed work, but at least I can work at home..
13:42 wolverian not bad for a summer job, I think.
13:42 audreyt yup
13:43 wolverian the artistic license is OSI approved, right?
13:44 whiteg yes
13:44 svnbot6 r9007 | audreyt++ | * Prelude.pm is now parsed/compiled to YAML:
13:44 svnbot6 r9007 | audreyt++ |     ./pugs -CParse-YAML src/perl6/Prelude.pm
13:44 svnbot6 r9007 | audreyt++ |   though the emitted tree is lacking many nodes due to unfilled
13:44 svnbot6 r9007 | audreyt++ |   instances in Pugs.AST.Internals. Once we fill them in it'd work!
13:44 wolverian whiteg, thanks.
13:44 whiteg :)
13:44 wolverian I wonder why the project page doesn't mention 'free software' anywhere.. only open source. :) ah well, corporate sponsoring and all.
13:44 Odin- "OSS summer project"?
13:45 wolverian yes, arranged by http://www.coss.fi/en/
13:46 whiteg .fi ?
13:46 wolverian finland
13:46 * whiteg is at finland...
13:47 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
13:47 whiteg wolverian: Thanks.
13:48 wolverian you're welcome
13:54 pjmm left perl6
14:02 svnbot6 r9008 | gaal++ | DrIFT.YAML - very minor cleanups
14:08 evalbot_9005 is now known as evalbot_9008
14:08 f is now known as fandango
14:22 audreyt gaal: http://nopaste.snit.ch:8001/6567
14:23 putter joined perl6
14:23 wolverian hm, is case preferred over if?
14:24 wolverian and why does 'el node' crack me up :)
14:25 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.
14:25 audreyt it's just a sketch that doesn't run :)
14:25 wolverian gaal, right. makes sense
14:25 gaal and in general, you can pattern match with case
14:25 wolverian true enough. haven't needed it yet myself. I think I'm going to battle NodeMap now
14:27 * putter wonders if unshaved yaks are a kind of feeping creature (of creeping featurism fame)
14:28 * stevan_ dodges several of putters unshaved yaks as they bounce around the room
14:29 Nouk joined perl6
14:30 audreyt so, the two missing parts that should happen before hackathon, after yaml-blessed prelude:
14:31 audreyt 1. hoisting lexical pads into VCode -- that is, make symbols into properties of the surrounding block
14:31 audreyt 2. base on that, takes Exp (parse tree) and generates an PILN-compatible object space image
14:32 audreyt the image needs to be in yaml, so that it can be loaded on the perl5 objectspace site
14:32 audreyt and for the perl5 runtime to take over after that
14:32 audreyt 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
14:33 audreyt once that's done, the part that really needs haskell would be Parsec
14:33 avar joined perl6
14:34 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 audreyt I've got drawings here. needs to encode it to .png :)
14:45 putter :)
14:45 putter re BEGIN, oh yes please :)
14:46 audreyt cool :)
14:46 audreyt prelude->yaml compilation is coming rsn
14:46 audreyt (with luck, in 5 minutes)
14:46 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.
14:46 lypanov audreyt: whats that mean?
14:46 lypanov audreyt: serialization of the prelude source?
14:47 lypanov its in p6? less parse time?
14:47 audreyt lypanov: well, currently we serialize it into haskell
14:47 audreyt and compile it along with pugs
14:48 audreyt which takes ~10 minutes on average machines
14:48 audreyt it's done to save parse time, yes
14:48 audreyt and also enable us to write most of builtin functions in p6
14:48 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.
14:49 audreyt putter: ask for Perl6::Rules comaintainship from damian? :)
14:49 putter audreyt: did my earlier-described hypothesis about what fixity means sound plausible?
14:50 audreyt putter: fixity has an operational definition in OpTable
14:51 * 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
14:51 audreyt especially
14:51 audreyt \[ <expr> \]
14:51 audreyt backtracks
14:52 audreyt until it can find a expr snippet that is followed by \]
14:52 audreyt whilst the token-level optable parser does not ever backtrac
14:54 lypanov audreyt: what would happen instead? you said "compile it along with pugs" would it be compiled at a different time?
14:54 lypanov audreyt: so old process == parse, make .hs. compile
14:54 lypanov audreyt: new process == parse, dump to yaml, use at runtime?
14:55 audreyt hm, no, not like that
14:55 audreyt old process ==
14:55 audreyt compile pugs once
14:56 audreyt use that pugs to parse Prelude.pm
14:56 audreyt and save it as a .hs file
14:56 audreyt the ncompile pugs again
14:56 audreyt link the .hs with it
14:56 audreyt into the final executable
14:56 audreyt new process ==
14:56 audreyt compile pugs once and that's it
14:57 audreyt for each .pm file, there could be a .pm.yml image that coes with it
14:57 lypanov ouch. oo. much much nicer then
14:57 audreyt not unlike .pyc files
14:57 lypanov anything that decreases time for first compile == teh roxor
14:57 integral could just do what perl5 does and have .pmc files with a 'use YamlLoader' header
14:57 lypanov (it put me off so much that i haven't compiled since...)
14:57 audreyt lypanov: actually there are two not widely known flags
14:57 audreyt in config.yml, precompile_prelude: false
14:57 lypanov audreyt: i use both of them
14:57 audreyt plus "make unoptimised"
14:58 lypanov audreyt: its still very slow unfortunately on my ibook 12"
14:58 audreyt ah right
14:58 audreyt ppc is teh slow
14:58 audreyt in that case, your life should get much better after this round of work
14:58 lypanov yup,
14:58 lypanov not only is gcc teh suck on ppc, but ppc is teh suck itself
14:58 lypanov so double teh suck
14:58 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.
15:00 putter 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:01 * lypanov wishes he had chopsticks with him, makes dipping mini cookies in tea easier
15:02 putter oo, re example, infixcircumfix ( ie, . [ . ] . ) with type restrictions on the third, right-hand side argument?
15:03 audreyt it's called ternary, putter.
15:06 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:08 audreyt k.
15:08 audreyt but it's specced as not.
15:09 audreyt okay. prelude->yaml compilation is officially There.
15:09 audreyt committing.
15:09 drbean left perl6
15:11 svnbot6 r9009 | audreyt++ | * Prelude-YAML compilation works:
15:11 svnbot6 r9009 | audreyt++ |     time ./pugs -CParse-YAML src/perl6/Prelude.pm > Prelude.yml
15:11 svnbot6 r9009 | audreyt++ |   takes 12 seconds on my laptop, resulting in a 533036-bytes
15:11 svnbot6 r9009 | audreyt++ |   file which we may or may not want to install as part of pugs's lib.
15:11 svnbot6 r9009 | audreyt++ |   on the other hand, it's 16k when gzipped, and 8k when bzipped.
15:13 lypanov hehe
15:13 lypanov teeesny
15:13 lypanov s/sn/ns/
15:15 Qiang joined perl6
15:17 audreyt brb, food
15:18 putter yay audreyt!
15:23 comet^ joined perl6
15:24 justatheory joined perl6
15:29 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 fglock joined perl6
15:30 putter If folks could suggest test cases, ideally daunting doubt-allaying ones ;), that would be much appreciated.
15:31 putter for the regexp engine, any p5 regexp (no lookbehind) and input string.  for the parser... well, maybe that one's mine...
15:32 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?
15:33 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:35 TMTOWTDIt joined perl6
15:36 putter integral: thanks! :)
15:37 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:38 integral it also means you build up a big stack of backtracking locations too if you're not smart
15:39 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:41 putter 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:44 integral doesn't sound too bad
15:44 integral for such exaggerated numbers :)
15:45 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:47 vel joined perl6
15:47 Cryptic_K joined perl6
15:49 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:52 putter fglock: re sorry, oh, that's fine.  experimentation is great.  though, it -has- been lonely, snif. ;)
15:53 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 ]
15:53 svnbot6 r9010 | putter++ | Renamed the misnamed two "regexp_spike*" files to "parser_spike*".
15:53 putter fglock; you saw Regexp;;Parser?  it's a "hand-write a parser that can read the regexp syntax
15:54 * putter goes to try integral's case with the new ./regexp_try.pl...
15:55 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:56 putter fglock: thanks! :) will do.
15:57 putter 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:59 SamB joined perl6
15:59 hexmode joined perl6
15:59 putter oh, no, those are stats for a different expression.  trying yours for real now... ;)
16:05 putter 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...
16:06 integral It was more designed to just test some features rather than take ages alone
16:06 putter ah, ok.
16:06 putter yeah, regexp_try.pl should use Benchmark... any volunteers ;)
16:07 putter Oh, it could also separate the compile ( my $r = compile($re) || die; ) from the match ( my $m = match($r,$str); ) ...
16:11 svnbot6 r9011 | putter++ | Silenced "deep" recursion warnings in regexp_engine_demo.pl.
16:15 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.
16:15 integral err, -$seconds rather
16:16 putter ah, ok, thanks.
16:29 svnbot6 r9012 | putter++ | regexp_try.pl can now do Benchmark.  And the argument order has changed to match p5's =~.
16:29 svnbot6 r9012 | putter++ | perl regexp_try.pl [STRING|--file FILENAME] REGEXP [--bench [DURATION-SEC]]
16:32 * putter thinks reversing the sense of duration, DURATION-SEC, was a bad idea...
16:33 stevan joined perl6
16:34 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 G2 joined perl6
16:35 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
16:36 integral putter: it's just for comparison surely?
16:36 integral and you could somehow guess it's equivalence to a line per second figure I guess
16:40 vel joined perl6
16:41 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:43 putter 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:44 integral I use regexps quite often when iterating over big files
16:44 integral so /sec measurements work for me
16:44 putter ah
16:45 putter that makes sense.  wish it gave both.
16:46 fglock putter: I'm special-casing "plural" regexps (ones that contain * and +); about the code - wouldn't it fail anyway?
16:48 putter /<arbitrary_rule>*/
16:49 chris2 joined perl6
16:52 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:54 fglock 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?
16:55 fglock PerlJam: I'm making some experiments with a backtracking parser
16:56 Nouk joined perl6
17:02 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:04 TMTOWTDIt left perl6
17:04 grayson joined perl6
17:05 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:06 fglock (I'm not sure about the meaning of 'local', probably)
17:09 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:12 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 PerlJam (and perl5 has no "say")
17:12 PerlJam (And this is why I stopped writing perl6 for a while--it was affecting my perl5 code :-)
17:13 integral (use feature 'say'; say "5.10 includes say";}
17:14 lisppaste3 joined perl6
17:15 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
17:17 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:18 fglock_ joined perl6
17:18 putter I'm not sure whether p5 lets your quantify a (?{}).  but (a(?{...}))* should be fine.
17:20 putter (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 {...}
17:21 putter perl -we '$x=0;"aaa" =~ /(?:a(?{local $x=$x+1}))*(?{print $x})/;'  prints 3
17:22 putter 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)
17:23 fglock_ putter: oh, ok - no problem
17:23 fglock_ so I'll try to finish my test program
17:23 fglock_ should I upload it, even if it useless at the moment?
17:27 Amnesiac joined perl6
17:29 putter that's what misc/pX/Common is for...:)  experiment in community coding... we'll see if it works...
17:31 putter 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:35 fglock_ I'm trying to find a proper filename
17:36 putter good names  ++
17:36 integral a
17:37 fglock_ it is a "what a regex compiler could compile a regex to"
17:39 fglock_ compiled_parser.pl ? this is much more than it actually is
17:44 fglock_ backtracking worked :)
17:44 putter iterator_engine?
17:45 fglock_ ok
17:50 svnbot6 r9013 | fglock++ | * misc/pX/Common/iterator_engine.pl - an experimental parser
17:50 svnbot6 r9013 | fglock++ |   that backtracks using List operations
17:56 fglock_ putter: would you check if this program makes sense for you?
18:01 putter fglock_: looking...
18:02 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:03 gaal putter++ !
18:04 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:06 gaal put the blame on make
18:06 audreyt maim
18:07 gaal May M  - a monadic type that reflects mutinous computation
18:11 wolverian what's the process for disambiguating a type variable in haskell? is there a common method or does it vary?
18:12 audreyt disambiguating?
18:12 wolverian i.e. fixing Ambiguous type variable `t' in the constraint: ...
18:12 audreyt use :: is normal
18:12 audreyt (term :: Type)
18:12 wolverian thought so. I can't find a type for it
18:13 audreyt "it"?
18:13 wolverian DynGraph g
18:13 wolverian giving that to graphviz'
18:13 audreyt DynGraph is a constraint
18:14 audreyt you should type it as Gr
18:14 audreyt (term :: Gr)
18:14 wolverian oh, duh. thanks. should I put that in the function that returns the graph, or keep the function's type as a constraint?
18:15 audreyt yes.
18:15 audreyt (i.e. both works)
18:15 wolverian thanks again. :)
18:15 audreyt np :)
18:16 wolverian works, awesome :)
18:17 svnbot6 r9015 | fglock++ | iterator_engine.pl - bugfix
18:18 putter gaal: :)
18:23 putter 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 putter s/find/fine/
18:28 svnbot6 r9016 | audreyt++ | * Pugs.AST.Internals: Dumping Pairs and Hashes.
18:30 fglock_ putter: it's not using iterators. It is recombining the nodes in (@matched, @tail), instead of backtracking
18:31 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:32 fglock_ the way you wrote it is more elegant
18:39 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:43 kolibrie my recent pugs compilations (most recently r9007) make successfully, but running ./pugs displays the banner and then seg faults
18:44 kolibrie any ideas what I need to do to get it to not seg fault?
18:44 audreyt kolibrie: hmm, gdb?
18:44 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)
18:44 audreyt might be readline related
18:44 putter kolibrie: what os, version?
18:45 kolibrie audreyt: what do I type?
18:45 kolibrie putter: debian unstable on i686
18:45 * putter is a bit amazed that something as "simple" as readline could be the cause of so much pain...
18:46 * putter tries to remember what the folk-remedy for that was...
18:46 putter you're running 6.4.0, yes?
18:46 putter err, ghc 6.4.0
18:47 kolibrie putter: I think so
18:47 putter is 6.4.1 on unstable?
18:48 kolibrie I compiled myself, months ago
18:49 fglock_ putter: re "a cache of the current values of all the regexp nodes" - the hash works like a "namespace" for rules
18:50 fglock_ (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... :/
18:51 kolibrie putter: looks like ghc6 version 6.4.1 is in unstable
18:52 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:53 kolibrie putter: how odd
18:53 putter 6.4.1 is the current "stable" version from a ghc point of view
18:53 putter why odd?
18:54 putter 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?
18:54 * putter knows very little about debian...
18:57 * kolibrie just thought it was a strange recipe for success
19:00 elmex joined perl6
19:01 fglock_ has someone written a grammar file for grammar/rule ?
19:01 putter kolibrie: ah, yes
19:02 avar joined perl6
19:04 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? https://svn.perl.org/perl6/grammar/trunk/Grammar.perl6
19:04 fglock_ ok
19:05 LTjake joined perl6
19:07 putter re Grammar.perl6, as reference/raw material, sure.  as something you would execute, less so.
19:08 putter thanks, I'd forgotten about that
19:10 * 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 perl6
19:11 rafl Does anyone know a document that describes how nested data structures in perl 6 work? Preferably in contrast to Perl 5.
19:13 putter http://dev.perl.org/perl6/doc/design/syn/S09.html "data structures" doesn't?
19:13 fglock_ putter: re backtracker - which file/line is it?
19:14 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".
19:14 bsb putter, fglock_: (backlogging) Is the $^R localized var any use to you?
19:15 bsb see http://www.perlmonks.org/index.pl?node_id=286981
19:15 putter fglock_: all over :)  just grep around for local( in regexp_engine_demo.pl
19:16 putter bsb: looking...
19:17 svnbot6 r9017 | audreyt++ | * Data.Yaml.Syck: parseYamlFS -- faststring-based yaml parsing
19:25 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.  :)
19:27 putter bsb: oh, and I *very* impressed you manage a clean PASS, after two years, relying on both spec and unspec p5 regexp behavior. ;)
19:28 bsb Once again, japhy did most of the work.
19:29 bsb all the hard work anyway
19:30 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:33 gaal don't tell anyone, but audreyt has just gone into the shower with her laptop again
19:34 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?!
19:34 putter gaal: *lol*
19:35 putter mil-spec laptops ++
19:36 putter 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.
19:37 bsb putter, can't say I do
19:37 putter :(
19:37 bsb Maybe you could transform via YAPE::Regexp or the newer one
19:38 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:39 putter 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?
19:40 * putter goes to look at http://dev.perl.org/perl6/doc/design/syn/S09.html ...
19:41 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 );
19:41 * putter has more reading to do to figure out what that means...
19:44 putter 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:46 putter 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:49 putter rafl: ah,  Multidimensional argument list binding  and  Pipe operators  in http://dev.perl.org/perl6/doc/design/syn/S06.html
19:51 putter bsb: so, yes. ;)  i think.
19:53 svnbot6 r9018 | audreyt++ | * Data.Yaml.Syck: emitYaml now uses faststrings, resulting
19:53 svnbot6 r9018 | audreyt++ |   in another 4x speedup.
19:53 svnbot6 r9019 | fglock++ | iterator_engine.pl - starting to use function composition;
19:53 svnbot6 r9019 | fglock++ | starting a 'Prelude'
19:56 putter audreyt: so *3* second Prelude compilation!?!
19:56 audreyt the emitter part of it
19:56 putter ah, right
19:57 putter duh
20:00 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 perl6
20:01 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
20:01 avar if "ab" is not possible then it'll fall back on "bb"
20:04 fglock_ ok
20:26 svnbot6 r9020 | fglock++ | iterator_engine.pl knows '<word>'
20:26 svnbot6 r9019 | fglock++ | iterator_engine.pl - starting to use function composition;
20:26 svnbot6 r9019 | fglock++ | starting a 'Prelude'
20:29 svnbot6 r9021 | gaal++ | * change pugs' YAML emission client code to use audreyt++'s speedupped FastString
20:34 audreyt ?eval 1
20:34 evalbot_9008 is now known as evalbot_9021
20:34 evalbot_9021 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46.
20:35 svnbot6 r9022 | audreyt++ | * relax optimized settings for FPS
20:35 audreyt ?eval 1
20:35 evalbot_9021 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46.
20:38 svnbot6 r9023 | audreyt++ | * relax the same flags for Data.Yaml.Syck as well.
20:38 audreyt ?eval 1
20:38 evalbot_9021 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46.
20:41 svnbot6 r9024 | audreyt++ | * unbreak the build by adding FPS to cabal.
20:43 audreyt ?eval 1
20:43 evalbot_9021 is now known as evalbot_9022
20:43 evalbot_9022 Can't exec "./pugs": No such file or directory at examples/network/evalbot//evalhelper.p5 line 46.
20:48 audreyt ?eval 1
20:48 evalbot_9022 is now known as evalbot_9024
20:48 evalbot_9024 1
20:49 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 perl6
20:51 audreyt ?eval eval("--- 1\n", :lang<yaml>)
20:51 evalbot_9024 ""
21:17 svnbot6 r9025 | audreyt++ | * repair YAML parsing's memory problem by making an explicit copy.
21:20 svnbot6 r9026 | audreyt++ | * Fix memory corruption on emitting as well.
21:28 audreyt okay. loading the prelude .yml is now benched as 2secs
21:28 audreyt dumping is 4
21:28 audreyt on my laptop
21:29 audreyt probably still a bit heavy compared to the <0.5sec performance of precompiled prelude
21:29 audreyt but beats the >10sec nonprecompiled-prelude easily
21:29 audreyt if it's still too slow, we can improve it further tomorrow
21:29 audreyt but now I need to sleep :)
21:29 audreyt g'nite *wave*
21:29 lypanov sleep well audreyt
21:34 rafl Juerd: ping
21:35 Juerd pong
21:37 Juerd rafl: pong
21:37 webmind g/win 29
21:37 webmind oops
21:38 Khisanth joined perl6
21:39 rafl Juerd: You said in Berlin that you deal with IBM stuff.. can you sell me an ultra bay thingy for my X41?
21:40 DesreveR joined perl6
21:50 Juerd rafl: Yes, but very probably not within two weeks :)
21:51 rafl Juerd: probably -v :-)
21:53 Juerd rafl: Three weeks it usually takes. I'll phone tomorrow.
21:54 Juerd Luxury thinkpads aren't sold much in .nl, so they don't keep any stock.
21:54 Juerd Only your average R* and T* models, and accessories for them, are available quickly.
21:57 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:58 dduncan boing boing
21:59 rafl Juerd: Thank you!
21:59 dduncan according to audreyt, this IQ thing was a 10 year old rumor, and we should ignore it
21:59 dduncan she told me yesterday just after I asked the question
22:00 xinming dduncan: :-)
22:01 stevan xinming: what does it say about her IQ?
22:01 Juerd What does IQ stand for in this context?
22:01 stevan Intelligence Quotient (i assume)
22:03 xinming stevan: Over 180. :-)
22:04 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
22:05 xinming stevan: No. :-)
22:05 stevan oh well
22:05 * stevan is not sure you can accurately measure intelligence anyway
22:06 whiteg that book is over 10 years
22:07 whiteg 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, :-)
22:07 stevan according to some sites a score that high occurs 1 in a million,... that sounds like our audreyt ;)
22:07 whiteg xinming: actually, even the publisher in taiwan no longer publish it now.
22:08 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
22:09 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
22:09 whiteg In taiwan, students with that IQ score happens almost every year..
22:09 xinming stevan: That's why I say, to test the scrore about 'thinking in logic', The result is believable. :-)
22:10 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 Juerd whiteg: It's called evolution :)
22:10 webmind 'more then half scores above average' ;)
22:10 Juerd Whoa!
22:11 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.)
22:11 webmind it increases ?
22:11 webmind I'm amazed :)
22:11 xinming webmind: I think so.
22:11 Juerd webmind: Yes, evolution.
22:12 Juerd 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 :)
22:12 * webmind must meet the wrong people on the streets :)
22:12 webmind integral, I think the latter
22:12 xinming Math knowledge will help you in IQ test. :-P
22:12 webmind uhuh
22:13 Juerd webmind: Well, psychiology teaches that people flock together in groups of intelligence, within other groups...
22:13 Juerd (nothing implied, just observing.)
22:14 Juerd xinming: Especially recognising fibonacci sequences assures one of a few extra points ;)
22:14 webmind but not nesceserly(sp?) in higher levers of intelligence
22:14 sili well, i'm glad that fibonacci numbers are abused in CS to the point i can name off the first 247
22:14 Juerd Hmmm
22:14 Juerd Intelligence lever... :)
22:14 webmind levels
22:14 * Juerd pulls the lever.
22:14 PerlJam sili: Well ... what are they?  ;)
22:14 webmind typo :)
22:15 hexmode joined perl6
22:15 Juerd I'll compete with sili: 1 1 3 5 8 13 21
22:15 Juerd Woohoo :)
22:15 Juerd ehm
22:15 Juerd Forgot 2 :)
22:15 Juerd 1 1 2 3 5 8 13
22:15 hexmode bitl
22:15 Juerd Someone else do the remaining 240, please :P
22:16 xinming Whenever I see the numbers in these sequence. I'll hide... :-)
22:16 webmind 21 34 55 89
22:16 * xinming hides..
22:16 * stevan take the more "intelligent" approach and writes a program to calculate them ;)
22:16 sili 1 1 2 3 5
22:16 sili 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765
22:16 sili muahaha
22:16 sili good ol /exec
22:17 Juerd sili: Still not at 247 ;)
22:17 sili don't make me flood
22:17 Juerd See topic ;)
22:17 sili heh.
22:18 * stevan wonders if "reading" helps on the IQ test more than the fib sequence :P
22:18 iblechbot joined perl6
22:18 sili take the sample mensa test
22:18 sili it's fun
22:18 stevan for some definition of "fun"
22:19 PerlJam mensa is a load of crap.
22:19 sili PerlJam: but they're so l33t
22:19 * stevan hateses tests
22:19 integral it's always people who're not in it who say that! ;-)
22:19 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...
22:19 webmind stevan, and reading it a learned skill :)
22:20 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:21 sili don't want to be part of a club that wants you as a member?
22:23 * stevan brain is bigger than all of yours (of course that could be the elephantitis)
22:23 Amnesiac joined perl6
22:23 sili stevan: or your regular ol tumor
22:23 stevan :)
22:25 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
22:25 stevan in other words, what good is a mensa membership if you can't hold a job
22:26 sili jobs are overrated
22:26 sili legalized slavery, i say
22:26 xinming stevan: You are right, Knowledge is mostly useless unless you know how to use it.
22:26 xinming stevan: For the normal people. Computers are useless. because They don't know how to make moeny from it. :-P
22:29 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:30 PerlJam stevan: For those people, computers are just furniture that they interact with  :)
22:31 xinming stevan: hmm, I just tell the truth in China. :-/
22:31 stevan true, although that is becoming less and less so
22:31 stevan xinming: and I for america :)
22:31 * stevan held many different kinds of jobs before getting into programming
22:32 stevan and they were all very boring :)
22:33 stevan 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 perl6
22:43 amv_ is now known as amv
22:46 larsen joined perl6
22:47 putter joined perl6
22:50 grayson joined perl6
22:53 putter steven: ping?
22:55 stevan putter: pong (but only for a moment, I am building shelves)
22:55 clkao joined perl6
22:55 putter hi steven.  I need you tell me I'm insane, to wit,
22:55 putter we have backtracking with not too shoddy performance,
22:55 putter so structural matching is a no brainer, and will make writing the compiler easier,
22:55 stevan putter: you are insane (that is a high compliment in #perl6 of course)
22:55 putter but if we have ok backtracking....
22:56 putter why not add unification?
22:56 putter resolution is a easy I suspect,
22:56 putter so given bt and unification... prolog on p5 :)
22:56 stevan putter: sorry, I so not a parser/regexp guy, I have no idea what you are talking about :)
22:56 stevan ooohh,.. prolog in p5 :)
22:56 stevan that I understand :)
22:56 putter lol
22:57 stevan is it CPAN-able?
22:57 stevan I think it would be really cool if all the elements of the spike were CPAN-able
22:57 putter as long as local() lookup doesnt go glacial as it gets used a lot, I'm thking
22:57 putter don't see why not
22:58 stevan even cooler :)
22:58 putter ooo, no.  spike == throw-away code.  but once shown to work, one can do a non-throwaway version
22:58 stevan yes, that is what I mean
22:59 stevan I mean after all,.. Perl 5 needs  a really good set of compiler tools :)
22:59 stevan I got Class::MOP working using C3 dispatch in like 10 minutes this morning, roles are my next thing to try,
22:59 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.
22:59 stevan after that transcoding Perl 6 classes to P5 might be really simple
23:00 putter stevan++ yay
23:00 putter I was going to ask you about that.
23:00 putter It would also be nice if one could mixin (no pun intended) one of the multimethod modules
23:01 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...
23:02 stevan anyway,.. I have to build shelves or I am in trouble with the $wife :)
23:02 stevan I should be back online later this evening though, about 9 our time
23:03 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
23:03 putter ok.  bye
23:03 putter enjoy, and may you avoid donating blood to the process.
23:03 stevan Class::Multimethods::Pure worked with the old metamodel,.. and should work with MOP
23:04 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 perl6
23:05 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 stevan Class::Multimethods might be an option too, even though it uses manhattan distance
23:06 stevan IIRC they only really vary in how they handle edge cases
23:06 stevan anyway,.. gotta go,.. will talk later
23:06 putter ah.  hmm...  ok.  we'll figure something out.  maybe should do "real" dispatch, integrated with the object system (inherited, etc) anyway
23:06 putter later &
23:07 avar how is multiple class inheritance handled in p6?
23:10 justatheory joined perl6
23:10 azuroth is [2,3,4] a sublist of [2,3,4]?
23:12 wolverian it's a subset, but not a proper subset. I assume it's similar to lists..
23:12 wolverian s/to lists/with lists/
23:19 putter avar: depending on what aspect(s) you are interested in, http://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 perl6
23:20 wolverian Khisanth, depends on the language.
23:21 azuroth Khisanth: I'm doing my haskell homework :-)
23:29 bsb "Lady with 5 Master Degrees Unemployed for 2 Years"
23:29 bsb http://www.standartnews.com/archive/2004/11/03/english/features/s4251_2.htm
23:29 bsb as you said stevan
23:30 bsb bye
23:30 bsb left perl6

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

Perl 6 | Reference Documentation | Rakudo