Camelia, the Perl 6 bug

IRC log for #parrot, 2008-12-12

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:03 allison joined #parrot
00:04 dalek r33816 | tewk++ | trunk:
00:04 dalek : [js] parses whitespace
00:04 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33816
00:09 dalek r33817 | cotto++ | trunk:
00:09 dalek : [imcc] IMCC_subst_constants uses r[2], so make sure r has enough elements (CID #173)
00:09 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33817
00:10 cotto me-- #should CID #174
00:11 jonathan But you++ for fixing it.
00:14 dalek r33818 | cotto++ | trunk:
00:14 dalek : [imcc] IMCC_subst_constants uses r[2], so make sure r has enough elements (CID #171)
00:14 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33818
00:23 dalek r33819 | cotto++ | trunk:
00:23 dalek : [debug] close a leaked filehandle (CID #176)
00:23 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33819
00:27 davidfetter joined #parrot
00:36 alvar joined #parrot
01:21 Eevee joined #parrot
01:37 TiMBuS if i want to define a token for function names, how do i make it do they can't be specific names? like my current rule is defined as: [ \w | '-' | '?' | '=' ]+
01:37 TiMBuS but i want to specifically disallow '=='
01:38 TiMBuS should i just check to see if it matches '==' in actions.pm?
01:44 lathos Something like <! '==' >
01:44 Infinoid maybe a <!before '='> ?
01:44 lathos One of those.
01:44 purl hmmm... one of those is a return value.
01:45 Infinoid I wouldn't really know.  everything I know about perl 6 regexes I learned from 20 seconds of reading http://en.wikipedia.org/wiki/Perl_6_rules
01:45 Infinoid (which is very possibly out of date.)
01:46 lathos Ah, I learnt from 20 seconds of reading http://dev.perl.org/perl6/doc/design/syn/S05.html , which while still possibly out of date at least shouldn't be.
01:46 Eevee "Perl 6 rules" is a great title for an article
01:46 lathos (Also: another factor is how much Rakudo actually implements.)
01:46 chromatic Everything I know about Perl 5 parsing I learned from forgetting to run regen_perly.pl.
01:46 chromatic Oh, and it has a hand-rolled lexer too.
01:47 lathos The best kind.
01:47 chromatic When adding a new keyword, don't forget to put it in the nested nested nested switch statement corresponding to the length of said keyword.
01:47 chromatic Bonus points for guessing *which* keyword.
01:47 lathos I tried writing a grammar for TT3 last night, but it all got a bit explody.
01:49 lathos What Perl 6 libraries do we need right now? I'm in a library writing|porting mood.
01:49 chromatic File::Temp
01:49 purl rumour has it File::Temp is generally portably enough, yes. or annoying
01:50 lathos Right-oh.
01:50 chromatic Hmm.
01:50 chromatic By the time Perl 5's parser knows it has a block, it looks like a little bit late to change the package of said block.
01:51 lathos Oh, chromatic, I had an idea. I figured I'd write NCI.pm, with a wee tiny NCI.pir part, to make it possible to wrap libraries in Perl 6.
01:51 chromatic That would also be lovely.
01:51 lathos Currently using dynamic libraries means building up big arrays of names and signatures and that's horrible in PIR.
01:52 chromatic It is.
01:53 chromatic Hmm, during the parse can I change a block's package?
01:53 lathos Don't think so.
01:53 Lorn joined #parrot
01:54 chromatic Do stashes get assigned at parse time?
01:54 lathos PL_compcv is saved away during startsub.
01:54 lathos Although, hrm, that doesn't matter.
01:55 chromatic Suppose I want to add a grammar rule something like PACKAGE NAME block and have the package set only inside the block.
01:55 chromatic That's not exactly what I want to do, but it's close enough that you should understand what I'm trying to do without giving away the sekrit.
01:56 lathos Hold on, are we talking 5 or 6 here?
01:56 chromatic 5
01:59 lathos Oh, sure.
01:59 lathos Just save PL_compcv, then reassign it. It'll just unsaved at the end of the block.
02:00 chromatic I don't follow.
02:01 chromatic I want to write the equivalent of:
02:01 chromatic package Foo {
02:01 chromatic sub bar { ... }
02:01 chromatic }
02:01 chromatic and have Foo::bar.
02:02 TiMBuS <lathos> Something like <! '==' >
02:02 TiMBuS this doesnt work, but <! ['=='] > does, but it seems to cause a lot of problems, possibly to do with backtracking im not sure =/
02:03 TiMBuS i think ill just check in actions.pm, where things make more sense to me
02:04 lathos temp_package: PACKAGE temp_package_name block
02:04 lathos temp_package_name: WORD { savefreeSV(PL_compcv); package($1); }
02:05 chromatic Ah, clever.
02:05 chromatic If only I'd studied CS and parsers.
02:05 tewk_ lathos: NCI.pm?
02:05 lathos Yep.
02:06 tewk_ perl6 or perl5?
02:06 lathos 6.
02:06 lathos Who writes Perl 5 any more?
02:06 * Infinoid
02:06 tewk_ chromatic attempted perl5 nci
02:07 lathos use 6; use NCI; %sigs = ( foo => "ii", bar => "pv"); NCI::wrap("somelib", %sigs); # Or similar
02:07 chromatic Succeeded too, in proof of concept.
02:07 lathos Enough of a proof of concept to make it worthwhile doing for Parrot.
02:08 mugwump That would be O for awesome
02:09 chromatic lathos, that doesn't return to the parent package at the end, sadly.
02:09 chromatic Let me stare at the code again for a moment.
02:10 chromatic I need to restore the current stash in the new PACKAGE rule.
02:10 lathos Yeah.
02:10 Eevee NCI == automagical C lib wrapping?
02:10 Eevee wait that's "native call interface" isn't it
02:10 lathos I thought there was a magical save rule to do it for you, but there isn't.
02:11 jimmy joined #parrot
02:11 Infinoid Eevee: yes and yes
02:11 lathos chromatic: Is by any chance your "package" token spelt "class"?
02:12 chromatic I cannot say; what would make you think such a thing?
02:12 chromatic The fact that I seem to *enjoy* kicking over beehives on p5p, perhaps?
02:13 lathos Haven't read p5p for years, it's just... well, that's what I would do.
02:13 chromatic Strange how our minds work similarly.
02:19 chromatic I could return an op from temporize_package_name in the correct package though.
02:34 kid51 joined #parrot
02:45 chromatic Aha.
02:47 chromatic Now to shock and amaze the world.
02:52 particle joined #parrot
02:59 chromatic lathos, thanks for the help.  This should be... interesting.
03:07 tewk_ PGE help.rule arguments { '(' <expression>? ')' }
03:07 tewk_ parses
03:07 tewk_ rule arguments { '(' <expression>? ')' {*} } doesn't parse
03:08 tewk_ do all {*} have to have #= keys ?
03:22 dalek r33820 | jkeenan++ | testparrottest:
03:22 dalek : Restore original order of POD and subroutines, to make diff-ing easier.
03:22 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33820
03:29 dalek r33821 | jkeenan++ | testparrottest:
03:29 dalek : Small cleanups.
03:29 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33821
03:34 dalek r33822 | jkeenan++ | testparrottest:
03:34 dalek : Continue to restore previous order of subroutines.
03:34 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33822
03:35 alvar joined #parrot
03:53 particle joined #parrot
03:57 galf joined #parrot
04:01 elmex_ joined #parrot
04:41 gaurav joined #parrot
05:03 pmichaud Rakudo is now passing 5004 tests.
05:03 pmichaud Great work, everyone.
05:05 jimmy so much fast.
05:05 nopaste "pmichaud" at 72.181.176.220 pasted "Current spectest results, r33822" (17 lines) at http://nopaste.snit.ch/14916
05:05 GeJ the twitter feed jumped from 6 followers yesterday to 48.
05:05 jimmy pmichaud++ and Tene++ and Others++
05:05 particle joined #parrot
05:06 pmichaud particle:  you just missed my note
05:06 pmichaud 05:03 <pmichaud> Rakudo is now passing 5004 tests.
05:06 pmichaud 05:05 <nopaste> "pmichaud" at 72.181.176.220 pasted "Current spectest results, r33822" (17 lines) at http://nopaste.snit.ch/14916
05:07 jimmy Why there is not S18 or S19
05:07 dngor joined #parrot
05:08 particle YAY!
05:08 particle pmichaud++
05:09 particle i just got internet back after a miles-wide outage
05:09 PerlJam jimmy: the synopsis numbers were originally intended to correspond to chapters of the Camel book.
05:09 particle pmichaud: i was just looking at the skip messages for the test suite, seeing what i could do about any of them
05:09 PerlJam jimmy: maybe those chapters are no longer relevant or maybe it's just that no one has written them yet :)
05:10 Hinrik what twitter feed?
05:10 particle rakudo twitter feed?
05:11 * particle pokes purl
05:11 * purl pokes particle back!
05:11 dalek r33823 | particle++ | trunk:
05:11 dalek : [rakudo] parse submethod declarations
05:11 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33823
05:11 Hinrik can one see a twitter feed without signing up?
05:11 jimmy seems that other Synopses doesn't have been implemented
05:12 pmichaud Hinrik: http://twitter.com/rakudoperl
05:12 Hinrik jimmy: Jerry Gay recently got a grant from The Perl Foundation to get started on writing S19
05:12 pmichaud purl, twitter?
05:12 purl twitter is just designed wrong
05:12 jimmy particle++
05:12 particle hinrik: i'm him, and i'm pod-formatting my draft *right now*
05:12 pmichaud purl:  no, twitter is http://twitter.com/rakudoperl
05:12 purl okay, pmichaud.
05:13 Hinrik oh, I see
05:13 pmichaud purl:  rakudo twitter is http://twitter.com/rakudoperl
05:13 purl OK, pmichaud.
05:14 Hinrik what Pod formatter is being used to turn S26 into HTML?
05:15 jimmy pmichaud: how to build the result at  http://nopaste.snit.ch/14916 ?
05:16 particle Hinrik: it's written in perl 5 pod, but i've no idea
05:16 Hinrik particle: no, it's written in Perl 6 pod :)
05:17 particle jimmy: tools/test_summary.pl
05:17 Hinrik all the other ones are written in Perl 5 pod
05:17 particle hinrik: ah, my mistake, i confused 26 and 29
05:17 particle i think damian wrote a cpan module for it
05:17 jimmy where is S26?
05:17 purl S26 is http://perlcabal.org/syn/S26.html
05:17 jimmy purl++
05:18 Hinrik ah, Perl6::Perlpod I presume
05:18 Hinrik Perldoc, even
05:23 allison joined #parrot
05:25 jimmy Can't open perl script "t/spec/fudgeall": No such file or directory ,where is it?
05:25 jimmy fudgeall ?
05:25 pmichaud jimmy:  do "make t/spec" first.
05:27 jimmy pmichaud: thanks,http://svn.pugscode.org/pugs/t/spec/ is what i want
05:29 ffwonko joined #parrot
05:40 petdance joined #parrot
05:44 petdance Is anyone lookin' at the Intel parallel-supporting compilers?
05:47 particle as in icc?
05:47 particle occasionally, but not regularly
06:05 Theory joined #parrot
06:31 GeJ /win 5
06:48 Hadi joined #parrot
06:48 Hadi left #parrot
06:59 TonyC joined #parrot
07:11 uniejo joined #parrot
07:41 dalek r33824 | pmichaud++ | trunk:
07:41 dalek : [rakudo]: spectest-progress.csv update: 240 files, 5004 passing, 1 failing
07:41 dalek : Failure summary:
07:41 dalek :     S04-statements/given.rakudo 17 - should not fall into default in this case
07:41 dalek : NOTE:  This update also changes the ordering of columns in the file,
07:41 dalek : see the new headers line for the new ordering.
07:41 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33824
07:43 dalek r33825 | pmichaud++ | trunk:
07:43 dalek : [rakudo]:  Updates to test_summary.pl and progress-graph.pl scripts.
07:43 dalek : * Revise the summary output to be csv compliant (easier spreadsheet import)
07:43 dalek : * Reorder columns
07:43 dalek : * Update progress-graph.pl to use new column ordering and labels
07:43 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33825
07:50 petdance particle: I ask 'cause there's a newer release just came out and it is supposed to be much better at parallelization.  Also only runs on Windows & Linux and they have no p.lans to move to the Mac.
08:03 * particle wonders how much faster spectest would run if we could cache the emitted parse|past for the tests
08:03 particle ...and wanders in to bed &
08:03 particle 'course, we'd still have to parse the parse|past
08:04 particle so maybe convert emitted pir to bytecode?
08:04 iblechbot joined #parrot
08:45 Hadi joined #parrot
08:45 Hadi left #parrot
09:10 Hadi joined #parrot
09:12 dalek r33826 | cotto++ | trunk:
09:12 dalek : [imcc] whitespace fix
09:12 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33826
09:21 bacek joined #parrot
09:30 gaurav joined #parrot
09:42 bacek hi there
09:42 purl hey, bacek.
09:42 bacek congratulations everyone!
09:48 Theory joined #parrot
09:54 alvar joined #parrot
10:05 cotto yay!  congratulations us!
10:05 cotto what's the occasion?
10:08 moritz I suspect rakudo passing 5k spectests
10:08 ffwonko joined #parrot
10:11 bacek moritz: indeed
10:13 bacek moritz: will you mind to apply patch from #61210?
10:14 moritz bacek: will do
10:14 bacek moritz: thanks
10:15 tomyan joined #parrot
10:16 bacek moritz: and don't forget to run autounfudge. It will give few passing tests more :)
10:17 kj joined #parrot
10:17 moritz bacek: running spectest now...
10:24 dalek r33827 | fperrad++ | trunk:
10:24 dalek : [Lua]
10:24 dalek : - fix test io_33
10:24 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33827
10:24 bacek moritz: ok. autounfudge should be run with --unskip. It doesn't epicly fail with this patch. It just fail is some cases
10:24 bacek e.g. S29-str/chomp.t
10:25 dalek r33828 | fperrad++ | trunk:
10:25 dalek : [Lua]
10:25 dalek : - fix many tests (just a stupid typo)
10:25 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33828
10:30 dalek r33829 | moritz++ | trunk:
10:30 dalek : [rakudo] Test.pm fix calls to proclaim() in is_deeply, bacek++
10:30 dalek : Patch courtesy by Vasily Chekalkin. Closes RT #61210.
10:30 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33829
10:45 nopaste joined #parrot
10:45 TonyC joined #parrot
10:47 bacek joined #parrot
10:58 ruoso joined #parrot
11:01 Lorn joined #parrot
11:31 jonathan Woo, we made over 5000! :-)
11:35 sjn yay! \o/
11:35 bacek rakudo: my @a; @a = 1;
11:35 polyglotbot RESULT[[1]]
11:35 bacek hm...
11:35 bacek rakudo: my @a; @a = 1, 2;
11:35 polyglotbot RESULT[[1, 2]]
11:35 bacek rakudo: my @a; @a ,= 1, 2;
11:35 polyglotbot OUTPUT[get_iter() not implemented in class 'Integer'␤current instr.: 'prefix:=' pc 16420 (src/builtins/misc.pir:17)␤called from Sub '_block11' pc 38 (EVAL_12:21)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc
11:35 polyglotbot ..1216 (src/PCT/HLLCompiler.pir:669)␤called from S...
12:29 ffwonko joined #parrot
12:48 masak joined #parrot
14:00 jonathan pmichaud: ping
14:00 pmichaud pong
14:00 jonathan OH HAI
14:01 jonathan So, I want to dig into doing some of the Hague Grant stuff. :-)
14:01 jonathan Namely, I want to start on registering stuff in the namespace as we compile.
14:01 jonathan We've talked a bit before about putting some kinda "place holder" thingy in the NS.
14:02 jonathan Did you have any more thoughts on the nature of that?
14:02 pmichaud it doesn't have to be anything special, I don't think.  Even  Bool::True would be sufficient.
14:02 jonathan Like, do we have a UnderConstructionProto that, say, throws an exception if you call .new on it?
14:02 jonathan Well, I wanted to put something a little bit more substantial in.
14:03 jonathan Most notably, I think to do this right, we need to put something in that does the Abstraction role.
14:03 pmichaud sure, but we need to know what that "more substantial needs to do"
14:03 jonathan I think we know that you're not going to be allowed to instantiate it or do it, in the case of classes and roles.
14:03 pmichaud ...but it's not going to live for very long.
14:03 jonathan But when we get to having BEGIN blocks inside classes, I think it's fair enough that you should be able to introspect what is constructed so far.
14:04 jonathan The "does Abstraction" is the important thing to me.
14:04 jonathan Because that's how we can say "is the thing in the namespace a type".
14:04 jonathan As opposed to, say, a sub.
14:04 pmichaud this sounds fine to me.
14:05 jonathan Would going so far as subclassing proto make sense?
14:05 jonathan And overriding the things you're not allowed to do yet to throw exceptions?
14:06 pmichaud I don't know that you need to subclass proto
14:06 pmichaud it might be simpler to just create a UnderConstructionProto class (normally)
14:06 pmichaud the methods in that class will override the built-in protoobject ones anyway (such as .new)
14:06 jonathan True.
14:06 pmichaud I'd start with that
14:07 jonathan OK.
14:07 jonathan I also wanted to ask about metaclass stuff.
14:07 pmichaud if there's something where we really need it to be a subclass of Proto, then we can easily switch.  But I'd rather this not be the only case where we're subclassing proto
14:07 pmichaud i.e., if we don't have to do it, let's use the same model that all the other classes use.
14:07 jonathan OK, makes sense.
14:07 pmichaud okay, metaclass stuff.
14:07 purl metaclass stuff is goggley gook that only moose devs will use.
14:08 pmichaud <-- uses metaclasses.  Not a moose dev.  (moose++)
14:08 jonathan We need to build classes using the metaclass interface.
14:08 jonathan So we can make knowhow etc work.
14:08 pmichaud what exactly is 'knowhow' ?
14:09 jonathan knowhow lets you (I will probably epic fail on the terminology here) define a new type of metaclass.
14:09 jonathan Perl 6 has a default one, which the "class" keyword uses.
14:10 pmichaud okay.  iiuc, while supporting knowhow is a key goal for smop, it's not high-priority in-and-of-itself for rakudo at the moment (more)
14:10 jonathan I think the idea is that you can add a new package_declarator (through macros, but we pondered something nicer).
14:10 pmichaud that said, I agree that we want to implement the metaclass interface for the metaclass(es) we do have.
14:11 jonathan My position is...
14:11 jonathan * I don't really need knowhow itself just yet either
14:11 jonathan * We should try and work towards matching the interface so knowhow will be trivial later on
14:12 jonathan * And I want to use !^dispatch on the metaclass to handle dispatching
14:12 pmichaud I think we're saying the same thing (thus far)
14:12 jonathan Er, ^dispatch
14:12 jonathan erm, what the API says :-)
14:13 jonathan Basically, I need to do some stuff on dispatch, and I think it'd make sense to do it in the way that it looks like things are headed.
14:13 pmichaud agreed, totally.
14:13 jonathan I'm still pondering exactly what that dispatcher will handle precisely.
14:13 jonathan (Like, where conceptually does auto-threading belong. I don't think it's in there.)
14:14 pmichaud that's okay, we do at least know that we need the metaclass interface
14:14 pmichaud seems to me like it belongs in P6object
14:14 jonathan dispatch?
14:14 purl dispatch is done by _DISPATCH
14:14 pmichaud no, metaclass interface
14:14 pmichaud metaclass interface belongs in P6object
14:14 jonathan Well, this is the other question I had.
14:14 jonathan There is going to end up being some Perl 6 specific stuff in the metaclass.
14:14 gryphon joined #parrot
14:15 pmichaud ...like?
14:15 jonathan Like, the dispatcher is going to have to know about submethods.
14:15 jonathan And callsame, blah.
14:15 jonathan Plus compose_role will have Perl 6 specific stuff.
14:15 pmichaud my gut is that we can do P6object without too much of that Perl 6 specific stuff in the metaclass, but I don't know the details well enough to say for certain
14:16 jonathan Like, the type non-conflict trixy stuff.
14:16 jonathan (two attrs of the same name don't conflict if the types match exactly...)
14:16 jonathan I can say for certain that there will be Perl 6 specific stuff.
14:16 jonathan I can't see any way there wouldn't be.
14:17 pmichaud ...in which case I would want to subclass P6metaclass
14:17 jonathan The question is, how much is too much?
14:17 jonathan Right. That's what I was expecting.
14:17 jonathan How hard is that?
14:17 pmichaud shouldn't be hard at all.
14:17 pmichaud at minimum all one has to do is override .HOW
14:17 jonathan On the metaclass, or somewhere else?
14:17 pmichaud I don't remember the details at the moment (more)
14:18 jonathan Like, how do I use my subclass?
14:18 jonathan Ah, OK.
14:18 pmichaud but I do know that I was expecting that P6metaclass could be subclassed -- that was kinda the point.
14:18 pmichaud oh, yes.
14:18 pmichaud easy.
14:18 jonathan OK, good.
14:19 pmichaud you create an instance of RakudoMetaclass, it overrides 'new_class' method, and you use that object instead of the P6metaclass object we currently keep in p6meta/$!P6META
14:19 pmichaud then all of the metaclass interface is in terms of RakudoMetaclass
14:19 pmichaud (and it can inherit from P6metaclass as appropriate)
14:19 pmichaud anyway, that's the general approach.
14:19 jonathan Ah, great.
14:19 jonathan Yes, I'm quite sure I can work out any details.
14:20 pmichaud but to the extent that we can, I'd like P6object to support the "generic" metaclass interface
14:20 jonathan *nod*
14:20 pmichaud i.e., those things that aren't terribly Perl 6 specific
14:20 jonathan OK, I will keep that in mind.
14:20 jonathan knowhow P6Metaclass ;-)
14:21 pmichaud right.  :-)
14:21 jonathan OK, sounds good.
14:21 jonathan I guess the only other thing I now need to figure out is what we stick in the NS when compiling a sub...
14:22 jonathan (So we can do re-definition detection, auto-multi stuff when a proto is in scope, etc)
14:22 pmichaud I think the same general idea, but I'd focus on types first.
14:22 pmichaud I'd wait to do subs until after types are working.
14:22 jonathan Oh, sure, it comes second.
14:22 jonathan UnderConstructionSub is likely.
14:23 pmichaud and re-definition detection really needs to come also from the NameSpace PMC
14:23 jonathan Hmm.
14:23 pmichaud because sometimes we'll be loading pre-compiled subs
14:23 jonathan Oh, I see what you mean.
14:23 pmichaud so if we try to add a sub and one already exists, we should get an exception.
14:24 jonathan Ahhhh...yes, good point.
14:24 pmichaud (if we try to add a multi, it should silently dtrt)
14:24 jonathan We could easily have our own namespace PMC to do whatever we wanted, if we had .HLL support...
14:24 pmichaud yes, I'm expecting that is what we will end up doing.
14:24 pmichaud because we have other operations that need to be performed on namespaces as well
14:25 jonathan Yup.
14:25 pmichaud in fact....
14:25 purl in fact is an 8% savings in developer time ... caseu "Moose" is shorter to type than "Object"
14:25 jonathan OK, seems like we're agreeing on stuff. :-)
14:25 moritz purl: forget in fact
14:25 purl moritz: I forgot in fact
14:25 pmichaud it's entirely possible that UnconstructedTypeProto is really just a RakudoNameSpace PMC
14:25 pmichaud because it also needs to do package stuff as well _anyway_
14:26 jonathan Hmm. True.
14:26 pmichaud but that's something that's easily tweaked as we get into implementation details and guts
14:26 jonathan Sure.
14:27 jonathan BTW, I think I've also figured out how to very muchly unify multi-dispatch and parametric roles.
14:27 PerlJam pm: Is there a way to specify unicode characters to PCT in the grammar?  I want to do something like <ws-[\u2345\u2346]>
14:27 jonathan (At the implementation level.)
14:27 pmichaud perljam:   <ws-[\x2345\x2346]>    might work
14:27 jonathan Which, if I can pull it off, would make me quite happy. :-)
14:28 pmichaud PerlJam: I don't know if \x  is supported in [...] yet
14:28 pmichaud PerlJam: also, I think it now has to be  <+ws-[...]>
14:28 pmichaud (to do a composition)
14:28 PerlJam okay
14:28 pmichaud jonathan: it would make me very happy also
14:29 pmichaud PerlJam: you can certainly do   token badchar { \x2345 | \x2346 }    and then  <+ws-badchar>
14:29 pmichaud but it would be better to use the [...] form if that works.
14:29 masak pmichaud: ooh, I'll have to remember that trick.
14:30 pmichaud reading the code... PGE doesn't yet support \x in character enums
14:30 pmichaud I should make it do so.
14:30 pmichaud (not too hard to do)
14:31 pmichaud out of curiosity, what are you hoping for <+ws-[\x2345\x2346]>  to do?  That construction looks a bit weird to me, depending on how ws is being defined
14:33 PerlJam pm; <ws> would contain all whitespace characters, the other thing would just be a couple of characters less.
14:33 pmichaud <ws> doesn't mean "all whitespace chars" by default, though.
14:33 pmichaud (granted you can make it do that.)
14:33 PerlJam sure, but I'm going to try to make it so
14:34 pmichaud okay
14:34 pmichaud part of the issue is that  <+ws-[\t]>   does *not* mean "all whitespace characters except tab" when using standard-like definitions of <ws>
14:35 pmichaud in particular,  <+ws-[\t]>   would still match   "   \t   "
14:35 PerlJam Is there a way to do that with the standard <ws> def?
14:36 pmichaud the difference is that <ws> means "zero or more ws chars"  while -[\t]  effectively means "not a tab"
14:36 pmichaud i.e., -[\t] is a single character matcher, but <ws> is a multi char matchers
14:36 PerlJam right.
14:36 PerlJam but is there a way to "look inside" ws at the character classy parts and remove one or two?
14:37 pmichaud inside of the ws rule, you can specify that you want to match \s but not \t
14:37 pmichaud no, not really -- at least not that I can think of at the moment.
14:37 PerlJam Hmm.
14:38 dalek r33830 | kjs++ | trunk:
14:38 dalek : [pirc] some refactoring of the reg.allocator. Reg.allocator is now run after each sub, instead of after the parse.
14:38 dalek : + this can improve memory usage
14:38 dalek : + it should be slightly faster I think
14:38 dalek : + it allows to update the actual register usage in the current_sub, which is needed.
14:38 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33830
14:39 pmichaud first cut at improved .sort:
14:39 pmichaud > my %h = <a 7 b 1 c 4 d 3 e 8>;  say %h.pairs.sort({ .value }).perl;
14:39 pmichaud [("b" => "1"), ("d" => "3"), ("c" => "4"), ("a" => "7"), ("e" => "8")]
14:39 PerlJam that seems problematic in the general case.  In order to effectively use character classes in a set-like fashion, you need to know the implementation details of the rules you're adding/subtracting
14:39 PerlJam pm: cool.
14:39 pmichaud PerlJam: no, you just need rules that represent single characters instead of "one or more"
14:40 pmichaud <+space-[\u2345]>*     # works fine
14:41 pmichaud <+alpha-[aeiou]>   # works fine
14:41 masak pmichaud: re .sort: cool
14:41 pmichaud <+ident-[aeiou]>  # probably not what you expect.
14:42 pmichaud however, one can also do:
14:43 pmichaud [ <ident> && <-[aeiou]>+ ]   # identifiers not containing a vowel
14:43 pmichaud and that works just fine.
14:43 PerlJam && is actually implemented?
14:43 pmichaud > my %h = <a 7 b 1 c 4 d 3 e 8>;  say %h.pairs.sort({ .key }).perl;
14:43 pmichaud [("a" => "7"), ("b" => "1"), ("c" => "4"), ("d" => "3"), ("e" => "8")]
14:44 pmichaud I know && was implemented at one time, yes.  I don't know how well tested it is, as it hasn't been often used
14:44 pmichaud but for your example, you can have    [ <.ws> && \X2345* && \X2346* ]
14:44 cognominal joined #parrot
14:44 pmichaud which is "whitespace but not if it contains \x2345 or \x2346"
14:45 pmichaud afk for a bit
14:54 dalek r33831 | fperrad++ | trunk:
14:54 dalek : [Lua]
14:54 dalek : - fully disable traceback (see segfault in RT #60206)
14:54 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33831
15:01 lathos I don't understand Moose.
15:10 masak lathos: I don't either. but the parts I've used I like very much.
15:10 moritz masak: does p5w use Moose?
15:10 lathos I mean I don't understand why anyone would use it.
15:10 masak seems like a stable, powerful, easy-to-use object system.
15:10 masak moritz: no, not yet.
15:11 masak moritz: (zarah does, however.)
15:11 moritz lathos: so what would you use instead? plain blessed hashrefs?
15:11 lathos No.
15:11 lathos People don't program in an object system, they program in a language. If I want a language that has a stable powerful easy-to-use object system I use Ruby or Perl 7.
15:11 lathos 6
15:11 lathos (Sssh, sekrit)
15:12 masak lathos: I like the combination of Perl 5 and Moose, that's all.
15:12 lathos Fair enough. I shall continue to not understand you. :)
15:12 moritz lathos: I don't see why an object system can't or shouldn't be a library, just like regex engines are in many programs
15:12 masak lathos: understanding is not a prerequisite to using my software. :)
15:13 lathos That's OK, I don't use your software. :)
15:13 masak that's ok too.
15:13 masak but if you would, you wouldn't have to understand me. that's my point.
15:13 lathos I don't *have* to understand you. I just *don't* understand you...
15:13 masak sometimes I don't, either. :)
15:14 tewk_ pmichaud: proto 'infix:!='  is equiv('infix:==')   { ... }
15:14 tewk_ arge quotes here messing me up?  this is an old grammar, ecmascript.
15:14 tewk_ I thought I'd help out PerlJam
15:15 pmichaud I think the quote forms still work
15:15 pmichaud but it should be easy to switch to whatever rakudo is currently using (and we know that works)
15:16 tewk_ is it deprecated? not a best practice.
15:16 tewk_ rakudo doesn't have them
15:16 pmichaud I'm not sure if it's deprecated or not.  I haven't officially deprecated it.
15:16 pmichaud PGE and Perl6Grammar might accept things that wouldn't be standard Perl 6.
15:16 pmichaud (because they may be used to implement languages where the Perl 6 syntax doesn't really make sense.)
15:17 pmichaud that said, obviously the Perl 6 syntax will always work.  :-)
15:17 pmichaud so I'd recommend it if possible.
15:19 AndyA joined #parrot
15:19 jhorwitz joined #parrot
15:20 dalek r33832 | fperrad++ | trunk:
15:20 dalek : [Lua] complex
15:20 dalek : - fix __unm
15:20 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33832
15:20 tewk_ pmichaud: proto infix:<==>  is precedence('m=') is pasttype('chain') { ... }
15:20 tewk_ is that the == operator.
15:21 tewk_ I bet I need :<  > now
15:22 pmichaud no, you don't
15:22 pmichaud yes, infix:<==>  is the == operators
15:22 pmichaud but in Parrot it's still written as the "infix:==" sub
15:22 pmichaud I haven't decided whether/how to change this.
15:24 PerlJam pmichaud: it could be infix:'==' too ?
15:25 pmichaud PerlJam: I don't think it accepts that syntax, no.
15:25 pmichaud originally PGE always used the "infix:==" syntax
15:25 chromatic joined #parrot
15:25 pmichaud but TimToady has a strong aversion to that, and of course it's not standard Perl 6
15:26 pmichaud so I added the infix:<...>   and infix:«...» syntaxes, which simply remove the angles
15:26 pmichaud the reason PGE didn't start out using the angles in the first place is that it's a pain to map angles
15:27 pmichaud for example,   infix:<+>, infix:<<+>>, infix:«+»   are all the same thing in Perl 6
15:27 pmichaud so I went with a "canonical" representation where the angles didn't matter.
15:28 pmichaud I'm getting a new rakudo spectest failure...
15:28 pmichaud t/spec/S02-builtin_data_types/arr               45    1   2.22%  19
15:28 tewk_ Ok I think ' ' quotes work just fine, cardinal uses them
15:32 tewk_ ahh but cardinal uses << >> to encompass operators such as <= and >=
15:33 PerlJam pm: btw, it looks like PGE has infix:& but not infix:&&
15:35 jan joined #parrot
15:36 jonathan particle: re parse submethod declarations - I vastly prefer that we don't parse stuff that we don't implement...
15:37 PerlJam jonathan: maybe he's going to implement them too :-)
15:42 AndyA joined #parrot
15:45 nopaste "pmichaud" at 72.181.176.220 pasted "fun with sort" (34 lines) at http://nopaste.snit.ch/14918
15:46 Wknight8111 joined #parrot
15:46 masak pmichaud++
15:47 tewk_ nevermind, the assignment operators were not part of the optable so it was eating the first = of my == operator
15:47 jonathan pmichaud++ indeed
15:47 jonathan Is that spec'd? ;-)
15:47 jonathan If not, it should be!
15:48 pmichaud if I add a test for it, it will be.  :-)
15:48 jonathan Yay!
15:48 jonathan Block that thang.
15:48 pmichaud (yes, p6l could choose to reject this particular form.)
15:48 jonathan *blog!
15:48 pmichaud just waiting for spectest to finish so I can ci.
15:48 jonathan (what they don't know can't hurt them)
15:48 jonathan ;-)
15:48 pmichaud well, if I blog it, they're likely to learn about it.  :-)
15:48 masak jonathan: I'll put something in S29 about that way to .sort early next week
15:49 jonathan Great. :-)
15:49 masak jonathan: ...along with a lot of other planned S29 improvements.
15:49 masak pmichaud: better not tell p6l, then :P
15:49 pmichaud masak: I think the semantics should be that 2-argument closures represent comparisons (that return Increase, Same, Decrease) -- all others are closures that are used to get the values that are used in the comparison
15:50 * masak makes note of that
15:50 pmichaud if not that, then 0-arity and 1-arity closures represent "get the value", 2-arity closures are "comparison function", everything else is ???
15:50 Tene pmichaud: what would a 3-argument closure to sort do?
15:50 pmichaud Tene: see "???" I just wrote.  :-)
15:50 Tene how can 0-arity get a value?
15:50 pmichaud { .abs }    # 0 arity
15:51 pmichaud (because the $_ parameter is optional)
15:51 pmichaud and I don't want to force people to write  { $^a.abs }  to get a 1-arity closure
15:52 pmichaud also, one could do something like    { rand() }     :-P
15:52 pmichaud which doesn't require any arguments, but would sort the list into random order :-)
15:53 jonathan pmichaud: 2 * rand() is rand returns between 1 and 0 ;-)
15:53 jonathan or rand() > 0.5
15:53 * jonathan has actually used this in Perl 5. :)
15:53 dalek r33833 | jonathan++ | trunk:
15:53 dalek : [rakudo] Add Abstraction role.
15:53 pmichaud hmmm?
15:53 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33833
15:54 jonathan pmichaud: Oh, I see
15:54 jonathan You've giving the value to sort on. :-)
15:54 jonathan Cunning!
15:54 pmichaud yes.
15:54 jonathan Perl 6 FTW.
15:54 pmichaud what's more, unlike   { foo($^a) cmp foo($^b) }    --- something like  { foo($^a) }    would compute foo(...) of each value only once for the entire sort, instead of on each comparison.
15:55 pmichaud actually, I wrote it in Perl 6 to begin with...
15:55 pmichaud ##  Algorithm as Perl 6:
15:55 pmichaud ##      @!v     = @list.map($by);
15:55 pmichaud ##      @!slice = (0..^@list).sort: { @!v[$^a] cmp @!v[$^b]};
15:55 pmichaud ##      return @list[ @!slice ];
15:56 masak beautiful.
15:56 purl beautiful is a love thing
15:56 pmichaud where @list is the original list to be sorted, $by is the sub to use to compute the values.
15:56 jonathan What are @!v and @!slice attributes of?
15:56 pmichaud it's pseudo-perl6
15:56 jonathan Ah.
15:56 pmichaud I should probably get rid of the !'s
15:57 pmichaud ##      my @v     = @list.map($by);
15:57 pmichaud ##      my @slice = (0..^@list).sort: { @v[$^a] cmp @v[$^b]};
15:57 pmichaud ##      return @list[ @!slice ];
15:57 pmichaud oops, missed one.
15:57 pmichaud fixed.
15:57 Theory joined #parrot
15:58 Tene I wrote .assuming in Perl 6 first, then translated to pir.
15:59 masak .assuming is implemented!?!?
15:59 pmichaud masak: you need to watch http://twitter.com/rakudoperl  :-)
15:59 Tene masak: yes.  It took me like 2 minutes to implement after jhorwitz asked for it
15:59 masak I do, only not right now when I'm writing my exam.
16:00 masak Tene++
16:00 masak I should ask for more seemingly-difficult features, apparently.
16:00 Tene masak: yes, definitely.
16:00 pmichaud I would've thought .assuming was difficult.  Tene apparently knew differently.  :-)
16:00 pmichaud karma Tene
16:00 purl tene has karma of 329
16:01 pmichaud that looks prime, so I won't mess it up.
16:01 jhorwitz Tene: was banging my head against pdd22io issues last night.  still have to try .assuming...
16:01 Tene jhorwitz: it passes some tests, so I assume it's okay.
16:02 Tene 7*47
16:02 purl 329
16:02 Tene 331 is prime, though
16:02 pmichaud okay, 329 isn't prime, but it's still a cool set of factors :-)
16:02 jhorwitz excellent.  i have uses for it.  BWHAHAHAHAHA
16:03 pmichaud hmmm.   $tests.pass.assuming('ok')
16:03 pmichaud or
16:03 pmichaud &ok.assuming($tests.pass);
16:03 pmichaud Tene++ # clever, straightforward implementation of .assuming
16:03 pmichaud there, you just need one more karma to be prime :-)
16:04 pmichaud maybe implement ".is_prime"  :-)
16:04 Tene I spent 10 minutes banging my head against a typing mistake.
16:04 Tene method is_prime { return rand() > 0.5; }
16:04 masak Tene: I can see problems with that approach.
16:05 Tene with is_prime or .assuming?
16:05 chromatic Yes, but it's an O(1) algorithm.
16:05 masak is_prime
16:05 purl hmmm... is_prime is known imperfect.
16:05 masak works badly for large numbers, for one.
16:05 Tene See?  It's known imperfect.
16:05 * Infinoid gets an intermittant failure testing Tene's .is_prime on amd64, and automatically blames the GC
16:05 Tene Infinoid: very reasonable conclusion, but it's probably the JIT.
16:06 Infinoid heh.
16:09 Infinoid http://svn.pugscode.org/pugs/t/​examples/99problems/problem39.t
16:10 dalek r33834 | pmichaud++ | trunk:
16:10 dalek : [rakudo]:  Fix .list method on Mapping and Hash.
16:10 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33834
16:10 Tene masak: so what's your next item for me to implement?
16:10 masak um.
16:10 pmichaud would be nice to have infix:<cmp>  working on Pairs
16:11 * masak looks through the November RAKUDO comments
16:12 masak Tene: @$a
16:13 Tene Okay, I'll look into it.
16:13 dalek r33835 | pmichaud++ | trunk:
16:13 dalek : [rakudo]:  Add by-value sort for e.g.,     %hash.sort { .value }
16:13 pmichaud Tene:  need to fix the grammar to properly handle desigilname
16:13 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33835
16:13 masak Tene: also, unbreaking of %*ENV
16:13 pmichaud %*ENV is a nice challenging one, though.
16:13 pmichaud but actually....
16:13 masak there's a detailed RT ticket about it
16:13 pmichaud that will probably get fixed when I do postcircumfix:{ }
16:14 masak submethods, in particular BUILD.
16:14 pmichaud oh, wait.  It'll be fixed when we do postcircumfix:{ } w/proxies
16:14 jonathan masak: Those ones are on my task list...submethod needs dispatcher changes.
16:14 masak uh huh.
16:14 masak I guessed that.
16:15 jonathan masak: It's actually in my grant project plan to do 'em though. ;-)
16:15 masak I'm just indiscriminately spouting wish list items.
16:15 jonathan :-)
16:15 pmichaud have we recently reviewed RT tickets for things that can be closed?
16:15 pmichaud I suspect there may be a few.
16:15 Tene I know coke was doing it... don't know how far he got.
16:15 pmichaud oh, I meant rakudo tickets.
16:15 pmichaud (sorry for being unclear there :-)
16:16 masak Tene: if you run out of things to do, you can always search for RT tickets I opened. :)
16:16 pmichaud afk for a short bit
16:18 jonathan pmichaud: I did some kind of review and closed a few last Rakudo day, but there's likely more.
16:19 pmichaud another really good thing to do would be to get +Inf and -Inf working.
16:20 pmichaud (Inf should be a term or named_0ary, probably)
16:29 dalek r33836 | fperrad++ | trunk:
16:29 dalek : [Lua] mathx
16:29 dalek : - fix test on linux
16:29 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33836
16:30 jonathan pmichaud: Will it not just parse as a type name?
16:32 dalek r33837 | tewk++ | trunk:
16:32 dalek : [js] fixes for member_expression and optable assignment ops
16:32 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33837
16:34 PerlJam pm: the 0 and 1 arity sort subs always use infix:<cmp> ?   how would you affect a numeric comparison ?  (yes, the obvious answer is to provide your own 2-arity sub)
16:35 moritz PerlJam: cmp dwim's if both args are numeric
16:35 masak PerlJam: remember that Perl 6 cmp ain't Perl 5 cmp
16:36 PerlJam that seems ... odd.
16:36 masak the cmp from Perl 5 is spelled 'leg' in Perl 6
16:36 moritz PerlJam: not so odd if you remember that Perl 6's scalars carry type information
16:50 PerlJam how would you do  $max_length_string  = [...] @strings; ?  (utilize [op])
16:50 pmichaud $max_length_string = [max] map { .chars } @strings;
16:50 pmichaud or even
16:51 pmichaud $max_length_string = [max] @strings».chars
16:51 PerlJam pm: doesn't that give you length, but not the string that is the max length?
16:51 pmichaud (It might be .» instead)
16:51 PerlJam I want the string
16:51 pmichaud oh
16:51 pmichaud just a sec
16:51 masak PerlJam: @strings.sort({ .chars })[*-1]
16:52 masak PerlJam: or even @strings.sort({ .chars }).end
16:52 moritz pmichaud: both ». and .» are allowed
16:52 masak moritz: do they mean the same?
16:52 pmichaud $max_length_string = max( @strings, { .chars })    might work if we generalize what I did for sort to max
16:52 moritz masak: .end is the last index, not the last item
16:52 masak pmichaud: might be a good idea.
16:52 moritz masak: aye
16:52 masak moritz: ah. dang.
16:52 PerlJam masak: yes, I know sorting is an obvious method.  I'm thinkink that [op] could use a similar trick as sort just got I just haven't  thought it through yet  :)
16:53 masak moritz: are you sure?
16:53 purl You still have ALL THREE lifelines left!
16:53 pmichaud PerlJam: see above max(...)
16:53 moritz rakudo: say <a b c>.end
16:53 polyglotbot OUTPUT[c␤]
16:53 masak :)
16:53 moritz uhm
16:53 masak moritz: I implemented that.
16:53 PerlJam pm: yeah, I saw. I just have a nagging feeling about it for some reason
16:53 pmichaud max has basically the same signature as sort
16:54 pmichaud our List multi max( Ordering $by = &infix:<cmp>, *@values )   # out of date, but you get the picture
16:54 PerlJam pm: and I was thinking of applying it to [] as a general transform-but-keep-the-original
16:55 * pmichaud writes a journal post about .sort
16:55 masak (journal posts)++
16:55 moritz masak: S29:544
16:56 moritz Returns the final subscript of the first dimension; for a one-dimensional
16:56 moritz array this simply the index of the final element.
16:56 PerlJam pm: I mean, what you did for sort seems like it could be used other places.  It seems odd to repeat that work in all of those other places.  Maybe there's a one-place it could be done and all of those other places can use it.
16:56 pmichaud pj:  I agree.  I was thinking it should be part of the way we handle "Ordering" in general.
16:56 moritz masak: should I open a ticket?
16:56 masak moritz: 'For non-fixed dimensions (undeclared
16:56 masak or explicitly declared with C<*>), the actual last element is used.'
16:57 pmichaud i.e., instead of defaulting to infix:<cmp>, we have some other function that handles the case like this.
16:57 pmichaud then it could be used for max, min, sort, etc.
16:57 moritz masak: that desn't seem to make any sense to me
16:57 moritz masak: I'll ask p6l
16:57 masak moritz: good.
16:57 masak I can see a use for either behaviour.
16:58 moritz masak: returning either an index or an item based on some declaration magic feels weird
16:58 masak moritz: S02:1620
16:58 masak moritz: indeed.
16:59 moritz masak: so it seem sthat it should just read "the index of the actual last element is used."
17:00 masak moritz: well, from S02:1620 it seems that @foo.end and @foo[*-1] are equivalent.
17:00 moritz masak: $#foo returns the last index, not the last item
17:01 masak but @foo[*-1] returns the last item.
17:01 masak maybe we can agree that there is confusion in the specs on this. :)
17:01 moritz aye
17:02 masak ah, so S02 doesn't seem to imply that they are equivalent. at least not necessarily.
17:02 masak it just provides two common patterns for the two most common uses
17:03 moritz aye
17:03 masak I think you have convinced me.
17:04 masak but the description in S29 is still a bit zany, and could use an email to p6l
17:04 moritz well, if I don't get some feedback I'll just make the change I suggested
17:05 masak aye
17:38 iblechbot joined #parrot
17:39 Wknight8111 how many p6 spectests are passing today?
17:39 pmichaud 5004 as of midnight.
17:39 pmichaud (CST)
17:39 Wknight8111 excellent!
17:39 * purl plays air guitar
17:39 pmichaud I've been playing with .sort or there would be more.
17:39 Wknight8111 I'm trying to keep track of all the progress for the release
17:41 pmichaud http://use.perl.org/~pmichaud/journal/38080
17:42 jonathan pmichaud: Does {{ ... }} in a regex just put the PIR directly inline?
17:42 jonathan Or does it compile it as a sub and call it?
17:43 pmichaud compile as sub
17:43 pmichaud since it's a closure.
17:43 jonathan Aha.
17:43 jonathan OK. How do I fail?
17:43 pmichaud from within the {{  ... }} ?
17:43 jonathan Uh, that could be taken more than one way. :-)
17:43 jonathan Yes.
17:43 pmichaud there's not a good way to do that yet.
17:43 jonathan Ah.
17:43 jonathan What's the bad way?
17:43 pmichaud the interface for return values from called closures changed, and I haven't updated PGE to match
17:44 pmichaud perhaps I should just make a good way work
17:44 masak pmichaud: you should reply to educated_foo in fw's post and link to your post, too.
17:44 pmichaud the bad way is that returning a value from the closure stops the match (this was the S05 spec), so I would return on success and then <.fail>
17:44 pmichaud this is what happens in, say, the <.ws> token in Rakudo.
17:45 pmichaud so:   {{ return 1; }}  <fail>
17:45 pmichaud where return 1 indicates "yes, we found what we want"  and <fail> causes us to fail otherwise.
17:45 jonathan OK, I can't quite do that here, I think.
17:46 pmichaud in your case I would create a custom subrule.
17:46 pmichaud similar to what is done for <EXPR> and <quote_expression>
17:46 pmichaud i.e., write it in PIR to do exactly what you want.
17:46 jonathan <name> ...thingy to check it here... {*}
17:46 pmichaud I've also been thinking that it would be really nice if there was a way to fail a match from within an action method, but I'm not sure how to do that yet.
17:47 pmichaud if you do the custom subrule, it's
17:47 Tene pmichaud: "... we should do similar things for C and :"
17:47 pmichaud <name> <custom_subrule> {*}
17:47 pmichaud Tene:  thanks, pod doesn't work well in use.perl :-(
17:47 Wknight8111 Perl 6 is pretty fantastic
17:47 jonathan Yeah, but the custom subrule needs to know about name.
17:48 pmichaud oh, it's passed the current match object.
17:48 pmichaud as its first argument
17:48 jonathan STD.pm does it as an assertion, FWIW.
17:48 pmichaud so you just do   arg[name]
17:48 jonathan <?{{ ... }}>
17:48 pmichaud right, we don't have assertions yet, because we can't parse Perl 6.
17:48 jonathan Can we not have PIR assertions? ;-)
17:48 pmichaud We *could* create an assertion that runs PIR, yes.
17:48 pmichaud _that's_ doable quickly, and worthwhile.
17:49 jonathan That would be perfect.
17:49 pmichaud I can't do it right now -- would tomorrow be sufficient?
17:49 jonathan When we can parse Perl 6, I'll happily upgrade the PIR to Perl 6 at the same time.
17:49 pmichaud (or later today)
17:49 jonathan Ah, I was trying to get this working today... :-)
17:49 jonathan OK, I'll find a way around it for now.
17:49 pmichaud Tene++ # catching my errors
17:49 jonathan And then modify it to use assertions when you have time to do those.
17:51 pmichaud I will add it soon, though, because assertions are commonly requested, and being able to do them in PIR is good for $other_language_implementors who don't want the Perl 6
17:51 pmichaud (where "soon" means "today sometime, although possibly quite late")
17:53 masak these are indeed exciting times.
17:54 masak we hardly have time to try out all the features you throw on us! :)
17:54 PerlJam masak: it's ... almost ... like christmas  ;)
17:54 * masak says absolutely nothing.
17:55 Tene pmichaud: pct loops coming before release?
17:55 pmichaud Tene: don't know yet.  80% chance yes.
17:55 pmichaud it will depend on how many family-type interruptions occur today and tomorrow
17:56 * jonathan epicly breaks parsing
17:56 Tene I'm rather in a development sort of mood today.  Looking for something to procrastinate pdd review with.  :)
17:56 pmichaud Well, I just did .sort :-)
17:57 pmichaud (i.e., I'm in the same sort of mood. :-)
17:57 pmichaud and right now it's time for .lunch
18:03 masak .oO( @tasks.sort({ .lunch }) )
18:08 ruoso joined #parrot
18:18 davidfetter joined #parrot
18:27 dalek r33838 | Whiteknight++ | trunk:
18:27 dalek : [Book] Some updates to chapter 12 and some code examples to illustrate how some of the runcores operate.
18:27 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33838
18:32 peters joined #parrot
18:33 peters nopaste?
18:33 clunker3 http://pasta.test-smoke.org/ or http://paste.husk.org/ or http://nopaste.snit.ch:8001/ or http://rafb.net/paste or http://poundperl.pastebin.com/ or http://paste.scsys.co.uk/
18:33 purl hmmm... nopaste is at http://nopaste.snit.ch/ (ask TonyC for new channels) or http://rafb.net/paste or http://poundperl.pastebin.com/ or http://paste.scsys.co.uk/ or App::Nopaste or tools/dev/nopaste.pl or at http://www.extpaste.com/ or http://paste.scsys.co.uk (for #catalyst, #dbix-class, #moose  and others)
18:36 nopaste "peters" at 83.183.129.106 pasted "Unexpected resulr using a char range ("\r" ~~ token { <[\x00..\xFF]> })" (35 lines) at http://nopaste.snit.ch/14921
18:36 peters perhaps I'm missing something?
18:37 peters rakudo: ("\r" ~~ token { <[\x00..\x7F]> }) && say 'match'
18:37 polyglotbot RESULT[Method 'perl' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 29 (EVAL_14:16)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1216 (src/PCT/HLLCompiler.pir:669)␤called from Sub
18:37 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1392 (s...
18:37 peters rakudo: ("0" ~~ token { <[\x00..\x7F]> }) && say 'match'
18:37 polyglotbot OUTPUT[match␤]
18:38 tewk_ pmichaud: how do I say any character except \n * \ and /
18:40 Tene tewk_: negative character class
18:40 Tene <[^...]>
18:40 Tene should work
18:40 Tene or is that spelled <-[...]> now?
18:40 tewk_ tene++
18:41 Tene One of those two.
18:41 purl well, one of those two is probably what you want.
18:41 Tene or whatever
18:41 particle the latter
18:41 purl rumour has it the latter is better
18:48 geof joined #parrot
18:59 cognominal joined #parrot
18:59 jonathan Yay. Working Lowercase type names.
19:00 rindolf joined #parrot
19:00 rindolf Hi all.
19:05 jonathan hi rindolf
19:05 rindolf Hi jonathan
19:05 * jonathan ponders creating a branch for the changes he's working on
19:09 peters rakudo: ("\t" ~~ token { \x09 }) && say 'match'"
19:09 polyglotbot OUTPUT[Statement not terminated properly at line 1, near "\""␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤called from Sub 'parrot;Perl6;Grammar;eat_terminator' pc 27549 (src/gen_grammar.pir:3364)␤called from Sub 'parrot;Perl6;Grammar;statementlist' pc
19:09 polyglotbot ..26205 (src/gen_grammar.pir:2831)␤called from Sub 'pa...
19:09 peters rakudo: ("\t" ~~ token { \x09 }) && say 'match'";
19:09 polyglotbot OUTPUT[Statement not terminated properly at line 1, near "\";"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤called from Sub 'parrot;Perl6;Grammar;eat_terminator' pc 27549 (src/gen_grammar.pir:3364)␤called from Sub 'parrot;Perl6;Grammar;statementlist' pc
19:09 polyglotbot ..26205 (src/gen_grammar.pir:2831)␤called from Sub 'p...
19:09 peters rakudo: ("\t" ~~ token { \x09 }) && say 'match'
19:09 polyglotbot OUTPUT[match␤]
19:10 peters rakudo: ("\n" ~~ token { \x0A }) && say 'match'
19:10 polyglotbot RESULT[Method 'perl' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 29 (EVAL_15:16)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1216 (src/PCT/HLLCompiler.pir:669)␤called from Sub
19:10 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1392 (s...
19:10 * peters is confused
19:11 * jonathan wonders why it's looking for that...
19:11 jonathan peters: So am I. Something is very wrong there...
19:11 peters joined #parrot
19:12 * peters sorry lost connection
19:12 jonathan peters: That looks like a really quite odd bug...
19:12 allison joined #parrot
19:12 peters I thought so too
19:14 * peters is trying to write a p6 HTTP grammar
19:14 pmichaud it's looking for .perl because the bot tries to .perl the result if there's no output.
19:15 jonathan Ahhh!
19:15 jonathan That explains a lot.
19:15 pmichaud I don't know if ~~ token { ... }   works.
19:15 jonathan rakudo: ("\t" ~~ token { \x09 }) && say 'match'
19:15 polyglotbot OUTPUT[match␤]
19:16 jonathan It can work. :-)
19:16 pmichaud okay.
19:16 peters but it fails with \r or \n
19:16 peters works with NUL =)
19:16 pmichaud rakudo: ("\n" ~~ / \r /) && say 'match';
19:16 pmichaud rakudo: ("\n" ~~ / \n /) && say 'match';
19:16 peters http://nopaste.snit.ch/14921
19:16 polyglotbot RESULT[Method 'perl' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 29 (EVAL_14:16)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1216 (src/PCT/HLLCompiler.pir:669)␤called from Sub
19:16 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1392 (s...
19:16 polyglotbot OUTPUT[match␤]
19:16 pmichaud so far so good there.
19:17 pmichaud rakudo: ("\n" ~~ / \x0a /) && say 'match';
19:17 polyglotbot OUTPUT[match␤]
19:17 peters rakudo: ("\n" ~~ token { \x0A }) && say 'match'
19:17 polyglotbot RESULT[Method 'perl' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 29 (EVAL_15:16)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1216 (src/PCT/HLLCompiler.pir:669)␤called from Sub
19:17 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1392 (s...
19:17 pmichaud rakudo: ("\n" ~~ token { \x0a }) && say 'match'
19:17 particle short circuit
19:17 polyglotbot OUTPUT[match␤]
19:17 peters ahh
19:17 pmichaud ah, apparently it only understands the lowercase hex digis
19:17 pmichaud *digits
19:17 peters thanks =)
19:17 * pmichaud is surprised by that.
19:18 * particle too
19:18 * jonathan three
19:18 particle i wonder if i'm to blame for that error... odd.
19:19 pmichaud heh... yes, there it is -- only lowercase chars.
19:19 pmichaud fixing.
19:19 peters rakudo: ("\n" ~~ token { <[\x00..\xff]>  }) && say 'match'
19:19 pmichaud \x doesn't work inside of <[...]> yet.
19:20 polyglotbot RESULT[Method 'perl' not found for invocant of class 'PGE;Match'␤current instr.: '_block11' pc 29 (EVAL_14:16)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1216 (src/PCT/HLLCompiler.pir:669)␤called from Sub
19:20 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1392 (s...
19:20 peters ok
19:21 pmichaud so far only \n\r\t\f\a\e\0 work there.
19:22 peters rakudo: ("\n" ~~ token { \x0d | \x0a  }) && say 'match'
19:22 polyglotbot OUTPUT[match␤]
19:22 particle shouldn't be hard to get \x working without supporting \x[...]
19:22 peters ok, I could generate that range  ;)
19:22 pmichaud yes, but we already have a routine for \x[...]
19:22 pmichaud we really ought to be reusing it
19:22 particle true
19:22 pmichaud I haven't figured out a good place to put it
19:22 pmichaud I can make it part of PGE, I suppose, but...
19:22 pmichaud that feels funny.
19:23 particle indeed
19:23 particle subclass?
19:23 pmichaud subclass of what?
19:23 pmichaud it's really more like its own library.
19:23 pmichaud similar to the way P6object is a library for Perl 6 object behaviors
19:24 particle yeah.
19:24 pmichaud I may just put it into PGE for now.
19:24 pmichaud peters: btw,  you can use   token { \n }   to match a logical newline
19:25 pmichaud and unless you're doing unicode,   <[\x00..\xff]>  would be the same as .
19:26 peters true, but I need to specify several ABNF rules which has control character ranges
19:27 pmichaud well, you're the second person to inquire about <[\x...]> today, so it's moving up my priority list.  :-)
19:27 peters http://nopaste.snit.ch/14921 p6 grammar of ABNF (RFC 5234)
19:28 peters thanks =)
19:28 pmichaud <[\x00..\xff]>  is just .
19:28 pmichaud <[\x21..\x7e]>  is probably <print> or <graph>
19:29 peters does . matches unicode?
19:29 pmichaud yes, if you have one.
19:29 pmichaud but if the string is converted to fixed_8 beforehand, it won't be unicode.
19:30 pmichaud <DIGIT> | <[A..F a..f]>   is   <xdigit>
19:30 pmichaud <[\x21..\x7e]> is <graph>
19:31 peters thanks
19:31 pmichaud <[\x01..\x1f\x7f]>  is probably <cntrl> -- I don't know if <cntrl> includes \x00 though.
19:31 particle didn't realize we had <graph>
19:31 Wknight8111 a google image search for "rakudo spectest" returns a very inappropriate image, if your safe search is turned off
19:32 * pmichaud leaves his safe search firmly in the "on" state.
19:32 particle (:
19:32 pmichaud although the phrase "safe search is turned on" seems somehow oxymoronic.
19:33 Tene heh
19:33 chromatic Seatbelt fetishists.
19:33 chromatic They like Java too for some reason.
19:33 jonathan Oh, hmmm, yes. :-)
19:33 * pmichaud writes another blog post.
19:34 jonathan OH NO it's an animated gif!
19:34 jonathan Wknight8111: Don't check the animation...
19:34 Wknight8111 it has animation!?!?!
19:35 * Wknight8111 can't look at that while he's at work
19:35 particle save that talk for #perl
19:35 * jonathan suggests not looking...he wishes he hadn't.
19:36 jonathan Ugh. Lots of spectest fails.
19:36 * jonathan digs in to work out how he's messed up
19:37 pmichaud keep in mind that some spectests may be passing because rakudo incorrectly parses things as types (and they thus "work") afterwards
19:38 pmichaud this is also a problem for some tests that may be marked "todo"
19:38 pmichaud for example,  +Inf would currently parse (and could be marked "todo"), but would fail to parse when strict type naming is in place.
19:38 pmichaud and if it fails to parse, the whole file fails.
19:38 jonathan pmichaud: The test I'm looking at right now has *exactly* that problem.
19:39 jonathan Oh, it creates a fun point.
19:39 pmichaud right.  It's going to take some work to get typenames to be recognized.
19:39 jonathan #?pugs 2 todo "feature"
19:39 jonathan ok  Foo::Bar.isa(Class),    "subclass.isa(Class) is false";
19:39 bacek joined #parrot
19:39 jonathan There is no Class class...
19:39 jonathan Which I guess is what this is testing.
19:39 pmichaud but there is a Class type.
19:39 jonathan Oh?
19:39 pmichaud S02, S12, bunches of them have "Class"
19:40 pmichaud S02-bits.pod
19:40 pmichaud 947:    Class       Perl 6 standard class namespace
19:40 jonathan Ah, yes.
19:40 jonathan Oh, it's the type of the namespace?
19:40 jonathan what_goes_here ~~ Class to give true?
19:41 pmichaud I dunno.  But it's also mentioned as part of the signature for trait_auxiliary:is(...)
19:41 pmichaud 1423:    multi *trait_auxiliary:is(Class $base, Class $class; $arg?) {...}
19:41 jonathan Oh, that's...interesting.
19:43 * jonathan ponders what to do with tests like that for now
19:44 chromatic There's always fire.
19:45 pmichaud they currently pass?
19:45 jonathan Yeah, because Class now just hands back a Failure. :-)
19:45 jonathan Well, in trunk.
19:45 particle PerlJam++ svn1.5++ (sparse checkouts)++
19:45 pmichaud so, temporarily make Class do that.
19:46 jonathan Just install a Failure proto at startup under the name Class?
19:47 pmichaud sure.
19:47 jonathan (Class gives a failure because of the autovivification, just to be clear...)
19:47 jonathan OK
19:47 pmichaud or go ahead and create src/classes/Class.pir to do it
19:47 jonathan OK
19:47 jonathan Let me look at some other failures first.
19:47 pmichaud we know that Class will eventually exist -- making it a Failure for now is a good workaround.
20:01 peters is \n as in C or as in p5?
20:04 particle mac os line endings are not recognized
20:04 particle \n\r, that is
20:04 pmichaud in a regex, \n represents any line ending.
20:05 peters ok, same as p5 then?
20:05 pmichaud no.
20:05 pmichaud in p5, I think that \n represents only \x0a
20:06 pmichaud in p6 regexes, \n matches any logical newline, platform independent.
20:06 peters I thought \n was a "logical newline " that varies depending on whis os
20:06 peters .. in p5
20:06 particle \n is logical in p5
20:06 pmichaud according to S05:
20:06 particle it matches \r\n on windows
20:06 pmichaud C<\n> now matches a logical (platform independent) newline not just C<\x0a>.
20:06 peters ok, thanks
20:07 peters that means i can't use \n in my grammar
20:07 pmichaud not if you want to match only one octet, correct.
20:08 peters thanks
20:19 masak joined #parrot
20:29 jonathan rakudo: say eval('want')
20:29 polyglotbot OUTPUT[Null PMC access in get_string()␤current instr.: 'print' pc 15495 (src/builtins/io.pir:22)␤called from Sub 'say' pc 15517 (src/builtins/io.pir:32)␤called from Sub '_block11' pc 37 (EVAL_13:16)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub
20:29 polyglotbot ..'parrot;PCT;HLLCompiler;evalfiles' pc 1216 (src/P...
20:29 jonathan haha
20:29 * jonathan is finding some amusing reasons why tests once parsed
20:29 jonathan Or didn't explode
20:35 rindolf joined #parrot
20:38 * peters p6 is just beautiful, it contains everything (and feartures i didn't know I wanted) that I have longed for in p5
20:40 * jonathan makes a large reduction in the number of failures
20:45 davidfetter [--] @failures;
20:47 jonathan FAIL
20:47 jonathan (-- is not infix)
20:47 jonathan --<<@failures
20:47 particle @failures>>.--
20:47 Tene @failures.>>--
20:47 davidfetter heh
20:47 particle :D
20:51 cognominal jonathan, with the grant, you are working full time on parrot?
20:51 cognominal I mean rakudo
20:52 jonathan cognominal: No.
20:53 jonathan Between various grants I'm working quite a lot of the time on Rakudo and Parrot, though. :-)
20:53 jonathan Oh, this is a fun one.
20:53 jonathan regex B {\d+};
20:53 jonathan The test then does B.WHAT
20:53 jonathan Which tries to call B now.
20:53 jonathan I guess the test should be &B.WHAT
20:53 jonathan ?
20:53 jonathan Since regexes are just like subs...
20:53 particle methods
20:54 particle yes, should be &B imo
20:54 masak nice one.
20:54 jonathan OK.
20:54 particle (fixing tests)++
20:56 peters rakudo: ("failure" ~~ token { \x66 \x61 \x69 \x6c \x75 \x72 \x65 }) && say "success!"
20:56 polyglotbot OUTPUT[success!␤]
20:57 jonathan My oh my, this patch shakes out some things
20:57 jonathan is('1245' ~~ B, '1245', 'Match against regex');
20:57 jonathan Now fails.
20:57 * jonathan checks the synopses and wonders if this is one of those "dispatch on the form" things
20:58 tewk_ does <-[]> support escape characters
20:58 dalek r33839 | masak++ | trunk:
20:58 dalek : [rakudo] made .end return highest index, not last element
20:58 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33839
20:58 masak let it also be known that we have no spectests for .end -- at least no unfudged ones.
20:59 tewk_ I want to say anything but \n * \ /,  <-[\n*\\\/]>?
21:04 particle i don't think you need to escape / there
21:04 particle and yes, i believe that should work
21:04 particle rakudo: token foo { <-[\n*\\\/]>? }; say 1
21:05 particle rakudo: token foo { <-[\n*\\/]>? }; say 1
21:05 polyglotbot OUTPUT[1␤]
21:05 polyglotbot OUTPUT[1␤]
21:05 GeJ Good morning everyone
21:05 masak hej GeJ
21:07 jonathan hej hej
21:09 peters rakudo: ("failure" ~~  token { \x[66,61,69,6c,75,72,65] }) && say "success!"
21:09 polyglotbot OUTPUT[success!␤]
21:09 GeJ hej masak
21:10 peters nice syntax =)
21:10 GeJ morning jonathan
21:11 masak jonathan: so, which one do you think you'll do first, submethods or S09? :)
21:12 jonathan ...I'm doing S09?!
21:12 jonathan masak: submethods for sure though
21:12 * masak thought jonathan had dibs on S09
21:12 jonathan I'm doing typed arrays.
21:12 jonathan And typed hashes.
21:13 masak ok
21:13 jonathan That's one small part of the monster. :-)
21:13 masak we'll take turns on it :)
21:14 Hadi joined #parrot
21:14 peters token { 'typed' [<array> | <hash> ] }++
21:15 peters rakudo: my unint16 $foo = 10;
21:15 polyglotbot OUTPUT[Scope not found for PAST::Var '$foo'␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤called from Sub 'parrot;PAST;Compiler;post_children' pc 1853 (src/PAST/Compiler.pir:379)␤called from Sub 'parrot;PAST;Compiler;call' pc 4042
21:15 polyglotbot ..(src/PAST/Compiler.pir:1054)␤called from Sub 'parrot;PAST;Compiler;post_childr...
21:15 pmichaud it might be problematic to have rules named 'hash', since that's also a method on Match objects.
21:16 peters ok
21:16 peters token token { } # works =)
21:17 masak peters: yes, but don't do that :)
21:17 masak unless your in an obfu contest.
21:17 masak s/your/ypu're/
21:17 masak ga'h!
21:17 pmichaud it's not a problem of "keywords", it's an issue with "what methods do Match objects already have"
21:18 pmichaud because rules in a grammar are methods
21:18 peters masak: well blame RFC 2616 (HTTP) ;P
21:18 masak peters: fair enough.
21:18 peters masak: Svensk?
21:18 masak peters: aye
21:19 peters masak: nice, me too =)
21:19 masak cool.
21:19 masak which part?
21:19 purl the IMPORTANT part!
21:19 masak purl: nobody likes you.
21:19 purl masak: sorry...
21:20 peters south of sweden, Helsingborg.  You?
21:20 masak middle-right part. Uppsala.
21:21 peters Cool, are you a student?
21:21 jonathan is('1245' ~~ B, '1245', 'Match against regex');
21:21 masak peters: among other things, yes :)
21:21 jonathan pmichaud: In the above, what should happen?
21:21 jonathan If you have declared regex B { ... }
21:21 peters masak: =), CS?
21:22 jonathan It used to work because we were like "ah, it's uppercase, we'll get_hll_global it"...
21:22 jonathan Now we know it's not a type name, we don't...so it calls B without any parameters, which dies.
21:22 masak peters: no, Bioinformatics.
21:22 mberends joined #parrot
21:22 masak peters: you?
21:22 purl o/` You are what you is and you ain't what you not o/`
21:22 masak purl: forget you
21:22 purl masak: I forgot you
21:22 masak :)
21:22 * masak wishes
21:22 jonathan pmichaud: '12345' ~~ &B works of course.
21:23 peters masak: I work as a IT manager for Siba
21:23 jonathan pmichaud: But it's not clear to me from S03 if this is a "dispatch on the form" case.
21:23 masak sounds nice. they must have quite a bit of IT.
21:24 masak peters: what brings you to #parrot?
21:24 peters masak: true =)
21:24 peters masak: I have always liked p5
21:24 peters so the natural step would be p6
21:25 masak might be. :) I know I like it.
21:25 peters =)
21:26 peters I whish Siba would be more into opensource but they really like c# and old VB =(
21:27 masak somehow I'm not surprized.
21:28 * masak has a spelling malfunction today
21:28 Lorn joined #parrot
21:29 masak peters: allow me to unashamedly plug November the Perl 6 wiki, in case you haven't heard about it already.
21:30 masak peters: it's not yet ready for production use, but it's fun to work with, and it's a real working-today Perl 6 application :)
21:31 * peters googles
21:31 peters http://github.com/viklund/november/tree/master ?
21:31 Infinoid masak++
21:31 masak peters: that's it
21:31 peters cool =)
21:32 masak developed mostly in Uppsala and Vladivostok, as it happens
21:32 particle http://svn.pugscode.org/pugs/doc​s/Perl6/Spec/S19-commandline.pod
21:32 particle first draft in, time for lunch &
21:32 * davidfetter wonders how many russian names start with vladi-
21:32 masak particle++
21:33 jonathan davidfetter: Two come to mind immediately...
21:33 bacek davidfetter: 4-5 :)
21:33 bacek morning, good morning
21:33 masak bacek: evenin'
21:34 bacek masak: welcome from future :)
21:34 * davidfetter wonders what people would think of americans if we prefixed city names with conquest-
21:34 masak bacek: I'm glad I'm in the past. I need to finish this essay by tomorrow. :)
21:34 * Infinoid hails from conquest-#316512
21:35 masak davidfetter: it'd be kinda cool. for like 10 seconds.
21:35 davidfetter masak, that long?
21:35 Infinoid bacek: happy weekend
21:35 masak davidfetter: ...maybe.
21:36 peters sorry for my ignorance, why is there a need for a spec for @ARGV (argc, argv[]) processing?
21:37 masak peters: there's a need to spec everything in Perl 6.
21:37 masak so we know what to implement.
21:37 bacek http://lefigaro.ya.ru/replies.xml?item_no=1783
21:38 bacek Russian text: "Discussing manhatten distance" :)
21:38 bacek And I know this guys :)
21:38 masak small country, eh? :)
21:40 bacek masak: yeah. And photo actually made in Germany. (Or Austria may be...)
21:40 bacek small world
21:40 purl ... but I wouldn't want to paint it.
21:41 masak :)
21:41 bacek purl: good girl! :)
21:41 purl :)
21:41 peters masak: well, that doesn't IMHO justify a spec
21:41 masak peters: please elaborate.
21:41 Tene peters: it's "These are the options that Perl 6 will accept"
21:41 Tene Things like Perl 5's -e, -p, -I, -M, etc.
21:41 bacek afk
21:42 peters Tene: I understand that
21:42 Tene These need ot be specified so that all implementations consistently accept the same arguments to perform the same functions.
21:42 peters but I can see the usage for a "simple" spec, but aslong it leaves it to various implemenrarions to extend it
21:42 masak peters: of course.
21:42 purl Indubitably.
21:43 * peters to many beers
21:43 * peters can't spell right
21:43 masak I'm sober, and even I can't!
21:43 jonathan I didn't have dinner yet, let alone beer...
21:44 jonathan I am down to four spectests needing attention, however.
21:44 jonathan Unfortunately, even at that point I ain't sure if I can commit...
21:44 masak commit what?
21:44 jonathan (That is, once I sort those out.)
21:44 * masak is curious
21:45 jonathan masak: I'm working on registring classes etc in the namespace as we compile
21:45 masak enabling what?
21:45 jonathan class omgitstartswithalowercaseletter { } for one
21:45 masak OMG!
21:45 jonathan and sub OMGUPPERCASE { } for another :-)
21:45 masak omg!
21:46 jonathan But also things like, detecting redifinition of classes without using is also and is instead.
21:46 jonathan (OK, it explodes now...)
21:46 masak O RLY? what happens now, I wonder?
21:46 * masak tests
21:47 masak rakudo: class A {}; class A {}
21:47 jonathan rakudo: class A { }; class A { };
21:47 polyglotbot OUTPUT[Class A already registered!␤␤current instr.: '!keyword_class' pc 15002 (src/builtins/guts.pir:352)␤called from Sub '_block14' pc 117 (EVAL_13:47)␤called from Sub 'parrot;PCT;HLLCompiler;evalpmc' pc 830 (src/PCT/HLLCompiler.pir:475)␤called from Sub 'parrot;PCT;HLLCompiler;compile' pc 428
21:47 polyglotbot ..(src/PCT/HLLCompiler.pir:301)␤called from Sub 'parro...
21:47 polyglotbot OUTPUT[Class A already registered!␤␤current instr.: '!keyword_class' pc 15002 (src/builtins/guts.pir:352)␤called from Sub '_block14' pc 117 (EVAL_12:47)␤called from Sub 'parrot;PCT;HLLCompiler;evalpmc' pc 830 (src/PCT/HLLCompiler.pir:475)␤called from Sub 'parrot;PCT;HLLCompiler;compile' pc 428
21:47 polyglotbot ..(src/PCT/HLLCompiler.pir:301)␤called from Sub 'parro...
21:47 masak seems to work already.
21:47 jonathan Yeah, but we can detect it at compile time now. ;-)
21:47 masak oooh...
21:48 jonathan plus things like
21:48 jonathan my TypeThatDoesNotExist $x;
21:48 masak nice!
21:49 masak rakudo: my TypeThatDoesNotExist $a; say $a.defined
21:49 polyglotbot OUTPUT[0␤]
21:49 masak I look forward to those.
21:49 jonathan Aye.
21:49 jonathan I fear I need to properly fix use to both happen at compile time *and* not break pre-compiled modules before I commit this, though.
21:49 jonathan (Which I expected, and scribbled on my project plan for the grant...)
21:50 masak yes, please. no breaking of pre-compiled modules if it's at all avoidable.
21:50 peters rakudo: sub foo { }; sub foo {}; say "ok";
21:50 polyglotbot OUTPUT[ok␤]
21:50 jonathan peters: I'll also such things for subs in the future too. :-)
21:50 masak peters: nice one. that's a bug.
21:51 * masak submits rakudobug
21:51 peters =)
21:51 jonathan Yay, file a ticket! I can have the pleasure of closing it.
21:51 jonathan In a week or so...
21:51 jonathan Hopefully. :)
21:51 masak peters: jonathan and I have a competition, you see. I open tickets and he closes them.
21:51 masak peters: so far I'm winning. :)
21:51 peters hehe
21:53 masak but jonathan and pmichaud makes it up by being enormously productive. this week, they implemented something like 10 new significant features.
21:53 masak jonathan++ pmichaud++
21:53 peters nice =)
21:53 jonathan I think I might put this stuff I'm doing in a branch.
21:54 * masak has a nagging feeling he has reported that bug before...
21:54 jonathan I'm building up quite a diff...and if I've gotta do use etc.
21:54 chromatic When we have our Parrot 1.0 retrospective, my biggest handwriting is for "Force multipliers".
21:58 masak chromatic: I needed to google that. oh, military jargon.
21:58 peters not sure I dare to try it here but: rakud: token bar { }; token bar {}; #hangs on my GF's win32 machine
21:58 peters s/rakud/rakudo/
21:59 masak peters: I get 'Could not find non-existent sub bar'
21:59 * peters has a svn export from last night
22:00 masak that's _old_! :)
22:00 peters rakudo: token bar {}; token bar {};
22:00 polyglotbot OUTPUT[Could not find non-existent sub bar␤current instr.: '_block11' pc 24 (EVAL_13:14)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1216 (src/PCT/HLLCompiler.pir:669)␤called from Sub
22:00 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1392 (src/PCT/HLLCompiler.pir...
22:00 peters good =)
22:00 masak my Rakudo build is 3,5 h old :)
22:01 jonathan mmm...bar...that's where they serve beer...
22:01 * jonathan needs to eat!
22:01 jonathan bbiab
22:01 masak beer is food.
22:02 * peters needs to pay attention to GF or she will not be happy
22:02 peters Good night folks, I'll be back later
22:03 allison joined #parrot
22:03 masak peters: 'night
22:03 peters left #parrot
22:03 mj41 Beer is liquid bread. Good night from Czech republic.
22:03 masak mj41: pivo :)
22:04 jonathan O, pijem rad pivo!
22:05 mj41 So do I.
22:06 * jonathan -> nom
22:06 masak jonathan: "I like to drink beer"? but to a Russian-speaker it looks like "Oh, to drink happy beer!"...
22:08 jonathan masak: It was meant to mean, "I like to drink beer" :-)
22:08 jonathan I think it might even be right, but my Slovak is sucky.
22:09 * jonathan really afk for a bit now
22:09 mj41 It seems ok to me.
22:09 masak jonathan: it might well be right. I just observed on how it looks to me who don't know Slovak.
22:10 masak "rad" means "glad" in Russian, as far as I know.
22:14 Hadi joined #parrot
22:14 Hadi left #parrot
22:21 Theory joined #parrot
22:27 dalek allison@perl.org | Debian chroot Setup:
22:27 dalek link: http://www.perlfoundation.org/par​rot/index.cgi?debian_chroot_setup
22:32 dalek r33840 | allison++ | trunk:
22:32 dalek : [docs] Update wiki link in Debian packaging guide.
22:32 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33840
22:36 pmichaud http://www.rakudo.org/2008/12/rak​udo-perl-now-passing-over-5.html
22:36 pmichaud afk for a bit
22:38 masak 5000++
22:38 gryphon joined #parrot
22:40 masak approximating from the graph, it appears we're passing as many spectests as we had sometime in early July.
22:40 uniejo joined #parrot
22:49 * jonathan returns
22:50 ruoso joined #parrot
22:57 dalek r33841 | jonathan++ | rakudoreg:
22:57 dalek : [rakudo] Create a branch to put my work on registering symbols, since the diff is getting big and I'll want to fix up some others things too (like use).
22:57 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33841
23:01 Limbic_Region joined #parrot
23:18 pmichaud masak:  that's correct
23:18 pmichaud on 2008-07-03 we had 4814 spectests
23:25 jonathan pmichaud: Any comments on my question about the smartmatch?
23:26 pmichaud sorry, I miseed the question.
23:26 pmichaud *missed
23:27 jonathan regex B { ... }
23:27 jonathan (ok, not really ... but something in there...)
23:27 jonathan "abc" ~~ B # does this work?
23:27 pmichaud Not as written
23:27 jonathan "abc" ~~ &B # or should it be this?
23:27 pmichaud it can't be B
23:27 jonathan Right.
23:27 jonathan That used to work.
23:27 pmichaud it could potentially be &B
23:27 pmichaud but that's not official spec yet
23:27 jonathan &B will work.
23:27 jonathan OK
23:28 pmichaud it's okay for it to be &B for now
23:28 jonathan So basically if I break "abc" ~~ B, it's not a big deal.
23:28 pmichaud it's not at all a big deal for me -- I've been warning about use of that idiom for several weeks.
23:28 jonathan Great. I'll break it.
23:28 jonathan That's one less fail to worry about.
23:29 pmichaud "abc" ~~ B   effectively means the same as   "abc" ~~ B()
23:29 jonathan Right.
23:29 pmichaud which makes for an interesting looking smiley.
23:29 jonathan Which is, now I've got the registring of names and the updated typename rule, what it works as.
23:30 jonathan Guy wearing glasses preparing for a kiss?
23:30 pmichaud that, or some sort of monster with a wide mouth
23:34 jonathan OK, I'm a bit tired to do much more today
23:34 jonathan So, going to put what I've done so far in a branch.
23:36 pmichaud that sounds good.
23:36 pmichaud could you describe to me briefly what the data structure of the .WHENCE property is supposed to look like?
23:36 pmichaud e.g., for   Foo{ ... }   ?
23:37 AndyA joined #parrot
23:37 jonathan Is IIRC just a hash of attribute name (sigil-less) to values, but I may need to re-visit it.
23:37 pmichaud if so, that would make it very simple
23:37 jonathan sigilless and twigilless.
23:37 pmichaud I tried doing that in my Associative patch but it didn't quite work
23:37 pmichaud (but I had other things going on at the time so couldn't check all that closely)
23:37 jonathan OK
23:38 jonathan In what way did it not work?
23:38 jonathan As in, what broke?
23:38 jonathan Just doing Foo{ ... }?
23:38 pmichaud one of the spectests broke, I forget which.
23:38 pmichaud it didn't like the idea of just constructing the hash.
23:38 jonathan Just one test, or a bunch of related ones?
23:38 pmichaud just one test file... don't remember how many tests
23:38 jonathan Can you remember which?
23:38 pmichaud it seems to me that I should be able to do:
23:39 pmichaud .sub 'postcircumfix:{ }' :method
23:39 pmichaud .param pmc values :slurpy
23:39 pmichaud whence = values.'hash'()
23:39 dalek r33842 | tewk++ | trunk:
23:39 dalek : [js] added regex parsing, fixed LTM issues with numeric literals, fixed array_literals, fudged nested functions
23:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33842
23:39 pmichaud # setprop the whence property
23:40 jonathan Hmmm...what are you getting passed in?
23:40 pmichaud well, for   Foo{ a=>1, b=>2, c=>3 }  I'd get the list of pairs
23:40 jonathan Is it an already constructed hash or a list of pairs?
23:40 jonathan Right.
23:40 ruoso joined #parrot
23:40 pmichaud and then values.'hash' would turn that into a Hash of some sort
23:40 jonathan Yes.
23:41 pmichaud anyway, I just wanted to confirm that it's support to be a simple hash and not anything special
23:41 jonathan Oh
23:41 pmichaud that's what it looked like to me, but my initial (not very deep) attempt failed and then I got sidetracked on other tasks on tuesday, including preparing for my trip.
23:41 jonathan You are also meant to clone the proto-object and attach it to the clone and return the clone.
23:41 jonathan You are doing this, right?
23:41 pmichaud right, I was doing that.
23:41 jonathan OK.
23:41 pmichaud the whence goes on the clone.
23:41 jonathan Oh!!!
23:42 jonathan # Attach the WHENCE property.
23:42 jonathan props = getattribute self, '%!properties'
23:42 jonathan unless null props goto have_props
23:42 jonathan props = new 'Hash'
23:42 jonathan have_props:
23:42 jonathan props['WHENCE'] = WHENCE
23:42 jonathan setattribute res, '%!properties', props
23:42 pmichaud yes, I was dong that too.
23:42 pmichaud *doing
23:42 jonathan Why on earth are we doing it that way... :-S
23:42 pmichaud good question
23:42 purl Yeah, it is. I'm stumped.
23:42 jonathan Rather than just sticking it as a prop.
23:42 pmichaud is %!properties used for anything else?
23:43 jonathan I don't think so. I'd forgotten it existed.
23:43 pmichaud okay, I'll switch it to %!WHENCE
23:43 jonathan And setprop it on the proto?
23:43 pmichaud it _should_ be accessed in only a few places
23:43 pmichaud yes, and setprop it on the proto's clone
23:43 jonathan OK
23:43 jonathan You'd need to update .new in object.
23:43 pmichaud that's another one that deserves a refactor :-)
23:44 pmichaud but one thing at a time :-)
23:44 pmichaud now that we have the base methods in place, it's a lot easier to (re)write a lot of these in terms of existing methods
23:44 jonathan It probably needs most if it ripping out and breaking out into CREATE and BUILD and whatever I suspect...
23:44 pmichaud for example, using .'hash'() instead of duplicating the iteration code in setting whence :-)
23:45 jonathan I'm pondering whether initial values (like has $.x = 42) actually should be going into a WHENCE.
23:45 jonathan Because I don't know if the semantics are quite the same.
23:45 pmichaud I thought that's how you were going to do it.
23:45 jonathan It's how I did it.
23:45 pmichaud oh
23:45 jonathan But
23:45 pmichaud then I think yes.
23:46 jonathan Really I'm not so happy with it as we're supposed to make a closure around the 42
23:46 jonathan And then run that to get the value
23:46 jonathan So if you do
23:46 pmichaud we only need the closure if there are any lexicals there :-)
23:46 jonathan has $.x = rand
23:46 pmichaud oh
23:46 pmichaud yes, in that case also
23:46 jonathan Then you're meant to get a different value each time
23:46 pmichaud but
23:46 pmichaud can't the closure be in the WHENCE ?
23:46 jonathan Yeah, but how do we know whether to run it... :-)
23:47 pmichaud if it's a block, run it?
23:47 jonathan Foo{ x => { ... }) # do we actually want to run that block?
23:47 jonathan As in, do we want to run it each time the class is created?
23:47 jonathan s/created/instantiated/
23:48 pmichaud thinking
23:48 purl Oooh he is soooo fine!!!
23:48 jonathan See also Autovivifying objects in S12
23:48 pmichaud it still feels as though whence is the correct place.
23:48 jonathan "This form is also lazily evaluated:
23:48 jonathan my $dog = Dog{ :name<Fido> };
23:48 purl okay, jonathan.
23:48 jonathan "
23:49 pmichaud aha
23:49 pmichaud whence is not a Hash, it's a closure that returns a Hash
23:49 jonathan And "runs the closure if the object ever needs to be autovivified"
23:49 pmichaud i.e., whence is *always* run
23:50 pmichaud it's not a hash of closures to be run, it's a closure to be run that fills in elements of the hash
23:50 jonathan Aha.
23:50 jonathan Yes.
23:50 pmichaud so in the case of   Foo{ x => {...} }    we aren't executing the x => closure, we're executing the outer closure
23:50 pmichaud and
23:51 jonathan OK, can we easily be smart enough at compile time to say "ah, something that looks like a hash index into a proto-object" and make a closure instead?
23:51 pmichaud has $.x = 42;
23:51 pmichaud has $.y = 15;
23:51 pmichaud results in a whence property of   { x => 42, y => 15 }
23:51 pmichaud and that property gets executed to get the hash that builds the object.
23:52 jonathan Aha.
23:52 jonathan That makes sense.
23:52 pmichaud it's not the individual components that get executed
23:52 jonathan *nod*
23:52 jonathan Yes, I see that now.
23:52 pmichaud so in the case of
23:52 pmichaud has $.x = rand;
23:52 pmichaud we end up with  { x => rand }
23:53 pmichaud and invoking that closure builds the x at object construction time.
23:53 pmichaud cool.
23:53 jonathan That still leaves me with the question
23:53 jonathan Dog{ tail_wag_velocity => 2000000 }
23:53 pmichaud no problem, that's just postcircumfix:{ }   on Protoobject :-)
23:54 pmichaud it's a method.
23:54 jonathan But it's not, because it'll evaluate the stuff in the closure?
23:54 jonathan And then call the method?
23:54 Whiteknight joined #parrot
23:54 pmichaud oh, I see what you're saying.
23:54 jonathan So Dog{ poohs_per_day => rand }
23:54 jonathan We don't want the rand called then
23:54 jonathan Otherwise it's not very random. ;-)
23:54 Whiteknight what an irregular dog
23:55 jonathan Whiteknight: Welcome to #parrot...what an opportune time to arrive. :-)
23:55 pmichaud yes, it can be done.
23:56 jonathan We statically know if we've got a typename there, I guess.
23:56 pmichaud no, that's not the way I'd do it.
23:56 jonathan The better way?
23:56 purl it has been said that The better way is checking $c->user_exists
23:56 pmichaud have postcircumfix always return a closure instead of executing things directly.
23:57 jonathan How does that play out with hash indexing?
23:57 pmichaud for a normal slice, it then just executes the closure to get the arguments.
23:57 jonathan postcircumfix:{ } has a signature of @@slice or something though?
23:58 pmichaud that's still not a big issue -- in that case the closure returns a list of captures
23:58 pmichaud or something
23:58 pmichaud keying off of the fact that we have a typename feels wrong.
23:58 pmichaud because it's a static analysis
23:59 jonathan I've spent all day working on that. :-P
23:59 pmichaud yeah, I'm wondering about something like
23:59 pmichaud my $x = Dog
23:59 pmichaud my $dog = $x{ :name<Fido> }
23:59 pmichaud I'd like to not preclude that if at all possible.

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

Parrot | source cross referenced