pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | <stevan> Moose... it's the new Camel ":P | .pmc == PPI source filters!
Set by Alias_ on 16 March 2006.
00:37 gaal joined 00:58 mako132_ joined 01:07 wolverian joined, webmind joined, chip joined, Grrrr joined 01:11 feng joined 01:15 root joined 02:42 mako132_ joined
svnbot6 r9744 | lwall++ | Various items for further discussion at the hackathon. 02:53
03:19 mako132_ joined 03:20 xern joined 03:29 Quell joined 03:42 lisppaste3 joined 03:49 nirgle joined 04:14 mako132_ joined 04:24 justatheory joined 04:26 justatheory joined 04:38 f0rth joined 04:43 trym joined 05:06 amnesiac joined
ayrnieu assertion "s1->encoding && s1->charset && !PObj_on_free_list_TEST(s1)" failed: f 05:13
ile "src/string.c", line 1341 05:14
Abort trap (core dumped)
wee
(this is pugs)
arcady but it sounds like parrot... 05:15
what with all the PObjs and core dumps
ayrnieu Perhaps: I have an embedded parrot.
I have a pugs.core , however.
arcady that's definitely a parrot error 05:17
maybe embedding is broken 05:18
not that I am a parrot expert, but that error message looks like a result of null pointers and/or access to already-freed objects 05:21
05:38 GeJ joined 05:45 justatheory joined 05:53 justatheory joined 06:12 feng joined
ayrnieu shudders. regexen are so brain-eatingly slow right now. 06:13
06:17 amnesiac_ joined 06:23 nothingmuch joined 06:25 Aankhen`` joined 06:55 xinming joined 07:08 penk joined 07:18 elmex joined 07:23 nothingmuch joined 07:27 damnhil joined, damnhil left 07:43 f0rth joined 07:52 |Jack| joined 08:06 marmic joined 08:23 drrho joined
KingDiamond so what's the current state of the exception handling implementation? any example of a try... catch? 08:57
I'm trying to determine the type of an object actually... is there a way I can do that currently? 09:06
ayrnieu any way at all? Look at its .perl 09:08
in perl6, you'll have standard ways to see if an object has a field or a method, however. 09:09
and look in t/builtins/control_flow/try.t for exception handling 09:10
KingDiamond ah, thanks! 09:11
09:13 Guest27883 joined
gaal KingDiamond: $obj.ref 09:14
though yeah, .does will be correct in more cases 09:15
KingDiamond gaal: w00t! this is what I needed. thanks. 09:17
gaal: so is there a way to list available object methods? 09:25
ayrnieu something in .meta , I expect.
KingDiamond ayrnieu: .meta doesn't work 09:27
09:28 luqui joined, luqui left
ayrnieu yes, I know. 09:28
gaal my @meths; push @meths, $_ for grep { $class.can($_) } 'a' .. 'zzzzzzzzzzzzz' 09:35
KingDiamond gaal: heh :-) 09:37
spo0nman cant seem to get pugs to work.
gaal the zzz is an allusion to the speed in which this doesn't work
spo0nman pugs does not love me. 09:38
gaal spo0nman: what doesn't work?
spo0nman gaal: ah! i cant seem to compile it.
KingDiamond spo0nman: you said there were problems with your kdelibs or something conflicting with parrot, right?
spo0nman warns that he is on Freebsd 4.10
KingDiamond: that was linux. 09:39
Im sure if i tried it with yet another OS it'll still not work.
KingDiamond: Parrot compiles and runs in the /tmp/parrot dir but when i make install it cannot find parrotlibs. 09:40
spo0nman pulls his hair.
09:40 kanru joined
gaal brb, sorry - spo0nman please paste error messages 09:41
spo0nman gaal: with FBSD, I got as fas as getting parrot ghc darcs and hs-plugins working ... pugs fails. 09:42
gaal: paste.lisp.org/display/18335 09:46
nothingmuch spo0nman: you should consider working on feather.... it's been a long time 09:49
it's much more fun to work on pugs than to try and build it unsuccessfully =(
spo0nman nothingmuch: :)
nothingmuch just FYI: gmp is the gnu big num math library
that I'm guessing haskell is using for the Integer data type 09:50
spo0nman nothingmuch: haskell works ... so i dont know if im missing it.
nothingmuch i'm not sure what ghcz is though
spo0nman nothingmuch: feather? /me does a web search.
nothingmuch yeah, it's odd
spo0nman: feather.perl6.nl
it's Juerd's donation
you can use it to do perl 6 related things
(development, IRC, web hosting, email) 09:51
you need to mail Juerd and ask for an account
spo0nman sweet. 09:52
just tell me where to send the cookies. :)
nothingmuch well
you can send me cookies
i'll never say no =)
09:53 fglock joined
nothingmuch spo0nman: see, fglock is using feather to connect =) 09:53
spo0nman :)
fglock nothingmuch: hi! 09:55
nothingmuch hola fglock
fglock pmichaud: re your comments in parrotsketch: you can enter the precedence table by using prototypes: 'sub infix:<-> is assoc:<left> is equiv:{infix:<+>}' - I'm not sure about the syntax, as there is no 'prototype' in S06 10:05
nothingmuch: I'm looking for what to do next - maybe work a bit in a TGE/p5 10:06
nothingmuch fglock: i'm too out of touch to advise right now 10:07
10:09 Guest27883 is now known as Aankhen``, Aankhen`` joined
fglock later & 10:10
10:10 fglock left 10:23 Guest27883 joined 10:46 iblechbot joined 11:23 root joined 11:31 root is now known as colares 11:33 colares is now known as asdfjasdf, asdfjasdf is now known as colares
gaal camel: giant-moose.livejournal.com/119622.html 11:38
11:39 colares joined
KingDiamond in a connect() object, I want to pass a body and header to the say() method; how to? :-/ 12:00
12:01 nirgle left
gaal $o = connect(..); $o.say("asdf") 12:01
or say $o: "asdf"
see examples/network
12:10 chris2 joined 12:13 stennie joined 12:35 nnunley joined 12:43 fglock joined 13:01 iblechbot joined 13:24 Limbic_Region joined 13:25 pdcawley_ joined
svnbot6 r9745 | fglock++ | Pugs-Compiler-Rule/TODO update 13:30
13:44 wilx joined, nothingmuch joined 13:45 elmex joined 13:51 sahadev joined 13:53 miyagawa joined 13:54 wilx joined 13:57 bsb joined 14:10 pdcawley_ joined
audreyt fglock: there? 14:24
14:25 Qiang joined
fglock audreyt: hi 14:29
svnbot6 r9746 | fglock++ | Pugs-Compiler-Rule/RuleInline.pl - a *fast* rule runtime
14:30 rep is now known as xX_rep_Xx
audreyt fglock: is PCR-Dev.tgz still relevant? 14:41
14:42 diotalevi joined
fglock audreyt: no - it had some new ideas, but it is obsolete now 14:42
14:42 nothingmuch joined
audreyt k, maybe rm it then 14:42
fglock audreyt: it can compile the grammar using itself, but this is not important now 14:43
audreyt the new PCR looks nice!
svnbot6 r9747 | audreyt++ | * re::override - build fix on Win32 and threaded perls;
r9747 | audreyt++ | factor out NOTES from override.xs, and various cleanups.
audreyt is RuleInline for PCR 0.02, or would you like to push out a release using existing pX codebase first? 14:44
I'd like to do a re::override::PCR
fglock audreyt: thanks
audreyt: inline is just an idea I had 10min ago :)
svnbot6 r9748 | fglock++ | rm PCR-dev.tar.gz
audreyt also, have you seen pmichaud's language/perl6/ optable (and very minimal grammar) for p6?
fglock audreyt: I've read about it - do you have a link? 14:45
gaal meows
14:45 justatheory joined
audreyt fglock: yes, svn.perl.org/parrot/trunk/languages.../grammar.g 14:46
I'm a little bit underwhelmed by its current scope... but seems like a clean start at least
also, svn.perl.org/parrot/trunk/languages.../parse.pir is the initial optable population 14:47
gaal: hey!
fglock oh, it doesn't use a statement table yet
gaal hey hey ms jetlag :) 14:48
fglock audreyt: how about using sub prototypes to declare fixness/precedence/etc
audreyt gaal: *sigh*
fglock: that's the right way to do it...
fglock do you think opp.pl can be of any use? 14:50
I'm looking for what to do next :)
nothingmuch mĆøĆøĆøĆøse 14:51
fglock audreyt: S06 doesn't mention sub prototypes 14:52
audreyt huh? 14:53
wolverian I used Moose yesterday, it was nice.. :)
audreyt grep for "tighter" and "is assoc"
fglock audreyt: I mean, defining a sub without a block 14:54
but maybe I overlooked it
audreyt "proto" is it
proto infix:<+> ($a, $b) { ... } 14:55
fglock audreyt: ok. S06 has 'sub foo {...}' - proto isn't there (dev.perl.org/perl6/doc/design/syn/S06.html) 14:56
audreyt proto is S12. 14:57
it probably needs to be added to S06 as well
something like, in S06.pod after "B<Multimethods>": 15:06
+B<Prototypes> (keyword: C<proto>) specifies the commonalities (such
+as parameter names, fixity and associativity) shared by all multis
+of that name.
TimToady: sanity-p?
gaal audreyt: then also +If a C<proto> is not specified explicitly, one is created based on the first C<multi> declaration 15:07
+A C<proto> declaration must come before any matching multis, if at all.
right?
(IIRC a discussion a month ago) 15:08
audreyt yup
but that's in S12
which is very weird 15:09
I think the whole para
=head1 Multiple dispatch
should be moved back to S06
15:09 kisu joined
fglock S06 has a 'Stub declarations' section - it could comment on 'proto' x '{...}' 15:10
audreyt though "proto" only makes sense for multis
(which is what you are working on now I presume)
for normal subs, you can do forward declaration using the
sub x { ... }
...
sub x { real body }
form
I think it's terribly inconsistent though 15:11
I'd like to see all the proto forms moved to C<proto>
but that's what is specced now
and sorta makes some sense
fglock what's the place for a op precedence parser in Pugs::* ? I was thinking something like Pugs::Grammar::Category 15:15
audreyt that's an excellent name.
fglock cool
15:18 hexmode joined
nothingmuch goes bug hunting 15:19
gotta clear out all those stupid things in the RT queues
btw: halogen.note.amherst.edu/~jdtang/sc...rview.html
seems nice
fglock lunch &
nothingmuch audreyt: i'm going to put HTML::FromANSI in a darcs repo on my website... cool? 15:20
and hopefully close the two bugs
audreyt nothingmuch: er sure
15:20 fglock left
audreyt needs to crash for another 3hrs now 15:20
I'll try to resume journaling after I wakeup :/ 15:21
...hopefully before the akihabara walking tour
audreyt waves... & 15:22
nothingmuch does 'temp $x' retain the value of the outer $x unless explicitly assigned?
or do you have to say 'temp $x = $OUTER::x' ?
audreyt unspecced (!) 15:23
nothingmuch i'll post to p6l
one 15:27
done
Limbic_Region um - slight typo in the temp x thread - the comment after the first block should say definately 5 not 10 15:32
cognominal is there a difference between PCR and PCRE? 15:34
chris2 one means polymerasis chain reaction, and the other perl-compatible regular expressions :) 15:35
PerlJam apparently I'm not the only one who thinks that when they see PCR 15:38
PCR == perl6 rules implementation. PCRE == perl5-ish regular expression implementation 15:41
(btw)
15:50 justatheory joined, samhain1138 joined
audreyt so maybe re::override::Pugs instead of ::PCR -- otherwise too confusing 15:51
Limbic_Region audreyt is supposed to be sleeping 15:52
audreyt I am sleeping...
15:54 GabrielVieira joined
GabrielVieira hi 15:54
PerlJam Limbic_Region: audreyt takes Ambein to help sleep and so is able to do all sorts of things while asleep. 15:56
16:03 fglock joined
svnbot6 r9749 | audreyt++ | * v6.pm: Alias++ requested the "use v6-pugs;" should be in a 16:03
r9749 | audreyt++ | line by itself (modulo whitespace/comments), to make PPI's life
r9749 | audreyt++ | not totally miserable.
16:06 Aankhen`` joined
svnbot6 r9750 | audreyt++ | * Pugs::Compile::Rule - avoid warnings in tests. 16:06
r9751 | audreyt++ | * re::override::PCRE - we really want 5.006+.
stevan_ dammit, I keep missing her
stevan_ ponders sleeping every 3 hours to try and get in sync :P
ingy hi audreyt 16:07
stevan_ wolverian: feel free to m??se on over to #moose (on perl.org) if you have any questions
hey ingy
you in .jp yet?
ingy audreyt: not yet
PerlJam stevan_: There was a chemical engineering student I used to know who would do that (sleep every few hours)
ingy grr
stevan_: not yet 16:08
audreyt: svn.kwiki.org/ingy/Sporx/
stevan_ will pretend if ingy wants him too
svnbot6 r9752 | audreyt++ | * Main.hs - 6.28.0 will use the Japanese version of the title poem.
ingy stevan_: svn.kwiki.org/ingy/Sporx/README
stevan_ ingy: nice :)
ingy I'm about to do the insane part of the hackj 16:09
stevan_ which is?
ingy each slide will be mutated into a Javascript function which returns takahashi markup
so that normal slides act normally 16:10
stevan_ ingy++ # bringings his own personal brand of insanity to the world of Javascript
ingy but slides with embedded Javperlscript do evil things 16:11
stevan_ I look forward to an Inline.js
ingy gah
stevan_ :)
ingy stevan_: did you see Inline::Module
released last night?
stevan_ no, what is that?
looking ....
ingy search.cpan.org/src/INGY/Inline-Mod...lib/Foo.pm
stevan_ :)
ingy Module::Compile++ 16:12
audreyt++
stevan_ this is like mixins, but crazier
ingy mixons
stevan_ yes, ++ all around indeed
ingy I feel like I've got my evil mojo back
stevan_ PerlJam: IIRC, DaVinci only slept something like 20 min every 4 hours 16:13
ingy that's a man with a BIG todo list
stevan_ ingy: no doubt, Module::Compile is the gateway drug :)
ingy :) 16:14
stevan_: I need to do a rewrite with dconway
svnbot6 r9753 | fglock++ | Pugs-Compiler-Rule/RuleInline.pl - added benchmark
r9754 | audreyt++ | * Revert "use" and "require" to use the internal forms
r9754 | audreyt++ | for now, as it doesn't (yet) work for anything other
r9754 | audreyt++ | than Test.pm. Will revisit when YAML+Closure works.
stevan_ quakes with fear
fglock plain PCR: 5263 iterations/second; fast PCR: 149000/s
ingy audreyt's on fire
stevan_ she is always more productive when she sleeps 16:15
s/sleeps/is sleeping/
ingy gets some coke from the fridge
stevan_ always keeps it in the little gold ankh around his neck, Superfly style :P 16:16
audreyt ingy: give me proper VimMode highliting (via Kwiki::/Spork::) in Sporx please :) 16:19
audreyt is tired of {{#c|}}
ingy audreyt: I can do better 16:20
audreyt I want to use kwid :)
ingy wait til you see it
audreyt okay. will you be in the Akihabaratour?
when'd you arrive?
ingy 1720 tomoorrow
I think I am joining the dinner 16:21
miyagawa yeah.
hacking dinner!
ingy we can do last minute hacking at dinner and beyond
audreyt k
ingy I'll convert everyone to Sporx JIT 16:22
audreyt yay!
ingy++ ingy++
ingy :)
16:23 chihchun is now known as av, av is now known as chihchun
fglock audreyt: 'fastPCR' (nonbacktracking) is 30x faster then plain CPR - it could be used as a first-try, and then fallback to backtracking 16:27
s/CPR/PCR/
audreyt fglock: nice!
(both PArrows and Parsec uses commit-by-default, try-if-you-must strategy)
it's so useful that I sometimes wonder if rules can take a :eager flag ;) 16:28
fglock audreyt: is there a swich to disable backtracking in rules (other than ':')
:)
audreyt otoh, if we are using parser combinator style with {return...} 16:29
then
token : {return ...}
makes great documentation
the colon feels like an operator there
16:29 justatheory joined
audreyt so maybe adding it isn't that big a requirement 16:29
fglock audreyt: but then you would need token : token : token : {return} if you have a longer statement 16:30
or maybe not - it can be optimized by the emitter
(or by TGE) 16:31
stevan_ is starting to think that Perl 5i (of whatever it was called) will actually be out by *this* christmas
audreyt I'm not sure how TGE figures into this :)
it can be optimized by the emitter for sure.
stevan_: yes. 16:32
definitely :)
fglock audreyt: I'm trying to find out things that TGE could be used for :)
p5i?
audreyt (note that I submitted a YAPC::NA talk "Deploying Perl 6" counting on the existence of something like that at there)
fglock: imvvho, nothing :)
stevan_ audreyt: Moose 0.03 will be out later this week with a nice Moose::Cookbook in it
(and a bunch of other features/improvements too) 16:33
audreyt fglock: TGE does two directions of tree-based propagation, namely propagating AST nodes from bottom to up, and propagate context etc from up to down
the first one is easily effected with the :{return...} combinator style 16:34
ingy CĆøĆøkbĆøĆøk
audreyt the other direction is what multimethods is for
stevan_: ooooh
16:34 fglock joined
audreyt 18:36 < audreyt> the other direction is what multimethods is for 16:34
fglock ok 16:36
audreyt TGE makes sense for parrot, as writing either direction in PIR would suck
but in a self-hosting context, p6 itself is more powerful/expressive than AGs
(ags = attribute grammars that TGE implements) 16:37
PerlJam it had better be!
audreyt indeed :)
Limbic_Region wonders how good audreyt is at predicting the future in her sleep 16:39
any idea when 6.28.x of Pugs will be?
fglock I'm trying to find a reference on how faster the algorithm used by PGE op-precedence is, vs. plain p6 grammar
audreyt Limbic_Region: I have no idea... too many things in flux. would have more details after meetup with ingy/damian/etc this week 16:40
PerlJam fglock: isn't like comparing table-lookup to stack-unwinding (or similar)? 16:41
audreyt I need to get S06+S12 totally digested into _implementable_ forms... preferably with P5 backups and Perl6::API specs
s/backup/runtime support/
Limbic_Region thanks audreyt for her noop cycles and wanders back off to lurking 16:43
fglock nice: www.parsifalsoft.com/gloss.html 16:45
svnbot6 r9755 | audreyt++ | * Fix pugs -BJS compilation by temporarily emulating VCode serialization 16:47
r9755 | audreyt++ | for Perl5. Eventually this needs to be "fixed" by making PIL2JS
r9755 | audreyt++ | accepting the YAML tree instead of raw Perl5 tree.
16:50 ghenry joined
audreyt o/~ But in that sleep of 'Net / what dreams may come / when we have shuffled off / this mortal coil / must give us Code o/~ 16:51
bbl :) & 16:52
16:52 eric256 joined
ingy any js experts in the house? 16:56
16:57 justatheory joined
fglock stevan_: Perl 5i is Moose? 16:57
eric256 Moose!!! ;) 16:58
ingy elk
31k 16:59
eric256 is considering playing with Moose to build objects for a Plugin system... the before, after, around are perfect for it...i think ;)
eric256 wondered what 31,000 had to do with anything lol
audreyt fglock: I think stevan means "use v6-pugs" without writing v6 :) 17:00
fglock: that is, use all the runtime support, but with perl5 syntax
stevan_ fglock: IIRC Perl 5i was the ingy project that spawned Spiffy (ingy please correct me if I am misguided) 17:02
fglock audreyt: does it make sense to port perl5/Perl6-(Container|Value) to plain p5?
stevan_ fglock: so with Moose, PCR, Module::Compile, etc, we will have something pretty close
audreyt fglock: it does... but my brain is in alpha-wave now, so there's not enough Ghz to think about this 17:03
maybe tomorrow
ingy stevan_: I think you are misguided 17:06
perl5i was my idea to extend the perl5-i(nternals) 17:07
adding opcodes for Perl6ish stuff
and perl5i was supposed to provide a clean OO API (C level) for those internals. 17:08
eric256 curses himself for developing on windows where it can be soo hard to install modules. 17:10
Limbic_Region eric256 - using AS?
eric256 yea 17:11
me and my constant battle. i used to have cpan setup with VC++ i should figure that out agian.
Limbic_Region I was just checking if they use a freeware compiler or if they use the $$$ one 17:12
you would think that if they used a freebie one that there would be easy to follow instructions for building your own - I should ask crazyinsomniac 17:13
ingy anyone hang out on #javascript? 17:15
Ara4n has asked q's there (very) intermittently
or was that #js?
no, it was #javascript 17:16
17:21 DesreveR joined
Juerd ingy: Isn't that quite easily checked by joining the channel and having a look at its names list? :) 17:21
ingy Juerd: it's a big list 17:22
Juerd I see
ingy much bigger than here :p
Juerd Only 30 bigger. 17:23
Limbic_Region eric256 - what AS build are you using? I have just read that as of build 815 - MinGW works seamlessly with AS 17:28
eric256 i have build 815 17:30
17:31 avar joined
fglock I'm using PxPerl with MinGW, and AS too - I frequently get path problems :) 17:31
eric256 L~R i'm not registered so i can't msg you. 17:40
17:40 ruoso joined
ruoso is still alive after very very much beer in the weekend... 17:41
Limbic_Region ahh - nevermind anyway - I figured it out
integral Limbic_Region: /nickserv set unfiltered on # will allow people to msg you 17:42
17:42 siosiosios joined
fglock ruoso :) 17:43
ruoso fglock, so... I saw 06-subrule.t is working... 17:46
Limbic_Region hanks integral 17:48
fglock ruoso: PCR 0.02 may go to cpan today 17:51
17:56 elmex joined
ruoso fglock, I need to see what's missing on lrep after that... 17:59
fglock, it looks like I'll be able to make it work again
fglock, PCR has the features the old iterator_engine had...
18:01 eric256 is now known as eric256_
ruoso working too much :( 18:03
fglock ruoso: I'm also experimenting with a new version - see RuleInline.pl - it will be more than 10x faster 18:04
18:04 eric256_ is now known as eric256
ruoso fglock, does it brake the "abi" again? 18:06
. o O (it's weird to think in Perl 5 as binary ) 18:07
fglock, or it's a in-place replacement?
nothingmuch i'm going to release a new Test::TAP::HTMLMatrix 18:11
last chance to fix the display: file:///Users/nothingmuch/Perl/Test-TAP-HTMLMatrix/example_html/summary.html 18:12
err
nothingmuch.woobling.org/tth_exampl...mmary.html
if anyone feels they can make that prettier 18:13
eric256 that looks purty ;)
nothingmuch it's 'orrible 18:14
fglock ruoso: abi?
nothingmuch i couldn't write CSS if my life depended on it
eric256 yea i'm not too picky though. anything is prettier than my feather.perl6.nl/~eric256/t_index/ ;)
so if you find someone to help you with that...send them my way too. 18:15
we need offical P6 stylists and Librarians.
ruoso fglock, the perl 5 code that runs with PCR will run with RuleInline.pl? or will need to be re-written?
fglock ruoso: RuleInline will be transparent - it will first try a fast match, and if it fails, it will try the old PCR 18:17
ruoso: the fast match can't backtrack
nothingmuch okay
too late =) 18:18
ruoso fglock, alright... so it's just an enhancement to PCR, not a substitute
18:18 Ara4n is now known as Arathorn 18:25 GeJ joined 18:34 b_jonas joined 18:37 FurnaceBoy joined 18:46 KingDiamond joined
ingy yay, my refactoring of the takahashi.js was successful 18:49
nothingmuch Test::TAP::Model and Test::TAP::HTMLMatrix uploaded to CPAN
now with consolidated view support 18:50
this means two test runs can be diffed
18:50 larsen joined
PerlJam waits for "... this means we'll have a perl6 compiler by tomorrow" ;-) 18:51
s/\ba\b/*the*/
ruoso wonders if it would be a good idea to use PCR to build a Perl 5 parser and then write a P5->P6 compiler 18:52
nothingmuch ruoso: not a good idea 18:53
waste of effort
larry can already give you an opptree with an embedded parse tree
which is really as good as it gets for perl 5 18:54
remember that perl 5 has no spec but the code
ruoso nothingmuch, that's a point
:)
nothingmuch IMHO your time is too valuable to be wasted on that, but if that's what you consider fun, by all means ;-)
ruoso but a P5optree -> P6syntree converter may be useful... 18:55
Juerd ingy: So does Perl 6, though it doesn't call them setters and getters... :)
18:55 nnunley joined
ingy Juerd: accessors & mutators? 18:58
Juerd ingy: has $foo will FETCH { ... } will STORE { ... }; 18:59
Two different closures for the same thing.
nothingmuch ruoso: the problem with p5optree is that it's too low level 19:02
but if you start on that larry will be very greatful
i think what we *really* want is a perl5opparsetree to perl5 ast
and then a perl 5 ast to perl 6 ast
ruoso hmm... so a p5 ast is to be defined yet 19:03
PerlJam ruoso: do you grok PIR?
ruoso PerlJam, not yet... 19:06
nothingmuch ruoso: yes, that's perl 5's biggest problem
as far as compilation is concerned
the parse tree doesn't have enough semantic meaning 19:07
and the optree is too implementation specific
ruoso PerlJam, I'm a little skeptical about something that could represent anything high-level...
PerlJam, But I have to take a look... 19:08
PerlJam ruoso: Well, do you grok perl6 rules?
ruoso PerlJam, yes...
PerlJam ruoso: maybe it would be useful for you to hack on the perl6 grammar?
ruoso PerlJam, Probably... 19:09
PerlJam, do you have something specific to point me at?
PerlJam, I mean, docs
PerlJam ruoso: um, look in the parrot source tree in languages/perl6 19:11
ruoso ooops... svn.perl.org/viewcvs/parrot/ throwing error 19:13
RuntimeError: instance.__dict__ not accessible in restricted mode
19:36 pawel_ joined
pawel_ hi all 19:36
19:36 pawel_ is now known as pmurias
nothingmuch hi 19:37
fglock pmurias: hi! 19:47
pmurias PerlJam: do you need read or write PIR skills? 19:54
PerlJam pmurias: I need time. :-) 19:55
19:55 Arathorn is now known as Aragone
PerlJam I can read/write perl5, pir, perl6, rules, etc. but I have no time. 19:55
I was suggesting to ruoso that something of use would be to work on the perl6 language stuff in the parrot tree since it's coming to fruition
(i.e., there were some checkins over the weekend dealing with the perl6 grammat and what not) 19:56
pmurias personally i really dislike pir, i don't have any assembler or BASIC experience so it's a pain for me to deciphere all those gotos 20:01
PerlJam I've always thought PIR remarkably similar to perl. 20:02
(aside from the weird assembly-isms)
20:06 trym joined
pasteling "ruoso" at 201.9.29.142 pasted "Test rule emitted code" (19 lines, 417B) at sial.org/pbot/16499 20:13
ruoso fglock, please take a look at the paste 20:14
fglock, is it correct as a rule method declaration?
fglock, I know it's dirty... but it works... 20:15
fglock, maybe Pugs::Compiler::Rule could offer an initialization with the code sub already defined...
20:17 tri joined
KingDiamond okay, quick question: why does slurp() take the filename as a param and not a file object? 20:18
pmurias KingDiamond: more usefull in short scripts
ruoso KingDiamond, according to Perl6::Slurp it can take a file object too 20:19
KingDiamond ruoso: yeah, it apparently does but, interestingly, I get different outputs using slurp($file_obj) and slurp("filename"); why?
ruoso KingDiamond, interesting... do you have a test case? 20:20
KingDiamond I'm trying to read a binary file, if it helps
yeah, gimme a sec
fglock ruoso: how about: *{'rule'} = PCR->compile( '<?p6ws>*' )->code; - this is much cleaner
ruoso fglock, but then I didn't compile the code at first 20:21
I'll have to compile everytime...
fglock, a rule declaration can be compiled at compile time... it doesn't need to be compiled at ruuntime
pmurias fglock: why does PGR->rule("%hash") return undef? 20:22
fglock ruoso: ok - we'd better add an 'emit_method' or something
pmurias: did you define the %hash rule? currently it emits a warning and returns undef 20:23
20:24 DesreveR is now known as r0nny
pmurias it does *not* emit a warning, end according to the PGR/Rule.pm &variable handles the hash case 20:25
s/end/and/
fglock ruoso: your code uses internals - it would break if PCR changes
pmurias: see P::Emitter::Rule::Perl5 line 122 20:27
bbiab &
ruoso fglock, I know... probably we need a 'compiled' method... like my $rule = P::C::R->compiled(sub { ... });
20:33 macroron joined
ruoso is considering using Symbol::Glob to have the rule object as the scalar value and the rule method as the code value 20:48
21:00 fglock joined
fglock ruoso: like '$rule' and 'sub rule'? 21:03
21:04 SamB joined 21:05 KingDiamond joined 21:12 azuroth joined
ruoso fglock, yes... 21:14
fglock, actually Symbol::Glob is a little weird...
fglock, doing by hand seems easier
fglock, then both will be available... and the push problem is solved 21:15
fglock ruoso: the push problem is going to be fixed with Pugs::Grammar::Category (opp.pl is a prototype) 21:16
ruoso: when you get a declaration like 'sub infix:<x> {...}' you add the sub to category 'infix' and it's done 21:18
ruoso fglock, I agree that 'sub infix:<x>' must work... but push @rules, $rule; should work also
since rules can be defined as "my $rule = rule {...}" 21:19
KingDiamond hmm... so looks like I was wrong (thankfully) about the slurp() thing... however, something's goign wrong when I'm concatenating strings with binary data 21:20
fglock ruoso: there are categories 'rxsomething' - see S05 (near end of file)
21:28 hexmode joined 21:30 FurnaceBoy_ joined
pasteling "ruoso" at 201.9.29.142 pasted "Another rule declaration proposal... presuming P::C::R->compiled(CODE) is available..." (22 lines, 448B) at sial.org/pbot/16500 21:31
ruoso fglock, please take a look at the paste 21:32
21:34 p5evalbot joined
fglock ruoso: $rule needs a closure with a predefined grammar 21:36
ruoso fglock, hmmm... ok... 21:38
fglock, the rule object can have that defined, right? 21:39
fglock, I mean in the compilation
fglock, oh... now I noticed... 21:40
fglock ruoso: no, because you need inheritance to work
ruoso fglock, I was dumb
fglock, the sub definition is wrong
fglock, it should be *{'rule'} = ${'rule'}->code(); 21:41
eric256 you know if you are the only two talking you can drop the names right? :)
pasteling "ruoso" at 201.9.29.142 pasted "*fixed* Another rule declaration proposal... presuming P::C::R->compiled(CODE) is available..." (20 lines, 431B) at sial.org/pbot/16501
fglock eric256: no more :) 21:42
ruoso eric256, yeah... now we have three
:)
eric256, in my IRC client I get noticed when someone speaks my name
eric256 ahhh 21:43
i mean... ruoso, ahhh
;)
21:46 nnunley joined
ruoso fglock, considering the fix... what do you think? 21:47
fglock sorry, I don't see what are you trying to do
21:47 larsen joined
ruoso fglock, lrep-compiler? 21:48
fglock, trying to find out the perl 5 equivalent code to some perl 6 code...
fglock ruoso: you want perl5 versions for variable and method, right? 21:50
ruoso right 21:52
fglock how about making a PCR subclass? 21:54
ruoso fglock, the difference is that I don't want to compile at runtime... 21:55
fglock, I'll compile and dump the code of the rules as perl5 code
fglock, compiling Perl6.p6 to Perl6.pm
and then lrep.p6 to lrep 21:56
and so on
fglock ruoso: you don't need Pugs::Compiler::Rule - you can write a small program that dumps the compiled code to a file - you only need Pugs::Grammar::Rule and Pugs::Emitter::Rule::Perl5 22:00
ruoso fglock, Pugs::Compiler::Rule provides convenience methods, such as ->code() and ->match()... 22:01
fglock, I just need to restore the $rule from the compiled code 22:02
fglock ruoso: you can build a PCR pre-compiled object with bless{ code => eval "..." }, PCR; 22:03
ruoso fglock, but ok... I'll subclass it to implement...
fglock, that's from where I started...
fglock, the first paste looked like this
22:05 stevan_ joined
fglock we could implement a 'dump' method to return this 22:05
ruoso fglock, I already use $rule->{perl5} to get the compiled code...
fglock, a method for this would be nice... 22:06
fglock ok!
ruoso fglock, I just need to recreate the rule at runtime with the code saved at compiletime
fglock, in the last paste the code is the resulting $rule->{perl5} of a compilation... 22:07
i mean, the code inside the ->compiled() 22:08
fglock ruoso: you can try: instead of 'Pugs::Compiler::Rule->compiled(' - ${'rule'} = bless{ code => sub {...} }, Pugs::Compiler::Rule; 22:10
ruoso fglock, I know that works... I already tried that...
fglock, the problem is that it counts on too many internals... 22:11
but forget it... I'll subclass it and implement...
fglock ruoso: i put it in the TODO list - so I'll not forget 22:15
svnbot6 r9756 | fglock++ | PCR - added a serializer/Dump to TODO list
fglock later & 22:16
22:16 fglock left 22:18 m joined 22:40 miyagawa joined
svnbot6 r9757 | ruoso++ | lrep close to work with the new PCR... 23:12
23:36 wilx joined 23:38 Limbic_Region joined