Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-03-24

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:15 larsen joined #perl6
00:17 c9s_ joined #perl6
00:40 alester joined #perl6
00:54 wknight-away joined #perl6
01:09 lyokato_ joined #perl6
01:15 zostay joined #perl6
01:24 thoughtpolice joined #perl6
01:29 lyokato_ left #perl6
02:28 Psyche^ joined #perl6
02:46 IRSeekBot joined #perl6
03:10 alester_ joined #perl6
04:14 justatheory joined #perl6
04:27 BinGOs joined #perl6
05:15 alc joined #perl6
05:20 revdiablo joined #perl6
06:28 charsbar joined #perl6
06:31 drbean joined #perl6
06:31 jrockway joined #perl6
06:31 avar joined #perl6
06:31 lumi joined #perl6
06:36 aindilis joined #perl6
06:36 alester joined #perl6
06:41 buubot joined #perl6
06:41 charsbar_ joined #perl6
06:41 Qiang joined #perl6
06:41 alc joined #perl6
06:49 Qiang joined #perl6
06:57 dalin joined #perl6
07:00 Chillance joined #perl6
07:02 zamolxes joined #perl6
07:21 penk joined #perl6
07:21 katie_d_ joined #perl6
07:21 katie_d_ left #perl6
07:28 BinGOs_ joined #perl6
07:55 Aankhen`` joined #perl6
08:39 iblechbot joined #perl6
08:48 peepsalot joined #perl6
09:14 peepsalot joined #perl6
09:14 elmex joined #perl6
09:55 wolverian mncharity, are you sure = doesn't have a special meaning in YAML? it's a mistake to think YAML is simple.. :)
10:13 wknight-away joined #perl6
10:17 ruoso joined #perl6
10:24 penk left #perl6
10:26 elmex joined #perl6
10:43 chris2 joined #perl6
11:07 elmex joined #perl6
11:14 meppl joined #perl6
11:15 LazyJim joined #perl6
12:31 smtms joined #perl6
12:33 kolibrie joined #perl6
12:35 penk joined #perl6
12:45 cmarcelo joined #perl6
13:06 rdice joined #perl6
13:11 mncharity wolverian: if yaml is speced that  foo: =  means foo=>"=", but  foo: "="  means foo=>foo, ... well, if it's not an implementation bug, it's a spec bug. :)
13:13 pugs_svnbot r20163 | putter++ | [STD_red_run] new --dump5 and --dump6, much faster than --yaml.
13:13 pugs_svnbot diff: http://dev.pugscode.org/changeset/20163
13:13 lambdabot Title: Changeset 20163 - Pugs - Trac
13:14 wolverian mncharity, true enough :)
13:20 c9s joined #perl6
13:22 pugs_svnbot r20164 | putter++ | [elf_a] Added "is A", "has $.x", "self".  Switched STD_red_run to --dump5 from --yaml.
13:22 pugs_svnbot r20164 | putter++ | [elf_b] Added IR node classes.  They compile.
13:22 pugs_svnbot diff: http://dev.pugscode.org/changeset/20164
13:22 lambdabot Title: Changeset 20164 - Pugs - Trac
13:23 lisppaste3 joined #perl6
13:31 mncharity btw, at least part of the problem with slow yaml dumping is it does many .inspect() calls on the tree.  with a big tree, even a small constant non-linear task slows you.  ir_nodes.p6 goes from ~80 s -> 15 s when  Match's inspect() is intercepted.  -> 6 s using --dump5 instead.  Of which ~ 5 is the parse itself.
13:33 mncharity time ./elf_b_create.pl is taking me 9 s now, despite the addition of a 34kb 1.1klog elf_b_src/ir_nodes.p6 :)
13:34 mncharity *kloc
13:35 b_jonas joined #perl6
13:36 pmurias joined #perl6
13:38 elmex joined #perl6
13:38 elmex_ joined #perl6
13:39 mncharity STD_red_run on ruby 1.8 is rather slower.  2 min.  perhaps needs to be performance optimized.
13:41 peepsalot joined #perl6
13:44 peepsalot joined #perl6
13:44 mncharity I'm not sure whether to switch STD_red_run to #!/usr/bin/env ruby1.9 or not.  env ruby  will work out of the box for more people.  and elf_a should run fine with it, though slower.  but anyone wanting to develop elf_b really needs 1.9 (ie 2m vs 10s).  maybe just a README note.
13:45 elmex_ joined #perl6
13:46 pmurias mncharity: i have ruby 1.9 under ruby and ruby1.8 under ruby 1.8
13:46 mncharity me too
13:48 Psyche^ joined #perl6
13:53 pmurias it might make sense to keep the generated files in a different directory
13:55 mncharity which ones?
13:55 pugs_svnbot r20165 | putter++ | STD_red/README: Added '--yaml and its 1.9 patch are no longer required.  STD_red_run's #! should find ruby 1.9 for speed'.
13:55 pugs_svnbot diff: http://dev.pugscode.org/changeset/20165
13:56 pmurias ir_nodes.p6
13:56 lambdabot Title: Changeset 20165 - Pugs - Trac
13:56 pmurias argh, network is so slow today it takes ages to install cpan modules here :(
13:58 mncharity could be.  my thought was ir_nodes.p6 is actually source, even though it's generated.  but it does clutter up the svn diff.
14:00 pmurias ./elf_a -x -o ./elf_b elf_b_src/ir_nodes.p6 elf_b_src/main.p6 takes 27sec here
14:00 mncharity why a different directory?  even though I'm not sure it should be in svn at all - a tradeoff ("it's source, you can web link it" vs "obscures what humans edited").
14:02 pmurias is web linking to generated code important?
14:02 peepsalot joined #perl6
14:03 mncharity re 27 s, :/   could you check how long STD_red_run itself takes to do ir_nodes.p6?   cd misc/STD_red; time ./STD_red_run -q --dump5 ../winter_jig/elf_on_STD_red/elf_b_src/ir_nodes.p6 > /dev/null
14:03 TJCRI joined #perl6
14:04 pmurias kp6 only stored the compiled files as a hack because compiling was slow
14:05 pmurias 16sec
14:05 peepsalot joined #perl6
14:06 mncharity pmurias: makes it easier to say "could someone familiar with Moose take a look at http://svn.pugscode.org/pugs/misc/winter_​jig/elf_on_STD_red/elf_b_src/ir_nodes.p6 and say what a non-bogus version would look like?"   but it turns out it *hasn't* been added to svn (yet?).
14:06 lambdabot http://tinyurl.com/2vbl86
14:06 mncharity so i guess the only issue is which directory.   why a different directory? :)
14:06 deq` joined #perl6
14:08 pmurias mncharity: you can nopaste it
14:08 pmurias it's not really source
14:08 mncharity re bogus, my fuzzy understanding is Moose defines its own new().  but I'm unclear on its characteristics, and thus on whether we want to generate our own new-like method.
14:08 deq` joined #perl6
14:10 pmurias mncharity: Moose genereates it's own new
14:11 mncharity re "it's not really source", :)  "is!" <rendered in pouty voice>.  I tend to think of it as source written with the help of a script.  but I can argue the other way too. :)
14:12 mncharity re Moose, right.  but I was unclear from a quick skim of the docs whether its arguments were passed by name.  I kind of like insulating the IR name choices from the ast_handlers by going via a positional new.
14:12 stevan__ yes they are passed by name
14:13 stevan__ it will take either a regular hash or a hash-ref
14:13 mncharity thanks stevan :)
14:13 stevan__ mncharity: no problem :)
14:13 stevan__ the Moose Cookbook is the best way to get to know Moose actually
14:14 mncharity so the bummer is I've another commitment today.  back ~10 hrs.
14:15 mncharity possible next steps for elf include
14:15 mncharity teaching elf_b to run STD_red_run, and load its output into a Match tree.
14:16 mncharity not sure what else.
14:16 mncharity ?
14:18 mncharity stevan__: is ~1sec a plausible ballpark startup up cost for using Moose?  the code generated by elf_a is slower to start - wondering if a 1 sec hit is normal, or a sign the emitted code is doing something silly.
14:22 mncharity re elf_b and Moose new, perhaps the current method new should be renamed new2, and convert its positional args to Moose new's hash args.
14:22 peepsalot joined #perl6
14:23 stevan__ mncharity: ~1 sec startup is possible, if you have a lot of classes
14:23 stevan__ like a real lot of classes
14:23 stevan__ also autobox has an overhead to it
14:24 stevan__ mncharity: make sure you are on the latest Moose and MOP too,.. some serious speed improvements in the last few months
14:24 mncharity then again, there will soon be emitter code which depends on IR node field names.  so its only putting off the inevitable for a moment.  kiss.  => the unnecessary ir_nodes.p6 new()'s should be ripped out.
14:24 stevan__ mncharity: gimme a link to the file and I will take a look
14:25 mncharity looking...
14:25 mncharity http://svn.pugscode.org/pugs/misc​/winter_jig/elf_on_STD_red/elf_b
14:27 mncharity another issue is whether has() vars can somehow be accessed as lvalues.  so $self->x = 3  rather than $self->x(3).  but if not, can deal.
14:27 mncharity I need to scurry.  back briefy in ~20 min.
14:28 mncharity pmurias: are you all set?  any questions or whatever before I go?
14:29 stevan__ no, lvalues suck in p5
14:29 stevan__ basically un-usable for all but the very simplest accessors
14:30 stevan__ mncharity: also, if you dont call Moose::Object::new then Moose wont initialize any of your attributes
14:32 mncharity doh, re elf_b, that wasn't the ideal code to point you at.  could someone run  elf_a -x -e 'say 3'  output?  my impression is that used to be 0.5 sec, now > 1 s.  not sure why.
14:32 mncharity bbiab
14:34 araujo joined #perl6
14:34 Psyche^ joined #perl6
14:41 [particle1 joined #perl6
14:46 mncharity stevan__: thanks for eyeballing elf_b.  we'll discard the new()s.
14:47 mncharity re 'say 3' slowdown, that may or may not be a Moose issue.  so perhaps save your time for later, once it's clearer.
14:47 mncharity re lvalues, ah, ok.  good to know.  will deal.
14:48 mncharity anyone/anything else before I pumpkin?
14:49 FurnaceBoy joined #perl6
14:54 mncharity have a good day all &
15:09 Lorn joined #perl6
15:18 peepsalot joined #perl6
16:12 Onyxyte joined #perl6
16:25 Psyche^ joined #perl6
16:27 chris2 joined #perl6
16:43 Psyche^ joined #perl6
17:08 wtgee joined #perl6
17:11 penk joined #perl6
17:19 eternaleye joined #perl6
17:21 tobeya joined #perl6
17:43 [particle1 joined #perl6
18:01 Auzon joined #perl6
18:06 Psyche^ joined #perl6
18:11 wtgee left #perl6
18:19 jrockway joined #perl6
18:26 justatheory joined #perl6
18:40 moritz_ re
18:52 lichtkind joined #perl6
18:53 lichtkind TimToady: im now thinkin about to put also some of your last oscon talks into Perl6::Doc and i need your explicit permission to do that :)
18:56 Auzo1 joined #perl6
18:56 Auzo1 left #perl6
18:59 Psyche^ joined #perl6
19:00 rdice joined #perl6
19:04 TimToady lichtkind: is fine by me, as long as you don't quote me out of context except where I want to be quoted out of context...  :)
19:05 lichtkind TimToady: no just whole perl.com articles naming you as author in the doc and scribes section of the module but there you are already since you author of some design documents
19:05 wtgee joined #perl6
19:06 lichtkind TimToady: chromatic told me that i have to ask the authors too
19:29 moritz_ pugs: say %*ENV ~~ Hash
19:29 exp_evalbot OUTPUT[␤]
19:29 moritz_ pugs: say %*ENV ~~ Object
19:29 exp_evalbot OUTPUT[1␤]
19:29 moritz_ pugs: say %*ENV ~~ Array
19:29 exp_evalbot OUTPUT[␤]
19:29 moritz_ pugs: my @a;  say @a ~~ Array
19:29 exp_evalbot OUTPUT[1␤]
19:29 moritz_ why isn't %*ENV a Hash? pugs error?
19:34 moritz_ pugs: my @a = <a b c>; say ~@a
19:34 exp_evalbot OUTPUT[a b c␤]
19:35 wtgee joined #perl6
19:35 moritz_ pugs: my @a = <a b c>; say "a: @a"
19:35 exp_evalbot OUTPUT[a: @a␤]
19:35 moritz_ pugs: my @a = <a b c>; say "a: @a[]"
19:35 exp_evalbot OUTPUT[a: a b c␤]
19:37 TimToady moritz_: yes, probably pugs bug
19:43 moritz_ pugs: say %*ENV.perl
19:43 exp_evalbot OUTPUT[\undef␤]
19:44 moritz_ pugs: my %a; say %a ~~ Hash
19:45 exp_evalbot OUTPUT[1␤]
19:45 moritz_ it's a safety issue. I think %*ENV is "unsafe", and therfore it's not populated in the evalbot
19:52 justatheory joined #perl6
19:55 moritz_ is the error variable in Perl 6 still $! ?
20:02 thoughtpolice joined #perl6
20:04 rindolf joined #perl6
20:04 pmurias joined #perl6
20:05 pmurias stevan__: why do lvalues suck?
20:05 pmurias isn't it possible to use tied variables?
20:08 pmurias or does performance suffer badly?
20:09 stevan__ pmurias: any solution which requires tie() is usually a bad idea :)
20:10 stevan__ performance suffers, and its just ugly and difficult
20:10 stevan__ the code to make it work that is
20:10 stevan__ pmurias: several people have talked about writing support for it
20:10 Lorn_ joined #perl6
20:11 stevan__ it would be a MooseX:: extension of the attribute meta layer, which itself is pretty simple,.. but I suspect people start actually looking at what would be needed to support it
20:11 stevan__ "it" being the lvalue-ness
20:12 stevan__ and they probably decide that its not worth it for the little bit of sugar
20:14 pmurias stevan__: nothing horribly complex in implementation terms
20:15 stevan__ on the Moose side no
20:15 stevan__ the tie() side, I think gets really messy
20:15 pmurias why?
20:17 stevan__ one second, there is a CPAN module that does it
20:17 stevan__ it should help illustrate
20:17 stevan__ not with Moose, but for regular args
20:17 pmurias coded a simple tied accesor after i asked the question ;)
20:18 wtge1 joined #perl6
20:19 stevan__ pmurias: Attribute::Property does it,.. however their code is not that messy
20:19 stevan__ the issue is mostly that you have to take all the Moose code that handles; types, triggers, laziness, etc etc and that has to get put into a tied variable
20:20 vel joined #perl6
20:20 diakopter Perl 6 - the Cloying edition
20:20 stevan__ since once you return something from the lvalue sub it is completely out of your control
20:20 stevan__ it just reallyrubs me the wrong way
20:20 stevan__ and seems all kinds of backwards
20:21 vel am i wrong or there is perl6.exe.manifest missing for win32 build?
20:21 pmurias seen S06:314?
20:21 stevan__ pmurias: coded one for Moose? or just a regular one?
20:23 pmurias a regular one
20:27 stevan__ pmurias: actually you probably could avoid having to acount for the Moose lazy feature, but things like trigger (which fires after something is set) and types would need to be passed to the tied scalar
20:27 stevan__ its not impossible
20:28 stevan__ but as I said, it just feels wrong to me,.. not the correct division of responibilities
20:29 stevan__ you are certainly welcome to write it yourself, but IMO the overhead alone is not worth it
20:29 stevan__ and I certainly wouldnt want to have to bend the core Moose code to do it
20:32 pmurias stevan__: how do i change the attribute metaclass to be used?
20:32 stevan__ has 'foo' => (metaclass => 'My::Custom::Metaclass', ... );
20:32 stevan__ thats on a per-attribute basis
20:32 stevan__ for classwide
20:33 stevan__ use metaclass (attribute_metaclass => 'My::Custom::Metaclass'); # must be done before use Moose though
20:33 stevan__ hmm... looks like weak ref would also be a little tricky
20:34 stevan__ like I siad though,.. its kind of backwards,.. these are things the class should deal with and know about, not the actual slot-value
20:34 stevan__ which is what tie() would do
20:36 dduncan joined #perl6
20:36 stevan__ pmurias: you could also ask around on #moose, someone might have a half finished implementation
20:36 pmurias stevan__:  not having a real need for it
20:37 dduncan left #perl6
20:37 rdice joined #perl6
20:37 pmurias i think most of the issues could be doged by delegeting to a real attribiute metaobject
20:39 stevan__ pmurias: I dont think you can actually dodge them, but yes, if you delegate to the attribute meta, you would only need to pass one thing to the tie()
20:39 stevan__ but you would end up incurring a number of other method calls to get tot he things you need
20:39 stevan__ Moose inlines the accessors for speed
20:39 stevan__ so that would be out the window
20:40 stevan__ again, not that it cant be done, just annoying and tricky
20:40 stevan__ and incorrectly inverts the responsibilities
20:41 stevan__ can you tell I am not a fan or lvalue or tie :)
20:42 moritz_ we blame TimToady ;-)
20:42 pmurias stevan__: i think the tied aproach is the default perl6 one
20:42 PerlJam stevan__: Did I just see you make a comment about inlining for "speed"?  And you're using perl?!?  ;)
20:43 moritz_ perl6 and tie? did I miss something?
20:44 stevan__ pmurias: uhm, I hope not
20:44 stevan__ although if you fix tie
20:44 stevan__ then maybe
20:45 pmurias moritz_: a tie in disguise
20:45 ruoso joined #perl6
20:45 stevan__ PerlJam: we generate an optimized version of the accessors and if you ask for it the constructors,.. speeds things up quite a bit :)
20:45 moritz_ pmurias: how would you do that? MMD?
20:45 stevan__ PerlJam: if you want to write the Inline::ASM version for me I would happily accept the patch ;)
20:46 stevan__ IIRC, the perl 6 tie is really that Proxy object
20:46 pmurias yes
20:47 stevan__ I think the p5 tie is much uglier
20:47 pmurias moritz_: S06:314
20:47 pmurias stevan__: it's really easy to code Proxy if you want it
20:47 pmurias in perl
20:47 pmurias 5
20:47 stevan__ pmurias: with tie?
20:47 stevan__ :)
20:48 stevan__ pmurias: honestly I am not missing it
20:48 moritz_ pmurias: ah, 'is rw'
20:49 pasteling Someone at 81.168.228.98 pasted "Proxy in p5" (32 lines, 654B) at http://sial.org/pbot/30628
20:50 pmurias stevan__: yes
20:50 pmurias moritz_: i think formats are the only feature realy removed
20:50 PerlJam stevan__: I haven't enough Moose juice to write such a thing, but would that someone did, it could get rid of the stigma of slowness that perl has upon its OOPy bits.
20:51 stevan__ PerlJam: have you seen nothingmuch's MooseX::COmpile work?
20:51 stevan__ its slow, but coming along
20:51 stevan__ err.. its going slow
20:51 stevan__ the actual code it generates is comparable to hand coded p5
20:52 PerlJam no, I've been ignoring MooseX:: lately.
20:53 stevan__ PerlJam: fine, be that way,.. I thought you cared,.. but *sniff* apparently not *sniff*
20:57 PerlJam not enough time in the day to play with all of the interesting things out there *and* get work done for $dayjob *and* spend time with family  :)
20:57 pmurias stevan__: it would be a fun SoC
20:58 PerlJam once I figure out how to integrate "fun stuff" with $dayjob, that will be a great day.
21:03 Lorn joined #perl6
21:11 Auzon joined #perl6
21:12 pmurias stevan__: would accesors in c be much faster the perl ones?
21:15 lichtkind joined #perl6
21:18 stevan__ pmurias: to some degree yes, konobi has experimented with converting the type constraints to C
21:19 stevan__ and I know jjore was working on some benchmarks with different C based accessors, some that actually implemented their own opcode
21:19 lichtkind TimToady: thanks
21:20 stevan__ pmurias: the accessors Moose inlines only inlines as much code is needed for the accessor, a C version couldnt be as dynamic, so it would have to be able to handle all cases
21:20 stevan__ but the excution itself would be faster
21:29 justatheory joined #perl6
21:30 Limbic_Region joined #perl6
21:34 nnunley_ joined #perl6
22:01 nnunley joined #perl6
22:15 real0ne joined #perl6
22:17 real0ne left #perl6
22:40 rdice joined #perl6
22:43 cmarcelo joined #perl6
22:44 cmarcelo left #perl6
22:47 lambdabot joined #perl6
22:55 Lorn joined #perl6
23:19 BinGOs joined #perl6
23:45 eternaleye joined #perl6

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

Perl 6 | Reference Documentation | Rakudo