Camelia, the Perl 6 bug

IRC log for #parrot, 2008-12-14

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:05 Whiteknight make testj is the JIT core?
00:07 jonathan Think so, yes.
00:10 lathos JIT is meaningless now, with the MMD stuff, apart fromforNCI.
00:11 jonathan Yes and no.
00:11 jonathan MMD "only" affects PMCs.
00:12 jonathan But yes, we've made something that once coulda been JITTable with some effort (like, a 2D array lookup) into something that surely ain't. :-|
00:13 pmichaud why was mmd important, again?
00:13 lathos PMCs are rather omnipresent.
00:13 pmichaud (at the PMC level)
00:13 jonathan pmichaud: Well, we were doing it before.
00:13 jonathan We have been for a _long_ time.
00:14 pmichaud afaict, the PMC level mmd has always gotten in my way far more than it did anything useful.
00:14 pmichaud even "before"
00:14 jonathan For things like add, etc, the idea is that it handles cases where you want to react differently depending on the type of the thing you're adding to yourself, etc.
00:15 pmichaud of course, Rakudo never gets to use that.
00:15 jonathan Before, we had two MMD systems.
00:15 jonathan The one for :multi(...) which did manhattan dispatch on PCC stuff.
00:15 jonathan And a separate one for opcodes.
00:15 jonathan Apparently, that was a problem.
00:15 pmichaud the opcode MMD hasn't ever been useful to me.
00:15 pmichaud maybe it's better now
00:16 jonathan Maybe.
00:16 jonathan But for us it's a pain in the arse.
00:16 jonathan Because we already _do_ a multi dispatch.
00:16 pmichaud But I see a fundamental disconnect between pdd15_objects and mmd
00:16 jonathan And by the time we've done our Perl 6 dispatch, we know exactly what types we have.
00:16 pmichaud we have an object system, which basically takes us out of the PMC realm
00:17 pmichaud so, HLLs either use that object system, which means the PMC-level mmd isn't at all useful
00:17 pmichaud or they write custom PMCs, which means they aren't really using the object system
00:17 jonathan Oh, you can register Parrot subs with the opcdoe MMD.
00:17 jonathan *opcode
00:17 lathos To be fair I don't think we're doing much cross-language stuff and maybe it would turn out to be useful when we do.
00:18 pmichaud how does one register a Parrot sub with opcode MMD ?
00:18 lathos But it's slow as all hell.
00:18 jonathan pmichaud: Off hand, I don't remember. I'm sure I've seen a test doing this.
00:18 pmichaud I haven't seen anything like it.
00:19 pmichaud anyway, the notion of "custom PMCs" doesn't seem to fit into any HLL that has some sort of object-based system at its core.
00:19 pmichaud at least, not without re-implementing a Object PMC metamodel.
00:20 pmichaud gotta go fetch the xmas tree... bbiaw
00:22 dalek r33872 | pmichaud++ | trunk:
00:22 dalek : [pct]:  :loadinit no longer does the "get_outer" hack to fetch its block.
00:22 dalek : (More refactors coming on this part soon.)
00:22 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33872
00:25 chromatic Now we have a single MMD system which does double-to-quadruple dispatch.
00:25 chromatic The solution, I suspect, is removing the MMDable vtable entries from vtables.
00:26 chromatic (it works for primitive registers because autoboxing works there)
00:27 chromatic As soon as we can say that all of those types of invokables use PCCs, we avoid the marshalling overhead.
00:27 jonathan chromatic: Calling to MMD rather than calling the vtable that then calls the MMD would be a tiny saving - it's the whole marshalling where the big cost lies.
00:27 chromatic As well, we make it possible that a reasonably smart JIT (or a really dumb tracing JIT) could *inline* and *optimize* those calls.
00:28 jonathan Getting rid of the marshalling - yes, this would be a big win.
00:28 lathos chromatic: Sounds a lot like optimizing by adding complexity rather than optimizing by reducing it.
00:29 jonathan But the amount of work we do now do *add to damm numbers together* is insane.
00:29 chromatic Which part, lathos?
00:29 jonathan *two
00:29 lathos Waiting for a magic JIT to sort it out.
00:30 chromatic I think you misunderstood.
00:30 chromatic Right now, there's no way a JIT could optimize this.
00:30 jonathan chromatic proposed something different to that
00:30 * jonathan lets chromatic explain :-)
00:30 chromatic We call in and out of C far too many times for that to work.
00:31 chromatic If we pulled cmp out of the vtable and instead defined a Sub somehow (whether NCI or PIR or whatever), we could avoid a lot of marshalling overhead.
00:31 chromatic We could always do the cmp comparison with standard Parrot dispatch.
00:31 lathos Hrm.
00:31 chromatic A tracing JIT can inline that kind of dispatch.
00:31 chromatic We'd go a lot faster even without the JIT, but we have the possibility of going even faster.
00:32 lathos I thought the whole point of PMC vtables was that they wrapped up type-specific ways of doing stuff.
00:33 lathos I think that, in as far as it goes, makes sense. When you have MMD on two PMCs, it goes it bit awry.
00:34 chromatic That's the problem.
00:34 chromatic We have vtables that do MMD, which suggests to me that we should skip the useless step.
00:34 chromatic (not in the least because it's also very expensive)
00:34 lathos Yep, see what you're saying now and agree.
00:36 chromatic Of course, I have this design for a highly-concurrent message-passing VM which does pervasive MMD, but that's a different story.
00:37 chromatic Also, did you see my Perl 5 patch?
00:49 lathos Yep, very neat. Did you see NCI.pm?
00:49 lathos http://dev.simon-cozens.org/6pan/browser/trunk/NCI
00:52 chromatic That's tiny.  That's a good sign.
00:55 lathos It's just exposing the two PIR functions to Perl basically, with a bit of sugar around them.
01:14 * jonathan -> sleep
01:20 Tene So, anyone have any idea when I can expect to hear about reimbursements from PDS?
01:21 Tene It's been... a while.
01:53 pmichaud Let's mutiny until PDS reimbursements are handled.  :-P
02:07 Tene I think I'm RSI'd out for the day.
02:07 Tene PDD23 updates wait until tomorrow.
02:23 gmansi joined #parrot
02:39 particle1 joined #parrot
03:06 leto joined #parrot
03:15 jimmy joined #parrot
03:17 jimmy null $P0
03:17 jimmy $S0 = typeof $PO # this does work, but i think $S0 should be NULL
03:17 jimmy sorry, this does not work
03:33 gmansi joined #parrot
03:36 TiMBuS joined #parrot
03:47 dalek r33873 | Whiteknight++ | calling_conventions:
03:47 dalek : [calling_conventions] update to trunk r33872
03:47 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33873
03:52 leto joined #parrot
04:02 elmex_ joined #parrot
04:25 contingencyplan joined #parrot
04:30 Alias joined #parrot
04:46 MariachiElf joined #parrot
04:57 apeiron joined #parrot
05:13 bacek joined #parrot
05:21 gmansi joined #parrot
05:38 leto joined #parrot
05:43 Andy joined #parrot
06:10 leto joined #parrot
06:13 dalek r33874 | pmichaud++ | trunk:
06:13 dalek : [pge]:  Add <?{{...}}> and <!{{...}}> code assertions (PIR).
06:13 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33874
06:34 rhr joined #parrot
06:39 AndyA joined #parrot
06:57 TiMBuS joined #parrot
07:00 leto joined #parrot
07:21 Theory joined #parrot
07:50 dalek r33875 | fperrad++ | trunk:
07:50 dalek : [Lua] update NEWS
07:50 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33875
08:08 gmansi joined #parrot
08:32 iblechbot joined #parrot
08:38 Alias joined #parrot
08:51 allison joined #parrot
09:04 jimmy joined #parrot
09:04 gmansi joined #parrot
10:01 mberends joined #parrot
10:01 Hadi joined #parrot
10:02 dalek r33876 | tene++ | trunk:
10:02 dalek : [pdd23]: Rewrite a few sections, update for sanity, add comments.
10:02 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33876
10:02 Hadi left #parrot
10:18 cotto sanity++
10:18 Hadi joined #parrot
10:19 Hadi left #parrot
10:19 cotto (which begs the question why I'm still up)
10:36 dalek r33877 | cotto++ | trunk:
10:36 dalek : [imcc] be a little more defensive in NULL checks (CID #336)
10:36 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33877
10:49 jimmy joined #parrot
10:59 dalek r33878 | fperrad++ | trunk:
10:59 dalek : [dotnet]
10:59 dalek : - update PIR syntax generation
10:59 dalek : - fix some tests
10:59 dalek : Failed 16/43 test programs. 80/263 subtests failed.
10:59 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33878
11:34 dalek r33879 | cotto++ | trunk:
11:34 dalek : [io] free string after using it, rather than before (CID #343)
11:34 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33879
11:35 jimmy cid?
11:35 purl cid is all MUA or Coverity ID
11:36 dalek r33880 | cotto++ | trunk:
11:36 dalek : [ops] free string after using it, rather than before (CID #344, CID #345)
11:36 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33880
11:39 alvar joined #parrot
11:39 cotto They're automatically generated reports of possible bugs.
11:52 leto joined #parrot
12:03 jan_ joined #parrot
12:05 jan joined #parrot
13:05 kj joined #parrot
13:20 slavorgn joined #parrot
13:33 leto joined #parrot
13:59 Theory joined #parrot
14:40 Whiteknight joined #parrot
14:47 Limbic_Region joined #parrot
14:52 Theory joined #parrot
15:12 jan joined #parrot
15:26 dalek r33881 | kjs++ | trunk:
15:26 dalek : [pirc] update register usage in sub struct after doing register optimization.
15:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33881
15:39 kid51 joined #parrot
15:45 apeiron joined #parrot
15:48 dalek r33882 | pmichaud++ | trunk:
15:48 dalek : [rakudo]:  Adjust grammar to use <?{{...}}> assertion syntax.
15:48 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33882
15:57 tetragon joined #parrot
16:00 dalek r33883 | pmichaud++ | trunk:
16:00 dalek : [docs] NEWS updates for December 2008 release.
16:00 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33883
16:06 davidfetter joined #parrot
16:13 gmansi joined #parrot
16:27 dalek r33884 | kjs++ | trunk:
16:27 dalek : [pirc] implement re-use of live_interval objects; no need to malloc() and free(), if they can be cached.
16:27 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33884
16:27 dalek r33885 | pmichaud++ | trunk:
16:28 dalek : [rakudo]: spectest-progress.csv update: 240 files, 5005 passing, 0 failing
16:28 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33885
16:30 dalek r33886 | kjs++ | trunk:
16:30 dalek : [pirc] don't need a separate varaible for iterator; re-use the old one. (saving 4 bytes of stack space)
16:30 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33886
16:32 gmansi joined #parrot
16:33 dalek r33887 | kjs++ | trunk:
16:33 dalek : [pirc] free memory of cached objects.
16:33 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33887
16:37 dalek r33888 | kjs++ | trunk:
16:37 dalek : [pirc] remove unused codesize field from subroutine struct; endoffset - startoffset yields same value, if necessary.
16:37 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33888
16:44 dalek r33889 | jkeenan++ | trunk:
16:44 dalek : Include report of better test coverage of Parrot::Test.
16:44 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33889
16:46 dalek r33890 | fperrad++ | trunk:
16:46 dalek : [jako]
16:46 dalek : - remove .namespace/.endnamespace
16:46 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33890
16:51 dalek r33891 | kjs++ | trunk:
16:51 dalek : [pirc] don't generate leaving instructions in a sub if there's already a 'returncc' or 'end'. Update test as well. I think other branching instructions should be added to this check as well, or possibly a check on the opinfo->flags, which would be neater. TODO: check this out.
16:51 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33891
16:59 dalek r33892 | kjs++ | trunk:
16:59 dalek : [pirc] layout++; (old comments)--
16:59 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33892
17:07 dalek r33893 | pmichaud++ | trunk:
17:07 dalek : [rakudo]:  Reorganize method ordering, other minor cleanups.
17:07 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33893
17:11 dalek r33894 | kjs++ | trunk:
17:11 dalek : [pirc] prepare to do clean up some code related to symbol and pir_reg structures. + add a #define for documentation purposes.
17:11 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33894
17:13 Andy joined #parrot
18:00 Hadi joined #parrot
18:00 Hadi left #parrot
18:03 dalek r33895 | pmichaud++ | trunk:
18:03 dalek : [rakudo]:  Clean up flattening a fair bit.
18:03 dalek : This removes 15 seconds from "make spectest" on my machine,
18:03 dalek : and eliminates the special-case 'isa' checks from !flatten.
18:03 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33895
18:44 dalek r33896 | pmichaud++ | trunk:
18:44 dalek : [rakudo]: Optimize flattening a bit further.
18:44 dalek : When splicing in a flattened element, we don't need to
18:44 dalek : re-flatten the things we just spliced in.
18:44 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33896
18:52 dalek r33897 | moritz++ | trunk:
18:52 dalek : [rakudo] add a few files to t/spectest.data, restore alphabetical order,
18:52 dalek : and add reasons why we don't include other file(s) here
18:52 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33897
19:04 peters joined #parrot
19:04 peters Hi folks =)
19:05 clunker3_ joined #parrot
19:09 bacek joined #parrot
19:12 * peters is trying to implement a URI grammar (which doesn't need char ranges =)
19:12 peters nopaste?
19:12 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/
19:12 purl i think 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)
19:13 moritz peters: I have a basic URL grammar here that works in Rakudo
19:13 Andy moritz: Thanks for the pointer
19:13 Andy Anything interesting that we can do to churn up interest.
19:14 peters moritz: cool, but I'm in the mood for full RFC implementations ;)
19:14 moritz peters: even better ;-)
19:14 moritz peters: make sure to blog about it (and tell us the URL) when you're done ;-)
19:15 nopaste "peters" at 83.183.129.106 pasted "Patrtitial implementation of URI (RFC 3986)" (117 lines) at http://nopaste.snit.ch/14941
19:15 peters but it doesn't work =(
19:15 peters I guess that it's because "longest token match" isn't implemented
19:16 pmichaud generally one can work around longest token match.
19:16 moritz peters: remeber that tokens never backtrack, you might need rules instead in some places
19:17 pmichaud (regexes)
19:17 moritz erm, yes
19:17 moritz s/token/regex/ where appropriate
19:17 peters I see
19:17 pmichaud oh, we can also do code assertions in PIR now
19:17 pmichaud so
19:18 * peters tries s/token/regex/
19:18 moritz pmichaud: i've changed S29-trig/trig.t to 'use Num :Trig' as it says in the spec, which rakudo fails...
19:18 moritz pmichaud: should I fudge out that line? or regress on the test file?
19:18 pmichaud I prefer to fudge the line.
19:19 pmichaud rakudo doesn't have a Num.pm yet, nor does it understand arguments to 'use'
19:20 pmichaud peters:  you need to flip the order of dec_octet
19:20 pmichaud it'll match "2" (and stop) before it ever gets to "25 <[0..5]>"
19:20 pmichaud yes, this is a place where ltm would solve that for you.  :-)
19:21 peters thanks
19:22 pmichaud token ls32  { [ <h16> ':' <h16> ] | IPv4address     };
19:22 pmichaud did you perhaps mean <IPv4address>  ?
19:23 peters true =)
19:23 pmichaud if '2001:db8::7' ~~ /^<URI::IPv4address>$/ {
19:24 pmichaud I'd expect that to be false, since IPv4addresses are separated by '.'
19:24 moritz peters: in general it's helpful to build and debug such grammars bit by bit, you never get them right at first try
19:25 pmichaud that's my experience, definitely.
19:26 nopaste "peters" at 83.183.129.106 pasted "URI (RFC 3986) matches IPv4 and IPv6, good start =)" (122 lines) at http://nopaste.snit.ch/14942
19:29 pmichaud peters: yes, please please please blog this somewhere.
19:29 pmichaud this looks excellent -- and really shows off the power of p6 grammars.
19:30 peters I don't have a blog, perhaps you can blog it?
19:31 peters you desreve the credit ;)
19:32 * peters s/desreve/deserve/
19:32 pmichaud if you just send me a writeup, I'll post it.
19:35 peters would'nt the nopaste itself speak for the "powers" of p6 grammars and the state of the rakudo implemenation?
19:36 pmichaud sure -- there's a few things that you might want to finish up, though :-)
19:36 pmichaud like
19:36 * peters sucks at writing formal things in english
19:36 pmichaud token pct_encoded {
19:36 pmichaud '%' HEXDIG HEXDIG
19:36 pmichaud };
19:36 peters true =)
19:36 pmichaud it doesn't have to be formal -- it's better if it's not formal.  Just "here's what I did in Perl 6/Rakudo", "here's why I did it", "here's what I think about it."
19:40 peters why is simple, we need a alot of RFC grammars if we are to compete (read enhance as in RFC compliance) with p5, we simple want to fix issues with invalid p5 URI.pm parsing ;)
19:40 pmichaud sounds good to me.  :-)
19:40 peters and thanks to rakudo it's possible ;=)
19:40 pmichaud post it to perl6-users@perl.org, perhaps?
19:43 peters I want to try for a full URI (grammar proven; with tests) implementation first if thats ok
19:44 pmichaud sure
19:44 peters =)
19:47 jonathan pmichaud: Any preference for when I do Rakudo day next week?
19:47 jonathan Of course, I'm generally about a lot more now too, working on the grant/bytecode anno etc.
19:47 * moritz found another rakudo bug today: sort() isn't stable
19:48 pmichaud jonathan: so far my week appears open, unless I'm forgetting some committment I've made.
19:48 pmichaud jonathan: so it can be "pick your favorite day"
19:48 pmichaud depending on what you're thinking of doing, it might be better to go "after tuesday"  (release)
19:49 jonathan Is there anything you'd like my help on to make happen pre-release?
19:49 jonathan Or anything you'd like me to focus on post-release?
19:49 jonathan I haven't made any particular plans yet.
19:49 peters I think moritz should blog more about the powers about grammars, the ability to extend (inheritance), "override" rules and pass "action" objects is just amazing from a p5 perspective
19:50 pmichaud if you wanted to fix up WHENCE, that'd be cool.  :-)
19:50 jonathan OK.
19:50 jonathan How's Associative etc going?
19:50 pmichaud blocked on fixing WHENCE :-)
19:50 jonathan Oh.
19:50 pmichaud I'll make a branch for it.
19:50 jonathan OK, great.
19:50 moritz peters: I will, some day :/
19:51 jonathan Just stick the branch in with the WHENCE realted failures and I can investigate.
19:51 pmichaud oh, I might be able to work around it, actually.
19:51 pmichaud Anyway, I'll make the branch and get as far as I can and then you can look at things from there.
19:51 masak joined #parrot
19:51 peters moritz: cool =)
19:51 jonathan OK, works for me.
19:51 pmichaud it'd be great to get it in before release, but if it doesn't happen it's no biggie.
19:51 jonathan OK.
19:51 masak OH HAI
19:51 jonathan I'm away on Friday and then sketchy over the Christmas period from then.
19:51 pmichaud so if that's the case, maybe you'll want to rakudo day Monday.  And it would be nice to say that   has $a = ...   is _really_ working.
19:52 jonathan Ooh, that's tomorrow.
19:52 jonathan OK, I can do that.
19:52 pmichaud I'll get the associative branch start in a couple of hours
19:52 jonathan Nothing is pressing from @other_job for tomorrow.
19:52 peters godkv�ll (good evening) masak
19:52 * moritz detects many more masak tickets in the Perl 6 RT queue
19:52 masak peters: tja.
19:52 jonathan Yeah, I was pondering a bug-fixing Rakudo day more than a features one...
19:52 pmichaud masak's tickets are getting more esoteric.  eval() a method declaration inside of a class?!?!?!
19:52 masak moritz: that happens when I'm offline on a bus and bored. :)
19:53 masak pmichaud: see above :)
19:53 masak pmichaud: btw, that's a perfectly reasonable thing to do :P
19:53 jonathan pmichaud: It shouldn't segfault, but I think that might still be an error. Maybe.
19:53 pmichaud however, if they're getting more esoteric, that means that we're making it harder for him to find the "obvious" bugs, I think.
19:53 moritz masak: hehe, I was on a train ;-) see pugs r24361 for the result ;-)
19:53 masak pmichaud: aye. you are.
19:53 masak moritz: updating as we speak.
19:53 pmichaud speaking of which, I've almost fixed RT #58770 -- just need one more test.
19:54 pmichaud (empty return gives back Nil)
19:54 jonathan brb - eating
19:54 masak ooh, lots of tests. moritz++
19:56 moritz masak: List.end needs to be exported as a sub, that should be an easy one for you
19:56 bacek good morning, people of past
19:56 masak moritz: i.e. `end @a`, yah?
19:57 moritz masak: aye
19:57 masak bacek: good morning, future fellow.
19:57 dalek r33898 | pmichaud++ | trunk:
19:57 dalek : [rakudo]:  Fix bare return value in item and list context (RT #58770)
19:57 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33898
19:58 masak moritz: added to growing TODO list. the Chinese ordeal still isn't quite over.
19:59 moritz masak: maybe I'll take a look myself, it's been too long since I last did something in rakudo other than testing ;-)
19:59 * pmichaud runs a spectest summary to see what moritz++'s tests do to the results.
19:59 masak moritz: feel free.
19:59 moritz should be plus ~60
20:03 bacek rakudo: class Foo { has $.foo }; class Bar is Foo {}; my $f = Foo.new(foo=>42); say $f; my $b = Bar.new(foo=>'epic fail'); say $b;
20:03 polyglotbot OUTPUT[Foo<0xb721dcb0>␤You passed an initialization parameter that does not have a matching attribute.␤current instr.: 'die' pc 13732 (src/builtins/control.pir:167)␤called from Sub 'parrot;Perl6Object;new' pc 568 (src/classes/Object.pir:360)␤called from Sub '_block11' pc 108 (EVAL_12:40)␤called
20:03 polyglotbot ..from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/...
20:04 bacek is Bar.new(foo=>'bar') should work?
20:04 bacek or how I can initialise parent class?
20:05 moritz bacek: I think there needs to be a different syntax, in case the parend and the child have an attributed of the same name
20:05 Tene no, I'm pretty sure that inheritance should work like you said.
20:05 moritz maybe new('SUPER::bar' => ...)
20:06 bacek I can't find evidence in S06.
20:07 moritz bacek: S12 would be more interesting
20:07 bacek moritz: looking
20:09 bacek rakudo: class Foo { has $.foo }; class Bar is Foo {}; my $f = Foo.new(foo=>42); say $f; my $b = Bar.new( Foo { foo=>42} ); say $b;
20:09 polyglotbot OUTPUT[Statement not terminated properly at line 1, near "( Foo { fo"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤called from Sub 'parrot;Perl6;Grammar;eat_terminator' pc 27602 (src/gen_grammar.pir:3377)␤called from Sub 'parrot;Perl6;Grammar;statementlist'
20:09 polyglotbot ..pc 26258 (src/gen_grammar.pir:2844)␤called from...
20:09 bacek this should work. But it doesn't. Yet another TODO ticket :)
20:10 masak it used to work.
20:10 masak I remember jonathan blogging/talking about this.
20:10 bacek rakudo: class Foo { has $.foo }; class Bar is Foo {}; my $f = Foo.new(foo=>42); say $f; my $b = Bar.new( Foo{ foo=>42} ); say $b;
20:10 polyglotbot OUTPUT[Foo<0xb7205f8c>␤Bar<0xb7202364>␤]
20:10 bacek rakudo: class Foo { has $.foo }; class Bar is Foo {}; my $f = Foo.new(foo=>42); say $f; my $b = Bar.new( Foo{ foo=>42} ); say $b; say $b.foo;
20:10 polyglotbot OUTPUT[Foo<0xb71e8f6c>␤Bar<0xb71e4cb4>␤42␤]
20:10 bacek It works!
20:11 Tene That seems... less than ideal
20:11 masak Tene: indeed.
20:12 bacek Tene: it's from S12... Not perfect, anyway
20:12 nopaste "peters" at 83.183.129.106 pasted "complete but untested URI (RFC 3986) grammar" (147 lines) at http://nopaste.snit.ch/14943
20:13 masak peters++
20:13 masak peters: now go test it! :)
20:13 peters I will =)
20:14 peters .. tomorrow ( in swedish time)
20:16 peters masak: I also have alomst complete 2616 (HTTP) grammar ;)
20:16 masak peters: sounds worthy.
20:16 masak peters: you might want to consider committing these to the Pugs repository somewhere.
20:16 moritz just what I wanted to suggest, only masak was faster ;-)
20:17 pmichaud Foo{foo=>42}  is the correct syntax
20:17 pmichaud 5053 passing tests
20:17 masak pmichaud: it's sufficient syntax, but is it necessary?
20:17 peters but I can't test that until hex char ranges [(\x00i..} is implemented
20:18 pmichaud if foo is private to Foo, yes.
20:18 masak peters: could you perhaps fake it in the meantime?
20:18 pmichaud I don't know if it's necessary for a public $.foo
20:18 * peters != windows kb map
20:18 masak pmichaud: but it isn't in bacek's case.
20:18 peters masak: not sure how
20:19 masak peters: ok. me neither.
20:19 pmichaud we know that the Foo{...}  implementation in rakudo has a couple of issues -- just discovered them last night.
20:19 masak peters: though working around not-yet-features usually works, once you get into the right frame of mind.
20:19 masak in Rakudo as well as in PGE.
20:19 pmichaud I might be able to refactor \x to work
20:22 jonathan On the Foo{...} thingy.
20:22 peters that wold be very nice from my point of view
20:22 jonathan *The* most common bit of feedback I've got while talking about Perl 6 OO at workshops is that it'd be really nice if masak's second example worked and it did look up the hierarchy for an attr of that name.
20:22 pmichaud sounds like it needs a message to p6l
20:23 jonathan It came up in my OO talk at YAPC::EU when Larry was there.
20:23 masak peters: psst! submit TODO rakudo tickets for things that would be very nice from your point of view.
20:23 peters because I can't see a way too fake +<ctrl> - \x00
20:23 pmichaud peters:   [ <ctrl> & \X00 ]
20:23 jonathan And IIRC Larry said, that it should do that. I said the synopsis didn't say it should and asked him to patch it.
20:24 masak jonathan: but now that power belongs to The Masses.
20:24 pmichaud any chance it just uses the accessor?
20:24 jonathan Which leaves the most likely option as, he just forgot/didn't get to it.
20:24 jonathan pmichaud: If it's a private there's not an accessor, though...
20:24 pmichaud ...private accessor?
20:24 jonathan ?
20:24 peters what about any char except unicode (<[\x00..\xff]>)
20:24 jonathan $!foo # storage location
20:24 pmichaud there's no private accessor?
20:25 pmichaud (I need to review S12 for this.)
20:26 jonathan Oh, I think I've been there before.
20:26 jonathan It suspect it's sketchy
20:26 pmichaud it's okay if there's no private accessor -- I just thought I remembered one.
20:26 moritz self!foo is the private accessor
20:26 moritz (I think)
20:26 pmichaud right, that's what I thought.
20:26 jonathan "If you declare with the . form, you also get the private ! form as a non-virtual name for the actual storage location"
20:27 jonathan Do $!foo and self!foo are different? :-S
20:27 jonathan And if $!foo goes via the private accessor, then presumably self!foo is non-virtual.
20:27 moritz jonathan: $!foo implies scalar context
20:28 moritz jonathan: just like @!foo implies list context
20:28 jonathan Erm.
20:28 jonathan has @!foo; has $!foo; # so what does this mean?
20:28 moritz jonathan: conflict
20:28 purl somebody said conflict was really between naturalism and supernaturalism.
20:28 bacek ambiguity!
20:28 purl It's in the box.
20:28 * jonathan looks in S12 for that
20:29 masak purl: there?
20:29 purl What?!  Where?!  When??!  Why?  Who?!
20:29 moritz has @!foo; for $!foo { # just one iteration }
20:29 jonathan And more curiously... "The attribute variables may be used within instance methods to refer directly to the attribute values. Outside the instance methods, the only access to attributes is through the accessors since an object has to be specified."
20:30 * peters says g'night
20:30 bacek peters: g'night
20:31 masak peters: godnatt.
20:31 jonathan Ah, hmm.
20:31 dalek r33899 | moritz++ | trunk:
20:31 dalek : [rakudo] export @list.end as a sub
20:31 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33899
20:31 masak moritz++
20:32 dalek r33900 | moritz++ | trunk:
20:32 dalek : [rakudo] add test for @list.end to spectest.data
20:32 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33900
20:32 moritz JFDI also applies to the specs, it seems :)
20:32 pmichaud have to run an errand -- when I get back I'll work on the associateve branch
20:33 jonathan "If you declare with the . form, you also get the private ! form as a non-virtual name for the actual storage location" - and what if you declare it with the exclamation mark only...
20:33 jonathan Is it still non-virtual, etc.
20:34 masak sounds like another mail to p6l.
20:34 pmichaud it just felt to me as though   new Dog( foo => ... )   could initialize via the accessors instead of the attributes directly.
20:35 jonathan pmichaud: If private accessors are non-virtual that won't fly.
20:35 pmichaud jonathan: right.
20:35 jonathan Not to get the "looks up the tree" semantics.
20:35 pmichaud afk for a bit
20:35 jonathan ok
20:43 dalek r33901 | pmichaud++ | assoc:
20:43 dalek : [rakudo]: create a branch for associative array and WHENCE handling
20:43 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33901
20:49 pmichaud oops.
20:49 pmichaud in reviewing STD.pm, I misread the handling of postcircumfix on type names
20:50 pmichaud it's not called out for special syntactic treatment.
20:52 pmichaud (except in the case of postcircumfix:<[ ]>
20:55 jonathan Ah.
20:56 pmichaud so the arguments to Dog{ a=>b }   are no longer a list of pairs.
20:56 pmichaud wait
20:56 pmichaud rephrase
20:57 pmichaud the arguments to   Dog{ :name<Fido> }   are no longer a list of pairs, they're named arguments.
20:57 jonathan Ah.
20:57 jonathan That makes it...rather easy...to build the hash. ;-)
20:57 pmichaud indeed.
20:57 pmichaud as a first cut, it's just the slurpy hash.
20:58 jonathan But how do we know to make a hash evaluate each time (e.g. its a closure that evalutes the hash)?
20:58 jonathan Static analysis maybe.
20:58 jonathan Hey, we discussed this the other day... :-)
20:58 pmichaud either postcircumfix always passes a closure, or we do static analysis.
20:59 * jonathan prefers the second
20:59 pmichaud I'm still curious about the   my $x = Dog;   $x{ :name<Fido> }    case
20:59 jonathan The synopsis seemed to disallow that case.
20:59 pmichaud yes.
20:59 jonathan S12 looks to me like it's making concessions to enable static analysis. I may be wrong, but it's how it looks to me.
21:00 pmichaud well, "only for literal named types"  sounds very static.
21:00 pmichaud it's not just making concessions -- it says it right there.
21:00 jonathan OK, but I mean it's limiting it to that.
21:01 pmichaud right.
21:01 pmichaud doing that static analysis is going to be a little tricky at the moment, though :-(
21:02 pmichaud maybe we cheat and put the rule we want in the grammar anyway.
21:02 jonathan :-)
21:02 pmichaud that might be simplest for the moment.
21:02 jonathan Yes.
21:03 jonathan It's one of the cases where being able to look back at what we last matched would be handy.
21:04 pmichaud actually, let's cheat the other way, and not worry about making it into a closure just yet.
21:04 pmichaud which gives us what we have now.
21:04 pmichaud (because what we have now doesn't assume closure semantics either.)
21:05 jonathan Right.
21:05 jonathan That'll "work" too.
21:05 jonathan We'll still build a closure that returns the slurpy hash anyway, I think, though...
21:05 jonathan So we get consistency.
21:06 pmichaud oh, that would be good.
21:06 jonathan (With building a closure-building-hash for attr init.)
21:06 jonathan Then later it's a smaller refactor.
21:06 pmichaud yes, then we just move the closure-building semantics into actions.pm at some point, and adjust postcircumfix:<{ }>  on Protoobject accordingly.
21:06 GeJ Good morning everyone
21:06 jonathan *nod*
21:06 pmichaud wfm
21:06 jonathan Oh, I just realized... :-|
21:07 masak GeJ: top of the evening to you, sir.
21:07 jonathan Tomorrow is not so good for Rakudo day after all.
21:07 pmichaud jonathan: okay, no problem.
21:07 jonathan Since there's pm group in the evening.
21:07 jonathan And evening starts early in Slovakia. ;-) But also got some people going to that coming over for some of the afternoon before going there too.
21:07 pmichaud sounds like fun.
21:07 pmichaud okay, Rakudo day later in the week.  In the meantime I'll still get started on associative.
21:08 pmichaud if I can get to a commit point, great; if not, then it's there for later.
21:08 jonathan I'll do it Tuesday - maybe we can still land the fixes to proto before release.
21:08 jonathan erm
21:08 jonathan to WHENCE I mean
21:08 pmichaud although I just put my fixes in and didn't get the same errors I had previously... so.... hrm.
21:08 GeJ masak: Early greetings to you too.
21:08 pmichaud (running tests)
21:09 pmichaud aha.
21:09 pmichaud I missed a step.
21:09 pmichaud (forgot to update Makefile)
21:19 dalek r33902 | pmichaud++ | assoc:
21:19 dalek : [rakudo]:  Initial Associative implementation.
21:19 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33902
21:34 allison joined #parrot
21:39 moritz how can I delete a (spam) ticket in track?
21:39 moritz tt41 in this case
21:40 johbar joined #parrot
21:43 cotto it might require an admin
21:43 moritz then we should have more admins
21:44 jonathan Like, everyone who's active and has an account on RT now.
21:44 Theory joined #parrot
21:44 moritz for example
21:46 Khisanth o_O bugtracker spam? people are actually doing that now?
21:46 moritz Khisanth: people? bots, more likely
21:46 Khisanth well bots are probably being controlled by people
21:49 moritz more or less
21:49 purl thereabouts
21:54 leto joined #parrot
21:55 Limbic_Region joined #parrot
21:57 kid51 joined #parrot
22:23 dalek r33903 | pmichaud++ | trunk:
22:23 dalek : [rakudo]:  Eliminate use of %!properties attribute in favor of getprop/setprop.
22:23 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33903
22:24 dalek r33904 | pmichaud++ | assoc:
22:24 dalek : [rakudo]: sync WHENCE handling from trunk.
22:24 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33904
22:25 bacek joined #parrot
22:42 ffwonko joined #parrot
22:55 galf left #parrot
22:58 TiMBuS joined #parrot
23:24 gmansi joined #parrot
23:24 dalek r33905 | moritz++ | trunk:
23:24 dalek : [rakudo] add tests for overridable <.ws> rules to spectest.data
23:24 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33905
23:39 gmansi joined #parrot
23:44 bacek_ joined #parrot
23:57 leto joined #parrot

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

Parrot | source cross referenced