Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-03-25

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:12 clkao i am not saying we don't need testing.
00:12 clkao oop miscan
00:32 BinGOs joined #perl6
01:04 dduncan joined #perl6
01:10 meppl joined #perl6
01:11 dduncan left #perl6
01:28 wknight8111 joined #perl6
01:59 meppl good night
02:43 damianc joined #perl6
03:01 peepsalot joined #perl6
03:09 peepsalot joined #perl6
03:13 peepsalot joined #perl6
03:21 peepsalot joined #perl6
03:23 alester joined #perl6
03:25 peepsalot joined #perl6
03:34 peepsalot joined #perl6
03:36 justatheory joined #perl6
03:38 peepsalot joined #perl6
04:28 mncharity i suppose it's technically tomorrow already, and way past end of day, but let's see, something quick...
04:31 wtgee joined #perl6
04:33 mncharity v6/v6-KindaPerl6/src/KindaPerl6/Runtime/Perl6/Match.pm is Capture is Value... hmm.  simpler...
04:36 mncharity g'night all &
04:36 pugs_svnbot r20166 | putter++ | [elf_b] Dropped new() from ir_nodes.p6.  Moose provides.  The real-soon-now elf_b_create ast_handler creator can almost as easily use named arguments as positional.
04:36 pugs_svnbot diff: http://dev.pugscode.org/changeset/20166
04:36 lambdabot Title: Changeset 20166 - Pugs - Trac
05:08 vsoni joined #perl6
05:29 alc joined #perl6
06:30 penk joined #perl6
06:33 wtgee left #perl6
07:15 BinGOs joined #perl6
07:16 BinGOs joined #perl6
07:25 BinGOs joined #perl6
07:41 Aankhen`` joined #perl6
08:10 marmic joined #perl6
08:25 iblechbot joined #perl6
08:33 elmex joined #perl6
08:57 Southen_ joined #perl6
09:53 meteorjay joined #perl6
09:54 ruoso joined #perl6
10:16 codenight joined #perl6
10:36 * ruoso . o O ( *sigh* It's probably two weeks without coding SMOP... real life sucks... *sigh* )
10:44 xinming joined #perl6
10:54 IllvilJa joined #perl6
11:48 Lorn joined #perl6
12:07 Lorn_ joined #perl6
12:35 FurnaceBoy joined #perl6
12:38 r0bby joined #perl6
12:44 [particle1 joined #perl6
13:00 penk left #perl6
13:01 masak joined #perl6
13:29 wknight8111 joined #perl6
13:29 iblechbot joined #perl6
13:30 lichtkind joined #perl6
13:45 cmarcelo joined #perl6
13:46 simcop2387 joined #perl6
13:53 rdice joined #perl6
14:00 alester joined #perl6
14:12 pmurias joined #perl6
14:18 orafu joined #perl6
14:31 TJCRI joined #perl6
14:35 avar joined #perl6
14:56 mncharity joined #perl6
14:57 mncharity ruoso: re two weeks without coding SMOP, :/
15:10 LazyJim joined #perl6
15:20 Foke2 joined #perl6
15:39 Zygo joined #perl6
15:55 pmurias joined #perl6
16:00 gbarr joined #perl6
16:16 pmurias mncharity: does the order of fields returned by field_names matter (other than being the same as field_values)?
16:16 justatheory joined #perl6
16:21 wtgee joined #perl6
16:25 Foke2 joined #perl6
16:36 Jamtech joined #perl6
16:39 Jamtech_ joined #perl6
16:44 tobeya joined #perl6
16:59 pugs_svnbot r20167 | lwall++ | [STD] fighting all kinds of YAML, TRE, and P5 bugs...
16:59 pugs_svnbot diff: http://dev.pugscode.org/changeset/20167
16:59 lambdabot Title: Changeset 20167 - Pugs - Trac
17:16 mncharity lol #re commit message
17:16 mncharity sigh
17:17 mncharity re YAML, it might be easier and faster to do a "dump as p5" format like STD_red_run's new --dump5.
17:21 TimToady I'm just dumping lex/* as raw lines now
17:21 eternaleye joined #perl6
17:22 TimToady the only thing left in YAML is the DATA section, and that seems pretty harmless
17:24 wtgee left #perl6
17:28 mncharity ok
17:28 mncharity err, "nod"
17:43 barney joined #perl6
17:45 cmarcelo_ joined #perl6
17:52 mncharity my first bit of programming on elf_b.  yay. :)
17:52 pugs_svnbot r20168 | putter++ | [elf_a] Start of for() and while() support.  New -xe option: -xe -e 3  runs 3 in a separate perl.
17:52 pugs_svnbot r20168 | putter++ | [elf_b] New -e CODE.  Calls STD_red, and builds a Match tree.  Match::describe is unfinished.
17:52 pugs_svnbot diff: http://dev.pugscode.org/changeset/20168
17:52 lambdabot Title: Changeset 20168 - Pugs - Trac
17:54 mncharity oops, forgot to svn add Match
17:58 pugs_svnbot r20169 | putter++ | [elf_b] Add the new Match.pm file missing from r20168.
17:58 pugs_svnbot diff: http://dev.pugscode.org/changeset/20169
17:58 lambdabot Title: Changeset 20169 - Pugs - Trac
18:00 pmurias mncharity: why do you prefere positional arguments to named ones?
18:01 pmurias * prefer
18:02 mncharity pmurias: in what context?
18:03 mncharity the --dump5 format uses positional because it's faster in p5, plus smaller and simpler.
18:04 pmurias in Match.pm you wrote a special positional version of new
18:06 mncharity with it, knowledge about Match's exact method names remains localized in Match for now, rather than leaking into main.p6, which otherwise has no need for it.  so it's a firewall to stop Match naming decisions from propagating into main.pl.
18:07 mncharity Also, Match, and its field name choices, hadn't been written yet when the main.p6 code was. :)
18:07 mncharity err, s/main.*/main.p6/g
18:10 pmurias the first reason is a bit lame
18:13 pmurias can i purge Match.make ?
18:15 mncharity re lame, perhaps, but it's compartmentalization.   The dump pipe/format and its ends should be independent of the Match format used (since every single p6 impl has had a different one, and that's not likely to stop).  make() is basically make_from_dump5_match_format().
18:16 pmurias you count on the positionals being maped to the right attribiutes nonetheless
18:17 mncharity placing the make_from_dump5_match_format in Match rather than in a not yet existent Parser class which encapsulates the pipe might be something to refactor in future, but as Parser doesn't really exist yet, just scattered pieces of it, and as Match is likely to change, the current location seems plausible.
18:18 mncharity the match() terms on the --dump5 pipe are defined positionally.
18:18 mncharity and subject to change of course - I punted bool for instance, since it currently isn't being used in STD_red match trees.  which perhaps needs to change, but for now, kiss.
18:19 mncharity but the contents and layout of those terms are a separate issue from how any particular p6 client may chose to structure its Match object.
18:20 pmurias sorry, misunderstood Match.make() intended purpose
18:21 pmurias wouldn't
18:21 pmurias package Fastdump { sub match ($r,$s,$f,$t,$h){Match.new('rule',$r,'str',$s,'from',$f,'to',$t,'hash',$h)}
18:21 pmurias }
18:21 pmurias be cleaner?
18:22 pmurias forgot the rationale at the top
18:22 pmurias silly me
18:22 mncharity so the question is, should the nacient Parser code, depend Match providing an "undump" function (ie, "Match understanding pipe format"), or should Parser understand Match layout.  I guess it doesn't matter much at the moment, since they are both likely to change.  spreading pipe knowledge around seemed simpler... not sure why.  perhaps because the current Match
18:22 mncharity seems even more of a hack than the pipe layout.
18:24 pmurias the Match.new interface needs to be specced
18:24 pmurias * speced
18:25 mncharity with the exception of from() and to() there, everything else is non-spec.  AST handlers unavoidably have to deal with it, though the current ast_handler.config preprocessor provides insulation from .rule and .str.
18:25 mncharity re speced, yes
18:26 mncharity Match has "been in need of" spec'ing for a very long time.  But there are sort of different visions for what Match is.  And the choices seem non-local, tied up in regex engine implementation for instance.  So... the issue gets deferred, probably properly so.
18:28 mncharity my impression is only the from(), to() and the coerced behavior of Match (eg, as hash or bool or ...) have been speced.  I could well be wrong/out of date though.
18:29 mncharity taking a look at Snn and making elf_b_src/Match.pm ... err... can't resist...  making elf_b_src/Match.pm match them... would be great.
18:29 mncharity hmm, though maybe that should wait for elf_c.
18:30 pmurias you can't resist looking at the spec?
18:30 mncharity focus of elf_b is to work at least as well as elf_a, being able to compile itself and be used as the platform for further development.
18:30 mncharity re ?, err, no, lame pun, never mind.
18:35 mncharity so anyway, that's the story on make().  no big deal - whichever.  feel free to do your suggested edit.  a first commit by someone else to elf_b!  woot :)  that would be nice.
18:37 meppl joined #perl6
18:42 mncharity pmurias: I'm contemplating adding a cache for parser output, to speed things up.  I'd be interested in any feedback re "it's fine" vs "yeah, faster would be more usable".
18:46 pmurias it dosn't matter to the user much only for the elf developer
18:46 mncharity hmm, re "AST handlers unavoidably have to deal with it", err, no.  that's wrong.  I was confused.  the whole point of that preprocessing of ast_handlers.config to avoid dependency on .str is because then the handlers *don't* have to deal with it.  Keeping the internal structure of Match something only (un)dumpers and elf_x_create have to worry about.
18:47 mncharity elf developers are currently the only users. :)  so I gather that was a "yes, faster would be more usable"?
18:48 pmurias yes
18:50 mncharity ok.  sounds like a plan.  indeed, even the 7 sec delay when working on main.p6 was getting to be a pain.
18:51 mncharity so caching and perhaps better error messages for usability,  finishing match_describe and a start at ast_handlers for elf_b.
18:56 pmurias &
18:57 mncharity lunch &
18:58 Psyche^ joined #perl6
19:31 peeps[work] joined #perl6
19:43 marmic joined #perl6
19:45 qmole joined #perl6
20:02 Lorn joined #perl6
20:09 thoughtpolice joined #perl6
20:21 Jamtech joined #perl6
20:27 perlbot joined #perl6
20:38 Lorn joined #perl6
20:56 TJCRI joined #perl6
21:01 pmurias mncharity: would it speed up the compile if methods in ir_nodes where inherited instead of generated?
21:13 eternaleye_ joined #perl6
21:32 mncharity pmurias: anything which reduces the code to be parsed, would speed up the compile.  but since our objective to create lots more code, it's a best a very short term fix.  let me check in an attempt at a caching STD_red_run...
21:39 pmurias mncharity: caching code - that assumes the code dosn't change right?
21:39 mncharity right
21:40 mncharity so it doesn't help if you are working one something big, like ir_nodes.p6
21:40 pugs_svnbot r20170 | putter++ | [STD_red_run] An attempt at caching, to speed repeated parsing.
21:40 pugs_svnbot diff: http://dev.pugscode.org/changeset/20170
21:40 lambdabot Title: Changeset 20170 - Pugs - Trac
21:40 mncharity but if you are working on something else, eg, Match.p6, then the ir_nodes.p6 parse will be fast after the first run.
21:41 mncharity just set STD_RED_CACHEDIR to some temporary dir.
21:42 mncharity for me, the caching takes the 7 sec ./elf_b_create down to 3 sec.
21:43 mncharity of which 1+ is ./elf_b perl5 startup time, so the compile+emit is taking < 1 sec.
21:44 mncharity err, no.  < 2 sec.
21:45 mncharity I'd be interested in hearing how it runs for you.
21:49 pmurias STD_RED_CACHEDIR env var?
21:51 mncharity yes
21:52 mncharity --help has some details.  only one of note here is  -e CODE isn't cached.
21:53 pmurias 11sec
21:55 mncharity :/
21:56 pmurias the orginal thing is even slower
21:56 mncharity the first run takes how long?
21:57 pmurias mncharity: the cached matches are very large
21:57 pmurias 24sec
21:58 pmurias the cached file is 968K
21:58 pmurias * are
22:01 mncharity could try compressing them.  but on a cpu limited machine that seems problematic.  success would depend on the filesystem being even slower.  hmm.
22:02 mncharity i really really want to avoid the mess of build systems and individual file compilation.
22:03 pmurias the string that was matched against is duplicated over and over again
22:03 mncharity I don't suppose your laptop has a cpu knob, one with a "waste power, be hot, run fast" setting? :)
22:04 mncharity "the string that was matched against"?  oh, yes.
22:05 mncharity currently each Match object has its own copy of its match string, rather than using indexes into a single copy of it.
22:06 mncharity perhaps order 10x bigger.
22:07 mncharity went back and forth a couple of times fighting with yaml.  didn't seem to have any performance impact.
22:08 pmurias mncharity: i'm using a standalone box
22:08 Limbic_Region joined #perl6
22:09 pmurias * desktop box
22:12 mncharity oh, sorry, misremembered
22:12 mncharity hmm.
22:13 mncharity sigh.
22:13 pmurias np
22:13 pmurias ;)
22:13 mncharity lol
22:14 mncharity relieved lol :)
22:19 pmurias mncharity: is there a reason for not keeping on copy of the str? (besides simplisity)
22:22 Blazeix joined #perl6
22:22 mncharity pmurias: not really.  could tweak the --dump5 protocol to be something like   matching_string('...one copy...',match('comp_unit',0,3,{...}))  and then unpack it at the other end.
22:23 pmurias i get try doing it tomorrow
22:24 pmurias s/get//
22:24 mncharity hmm..  matching_string('...one copy...'); match('comp_unit',0,3,{...})
22:24 mncharity not s-expressions, but function calls. :)
22:24 mncharity re tomorrow, :)
22:26 mncharity might want to check how fast it is just to pipe it through compress or gzip -<small int>.  with the text gone, it will be more a machine format than one which can be eyeballed, so could go all the way. :)
22:27 pmurias maybe bind_str('string',0); match(...,get_string(0))
22:27 mncharity (un)compressing it would just be a 2 line change.
22:27 pmurias loading the match by perl takes 0.65sec
22:28 mncharity re 10000 copies of "get_string", perhaps have a match2(...) in which the get_string is implicit.
22:29 mncharity but I like being able to index into multiple strings...
22:30 pmurias i should get to sleep instead of wasting time not coding
22:33 mncharity good night...
22:35 mncharity the current dump is 34x bigger than the ir_nodes.p6.  gzip -9 takes that down to 3x in < 0.1 sec.
22:35 mncharity s/than/for
22:36 mncharity but... we are talking less than a MB.  for a big file.  do we care?
22:42 Blazeix Hi, I'm trying to learn Perl 6, so I'm implementing a card game. I was originally going to use an array of strings to keep track of the suit types, but I was wondering if there was a more perl6-centric way. Any insights?
22:44 Blazeix maybe a junction?
22:45 mncharity class Suit?
22:49 Blazeix And just have publicly accessible constants?
22:52 pugs_svnbot r20171 | putter++ | [elf_a] Added kludgy primitives for s/// and file_exists().  Added quote:regex and its IR node.  $x.re_gsub(/b/,'B') emits as $x =~ s/b/B/g;
22:52 pugs_svnbot r20171 | putter++ | [elf_b] Fleshed out match_describe().  elf_b, given its own code, currently dumps a description of the Match tree.  >4x slower than elf_a does.
22:52 pugs_svnbot diff: http://dev.pugscode.org/changeset/20171
22:52 lambdabot Title: Changeset 20171 - Pugs - Trac
22:55 mncharity p5 encouraged a very "bottom up, non-oo, minimalistic" style.  p6 is much more like ruby or python in encouraging a more oo approach.  so more like "what are my concepts, and the operations on them - those can be objects", than a p5-ish "what language primitive shall I use to express a concept".
22:59 mncharity my answer to "how to learn p6" is starting to be "learn ruby". :)
23:14 eternaleye joined #perl6
23:30 cmarcelo joined #perl6
23:30 eternaleye joined #perl6
23:49 cai joined #perl6
23:50 cai left #perl6
23:50 cai joined #perl6
23:59 eternaleye_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo