Camelia, the Perl 6 bug

IRC log for #parrot, 2008-05-21

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:39 particle joined #parrot
00:47 jonathan PCT++ # nearly have my toy language for Sweden presentation together
00:49 chromatic http://openjdk.java.net/project​s/mlvm/jvmlangsummit/index.html
00:50 jonathan Slightly random that they have a picture of the great wall of China on that page...
00:52 jonathan chromatic: You thinking Perl 6 on JVM?
00:52 jonathan Or just checking out what tools others are using to build compilers?
00:53 Juerd jonathan++  # I'm reading the 17 May post on rakudo.org
00:54 Juerd jonathan: I really like how these articles don't just show what was done, but also teach Perl 6.
00:55 jonathan Juerd: That's somewhat deliberate. :-)
00:56 Juerd I suspected that :)
00:57 chromatic jonathan, Charlie Nutter suggested that he wanted other VM weenies to attend.
00:58 jonathan Aha, OK.
01:20 jonathan OK, sleep time...
01:43 Andy joined #parrot
01:57 rdice joined #parrot
02:05 kid51 joined #parrot
02:10 pmichaud Juerd: ping
02:23 Zaba joined #parrot
02:41 * DietCoke yawns
02:41 japhb I resemble that remark
02:41 DietCoke getting the ability to work from home is a double edged sword. :|
02:41 japhb YES
02:44 DietCoke on the plus side, I'm pretty sure this time is billable. =-)
02:54 japhb That's definitely nice ...
02:58 chromatic japhb's contributor agreement arrived
02:59 japhb wheeee
03:00 DietCoke did we actually solict one? ;)
03:01 japhb DietCoke: at least two committers (maybe more?  don't know everyone's status) said I should apply for commitbit, so there you go
03:05 chromatic If he doesn't break the build or step on Tewk's changes or make big architectural changes without some form of review, +1 from me
03:05 chromatic You know, the usual.
03:07 * DietCoke gives chromatic a diet cookie.
03:08 * japhb gives chromatic some single-origin dark chocolate
03:08 DietCoke you suck up.
03:08 japhb DietCoke: never hurts ...
03:11 japhb Is ordinary 'make test' still the right test variant to run prior to commits, as per docs/project/committer_guide.pod, or is that out of date?
03:12 DietCoke at least make coretest.
03:12 DietCoke (which is faster and doesn't run all the config steps)
03:12 DietCoke s/steps/tests/
03:12 japhb Is coretest a strict subset of test?
03:12 DietCoke b'leev so
03:12 japhb k
03:16 DietCoke there are some things that require 'test' to hit, but it's mainly if you mess with adding opcodes, pmcs, or config steps.
03:16 DietCoke IIRC.
03:16 japhb fair enough
03:17 teknomunk joined #parrot
03:26 japhb Hmmm, coretest skips configure, examples, doc, manifest, developing, and JSON tests.
03:27 japhb Given it's 194 seconds already on this box and test is 319, both are approximately "take a stretch break", so not worth running just coretest for me I think.
03:29 japhb Speaking of DEVELOPING, shouldn't those two release numbers be bumped?  At least, that's how I'm reading the comments at the bottom of the file.
03:33 DietCoke DEVELOPING should be the number of the last released version, IIRC.
03:33 DietCoke hopefully c updated it.
03:34 japhb It shows two revs.  According to the notes, they are supposed to be the last release version, and the next-to-be-released version.  But right now, showing 0.6.1 and 0.6.2.
03:35 japhb ... unless I'm misreading the notes
03:37 Zaba joined #parrot
03:39 DietCoke yes. this release is 0.6.2
03:39 pmichaud just look at the log on the file and see when it was last updated :-)
03:39 DietCoke though you're right, those descriptions seem to be inaccurate.
03:40 japhb DietCoke: the reason I believe the descriptions instead of the release numbers above, is that DEVELOPING is deleted during tarball packaging ... so there's no point in having information in there that is out of date.
03:41 japhb ... Because someone using a release tarball (and thus perhaps interested in old history) will never see that file
03:41 DietCoke japhb: yes, but we're currently used to having it lagged by one.
03:42 DietCoke So we either need to change our expectations (fix the file) or yours (fix the descriptions.)
03:42 DietCoke But we should probably do one or the other. Feel free to open a ticket with your case. =-)
03:42 japhb I vote for fixing the file, because then it becomes useful ... developers then know when the next release will be.  :-)
03:42 japhb fair enough
03:43 pmichaud urg
03:43 japhb pmichaud: ?
03:43 DietCoke japhb: when the next release will be?
03:43 pmichaud ...is there no way to determine if a class has a method of a given name, either itself or via inheritance?
03:44 DietCoke (we don't know at release A what release B will be numbered.
03:44 japhb DietCoke: doesn't mean we can't put a placeholder in, and pick a date
03:53 DietCoke (the date's typically known)
03:53 DietCoke see: docs/project/rel*
03:53 DietCoke which also has the instructions for updating it which also probably need an update.
03:53 japhb RT sent
04:01 Alias joined #parrot
04:01 Alias Juerd: Ping?
04:03 tetragon joined #parrot
04:13 japhb Anybody about that uses git-svn for parrot work?
04:14 * japhb is having to give himself a crash course because of the Debian SVK snafu
04:20 dalek r27692 | pmichaud++ | trunk:
04:20 dalek : [p6object]:
04:20 dalek : * Turns out that when checking for a 'new' method, we have to
04:20 dalek :   check all of the mro classes.
04:20 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27692
04:33 ank japhb: I started playing with it yesterday, looks very nice
04:37 Alias debian svk snafu?
04:43 wolv joined #parrot
04:43 chromatic_FEED_ME Debian unstable includes Perl 5.10 but doesn't work with SVK or something.
04:45 Alias ah
04:45 Alias wait... in unstable
04:45 Alias oh wait, snafu
04:45 Alias I somehow read debacle :)
04:45 * bacek_ found bug Parrot_quicksort
04:45 particle[ventus] joined #parrot
04:45 bacek_ http://pastebin.com/d15ced157
04:45 particle[ventus] left #parrot
04:45 bacek_ This implementation of List.sor using FPA.
04:46 bacek_ With sample code and backtrace from GDB on crash.
04:46 bacek_ List.sort
04:57 dalek r27693 | pmichaud++ | trunk:
04:57 dalek : [p6object]:
04:57 dalek : * Allow p6object to create classes named via arrays
04:57 dalek :   (e.g., things like ['Foo';'Bar']).
04:57 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27693
05:20 dalek r27694 | pmichaud++ | trunk:
05:20 dalek : [p6object]:
05:20 dalek : * Convert PCT, PGE, and NQP to all use the new P6object.pbc library
05:20 dalek :   instead of Protoobject.pbc.
05:20 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27694
05:24 dalek r27695 | pmichaud++ | rakoo:
05:24 dalek : Remove rakoo branch to easily re-sync with trunk.
05:24 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27695
05:25 barney joined #parrot
05:26 dalek r27696 | pmichaud++ | rakoo:
05:26 dalek : Re-create rakoo branch from fresh trunk, this branch will
05:26 dalek : be used to migrate rakudo to the P6object library.
05:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27696
05:46 bacek_ joined #parrot
05:46 bacek_ pmichaud: ping
05:47 pmichaud bacek_: pong
05:48 bacek_ what about FPA sort bug? Or it is my bug?..
05:48 pmichaud I haven't had a chance to look at it.
05:48 bacek_ http://pastebin.com/d15ced157
05:48 bacek_ pmichaud: ok.
05:48 bacek_ I can wait :)
05:49 pmichaud there's no 'infix:lte'
05:49 pmichaud you probably mean 'infix:leg'
05:50 bacek_ pmichaud: just a sec
05:50 pmichaud also, you may need   get_hll_global 'infix:leg'
05:50 pmichaud otherwise it'll look for 'infix:leg' in the current namespace ('List')
05:51 bacek_ pmichaud: Ho!
05:51 bacek_ pmichaud: you genius!
05:51 bacek_ It works!
05:51 bacek_ copy to
05:51 bacek_ sort
05:51 bacek_ copy from
05:51 bacek_ done
05:51 bacek_ 1 2 3 4 a b c d
05:51 * bacek_ dancing around table
05:53 cotto_home automatic?
05:53 purl hmmm... automatic is extremely lame
05:54 cotto_home nopaste, automatic is http://youtube.com/watch?v=tIRCzbBB99E
05:54 cotto_home no automatic is http://youtube.com/watch?v=tIRCzbBB99E
06:11 Juerd pmichaud: pong
06:11 pmichaud Juerd: lot of apache2 processes running on feather -- a lot more than I would expect.
06:12 pmichaud it looks to me as though some of them never die
06:12 pmichaud not sure why yet -- haven't tracked that down.
06:13 pmichaud but since MaxSpareServers is set to a relatively low value -- we shouldn't see this many running.
06:14 bacek_ my @a = ('a', 4, 'c', 2, 'b', 1, 'd', 3);
06:14 bacek_ say ~@a;
06:14 bacek_ @a.sort();
06:14 bacek_ say ~@a;
06:14 bacek_ my @b = sort { $^b <=> $^a }, @a;
06:14 bacek_ say ~@b;
06:14 bacek_ $ ../../parrot perl6.pbc sort.pl
06:14 bacek_ a 4 c 2 b 1 d 3
06:14 bacek_ 1 2 3 4 a b c d
06:14 bacek_ 4 3 2 1 d c a b
06:14 bacek_ Ho. pmichaud is my hero
06:14 pmichaud bacek_: (nopaste is my hero :-)
06:14 bacek_ pmichaud: ok-ok :)
06:15 pmichaud Juerd: if you could temp grant me sudo privileges, I might be able to trck down the apache2 processes a bit further
06:15 * bacek_ just little overexcited :)
06:15 pmichaud bacek++
06:15 bacek_ pmichaud: this FPA based sort
06:17 uniejo joined #parrot
06:30 Juerd pmichaud: You now have sudo access
06:30 grim_fandango joined #parrot
06:30 Juerd pmichaud: And thanks
06:31 pmichaud sure.  I'm going to make a minor change to apache2.conf (to enable /server-status to my workstation) and reload it and see what's going on.
06:31 pmichaud I'll make backups of any files I change.
06:32 pmichaud (but that's the only one I expect to change w/o checking with you first)
06:39 Zaba_ joined #parrot
06:45 iblechbot joined #parrot
06:46 pmichaud okay, done.  I'll keep an eye on apache2 throughout tomorrow and let you know if I find anything.
06:48 AndyA joined #parrot
07:38 dalek r27697 | fperrad++ | trunk:
07:38 dalek : [Lua]
07:38 dalek : - bytecode translation : refactor
07:38 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27697
07:50 leo joined #parrot
08:25 dalek r27698 | pmichaud++ | trunk:
08:25 dalek : [p6object]:
08:25 dalek : * Refactor handling of parent class addition a bit, to simplify things
08:25 dalek :   for rakudo.
08:25 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27698
08:25 zOrK joined #parrot
08:37 bacek_ pmichaud: ping.
09:07 jonathan morning all
09:07 purl morning, jonathan
09:14 ruoso joined #parrot
09:22 jjore joined #parrot
09:24 jonathan pmichaud: (...is there no way to determine if a class has a method of a given name, either itself or via inheritance?) - the 'can' opcode/method should do this
10:04 wknight8111 joined #parrot
10:06 bacek jonathan, evening...
10:08 jonathan bacek: Hi there :-)
10:09 bacek jonathan, can you review second patch from http://rt.perl.org/rt3/Tic​ket/Display.html?id=54514?
10:10 bacek is it "right way" for workaround about broken inheritance?
10:17 jonathan bacek: .sub '$!sort' :method
10:17 jonathan Just !sort if you want to make it private
10:17 jonathan No $
10:18 bacek jonathan, O! New knowledge about "dark magick" :)
10:20 jonathan Other than wondering if Perl 6 sort really is in-place, it looks good.
10:22 jonathan I thought it returned a sorted copy of the list?
10:22 moritz it should
10:22 jonathan bacek: But that's only a small change. :-)
10:23 bacek jonathan, hmm... I don't fully understand "'=sort' mutator form"
10:24 jonathan bacek: That's a form that would be called, as an optimization, when writing for example @stuff .= sort();
10:25 jonathan However, Rakudo doesn't know about this yet, I don't think.
10:25 dalek r27699 | jonathan++ | trunk:
10:25 dalek : [rakudo] Implement => infix operator, for constructing more complex pairs. Make them work in calls when you just have a string literal there.
10:25 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27699
10:25 moritz jonathan: without the spaces please
10:25 jonathan moritz: It works without the spaces too?
10:25 moritz jonathan: I think method calls may not have spaces at all
10:26 moritz jonathan: you *have* to write it as @stuff.=sort
10:26 jonathan Normally, they may not.
10:26 jonathan But in STD.pm
10:26 jonathan token infix:sym<.=> ( --> Item_assignment) { <sym> {*} }
10:27 moritz so infix:<.=> is an alias for the method call .= ?
10:27 moritz ok, I take back everything I said ;9
10:27 jonathan Yes; and it allows the spaces :-)
10:27 jonathan Otherwise you'd not be able to write
10:27 jonathan my Dog $fido .= new();
10:28 jonathan It'd have to be without the spaces.
10:28 moritz ok
10:28 moritz thanks for the clarification
10:28 jonathan np
10:28 jonathan Do you know if you're allowed to do things like foo($name => $value) when calling?
10:29 jonathan Or is only a literal string allowed on the left hand side of =>?
10:29 avar no, the lhs of => is a scalar
10:29 jonathan If you're allowed more than a literal string, we have a problem at the moment, 'cus Parrot don't support that right now. :-(
10:29 avar or Any, probably
10:29 avar because the lhs is a hash table entry or something?
10:29 jonathan OK, in the general case, yes, it just makes a Pair
10:30 jonathan Because in Parrot Intermediate Code you're only allowed a string literal for the name.
10:30 jonathan I've made 'foo' => 42 work now
10:30 bacek jonathan, http://pastebin.org/37501
10:31 bacek jonathan, this is reworked sort
10:31 jonathan bacek: Looks good
10:31 purl O_O
10:31 jonathan And bonus points for tail call usage ;-)
10:31 bacek http://rt.perl.org/rt3/Tic​ket/Display.html?id=54312 and this this 5-days old infix:=> implementation :)
10:32 avar jonathan: Yes why is that? Because some parrot object is being used for it?
10:32 jonathan avar: Why are you only allowed a string literal at Parrot level, you mean?
10:33 jonathan I don't have a good answer to that, other than, that's the way it is.
10:33 avar If the lhs needs to be a string literal but not the rhs that would suggest you're using some parrot datatype that is limited in that way.
10:33 jonathan Yes, Parrot's signatures only allow a string constant there.
10:33 jonathan That's the limitation.
10:34 jonathan If you're allowed to write foo($name => $value), though, then I think Parrot's going to have to change to support non-constant names for named parameters.
10:34 avar Ah, so parrot calling conventions for subroutines are being used directly. That answers my question.
10:34 jonathan avar: Yes, correct.
10:34 avar Yes, either that or pass a Perl 6 object that describes the arguments
10:35 jonathan Such as a Capture. :-)
10:35 jonathan Unfortunately, doing so would rather harm our ability to interoperate with other languages on Parrot.
10:40 jonathan bacek: That was similar to what I first thought of doing; unfortunately, it doesn't work out with writing calls.
10:46 jonathan bacek: Is that sort patch ready to apply?
10:47 bacek jonathan, I think so.
10:47 jonathan OK. Is there a ticket for it?
10:48 bacek New version attached to http://rt.perl.org/rt3/Tic​ket/Display.html?id=54514
10:53 jonathan bacek: Does this work for you:
10:53 jonathan my @a = (7,1,8,3,2); my @b = sort { $^a <=> $^b }, @a; say @b;
10:54 jonathan I'm actually getting segfaults here from that!
10:59 jonathan bacek: Also,
10:59 jonathan my @a = (7,1,8,3,2); my @b = @a.sort({$^a <=> $^b});
10:59 jonathan too many arguments passed (2) - 1 params expected
10:59 bacek jonathan, just a sec... min... I rebuilding parrot from scratch.
11:00 jonathan Oh, did you support passing a comparer yet?
11:00 bacek about second example: no. It will not work.
11:00 bacek jonathan, comparer passing works only for sort {}, @list
11:02 jonathan OK
11:03 bacek I still learning parrot... My version with .sub 'sort' :multi(_) :method in list just always complains about wrong number of arguments
11:06 jonathan bacek: Maybe make it an optional parameter?
11:06 jonathan :optional
11:06 purl i think :optional is a flag to an argument
11:09 bacek jonathan, ok. I'll read pdds once again to figure how it should work
11:11 jonathan OK
11:11 bacek bacek@icebolt:~/src/parrot/languages/perl6$ cat sort2.pl
11:11 bacek my @a = (7,1,8,3,2); my @b = sort { $^a <=> $^b }, @a; say @b;
11:11 bacek bacek@icebolt:~/src/parrot/languages/perl6$ ../../parrot perl6.pbc sort2.pl
11:11 bacek 12378
11:11 jonathan I'm curious if
11:12 jonathan my @a = (7,1,8,3,2); my @b = sort { $^a <=> $^b }, @a; say @b;
11:12 jonathan my @a = (7,1,8,3,2); my @b = sort { $^a <=> $^b }, @a; say @b;[6~[6~[6~[6~[6~[6~[6~
11:12 jonathan ...oops
11:12 jonathan If that works for you
11:12 jonathan Oh, you just tried it.
11:12 jonathan Hmm
11:12 bacek jonathan, http://rt.perl.org/rt3/Tic​ket/Display.html?id=54474 :)
11:13 bacek jonathan, I've fixed cmp before :)
11:13 jonathan Ah, and that patch is unapplied?
11:13 bacek jonathan, yes
11:14 moritz that's one of the things that make parrot development less fun
11:15 jonathan Latest version attached to the ticket is one that should be applied, right?
11:16 bacek jonathan, yes. But it is not reviewed.
11:16 jonathan Just looked over it, looks good.
11:16 bacek jonathan, but according to Coke and chromatic it is right way to do
11:16 jonathan Not sure about the change to freeze though.
11:17 jonathan That's the only bit I'm a tad unsure about applying.
11:17 jonathan The rest, looks good to me.
11:18 jonathan Applied it locally, apart from the freeze part. Testing it.
11:18 bacek bacek@icebolt:~/src/parrot/languages/perl6$ cat sort3.pl
11:18 bacek my @a = (7,1,8,3,2); my @b = @a.sort({$^b <=> $^a}); say ~@b;
11:18 bacek bacek@icebolt:~/src/parrot/languages/perl6$ ../../parrot perl6.pbc sort3.pl
11:18 bacek 8 7 3 2 1
11:19 bacek jonathan, :optional really works!
11:19 bacek I'll create new patch for 'sort' :)
11:21 braceta joined #parrot
11:22 jonathan Yay!
11:22 jonathan moritz: You mean dealing with the segfaults makes it less fun?
11:23 moritz jonathan: no, that patches usually take quite some times before getting applied
11:24 jonathan Ah.
11:24 * bacek have to deal with kids... It's a bed time
11:24 masak joined #parrot
11:25 moritz jonathan: for example I submitted a patch to make languages/PIR/ compile again, which can easily be verified
11:26 moritz I can understand that patches to the core are thoroughly revied, but things like that should be easy and fast to do
11:27 masak does rakudo support `use v5`?
11:27 masak does it default to perl 5 if no version is given?
11:28 jonathan masak: No and no, for the moment.
11:28 masak but we're heading there?
11:28 moritz I think it's far down the roadmap
11:29 masak I mean, at least it's on the roadmap, right?
11:29 jonathan moritz: Agree that things like that likely can be applied nice and quickly, yes. In fact, people working on stuff in languages/ should be able to get commit bits after a few patches anyway.
11:29 masak I don't need it now, just curious whether it will be there
11:29 masak and how
11:30 jonathan masak: If it's in the spec, then yes, it will be there eventually.
11:30 masak that means that every compliant distro of perl 6 will also include perl 5
11:31 jonathan The spec seems to suggest it will be that way...
11:31 moritz masak: yes
11:31 masak will that be in the form of a parrot project, or in the form of the original perl 5 codebase?
11:31 moritz although I could imagine that 20 years after Perl 6 is being deployed we might get rid of that dependency
11:32 masak one can only hope
11:32 jonathan masak: Probably original Perl 5 embedded in Parrot, initially.
11:33 masak what does that mean? can it do `use v5; { use v6; ... }`?
11:34 moritz you will
11:34 masak ok, good
11:35 dalek r27700 | jonathan++ | trunk:
11:35 dalek : [core] Make Integer PMC call SELF.get_integer() rather that look straight at the data in various places, so as to make subclassing work properly. Patch courtesty of Vasily Chekalkin <bacek@bacek.com> (bacek++).
11:35 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27700
11:39 ank joined #parrot
11:40 braceta joined #parrot
11:40 dalek r27701 | jonathan++ | trunk:
11:40 dalek : Give bacek an entry in CREDITS.
11:40 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27701
11:49 dalek r27702 | fperrad++ | trunk:
11:49 dalek : [install]
11:49 dalek : - add MIME/Base64.pbc (used by pheme)
11:49 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27702
11:52 bacek joined #parrot
11:52 bacek hi again
11:52 purl oh, you're back!
11:52 bacek purl, damn bot! :)
11:52 purl bacek: i'm not following you...
11:53 jonathan bacek: Applied your Integer PMC patch, thanks. :-)
11:53 bacek jonathan, thank for applying 'cmp bug'
11:53 jonathan Thank you for the patch!
11:53 bacek jonathan, wait a little bit with sort.
11:54 jonathan Sure, whenever you're ready with it.
11:54 bacek Latest version broke my first test...
11:54 bacek I've got Null PMC access in get_bool :(
11:56 bacek What is proper way to check :optional argument was passed?
11:57 jonathan But :opt_flag after it
11:57 jonathan .param pmc foo :optional
11:57 jonathan .param int have_foo :opt_flag
11:57 jonathan Test have_foo for zeroness.
11:58 bacek jonathan, thanks.
12:00 bacek http://pastebin.org/37515
12:00 bacek This version work with my all my tests.
12:01 jonathan bacek: OK, great. I have a few local changes that I need to get sorted out and ci'd first, but will take a look in a moment. (Well, after lunch...)
12:02 bacek jonathan, ok. Bon appetite!
12:03 bacek I'll attach latest version to ticket.
12:04 bacek http://rt.perl.org/rt3/Ticket/D​isplay.html?id=54514#txn-409824
12:14 bacek jonathan, BTW, I think you can remove 'join' and 'sort' from TODO in List.pir :)
12:15 bacek and 'reduce' too.
12:17 * moritz tests his new 'make spectest_regression'
12:23 bacek Question (another stupid one): in which syn described this syntax: my @s = sort { $^a <=> $^b }: @a;
12:23 bacek with colon after sub.
12:23 dalek r27703 | jonathan++ | trunk:
12:23 dalek : [rakudo] Fix Int cloning.
12:23 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27703
12:24 moritz bacek: it's the same as { $^a <=> $^b }.sort(@a); (the thing before the : is the invocant). Either S02 or S12.
12:25 bacek moritz, thanks
12:26 bacek looks like in S06: invokant parameters...
12:28 bacek Is it handled by 'token adverbs' in STD.pm>
12:28 bacek ?
12:28 * moritz doesn't know STD.pm well enough to answer that
12:33 bacek yes it is... And it is not handled in current rakudo at all...
12:33 * DietCoke drinks a coffee.
12:33 * bacek just drinks
12:37 gryphon joined #parrot
12:38 moritz make spectest_regression patch for rakudo sent!
12:38 moritz to perl6-internals, that is
12:39 moritz hope that helps jonathan
12:45 Zaba joined #parrot
12:49 * jonathan returns from myamming a ham sarnie
12:53 jonathan moritz: Do we actually pass the tests on that list?
12:53 jonathan But - thank you muchly for this patch.
12:55 jonathan bacek: So that patch is ready to apply?
12:55 bacek jonathan, I think so
12:56 moritz jonathan: yes, rakudo passes these tests ( r27698 )
12:56 jonathan moritz++
12:56 moritz you're welcome
12:58 jonathan OK, will get these both in when I figure out how to get the first cut of lazy ranges in without breaking stuff that currently works...
12:58 jonathan for 1..6 { ... } # actually constructs an interator now
12:58 jonathan 'A'...'Z' works locally too :-)
12:58 jonathan By iteator I mean, Range object.
12:58 masak jonathan++
12:59 jonathan But gotta get my @a = (1..6); to do something sensible.
12:59 jonathan (Without doing everything that really needs to be done. Yet.)
13:07 ank hey, do you guys know what "TRE" is? (i'm reading rakudo.org and it talks about "TRE" as a token matcher)
13:08 moritz ank: it's a regex library
13:08 moritz http://laurikari.net/tre/
13:08 ank cool! thanks
13:08 moritz and for perl: http://search.cpan.org/perldoc?re::engine::TRE
13:08 moritz yw
13:14 * DietCoke wonders why the hell jonathan's email about fixing integer.pmc didn't hit the list.
13:15 DietCoke jonathan: any reason why you cc'd parrot-porters@perl.org and not perl6-internals@perl.org?
13:15 DietCoke (just spent 5m getting ready to apply the patch to find it applied. =-)
13:16 jonathan DietCoke: I thought parrot-porters was the Right Address for the list now?
13:16 DietCoke it's an alias.
13:16 Tene japhb: I use git-svn
13:17 DietCoke there's no reason to override the list that RT provides. =-)
13:17 DietCoke (I'm guessing it got held up for moderation somewhere.)
13:18 jonathan I couldn't see the "Toggle cc to ..."
13:18 dalek r27704 | coke++ | trunk:
13:18 dalek : Add test to verify cmp works in subclasses of 'Integer', reworked from a
13:18 dalek : sample provided by Vasily Chekalkin in RT#54474
13:18 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27704
13:18 dalek r27705 | jonathan++ | trunk:
13:18 dalek : [rakudo] Really fix Int cloning. D'oh.
13:18 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27705
13:18 DietCoke bacek: reworked your initial case as a test and committed that. For bonus points, provide those PIR scripts as failing tests in teh first place. =-)
13:18 DietCoke bacek++
13:19 jonathan DietCoke: Strange, I see it now...who knows. :-)
13:20 dalek r27706 | jonathan++ | trunk:
13:20 dalek : [rakudo] Make range objects work as iterators. You can now create them and use them as such. However, we're not ready to make them be created with .. just yet; need to sort out various other bits.
13:20 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27706
13:23 bacek DietCoke, clean version of test made by pmichaud...
13:23 jonathan bacek: This sort patch is final one to apply, right?
13:23 bacek jonathan, yes.
13:26 * bacek going to sleep...
13:26 jonathan bacek: Will apply this, thanks.
13:26 bacek jonathan, thank.
13:26 jonathan Ah, it has a slight bug
13:27 jonathan Will tweak it.
13:27 bacek BTW, any chances for 'protoregexes' in near future?
13:27 bacek jonathan, no way! It's prefect! :)
13:27 jonathan pmichaud is planning to work on them in the not too distant future, I believe.
13:27 jonathan bacek: Unless you try it with my @a = <5 1 7 3>; my @b = sort @a; say @b;
13:28 jonathan Then it things the array is the comparer. ;-)
13:29 bacek jonathan, yeek... You right. It's only 99% percent perfect :)
13:29 bacek jonathan, so it it should be 2 versions of 'sort' with :multi?
13:34 jonathan bacek: Actually, I just check if the comparer is code or not. :-)
13:34 jonathan Works.
13:35 jonathan Will ci.
13:35 wknight8111 joined #parrot
13:37 jonathan bacek: It's in. Thanks!
13:37 bacek jonathan, thank for knowledge about "Dark Magick" :) I'll try to implement 'map' better.
13:37 dalek r27707 | jonathan++ | trunk:
13:37 dalek : [rakudo] Implement sort method and sub. Patch courtesy of bacek++.
13:37 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27707
13:38 bacek ok. good night to everyone.
13:43 jonathan goodnight :-)
13:43 jonathan moritz: When I do "nmake spectest_regression" it seems to be running everything but the spectests...
13:44 rdice joined #parrot
13:47 moritz jonathan: are you on windows?
13:48 moritz jonathan: it assumes / as the path separator, my bad
13:48 jonathan moritz: Yes
13:48 jonathan Ah
13:49 moritz jonathan: try to translitare all backslashes by slashes in the grep in line 50 in t/harness
13:51 DietCoke Whoops. Blogger made it a little to easy to post to the wrong blog there.
13:51 DietCoke apologies if that diet post shows up in anyone's parrot feed. :|
13:51 DietCoke 'too'
13:52 jonathan moritz: Think I've got a fix that makes it portable.
13:52 jonathan It was the slashes issue.
13:53 jonathan Wow.
13:53 moritz jonathan: and we need a to die if @tfiles is empty, because it means that something is wrong
13:54 moritz jonathan: and it also means that t/0*/* is executed
13:54 moritz which is what happened to you
13:54 jonathan Ah, yes, good idea.
13:55 jonathan Added.
13:56 moritz and in root.in a line like this:
13:56 moritz @echo "  spectest_regression:  Run the tests of the official test suite that are known to pass."
14:03 jonathan Yup, added
14:06 dalek r27708 | jonathan++ | trunk:
14:06 dalek : [rakudo] Add spectest_regression makefile target, which only runs tests on a known-to-pass whitelist. The goal is to have make spectest be useful enough not to need this; for now, this way provides highly useful information. Patch courtesy of Moritz Lenz (moritz++), with a couple of platform tweaks by jonathan++ so it works on Windows.
14:06 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27708
14:09 DietCoke I know it's a hack, but isn't there a builtin module for file path assembly, and or a parrot config option you can steal it from rather than re-inventing tha particular wheel? (I know it's a really small wheel, though.)
14:09 jonathan moritz++ # thank you thank you thank you!
14:10 * moritz performs a sweeping bow
14:11 jonathan DietCoke: Probably; I'm sure if a cage cleaner feels strongly enough about it, they'll tweak it. :-)
14:13 jonathan OK, back to the hacking.
14:13 * jonathan hopes pmichaud is awake soon, since he has questions for him :-)
14:13 DietCoke jonathan: hopefully it'll be gone by then. =-)
14:15 jonathan Sure, but for now it solves a real problem, so I'm very happy to have it here.
14:19 DietCoke (to be clear, I'm happy it got applied. =-)
14:19 pmichaud pong
14:20 cognominal I see that everyone step in jonathan toes for things he has already built in his heads.
14:20 jonathan pmichaud: A few things...
14:20 purl a few things are worse than a gecko revolt
14:20 cognominal s/heads/head/
14:20 jonathan A gecko revolt sounds coool!!
14:20 DietCoke ooh, can I have one?
14:20 jonathan pmichaud: First, I've put in lazy ranges as iterators. Apart from, I can't use them with .. yet.
14:21 jonathan er, ranges as lazy iterators
14:21 jonathan But they work like that.
14:21 jonathan Thing is
14:21 jonathan @a = (3..5); # oh my
14:21 jonathan Because of course, you can't do @a[1] on an iterator
14:21 cognominal pmichaud, I did a svn update, make clean, perl Configure.PL, and make  and got error:imcc:syntax error, unexpected SHIFT_LEFT ('<<')
14:21 cognominal in file 'src/PCT/HLLCompiler.pir' line 17
14:21 cognominal error:imcc:syntax error, unexpected RELOP_EQ ('==')
14:21 cognominal in file 'src/PCT/HLLCompiler.pir' line 21
14:21 cognominal error:imcc:syntax error, unexpected SHIFT_RIGHT_U ('>>>')
14:21 cognominal in file 'src/PCT/HLLCompiler.pir' line 25
14:21 cognominal make[1]: *** [../../runtime/parrot/library/PCT.pbc] Error
14:22 pmichaud you mean in Parrot's implementation of Iterator.  Right.  Parrot's Itertor doesn't really do what we need, I don't think.
14:22 jonathan No, no.
14:22 jonathan Range *is* an iterator.
14:22 jonathan It's working fine as an iterator.
14:22 cognominal I am checking to see if I am clean... :)
14:22 jonathan my $r = Range.new(from => 1, to => 6); for $r -> { say $_ } # works
14:23 jonathan The thing is what happens on assigning it to an array.
14:23 pmichaud right now (wrong or right)  the array just gets a copy of the Range, yes?
14:23 jonathan Yeah.
14:23 pmichaud Ranges need to support postcircumfix:<[ ]>
14:23 Tene cognominal: looks like you got a merge conflict.
14:24 jonathan pmichaud: That'd be one way, but I don't think they're menat to.
14:24 Tene I was wondering the other day what needs to change in the List::* builtins to support working with lazy lists.
14:24 jonathan I mean, @a should be an array, which references the lazy iterator.
14:24 pmichaud okay, then we have to have lazy list implementation to make it work.
14:24 jonathan I feared this.
14:25 jonathan :-)
14:25 pmichaud there's a *reason* I put laziness far down the roadmap, jonathan.  :-)
14:25 cognominal yes I need to do branc intead of of experementing many stuf at once.
14:25 cognominal s/bran/branches/
14:25 jonathan Yeah, it hadn't quite occured to me that lazy iterators would wind up with needing to do the whole thing.
14:25 pmichaud I think once we have mutables, laziness becomes much simpler.
14:26 jonathan Yeah.
14:26 moritz jonathan: what about makiing it eager for a start?
14:26 pmichaud (eager)  that was the approach I had been taking.
14:26 pmichaud thus infix:<..>  was returning a flattened list
14:26 jonathan It still is.
14:26 jonathan I haven't switched it over to using Range.
14:26 PerlJam You could do the eagerness only on assignment.
14:27 PerlJam (to an array)
14:27 jonathan Yeah, that would be one way.
14:27 pmichaud I think overall it's easier to just get mutables working first.
14:27 jonathan Yes.
14:27 pmichaud and then do it "right"
14:27 jonathan Agree.
14:27 jonathan OK, I'll leave Range for now...the class is useful once we get to it.
14:28 jonathan Next up, sorting out $/, $!, and so on.
14:28 pmichaud anyway, with my @a = 1..10;   we start out with @a being [ 1..10 ]    but after we do @a[2]  we end up with   [ 1, 2, 3, 4..10 ]
14:28 pmichaud or something like that.
14:29 jonathan Yes, agree.
14:29 pmichaud so, postcircumfix:[] on the array does the flattening
14:30 jonathan Right. Thus the laziness - it's lazy until you try and get at the value.
14:30 moritz jonathan: your previous commit broke Makefile (I think), because of leading spaces (instead of tab)
14:30 jonathan Oh?
14:30 moritz jonathan: at least I get warnings
14:30 pmichaud I'm about to check in my class refactoring in the rakoo branch.  It undoubtedly breaks a ton of stuff
14:31 jonathan That's OK, we've got a nice makefile target to find out what. :-)
14:31 moritz make Makefile
14:31 moritz Makefile:167: warning: overriding commands for target `spectest_regression'
14:31 moritz Makefile:129: warning: ignoring old commands for target `spectest_regression'
14:31 moritz make: `Makefile' is up to date.
14:31 purl make Makefile is a shortcut
14:31 jonathan moritz: I don't, but maybe Windows cares about this...
14:31 jonathan erm, doesn't care
14:31 moritz jonathan: or maybe it's just my stuff that's borked, let me check..
14:32 Tene pmichaud: asking for testing?
14:32 pmichaud Tene: more like "asking for understanding" when the world shifts beneath everyone's feet :-)
14:32 moritz jonathan: in the generated Makefile I have a leading space in line 128 (which is the documentation for spectest_regression)
14:32 jonathan moritz: Found some spaces instead of tabs, fixed.
14:32 moritz ok
14:32 Tene pmichaud: are you checking into a branch, or into trunk?
14:32 moritz (sorry, I think I b0rked that)
14:33 pmichaud branch.
14:33 pmichaud (rakoo branch)
14:33 jonathan moritz: Try it now.
14:33 dalek r27709 | jonathan++ | trunk:
14:33 dalek : [rakudo] Fix makefile breakage in last commit, noticed by moritz++.
14:33 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27709
14:34 jonathan pmichaud: Any chance you can sync the branch with trunk, so I can run the spectest_regression target in it?
14:34 jonathan That will give a clearer picture of any breakage.
14:34 pmichaud jonathan: doing that now.  But I really expect that most class/grammar/etc. stuff is completely broken
14:34 jonathan pmichaud: OK. Will get myself a copy of the branch. :-|
14:35 DietCoke cla?
14:35 purl cla is Contributor License Agreement or http://www.perlfoundation.org/​contributor_license_agreement
14:35 moritz jonathan: still not fixed :(
14:35 moritz I did an 'rm Makefile' and then 'perl Makefile.PL' in the root dir
14:35 wknight8111 I'm getting a t/codingstd/trailing_whitespace test failure on languages/perl6/src/classes/List.pir
14:36 * pmichaud is _really_ concerned about trying to make these changes in a branch with so many people actively working in trunk.
14:36 moritz jonathan: there's a single leading whitespace at config/makefiles/root.in:125
14:37 moritz jonathan: removing that fixes the problem for me
14:37 jonathan Urk.
14:37 jonathan Found it.
14:37 jonathan That was sneaky.
14:37 dalek r27710 | fperrad++ | pdd25cx:
14:37 dalek : [Lua]
14:37 dalek :  - fix compil : s/ILL_INHERIT/EXCEPTION_ILL_INHERIT/g
14:37 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27710
14:37 jonathan pmichaud: You getting merge conflicts?
14:37 pmichaud yes.
14:37 jonathan Ugh.
14:38 pmichaud and even trying to sync the makefile changes you're making now is a pain.
14:38 Tene does svn not help you with that?
14:38 pmichaud I have to keep track of what has been merged and what hasn't.
14:38 pmichaud and yes, there are merge conflicts, so that recent changes to List conflicted with what I did a few hours ago.
14:40 jonathan moritz: Try that one?
14:40 dalek r27711 | jonathan++ | trunk:
14:40 dalek : [rakudo] Try to fix another whitespace bug in the makefile.
14:40 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27711
14:40 moritz jonathan: works!
14:41 jonathan OK, good.
14:46 moritz any bug admins here? #54476 was closed by r27708
14:48 dalek r27712 | pmichaud++ | rakoo:
14:48 dalek : re-sync rakoo branch with trunk.
14:48 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27712
14:48 jonathan moritz: yes, will close
14:49 jonathan pmichaud: Does rakoo branch include the changes too?
14:49 dalek r27713 | pmichaud++ | rakoo:
14:49 dalek : [rakudo]:
14:49 dalek : * First round of base class refactorings to use P6object.
14:49 dalek : * Undoubtedly quite a few things break.
14:49 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27713
14:49 pmichaud jonathan: it does now.
14:49 jonathan OK, let me svn up and see what the damage is. :-)
14:50 pmichaud I apologize in advance.  :-)
14:50 jonathan pmichaud: Thinking back on mutables etc. The only PMC we need to add for those is the Scalar one, right?
14:51 pmichaud yes, but I was thinking of calling it "Mutable"
14:51 jonathan OK, sure.
14:51 jonathan But Array is subclass of ResizablePMCArray?
14:51 pmichaud and then Scalar, Array, Hash etc are types of mutables
14:51 pmichaud I'm not sure about Array yet.
14:51 jonathan OK
14:52 jonathan Building the branch...
14:52 pmichaud the biggest thing the branch tries to do at this point is to clean up Perl6Object and Any handling
14:52 pmichaud and get all of the other classes oriented correct for that
14:52 jonathan OK, sounds good.
14:53 pmichaud 09:24 <jonathan> pmichaud: (...is there no way to determine if a class has a method of a given name, either itself or via inheritance?) - the 'can' opcode/method should do this
14:53 pmichaud unfortunately, the 'can' opcode only works on instances.
14:53 pmichaud at least, for what I want to do.
14:53 Tene pmichaud: and to get a list of all methods in a class?
14:53 jonathan Ah, OK
14:54 jonathan meths = inspect class, "methods"
14:54 pmichaud what I end up having to do is to inspect the class for 'all_parents', and then walk the mro list to look at each class and check its .'methods'() list
14:54 Zaba_ joined #parrot
14:54 dalek r27714 | fperrad++ | trunk:
14:54 dalek : [build]
14:54 dalek :  - fix 'make realclean' on Windows (partial revert of r27361)
14:54 dalek : The input line is too long.
14:54 purl i already had it that way, dalek.
14:54 dalek : make: *** [prog-clean] Error 255
14:54 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27714
14:55 pmichaud because .'methods'() only gives me the methods of the class itself, not its parents
14:55 jonathan Sure
14:55 jonathan That's the design.
14:56 pmichaud which is fine, but there's no way to figure out if objects of a given class can perform a given method without either instantiating such an object or walking the mro list :-)
14:56 DietCoke fperrad?
14:56 pmichaud anyway, my workaround works for now.  :-)
14:56 jonathan pmichaud: If we implemented something in C, it'd only be doing the same thing, I guess.
14:56 pmichaud and I even refactored it into a single place, so it's no big deal
14:56 jonathan (walking the MRO, that is)
14:57 pmichaud jonathan: yes, I think so.  And it's not a common enough operation to warrant much optimization.
14:57 jonathan That was going to be my next question. Do you do it enough to want it optimized.
14:57 pmichaud it only occurs when we create or register a new class.
14:57 pmichaud (using P6object)
14:57 pmichaud so, no.
14:58 pmichaud anyway, in the rakoo branch I currently get two 'make test' failures
14:58 pmichaud 07-isa.t and 07-ref.t
14:58 pmichaud starting to look at those nose.
14:58 jonathan Yeah, I just noticed we fail those.
14:58 pmichaud *now.
14:58 jonathan I'm going to see how bad the spectest_regression target is.
14:58 * pmichaud cringes.
14:59 pmichaud the 'class' and 'grammar' keywords need some reworking
14:59 jonathan Well, we ain't failing *everything* in that target...
15:00 pmichaud make_grammar_proto should now simply be    p6meta.'register'(class, 'parent'=>'Grammar')
15:00 jonathan In fact, only four of them.
15:00 jonathan Three of them OO ones
15:00 pmichaud (force 'class' to be a subclass of Grammar if it's not one already)
15:01 * pmichaud tries the spectest_regression target
15:01 pmichaud another big change is that Hash.pir is now Mapping.pir
15:01 pmichaud (and we eliminate "Perl6Hash".  Yay!)
15:03 Tene What will things look like eventually when HLLs want to use class names already taken by parrot?
15:03 pmichaud they will break until Parrot fixes that.
15:04 jonathan pmichaud: Working on class keyword
15:05 pmichaud okay.  We no longer have a 'make_proto' sub
15:05 pmichaud use p6meta.'register'   instead
15:05 pmichaud p6meta.'new_class'  creates a new class and registers it
15:06 pmichaud p6meta.'register'  just registers an existing class
15:06 pmichaud in the case of the class keyword, we should
15:06 pmichaud (1) create a new class
15:06 pmichaud (2) process any has/does/is keywords
15:07 pmichaud (3) call p6meta.'register'(class, 'parent'=>'Any')   to create the protoobjects and otherwise ensure that the class is a subclass of 'Any'
15:08 pmichaud Tene:  what you mentioned is RT#43419 .
15:12 jonathan pmichaud: Done.
15:12 jonathan class Foo { method bar { say "yay"; } }; Foo.new().bar;
15:12 jonathan yay
15:12 pmichaud outstanding
15:12 pmichaud I think I have 01-ref fixed.
15:12 pmichaud er, 07-ref fixed.
15:12 davidfetter joined #parrot
15:12 jonathan However, we have...issues
15:12 jonathan Oh, you probably fixe dthem.
15:12 jonathan .WHAT() gave weird errors?
15:13 pmichaud oh, didn't fix it yet.  But it's undoubtedly something to do with .WHAT(), yes.
15:13 pmichaud feel free to do liberal commits in rakoo -- i.e., commit things even if tests don't pass
15:14 pmichaud I think we'll have a few hours or so of cleaning up rakoo, maybe a bit longer
15:16 Infinoid joined #parrot
15:17 jonathan pmichaud: Is this a bug:
15:17 jonathan grammar Foo { rule TOP { \d+ } }
15:17 jonathan if "hi" ~~ Foo { say "yes" }
15:17 jonathan if "h2i" ~~ Foo { say "yes" }
15:17 jonathan if "2" ~~ Foo { say "yes" }
15:17 jhorwitz joined #parrot
15:17 jonathan yes
15:17 jonathan Note it doesn't print yes after the second check.
15:17 dalek r27715 | pmichaud++ | rakoo:
15:17 dalek : [rakudo]:
15:17 dalek : * merge Makefile fix from trunk into branch
15:17 dalek : * be sure to register Perl6Str as well as String
15:17 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27715
15:18 pmichaud I thik that should produce "yes" twice, if that's what you're asking.
15:18 jonathan pmichaud: That's same in trunk though.
15:18 jonathan Yes, I think it should.
15:18 jonathan OK, that's a bug, but it's not related to the branch. On the upside, that means I've got the grammar keyword working again too.
15:18 pmichaud (commit?)
15:18 jonathan yea, just reading my diff for sanity :-)
15:20 dalek r27716 | jonathan++ | rakoo:
15:20 dalek : [rakudo] Get class and grammar keywords working again.
15:20 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27716
15:20 dalek r27717 | pmichaud++ | rakoo:
15:20 dalek : [rakudo]:
15:20 dalek : * Need to register "Boolean" type as "Bool".
15:20 dalek : * 07-ref.t passes.
15:20 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27717
15:21 ambs joined #parrot
15:21 pmichaud although, really I shouldn't have had to make r27717 in order to get 07-ref.t to pass.  Hrm.
15:21 * pmichaud investigates.
15:22 Topic for #parrotis now Parrot 0.6.2 "Reverse Sublimation" Released | http://parrotcode.org/ | 20/672 new/open tix
15:24 GeJ joined #parrot
15:25 cognominal I have a clean tree (at last) and I dabble with pod5 parsing and got Unable to find regex 'panic'
15:25 cognominal Null PMC access in invoke()
15:25 pmichaud oh, ick.
15:25 cognominal it there anything new on this front?
15:26 dalek r27718 | jonathan++ | rakoo:
15:26 dalek : [rakudo] s/Perl6Hash/Mapping/ in actions.pm. Makes a spectest fail differently. ;-)
15:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27718
15:26 pmichaud cognominal: I think I forgot to re-register the panic method in PCT::Grammar.
15:26 cognominal I have     [ $ || <panic: Syntax error> ]
15:26 ambs seen DietCoke
15:26 purl DietCoke was last seen on #parrot 30 minutes and 21 seconds ago, saying: fperrad?
15:26 ambs seen coke
15:26 purl coke was last seen on #parrot 1 day and 19 hours ago, saying: tries to figure out why that thread starts with tilly's message and not ambs's.  [May 19 13:28:34 2008]
15:26 pmichaud cognominal: just a sec, I'll fix.
15:26 cognominal no big deal
15:26 purl Yes it is!  I hate you I hate you
15:27 ambs purl, I hate you too
15:27 purl ambs: sorry...
15:28 * jonathan tries to work out why inheritance is br0ked in rakoo
15:29 nopaste "pmichaud" at 76.183.97.54 pasted "weirdness in 'copy' op" (56 lines) at http://nopaste.snit.ch/13031
15:29 cognominal if pmichaud and jonathan continue at thus pace the only sane way for peerl 5.12 will be to use parrot for bootstrap
15:29 pmichaud look at the line that says     find_lex P11, "$bool"
15:29 tedkat joined #parrot
15:30 pmichaud 39 copy P10, P9                     P10=Undef=PMC(0x833d5a0) P9=Object(Bool)=PMC(0xb7482eb4)
15:30 pmichaud 42 find_lex P11, "$bool"            P11=PMCNULL
15:30 pmichaud 45 unless_null P11, 6               P11=Boolean=PMC(0x833d5a0: 1)
15:30 pmichaud the object goes into 0x833d5a0 as a "Bool" but comes out as a "Boolean"
15:32 jonathan pmichaud: One mo, I'll look atthat...
15:33 pmichaud I'll write a small test case.
15:36 nopaste "pmichaud" at 76.183.97.54 pasted "weirdness in 'copy' op #2 -- small test case" (27 lines) at http://nopaste.snit.ch/13032
15:42 jonathan pmichaud: Will look, just trying to get to the bottom of why trait_auxilliary:is isn't dispatching properly...
15:43 pmichaud is that the one in Perl6Object ?
15:43 jonathan .sub 'trait_auxiliary:is' :multi('P6protoobject', 'Class')
15:43 jonathan Isn't matching anything
15:43 pmichaud oh
15:43 pmichaud you probably don't want P6protoobject
15:44 jonathan However, :multi(_,_) and printing the inheritance hierarchy of the first parameter shows that it includes P6protoobject
15:44 pmichaud it's a :multi, not a :method ?
15:44 jonathan Yes.
15:44 jonathan Well, it just extracts the Parrot Class and re-dispatches.
15:44 pmichaud where does trait_auxiliary:is get invoked from?
15:45 jonathan The code generated by an "is"
15:45 pmichaud .... i knew that ....  :-)
15:45 pmichaud I mean, it's in the generated PIR?
15:46 jonathan Ah, yes.
15:46 pmichaud P6protoobject feels wrongish to me.
15:46 jonathan class Bar is Foo { }
15:47 jonathan Here, Foo is the protoobject
15:48 pmichaud Foo?  I was thinking Bar
15:48 jonathan No, we haven't created Foo yet.
15:48 jonathan In the end, yes, we will install a proto-object for Foo
15:48 * pmichaud double-takes.
15:48 pmichaud I think you mean Bar.  We haven't created Bar yet.
15:49 jonathan Yes!
15:49 jonathan Grr!
15:49 pmichaud so, trait_auxiliary:is gets invoked as    trait_auxiliary:is(Bar, Foo) ?
15:49 jonathan No
15:49 pmichaud Foo, Bar
15:49 jonathan trait_auxiliary:is(Bar, $def)
15:50 pmichaud (where "Bar" is the class w/o a proto)
15:50 jonathan Ooops
15:50 jonathan trait_auxiliary:is(Foo, $def)
15:50 * particle waves as he arrives after two hours of scrollback reading
15:50 jonathan Where $def is the under-construction class
15:50 pmichaud okay.  checking.
15:51 jonathan pmichaud: This may be related
15:51 jonathan class Foo { }
15:51 purl rumour has it class Foo { } is okay
15:51 jonathan Foo.get_parrotclass()
15:51 pmichaud get_parrotclass requires an argument.
15:51 jonathan I would have expected that to work?
15:51 jonathan class Foo { }
15:51 purl class Foo { } is okay
15:51 jonathan grr
15:51 pmichaud it's a helper function -- it doesn't work on its invocant.
15:51 jonathan yes, but
15:51 jonathan Method 'get_parrotclass' not found for invocant of class ''
15:52 pmichaud get_parrotclass works on metaclass objects, not protoobjects
15:52 pmichaud Foo.HOW.get_parrotclass(Foo)
15:52 pmichaud but you don't have to have Foo's metaclass -- any metaclass will work
15:52 pmichaud p6meta.get_parrotclass(Foo)
15:53 jonathan class Foo { }
15:53 purl hmmm... class Foo { } is okay
15:53 jonathan Foo.HOW.get_parrotclass(Foo)
15:53 jonathan that's OK
15:53 pmichaud purl, forget class Foo { }
15:53 purl pmichaud: I forgot class foo { }
15:54 pmichaud the argument to get_parrotclass can be a parrotclass, a protoobject, a metaobject, a String, an array
15:54 pmichaud basically it says "I have X, I want to know what it represents as a parrotclass"
15:55 pmichaud we may end up throwing namespaces in there as well :-)
15:55 jonathan Hmm
15:55 jonathan class Foo { method hi { say "hi" } }; class Bar is Foo { }; # now "works"
15:56 jonathan my $x = Bar.new(); $x.hi;
15:56 jonathan This gives
15:56 jonathan attempt to access code outside of current code segment
15:56 jonathan Also to make that work I've done
15:56 jonathan .sub 'trait_auxiliary:is' :multi(_,Class) .param pmc parent .param pmc child .local pmc HOW HOW = parent.'HOW'() parent = HOW.'get_parrotclass'(parent) 'trait_auxiliary:is'(parent, child)
15:56 jonathan .end
15:56 jonathan ...that was helpful
15:56 jonathan nopaste?
15:56 purl nopaste is probably at http://nopaste.snit.ch/ (ask TonyC for new channels) or http://rafb.net/paste or http://paste.husk.org/ or http://poundperl.pastebin.com/ or http://paste.scsys.co.uk/ or don't bother me while I'm eating
15:56 particle DietCoke: ping
15:57 nopaste "Jonathan" at 85.216.151.226 pasted "inheritance" (8 lines) at http://nopaste.snit.ch/13034
15:57 pmichaud I suggest using p6meta instead
15:57 jonathan Which is wrong, because we need something that means "a proto-object" on the left
15:57 jonathan As the first argument
15:57 sjansen joined #parrot
15:57 pmichaud HOW = get_hll_global 'Perl6Object', '$!P6META'
15:57 pmichaud instead of
15:57 pmichaud HOW = parent.HOW()
15:57 pmichaud on the off-chance that parent doesn't know how to HOW
15:58 donaldh joined #parrot
15:58 jonathan pmichaud: OK, I have changed it.
15:59 jonathan But still the same problem.
15:59 purl the same problem is, like, what killed killtrac
15:59 pmichaud do we need  the :multi(Class, Class) form at all?
15:59 pmichaud if so, why?
15:59 jonathan And it worries me that we've also got a failed multi-dispatch on stuff we know is in the inheritance hierarchy.
15:59 jonathan We may well not.
16:00 pmichaud I think we may just want addparent directly in the :multi(P6protoobject, Class)  form
16:00 pmichaud and get rid of Class,Class until we know we need it.
16:00 jonathan Sure, but what I'm saying is that writing the multi you suggested gets us a no applicable methods error.
16:00 pmichaud yes, I'm still thinking about why that might be the case.
16:01 jonathan OK
16:01 jonathan Got rid of the Class, Class variant.
16:01 pmichaud in the _,Class form, check to see if parent isa P6protoobject
16:01 pmichaud I know you did this already --I'm wanting to double-check.
16:01 pmichaud $I0 = isa parent, 'P6protoobject'
16:01 pmichaud say $I0
16:02 jonathan 1
16:03 pmichaud but changing the _ to P6protoobject causes it to fail?
16:03 jonathan Correct.
16:03 jonathan Let me check in my clean-ups so far, with _ in there.
16:04 pmichaud okay.  I'll try a test case.
16:05 jonathan OK. We'll swap problems; I'll go peek at your boolean one
16:05 dalek r27719 | jonathan++ | rakoo:
16:05 dalek : [rakudo] Start trying to unbreak inheritance.
16:05 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27719
16:05 jonathan ...after making another cup of tea...
16:08 nopaste "pmichaud" at 76.183.97.54 pasted "P6protoobject and multi bug -- simple test case" (25 lines) at http://nopaste.snit.ch/13035
16:09 starc joined #parrot
16:10 jonathan pmichaud: OK, problem is that copy calls VTABLE_clone
16:11 pmichaud and Object PMCs don't know how to clone?
16:11 jonathan Which in turn ends up dispatching to the clone method of Boolean PMC, I guess.
16:11 jonathan Seems not
16:11 jonathan I've written clone vtable methods for most of our types
16:11 jonathan Bool was missing one
16:11 pmichaud right, I took quite a few of those out
16:11 jonathan erm...
16:12 pmichaud I think it belongs in Object PMC and not in our classes.
16:12 pmichaud (as my test case shows.)
16:12 jonathan OK, but I fear that doesn't work out too nicely.
16:12 jonathan Oh, in Object PMC
16:12 jonathan OK.
16:12 pmichaud clearly 'copy' isn't making a correct copy.
16:12 jonathan Well, copy just calls clone
16:13 jonathan So it depends on whatever clone does
16:13 pmichaud I'm not saying that none of our classes will have 'clone' methods -- I'm just saying that Rakudo shouldn't be blindly working around parrot bugs.  (visibly working around Parrot bugs is okay, but we should have a note for when we're doing that and why.)
16:13 jonathan I suspect copy could actually have the whole morph chunk of it deleted with no ill effects.
16:14 jonathan but that's a separate issue
16:14 jonathan OK, implementing clone in the Object PMC.
16:15 jonathan Ouch. Down to my last tea bag.
16:15 jonathan :-|
16:15 pmichaud not good.  :-)
16:16 nopaste "pmichaud" at 76.183.97.54 pasted "P6protoobject and multi bug -- simple test case, slightly improved" (30 lines) at http://nopaste.snit.ch/13036
16:16 pmichaud I think you're correct that there's a problem with mmd there.
16:17 iblechbot joined #parrot
16:18 jonathan Does P6protoobject ever end up in the class registry?
16:18 pmichaud yes
16:18 jonathan OK
16:18 pmichaud first statement of P6object.pir :-)
16:18 jonathan That's that theory out then.
16:19 pmichaud oh, 3rd statement.
16:19 pmichaud (coulda been first.  was the first at one time, then I thought it made more sense to create the Hash first.)
16:21 pmichaud of course, the protoobjects themselves are instances of anonymous (nameless) classes
16:21 pmichaud I wonder if giving those classes a name makes a difference?
16:23 jonathan pmichaud: It may, but I like to hope not.
16:23 jonathan The thing is that I fear anonymous classes currently don't get type numbers.
16:23 particle do we use type 0?
16:24 pmichaud okay, I'm confused.  Just a sec.
16:24 cognominal the perl6 grammar is real fun when one gets used to it. How can we have lived without it.
16:24 pmichaud (preparing nopaste)
16:25 particle jonathan: runtime/parrot/include/pmctypes.pasm lists 'default' as typeid 0
16:25 * particle thinks that's for anonymous classes
16:25 pmichaud even anonymous classes will need unique typeids (as long as we're using typeids)
16:26 jonathan Thing is, I thought that protoclasses in the previous implementation were anonymous too.
16:26 pmichaud they were.
16:26 jonathan Hmm
16:26 jonathan That doesn't seem like a likely reason for it not working now, then... :-S
16:26 pmichaud P6protoobject basically uses the same algorithm as Perl6ProtoObject did (as far as that goes.)
16:27 pmichaud oh, hrm
16:27 pmichaud a-ha!
16:27 pmichaud jonathan: you're not going to like this
16:27 particle it's a little confusing that the grammar module changed from P6Regex to Perl6Regex, and Perl6Protoobject is changing to P6Protoobject
16:27 pmichaud P6protoobject (small 'p')
16:28 pmichaud it takes after P6opaque from the spec.
16:28 particle my point is P6 vs Perl6
16:28 pmichaud I know
16:28 jonathan Oh, shiese!
16:28 particle :P
16:28 pmichaud but P6objects != Perl6 objects
16:28 jonathan Well, at least it's an easy fix.
16:28 pmichaud jonathan:  here's why it "worked" in trunk
16:29 pmichaud Object.pir:     protoclass = subclass objectclass, 'Perl6Protoobject'
16:29 pmichaud traits.pir: .sub 'trait_auxiliary:is' :multi('Perl6ProtoObject', 'Class')
16:30 pmichaud there is no "Perl6Proto*O*bject"
16:31 jonathan Oh?
16:31 jonathan Hmm..
16:31 jonathan So the bug was a typo, or?
16:31 pmichaud so I'm guessing that MMD treated that as _ or something.
16:32 jonathan (sorry, half my head is writing Object.pmc's clone right now)
16:32 pmichaud another difference is that in the old style  Perl6Protoobject is a subclass of Perl6Object
16:32 pmichaud but in p6object   P6protoobject is a standalone class (no parent)
16:32 pmichaud but I think the typo might be the issue.  I'll try.
16:34 jonathan pmichaud: OK, for http://nopaste.snit.ch/13032 - that prints MyInt twice here now
16:34 jonathan I've done this in the rakoo branch
16:34 jonathan Heavily untested.
16:35 Eevee joined #parrot
16:35 pmichaud jonathan, okay great.
16:35 pmichaud and I have one for you
16:35 dalek r27720 | jonathan++ | rakoo:
16:35 dalek : [core] Implement clone v-table method for Object PMC.
16:35 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27720
16:35 jonathan Running make test on it right now, but committed to see how it solves your issues.
16:35 pmichaud in trunk, if I change traits.pir to have   :multi('Perl6Protoobject', 'Class')
16:35 pmichaud and then try the Foo/Bar class test, I get
16:36 nopaste "pmichaud" at 76.183.97.54 pasted "P6protoobject and multi bug -- now in trunk!" (16 lines) at http://nopaste.snit.ch/13037
16:36 pmichaud so the same problem exists in trunk.
16:37 jonathan Arses.
16:37 * jonathan points the finger at MMD.
16:37 pmichaud and what is really weird is that it matched Perl6ProtoObject when there was no Perl6ProtoObject class.
16:38 NotFound joined #parrot
16:38 NotFound Hello.
16:38 pmichaud I'm wondering if non-existent classes somehow map to '_'
16:38 jonathan I fear they may.
16:38 jonathan It's the only answer that makes sense.
16:38 * pmichaud tries Object clone fix.
16:40 pmichaud code for Object.clone looks good.  nice work.
16:40 pmichaud glad it was you and not me :-)
16:40 jonathan I have vague recollections of writing quite a few bits of class.pmc and object.pmc. ;-)
16:41 particle how many failures do you see in spectest_regression now?
16:41 particle autoref complains about code outside segment
16:41 jonathan particle: Will look in a moment - was down to 3 last time.
16:42 Theory joined #parrot
16:42 jonathan Grr. Failing tests thanks for my patch.
16:43 jonathan Oh, argh.
16:43 jonathan That's because it's wrong wrong wrong.
16:44 pmichaud mmmmm, "Wii Fit" just arrived.  :)
16:48 jonathan Could be a wii bit distracting.
16:48 pmichaud argggggh
16:48 pmichaud actually, rakudo and parrot are more interesting at the moment
16:49 pmichaud so I set the box aside for Paula to look at later and came back into the office
16:49 pmichaud but now it's lunch time
16:49 jonathan Nice to know that coding beats playing wiht your wii.
16:49 pmichaud well, Wii Mario Kart generally gets about 30 minutes a day :-)
16:49 jonathan :-)
16:49 jonathan Just fixing the copy.t test that I broke...
16:49 pmichaud anyway, lunchtime.  Then I'll come back and play with rakoo a bit more.
16:49 jonathan Cool
16:49 pmichaud we seem to be a lot farther along than I had expected by this point.
16:50 pmichaud (as far as migration goes)
16:50 jonathan Nice.
16:50 jonathan It's not going to be the most inspiring Rakudo post today.
16:50 * particle is hoping to dig in
16:50 jonathan "Today we broke everything...then fixed it."
16:50 jonathan "Also, I failed to implement ranges."
16:50 particle ...amazingly, it only took a day to fix.
16:51 particle jonathan: you bit off a bit more than you could chew with ranges
16:51 jonathan Well, I thought I could get away with not having to do the whole load of lazy stuff elsewhere too.
16:51 * particle considers ieee membership
16:51 jonathan And in reality I probably *can*. It just might not really be worth it.
16:52 pmichaud if mutables works out okay, we may be able to do laziness in just a couple of weeks
16:52 jonathan Cool.
16:52 pmichaud as long as we don't get too lazy.  :-)
16:52 particle or laziness doesn't mutate
16:52 jonathan "We have a lazily evaluated implementation of Perl 6."
16:52 pmichaud that sounds like a good slide quote
16:53 pmichaud "Q:  Why is it taking long to implement Perl 6?"
16:53 jonathan :-)
16:53 Tene jonathan: did you get "for 1..* { ... }" working?
16:53 pmichaud "A: Because Perl 6 is built on lazy evaluation semantics."
16:53 particle *lazy implementation semantics :)
16:53 jonathan Tene: That'd be another thing that hangs on, getting the lazy implementation right.
16:53 jonathan Tene: It's not hard to get a Range object set up correctly that represents 1..*
16:54 Tene jonathan: you said that you got lazy ranges working, you just can't assign them to an array.  Is assigning to an array required for 'for' support?
16:54 jonathan No.
16:54 Tene That's why I was asking. :)
16:54 jonathan I can give you quite easily, for Range.new(from => 1, to => *) { }
16:55 jonathan But we can't really make the .. operator construct a Range object, until we can also have @a = 1..5; work :-)
16:55 Tene Ahh, okay.
16:55 moritz is there an object that corresponds to the whatever star?
16:55 particle Whatever.
16:55 Tene I keep finding myself thinking "Ah, I'll just wait for pmichaud to finish $x and then $y will be much easier to do."
16:55 jonathan It's just an instance of Whatever.
16:55 jonathan :-)
16:56 moritz ok ;)
16:56 Tene I think I'll do more assorted builtins later, I guess.  I got all of my insurance paperwork done last night.
16:57 particle glad you're properly insured to work on assorted builtins.
16:57 Tene Heh.
16:59 * japhb finally finishes scrollback
16:59 * Tene throws a git-svn at japhb
17:00 japhb Tene:  OK, are you committing directly to Parrot, or sending patches into RT?
17:00 Tene directly
17:00 particle jonathan: are you madly hacking on something now?
17:01 jonathan Object.clone, then was pondering hacking on some fried rice...what you wanting?
17:01 japhb ... Because I need to know the proper Parrot-standards way to do both.  'git format-patch' and 'git am' have a bazillion options, and it's not clear to me which are best.
17:01 particle i'm looking at the test/spectest failures and wondering how i can help
17:01 * particle has rakudo-shaped tuits today
17:01 japhb Then once I get commitbit, I have to learn the "right" way to do that as well
17:01 jonathan particle: in Rakudo command line mode to
17:01 jonathan class Foo { }; say Foo.new().WHAT();
17:01 Tene japhb: I've never cared about those options, and I've never had someone complain about the format of my patches.
17:02 Tene I just used git format-patch
17:02 jonathan s/to/do/
17:02 jonathan Does that trigger an error?
17:02 japhb Tene: And then do you take that patch and attach it to an email, or did you use am to send the mbox-formatted patch directly?
17:02 * DietCoke smacks ambs
17:02 particle class Foo {}; say Foo.new.WHAT;
17:02 particle Foo
17:03 Tene For committing directly, I just commit, and do the svn metadata fixes in a separate svn checkout when necessary.
17:03 jonathan Oh.
17:03 Tene I just attached to email.
17:03 japhb The learning curve for git is much steeper than SVK ...
17:03 jonathan I was expecting the code segment error.
17:04 japhb Tene: Ah, OK, that was going to ask that question also, about how you handled the svn metadatta
17:04 Tene it is?  I tried svk two or three times, and I could never really get it working.
17:04 particle jonathan: sorry, can't deliver that :)
17:04 japhb Tene: oh, it's buggy as all hell.
17:04 jonathan I'm happy the error is gone.
17:04 Tene Every time I tried it, I gave up before actually able to get anything done.
17:04 particle i get too many arguments in 01-sanity/isa
17:04 Tene With git, it's always worked without problem for me.  I guess my mental model of revision control happens to map well to what git already does.
17:04 particle and code segment error in S02-literal/autoref
17:04 jonathan particle: Going to see what I get now with my latest patch in the branch.
17:05 Tene I always get confused by svn too, somehow.
17:05 * DietCoke tries to find all the parrot stuff in the backscroll.
17:05 japhb but 'svk checkout http://some/thing' ... hack hack hack ... 'svk commit -m "message"' (AKA pretend it's SVN) worked for me
17:05 Tene As I recall, svk checkout wanted me to do some initial configuration about where to store things, and I couldn't get that working.
17:06 jonathan particle: Just getting latest and greatest and taking a look at what's failing
17:06 japhb Tene: usually pressing enter a lot works.  :-)
17:06 particle ok, i'll wait for your commit and rebuild/retest
17:06 dalek r27721 | fperrad++ | trunk:
17:06 dalek : [Lua]
17:06 dalek : - follows PCT, switch from Protomaker to P6metaclass
17:06 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27721
17:06 dalek r27722 | jonathan++ | rakoo:
17:06 dalek : [rakudo] Fix object clone method, so now it clones any PMCs we inherit from too.
17:06 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27722
17:07 NotFound I've found why gmp has problems when compiling with c++. There are c_... #defines in debug.h, and c_str makes c++ unhappy.
17:07 jonathan particle: It's in now.
17:07 particle ...already rebuilding already...
17:07 jonathan particle: You could always fix my innevitable trailing whitespace. ;-)
17:08 particle :P
17:08 jonathan Though probably best, after I go to bed. I'll only end up making more. :P
17:08 japhb Tene: Once you've committed to git-svn locally, what's the right way to push your changes back to the svn repo?
17:08 Tene git-svn dcommit
17:08 Tene after a rebase, ideally
17:09 japhb Tene: OK, so you make a pile of local commits, finally ready to push the whole patch, make sure no uncommitted changes, 'git svn rebase', 'git svn dcommit', right?
17:10 Tene Exactly.
17:10 japhb Tene: thank you.
17:10 Tene Add a couple of 'make test's in there for good measure. :)
17:10 japhb My brain was melting from all the git docs I've read in the past 24 hours
17:10 japhb Tene: well, of course.
17:10 purl Indubitably.
17:10 japhb :-)
17:11 particle jonathan: is $_, $!, $? well-defined enough now to start hacking on?
17:12 jonathan Yeah, but I think we need to fix Rakudo's use of lexicals first.
17:12 jonathan Perhaps
17:12 jonathan Hmm, actually probably not.
17:13 jonathan (Though we should maybe do that anyway. "say $x; my $x = 'foo';" should be an error.)
17:13 jonathan (If there's no other $x in an outsr scope)
17:14 jonathan But basically, for $! and $?, if we're not at the start of a routine, then we should just look at what they were in the outer scope.
17:14 jonathan Our meta-model is certainly meta-circular. I just managed to turn isa into an infinite loop. :-)
17:15 cognominal you know how to spell banana but you don't know when to stop
17:15 particle err. oops.
17:16 particle jonathan: i get the same test failures after your last commit
17:17 TimToady <@jonathan> if "h2i" ~~ Foo { say "yes" }
17:17 TimToady that should not match
17:17 TimToady subrules imply :p anchoring
17:17 dalek r27723 | jonathan++ | rakoo:
17:17 dalek : [rakudo] Fix the obvious problem with isa. However, we're still not passing the test yet.
17:17 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27723
17:19 jonathan TimToady: Oh, they must match the whole string?
17:19 * jonathan goes to look up :p
17:19 TimToady no, but they must match the beginning of the string
17:19 TimToady and h !~~ ^\d+
17:20 particle h isn't a digit!?!?! when did that happen? ;)
17:20 jonathan Ah, OK.
17:20 jonathan I didn't know about that.
17:20 Tene japhb: how are you getting your copy of the repo?
17:20 TimToady that's why I told you :)
17:21 jonathan :p ;-)
17:21 * jonathan wonders how many more hidden smilesy are in Perl 6
17:22 TimToady though I seem to recall that a match against a bare rule has to match the whole string: $x ~~ token {...}
17:22 TimToady but for a match against a grammar, I expect the TOP rule to enforce compleatness
17:23 TimToady since different grammars might want to give different error messages, or simply allow themselves to be embedded in other languages
17:24 japhb Tene: I did the "full history" checkout of the main Parrot SVN repo.  Then went and ate a meal
17:24 Tene japhb: and it completed in that time?
17:24 TimToady the TOP rule in STD currently allows $+STOP as an alternate endpoint for parsing, for instance
17:25 particle that's new
17:25 jonathan OK, makes sense.
17:25 japhb As I recall, yes, though it's been a while (I did the checkout a couple weeks ago, when it was "interesting thing to learn" rather than "only working tool").  I'm probably network-near it.
17:26 AndyA joined #parrot
17:28 dalek r27724 | jonathan++ | rakoo:
17:28 dalek : [rakudo] Should register both Sub and Closure under the name Code.
17:28 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27724
17:30 particle jonathan: should parrot core pmcs have an 'isa' method?
17:30 jonathan OK, we can't make 07-isa.t pass without making P6Object's isa also care about the name the class is registered under rather than just it's parrot name...
17:32 jonathan particle: They may implement the isa v-table method.
17:32 jonathan But I'd expect something in default.pmc to really be doing the work for all but special cases.
17:32 particle yes, the vtable function.
17:32 jonathan (Like Object.pmc, which needs to lie)
17:32 particle but i mean for $P0.'isa'($P1)
17:32 jonathan Oh, I don't think as a method, no.
17:32 particle if $P0 contains a 'String'...
17:32 particle ok
17:33 jonathan $I0 = isa $P0, $p1
17:33 jonathan er, $P1
17:33 jonathan I think fixing the isa sanity test needs a change in P6Object - will wait to get pmichaud's opinion on that one, though.
17:34 jonathan So, spectest_regression...
17:34 jonathan t\spec\S02-literals\autoref......ok 1/57Null PMC access in type()
17:34 particle take a look at this nopaste to check my sanity...
17:34 jonathan particle: Feel free to dig into that.
17:34 jonathan ok
17:37 * particle really wants this thorn out of his thumb :(
17:38 nopaste "particle" at 24.19.3.148 pasted "minimal test case for isa (too minimal?)" (11 lines) at http://nopaste.snit.ch/13038
17:39 particle oops!
17:39 particle i see my error
17:39 particle it should be new ... 'Perl6Str' twice, then assign $P17, 'Str'
17:40 jonathan Ok :-)
17:40 particle hrmm, that still prints 1
17:40 jonathan What's the bug you're chasing?
17:40 particle 07-isa.t
17:41 jonathan You got latest from svn?
17:41 particle yep
17:41 jonathan Only one last test fails there now
17:41 jonathan And it's not to do with string.
17:41 jonathan my $code = { 42 };
17:41 jonathan if $code.isa("Code")  { say "ok 3" } else { say "not ok 3" }
17:41 jonathan It's that one
17:42 jonathan The problem is that isa is checking only the Parrot class name, which in this case is Sub, rather than the registered name.
17:42 particle ah, hrmm, i must have been looking at an old test failure report
17:42 jonathan They all used to fail, but now only that last one does.
17:42 jonathan For me here, anyway.
17:43 jonathan t\01-sanity\07-isa.t                3    1  3
17:43 cjfields joined #parrot
17:44 particle yes, i get the same now
17:45 particle where's isa defined?
17:45 particle src/classes/Object?
17:46 particle should Code override Any's isa method?
17:48 particle or is this something for p6meta?
17:49 jonathan Something for p6meta, I believe.
17:50 jonathan t\spec\S02-literals\autoref.rakudo      1   256    57   62  27-57
17:50 jonathan t\spec\S12-class\instantiate.t          1   256     2    2  2
17:50 jonathan t\spec\S12-class\parent_attributes.t    1   256     3    6  1-3
17:50 jonathan These are the failing spec tests that we are down to, out of those that passed before.
17:51 jonathan How we fail more than we have in total on some of those bewilders me.
17:54 pmichaud back from lunch
17:55 jonathan particle: Both of those second two can probably be fixed by working out if we are calling the 'new' method in Perl6Object, and if not making it so we do.
17:56 jonathan pmichaud: isa test nearly passes now, but not for Code type, because isa is only calling parrotclass's isa  method, which is unaware of our own name mappings.
17:56 jonathan I'm kinda here and making dinner, so might reply a little slow for the next while...
17:57 cjfields_ joined #parrot
17:58 pmichaud (isa)
17:58 pmichaud I'm workingon isa -- need to know if   $foo.isa('Dog')  is the same as   $foo.isa(Dog)
17:59 julian_ joined #parrot
17:59 pmichaud There aren't any examples in the spec that show a string argument to .isa()
18:00 pmichaud s/spec/synopsis/
18:01 Tene Is it ever possible to care if something is a class or role that we can't currently resolve?
18:01 Tene Could the meta information be fiddled with by hand?
18:01 pmichaud also, P6object doesn't want to use string names to check 'isa' semantics.
18:01 pmichaud i.e., at the level of the 'isa' opcode, we're not doing string comparisons.
18:02 pmichaud (we can use a string name to decide what classes to compare, however.)
18:02 jonathan OK, makes sense.
18:03 jonathan Tene: We can find out if something is a class or role at runtime, if that's what you mean.
18:04 Tene $foo.WHAT = 'zomgl'
18:04 jonathan Don't think you can call .WHAT on a role.
18:04 jonathan IIRC
18:07 pmichaud Perl6Object should end up with its own 'new' method
18:07 pmichaud I commented the existing one out.
18:07 pmichaud so I could review it :-)
18:09 pmichaud all of the object objects will then (or should) gain Perl6Object's new method in lieu of the one that is in P6protoobject
18:09 Tene I guess the only other reason to support it is dealing with user input.  $foo.isa(=$*IN)
18:09 pmichaud s/object/other/
18:10 pmichaud yes, I suspect that string arguments are valid to .isa
18:10 pmichaud just wanting to work out the mapping in my head :-)
18:10 pmichaud (and then in code)
18:10 Tene purl: codehead?
18:10 purl no idea, tene
18:11 Tene purl: codehead is where pmichaud works out mappings
18:11 purl tene: bugger all, i dunno
18:11 Tene bah
18:12 jonathan pmichaud: Perl6Object's new method doesn't appear commented out here... :-S
18:13 pmichaud did you put it back in?
18:13 jonathan No
18:13 pmichaud it's commented out.  Look *carefully*.  :-P
18:13 jonathan It's not getting called, though. Or so it seems.
18:14 pmichaud =item new()
18:14 pmichaud Create a new object having the same class as the invocant.
18:14 pmichaud .sub 'new' :method .param pmc init_parents :slurpy
18:14 jonathan OH!
18:14 jonathan That is *evil*.
18:15 jonathan That said, uncommenting it makes all tests fail. :-)
18:15 pmichaud I guess I should've used   #=cut  there to make it more obvious what I did :-)
18:15 particle #=cut++
18:15 pmichaud yes, I didn't update the code yet.
18:16 pmichaud it seems a bit odd to me that 'new' is using setattribute directly.  wouldn't it go through the accessor?
18:17 pmichaud and I would expect it to get broken out into separate BUILD and BUILDALL components
18:18 jonathan Yes, I know we have to break it up into those.
18:18 jonathan I think it should set the attributes directly, as we don't know if it has any accessor methods or not.
18:20 jonathan Where did the setting of the auto-vivification stuff go to?
18:21 pmichaud I just took it out for now -- we may need to import it back in from trunk
18:21 pmichaud it was making my brane hurt
18:21 pmichaud :-)
18:22 pmichaud I also wanted to see if any of it ends up belonging in p6object somehow
18:25 * particle is out of his area of expertise and decides to leave rakoo hacking to pmichaud++ and jonathan++
18:26 cognominal joined #parrot
18:27 dalek joined #parrot
18:27 pmichaud joined #parrot
18:27 pmichaud looks like feather died again?
18:27 lichtkind joined #parrot
18:28 pmichaud joined #parrot
18:29 DietCoke looks like.
18:29 purl looks like is not the fault of this trace, the interpreter must be already corrupted.
18:29 * pmichaud waits for jonathan to return.
18:29 DietCoke no, looks like is <reply>
18:29 purl okay, DietCoke.
18:31 pmichaud so, are the parameters to .new()  allowed to initialize private attributes?  or just public ones?
18:33 jonathan joined #parrot
18:33 Juerd joined #parrot
18:34 Ivatar joined #parrot
18:35 wolverian joined #parrot
18:35 pmichaud ah, jonathan returns.  Excellent.
18:35 pmichaud so, are the parameters to .new()  allowed to initialize private attributes?  or just public ones?
18:38 Infinoid joined #parrot
18:40 Zaba joined #parrot
18:43 AndyA joined #parrot
18:44 gryphon joined #parrot
18:51 jonathan pmichaud: I believe private too
18:51 jonathan (sorry, cooking)
18:54 pmichaud hmmm.
18:55 pmichaud somehow that's counter-intuitive to me.
18:55 pmichaud because then they're not really "private".
18:55 pmichaud but I guess that's not too much different than the fact of attributes being read-only, either.
18:57 dalek r27725 | allison++ | pdd25cx:
18:57 dalek : [pdd25cx] Fix warning about incompatible pointer type.
18:57 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27725
18:59 pmichaud I'll try #perl6
19:07 dalek r27726 | allison++ | pdd25cx:
19:07 dalek : [pdd25cx] Fix warning about incompatible pointer type.
19:07 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27726
19:18 * jonathan is back from eating
19:18 jonathan pmichaud: Get any answer from #perl6?
19:18 jonathan S12 just says "It expects all arguments to be named parameters initializing attributes of the same name." - it doesn't mention whether they have constructors.
19:18 jonathan erm, s/constructors/accessors/
19:20 pmichaud jonathan: TimToady on #perl6 now
19:27 pmichaud here's the summary
19:28 pmichaud 19:18 <TimToady> $!foo is the physical storage.  $.foo is just the accessor, which does not require $!foo to be implemented by this class, as long as some base class does it.
19:28 pmichaud 19:21 <TimToady> BUILD is a submethod, so should only modify $!foo
19:31 pmichaud so, my takeaway on that is that BUILD can indeed use setattribute, but it needs to do so on the $! form of the attribute
19:32 jonathan OK, which is the physical storage.
19:32 jonathan All attributes are named $! under the hood, no matter how they are declared. That's how Rakudo implements it.
19:33 pmichaud okay.  I didn't catch that part (how Rakudo implements it)
19:34 jonathan Yeah, that's one bit of S12 I think I have got right. :-)
19:34 pmichaud and so yes, BUILD (and hence new) can likely initialize private attributes, and does so directly.
19:34 pmichaud I think you do also.
19:34 jonathan Yup.
19:34 pmichaud we just need to refactor 'new' into the BUILD/BUILDALL components then
19:34 jonathan OK
19:34 pmichaud or update what we have now to work with the new object system
19:35 pmichaud btw, we can also choose to add some of the other HOW methods into P6object's metaclass objects
19:36 pmichaud e.g., .attributes() to retrieve a list of attribute descriptors as described in S12
19:36 pmichaud oops, I gotta run pick up kids
19:36 pmichaud bbi30
19:36 jonathan ok
19:39 dalek r27727 | allison++ | pdd25cx:
19:39 dalek : [pdd25cx] Fix warning about returning from function marked 'noreturn'.
19:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27727
19:40 NotFound Boys, perl6/src/classes/List.pir fails whitespace and pod syntax tests.
19:40 NotFound Trailing space, I mean.
19:45 DietCoke the core pod syntax tests?
19:45 NotFound t/codingstd/trailing_space
19:46 DietCoke (those shouldn't be being run against files with perl6 pod in them, methinks.)
19:46 NotFound t/doc/pod
19:47 NotFound make test does it.
19:47 * particle doubts the .pir files have perl 6 pod in them
19:47 jonathan DietCoke: It'll just be the POD in the PIR files, which will be Perl 6
19:47 jonathan Won't be a big deal to fix.
19:47 DietCoke whoops, missed the .pir
19:48 particle i mean, doubts they should have perl 6 pod...
19:48 DietCoke right, right.
19:49 spinclad pmichaud: (backlogging, from 15:30 UTC:) is P10 tied to $bool lexically?  (i was confused about this for a while (still am?); it didn't show up in the trace, does trace have access to that so it could learn to display something about it?...) (if not so tied, it looks like P10 is never used and $bool has magically gotten a related value)
19:51 pmichaud spinclad: yes, they were tied.  Look at the 0x..... values of the PMC (they're the same)
19:52 spinclad so they are.  danke.
19:58 jonathan pmichaud: WHENCE - it's implemented on the protoobject
19:58 jonathan Not on the class itself
19:58 jonathan So before it was in Perl6ProtoObject
19:58 jonathan Now, well, not too sure where it belongs, since we have a shared proto between all things?
19:59 pmichaud I don't have a problem with defining a WHENCE accessor on P6protoobject
19:59 pmichaud oh, but it has to be an attribute
19:59 pmichaud hrm.
20:00 jonathan Yeah, it needs somewhere for storage.
20:01 pmichaud protoobjects don't have to be singletons, in other words.
20:01 ruoso joined #parrot
20:02 jonathan OK, so it can go as a method on the proto-object?
20:02 jonathan I'm just getting initialization working again normally first, then I'll look at WHENCE
20:02 pmichaud thinking
20:02 purl http://www.terrybisson.com/meat.html
20:03 pmichaud Dog but WHENCE({...})  is still considered a protoobject, yes?
20:03 pmichaud but it's not the same protoobject as Dog
20:03 DietCoke Call.
20:04 jonathan Yes.
20:04 jonathan It returns a clone of the protoobject with WHENCE property set.
20:05 NotFound Someone wants to take a look at a big and complex patch? #54602
20:09 jonathan pmichaud: Down to one failing spectest_regression test.
20:09 dalek r27728 | jonathan++ | rakoo:
20:09 dalek : [rakudo] Re-enable initialization of the current class' attributes. However, WHENCE stays disabled for now. This gets us down to one fialing spectest_regression test.
20:09 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27728
20:09 jonathan Which will be fixed once WHENCE is back.
20:10 jonathan Will probably show up with code to check in - got about the right amount of time at Prague airport connecting to have dinner and drain my laptop's battery while writing code. :-)
20:11 Tene You could just feed the dinner to the laptop.
20:13 Infinoid but then we wouldn't get the code :)
20:13 Tene spaghetti code?
20:13 jonathan <graon>
20:14 Zaba joined #parrot
20:16 pmichaud since WHENCE is a property, should it go into %properties ?
20:17 pmichaud every protoobject has one of those :-)
20:18 ejs joined #parrot
20:18 DietCoke NotFound: here's an easy win: 39132 - rip out pirtidy and its tests etc.
20:19 jonathan pmichaud: Yes, it should.
20:19 jonathan I think so anyway.
20:19 jonathan In that case, it's easy!
20:20 iblechbot joined #parrot
20:21 mj41 joined #parrot
20:23 NotFound DietCoke: I don't even know what pirtidy is.
20:24 PerlJam joined #parrot
20:25 DietCoke particle: http://rt.perl.org/rt3/Tic​ket/Display.html?id=44393
20:32 Zaba_ joined #parrot
20:34 DietCoke NotFound: http://rt.perl.org/rt3/Tic​ket/Display.html?id=46667 (another removal)
20:36 NotFound DietCoke: I looked at it some days ago, but I don't know how to test the function.
20:42 dalek r27729 | jonathan++ | rakoo:
20:42 dalek : [rakudo] Add WHENCE support back into the proto-object.
20:42 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27729
20:46 NotFound No one is interested in compiling parrot with c++?
20:50 Zaba joined #parrot
20:53 dalek r27730 | jonathan++ | rakoo:
20:53 dalek : [rakudo] Remove some code from the WHENCE setter that pretained to the old model.
20:53 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27730
21:00 bacek morning
21:02 pmichaud jonathan: so, putting WHENCE into %!properties is working out?  ;-)   nice when the tools actually start to match the spec.  :-)
21:04 jonathan pmichaud: It was in there before, but yes, WHENCE itself works now.
21:04 cjfields joined #parrot
21:04 jonathan new doesn't use it quite right yet.
21:04 jonathan Working on that.
21:04 jonathan Unfortunately, type checking is broken too.
21:04 DietCoke NotFound: I wouldn't say that.
21:04 pmichaud if possible I recommend avoiding using the parrot class opcodes directly
21:05 DietCoke NotFound: if no one else gets to it, I'll review and apply that patch before sleep.
21:05 jonathan pmichaud: Sure, just need an easy way to create a new instance of the proto-object, that seemed like the neatest way.
21:05 DietCoke (taking the ticket. don't let that stop anyone else, committers)
21:05 NotFound DietCoke: thanks, but maybe rewieing it produce insomniae ;)
21:06 pmichaud perhaps Perl6Object should provide an accessor for %!properties ?
21:06 Zaba joined #parrot
21:06 jonathan It's not very private any more, if it has an accessor...unless the accessor is private too.
21:06 jonathan But gnerally, no.
21:06 jonathan We will touch %properties a lot.
21:06 jonathan %!properties, I mean
21:06 pmichaud I was thinking private accessor, or submethod
21:06 jonathan We don't want an extra call every single time we want to get at it.
21:07 pmichaud we have a lot of extra calls floating around already :-)
21:07 jonathan Right. I'm not wanting to add to that. ;-)
21:08 pmichaud But   .'WHENCE'(...)   and .'accessor'('WHENCE', ...)   seems like the same number of calls to me :-)
21:09 jonathan I'm struggling to see what you're after, or why.
21:09 pmichaud a generic interface for accessing properties, as opposed to always directly interrogating the %!properties hash
21:09 jonathan Less places using getattribute?
21:09 pmichaud yes.
21:09 jonathan Ah, I see.
21:10 jonathan Let's get this at least working again, and then refactor.
21:10 pmichaud right.  I was just about to say.... ....but I'm not going to push it for now.  It can wait.  :-)
21:11 jonathan It's tricky enough trying to do one thing at a time. ;-)
21:11 donaldh joined #parrot
21:11 julian^ joined #parrot
21:11 jonathan If we can get the isa bug, this new thing and type checks fixed, I think we'll be good to roll this back into trunk later on today.
21:11 pmichaud just in general I'm wanting to avoid too much reliance on the parrot internals.  If we need it for speed, yes, but let's not too be too quick to assume we need it for speed.
21:11 pmichaud I'm on the isa bug right now (if I can avoid more interruptions :-)
21:12 pmichaud actually, I think the current isa bug is from having Code/Sub improperly defined
21:12 pmichaud so I'm fixing that
21:12 pmichaud I agree re: rolling back into trunk
21:13 pmichaud we can indicate that a few things are temporarily broken in trunk -- I just didn't want a whole lot of things breaking.
21:13 pmichaud I think we're almost at the point where we may want to tag releases :-)
21:13 jonathan If we have sanity tests and spectest_regression passing again, I'll be happy to see it rolled back in.
21:13 pmichaud i.e., we can say that features x, y, and z work as of release nnnnn, but between releases things may be in a bit more flux
21:14 pmichaud any impressions on the refactor thus far -- does it look reasonable to you?
21:14 jonathan I like that we now have metaclass, protoclass and the actual class we instantiate all separated out.
21:14 jonathan And that the metaclass isn't just the parrotclass
21:15 pmichaud I like that it's easy to get everything mapped into its appropriate 'Any' position -- even parrotclasses
21:15 jonathan The parent => ... thing is certainly a LOAD cleaner for inheriting from Any and Grammar too.
21:15 Ademan joined #parrot
21:15 pmichaud and yes, it's all hiding behind an abstraction layer now so that we can change the internals at some point
21:16 jonathan I will toss the specialized make_proto that grammar had.
21:16 pmichaud for example, someday we may want Object/Any to be PMCs
21:16 jonathan If you didn't already.
21:16 pmichaud I don't know if I tossed it or not
21:16 jonathan It's no longer needed thanks to parent => ...
21:16 pmichaud I'll be looking more closely at the methods in src/classes/*.pir over the next couple of weeks and cleaning them up
21:16 jonathan OK
21:16 pmichaud (make_proto_grammar)  was one of the reasons I was pushing ahead on P6object.  It felt really funny to me :-)
21:17 jonathan I'll get on with fixing whence and leave you to isa for a while. :-)
21:17 pmichaud I'm updating/rebuilding
21:17 pmichaud I should have isa fixed in about 10 mins, barring interruption
21:17 jonathan OK. We're on one last failure on spectest_regression
21:17 * pmichaud races the clock.
21:18 pmichaud oh this is just TOO PRETTY.
21:21 nopaste "pmichaud" at 76.183.97.54 pasted "turning Parrot Subs and Closures into Perl 6 Code" (7 lines) at http://nopaste.snit.ch/13040
21:21 pmichaud ...and now isa passes :-)
21:22 pmichaud and I get rid of Sub.pir .
21:23 jonathan Nice!
21:23 jonathan Erm
21:23 jonathan Don't lose the ACCEPTS method
21:23 pmichaud It's now in Code.pir
21:23 jonathan Or you break smartmatch on regex.
21:23 jonathan OK, cool.
21:23 pmichaud since smartmatch is defined on Code objects
21:23 jonathan Yup.
21:24 pmichaud I'll need to multimethod that one on Regex, though, when we get the ability to define the .sub type
21:24 jonathan my $x = Bar.new(y => 42, Foo{ x=> 10 }); # works again
21:24 pmichaud ohthatissocool
21:25 jonathan OK. Just type checking.
21:25 jonathan That is only broken because the protoobject lost it's ACCEPTS
21:26 pmichaud put ACCEPTS back into Perl6Object
21:26 dalek r27731 | jonathan++ | rakoo:
21:26 pmichaud I hadn't done that yet.
21:26 dalek : [rakudo] Enable WHENCE again and get new to work with WHENCE'd protoobjects again.
21:26 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27731
21:26 jonathan Perl6ProtoObject or Perl6Object?
21:26 pmichaud there is no Perl6ProtoObject
21:26 jonathan ERm, the first is no more.
21:26 jonathan Yeah.
21:26 jonathan This was on the protoobject.
21:26 jonathan So you can do
21:26 jonathan $obj ~~ Foo
21:27 jonathan For "is $obj a Foo"
21:27 pmichaud looking.
21:27 pmichaud actually, it should be
21:28 pmichaud Any       Type      type membership         $_.does(X)
21:28 pmichaud yes?
21:28 pmichaud (from S03)
21:28 jonathan Yeah, I think we had does
21:28 pmichaud I haven't implemented 'does' in P6object yet-- it's on the list
21:28 jonathan .sub 'ACCEPTS' :method .param pmc topic .local pmc HOW
21:28 jonathan # Do a does check against the topic. HOW = self.'HOW'() $I0 = does topic, HOW if $I0 goto do_return
21:29 jonathan (from trunk)
21:29 jonathan Well, we were delegating it to the Parrot does
21:29 pmichaud feel free to add ACCEPTS to P6protoobject
21:29 jonathan OK
21:29 pmichaud you can do it either in rakudo or in P6object.pir
21:29 jonathan Really need to look at this again.
21:29 pmichaud right, I'll review it and refactor it later
21:30 pmichaud actually, for now just put it into rakudo
21:30 jonathan It neeeds to be on the protoclass, not on the object, through?
21:30 pmichaud sure
21:30 jonathan Oh, stick it in the right namespace will do it?
21:30 pmichaud .namespace ['P6protoclass']
21:30 pmichaud right
21:30 pmichaud er, P6protoobject
21:30 pmichaud but it will end up in P6object.pir soon
21:31 pmichaud actually.....
21:31 pmichaud if you want, put it in P6object.pir
21:31 pmichaud it's going to be basically the same
21:32 jonathan OK
21:33 jonathan It does some weird stuff to try and call the ACCEPTS of an instance too, though...I'm now trying to think why.
21:33 pmichaud hrm
21:33 jonathan I wouldn't have gone to the trouble just for the fun of it.
21:34 pmichaud well, object methods tend to override the protoclass methods
21:34 pmichaud sorry, protoobject ones
21:34 pmichaud but I think that might be just for 'new'
21:34 pmichaud so I might need to tag 'ACCEPTS' as being more important on a protoobject than anything coming from the object class
21:35 jonathan I think the problem actually was that, protoclass method overrode object one.
21:35 pmichaud ahhhhh
21:35 pmichaud yes
21:35 dalek r27732 | pmichaud++ | rakoo:
21:35 dalek : [rakudo]:
21:35 dalek : * Fix Code so that .isa works on it again.
21:35 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27732
21:35 pmichaud uh, no.  hrm
21:35 pmichaud protoclass method should override object one
21:36 jonathan Well, yes, it should.
21:36 pmichaud Dog.ACCEPTS(x)   is different from $dog.ACCEPTS(x)
21:36 jonathan Yeah.
21:36 jonathan I'm now trying to remember why on earth that went in there. I think commit log is the best way. :-)
21:37 jonathan Oh ouch.
21:37 teknomunk joined #parrot
21:38 jonathan r27338 | jonathan | 2008-05-06 12:56:17 +0200 (Tue, 06 May 2008) | 1 line
21:38 jonathan [rakudo] Make grammars more class-like. We now create protoobjects for them. Add
21:38 jonathan ed a Grammar class, implementing the ACCEPTS method which calls TOP. Had to twea
21:38 jonathan k the protoclass' ACCEPTS to also try the one in the class to make this work; sh
21:38 jonathan ould review if this is really the Right Way for this to work.
21:38 pmichaud ahhhhh
21:38 pmichaud so a Grammar protoobject should prefer the object one
21:38 jonathan It's because smart-matching against a grammar's proto-object needs to now do a DOES check.
21:38 jonathan Yeah.
21:38 jonathan Well, both
21:38 jonathan We expect also
21:39 jonathan grammar Foo { ... }
21:39 jonathan if Foo ~~ Grammar { ... } #
21:39 pmichaud smart matching against a grammar is in the table
21:39 pmichaud er, *isn't*
21:39 pmichaud (in S03)
21:40 jonathan It's mentioned in S05, but yes, it shuld probably be in the table too.
21:41 pmichaud I'm not sure we need to expect Foo ~~ Grammar at this point
21:41 jonathan OK
21:41 pmichaud it might show up in the table, but I think we can ignore it for now
21:41 pmichaud there's always   Foo.^isa(Grammar)
21:41 jonathan True
21:41 jonathan Well actually
21:41 jonathan That'd dispatch to Grammar
21:42 jonathan Grammar.ACCEPTS(...)
21:42 jonathan So hmm.
21:42 pmichaud it would?
21:42 dalek r27733 | jonathan++ | rakoo:
21:42 dalek : [rakudo] Put ACCEPTS into the proto-class. Gets type checks working, and all spectest_regression passing again.
21:42 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=27733
21:42 jonathan Yeah, right hand side is the thing we call .ACCEPTS on
21:42 pmichaud Foo.^isa(Grammar)   is    Foo.HOW.isa(Grammar)   which doesn't call ACCEPTS?
21:42 jonathan No, no, I was still talking about Foo ~~ Grammar
21:42 pmichaud right
21:42 pmichaud I'm saying that for Grammar.ACCEPTS the accepts method should override the protoobject one
21:43 jonathan So I think actually my hack wasn't anything to do with needing both at all.
21:43 pmichaud oh
21:43 pmichaud getting Grammar.ACCEPTS to work isn't too difficult -- just a sec
21:43 jonathan It was to get Grammar.ACCEPTS to override the protoobject one.
21:43 pmichaud just call 'add_method' on the protoobject's class
21:43 pmichaud and stick in the one you really want.
21:43 jonathan If you can get that to work, you can remove the pile of nasty...
21:44 jonathan Erm, isn't it going to complain that we already have an ACCEPTS?
21:44 pmichaud it's the same for what I do for 'new'.
21:44 pmichaud it complains if you use addmethod class, ....   but not if you use class.'add_method'(...)
21:44 jonathan That's...so wrong. :-)
21:45 pmichaud at any rate, there should be a way for me to override existing methods, so it works fine.
21:45 pmichaud yes, I think they should both do what class.'add_method'() does.
21:45 pmichaud (i.e., not complain)
21:45 jonathan We should yell at the guy who implemented the Class PMC....oh, wait...
21:45 pmichaud anyway
21:45 pmichaud I'll fix Grammar ACCEPTS just a sec
21:46 jonathan OK
21:46 jonathan Just verifying that we have a clean bill of health on the tests.
21:48 jonathan Yes!
21:48 jonathan All sanity tests and spectest_regression pass for me in the rakoo branch!
21:49 nopaste "pmichaud" at 76.183.97.54 pasted "ACCEPTS for Grammar protoobject" (25 lines) at http://nopaste.snit.ch/13041
21:50 pmichaud ohhh!  add_method doesn't complain because the protoclass doesn't have an ACCEPTS method of its own.
21:50 jonathan Oh...
21:51 pmichaud It's inheriting it from P6protoobject.  So this is a simple override.  :-)
21:51 jonathan It's because it inherits it from...yes.
21:51 pmichaud coooooool
21:51 jonathan OK, if you commit that.
21:51 pmichaud I didn't test it -- I just wrote it.
21:51 pmichaud I don't have a convenient test handy.
21:51 pmichaud but I'll commit, yes.
21:51 NotFound Now I can make perl6 with C++ :)
21:52 jonathan NotFound++ # nice work
21:52 pmichaud oh, hrm.
21:52 jonathan pmichaud: I need to get a few more spectests in place...
21:52 pmichaud this might not be sufficient.
21:52 NotFound Only problem was a "class" variable name.
21:52 japhb NotFound: Is that an OpenGL-enabled build?  I'm curious if I need to make changes there.
21:52 pmichaud I don't know if subclasses of Grammar will also get the correct ACCEPTS
21:52 cjfields jonathan: are role attributes supposed to be implemented yet?
21:53 NotFound japhb: I think it was... Were was the triangle test?
21:53 pmichaud actually, they won't.
21:53 jonathan cjfields: No.
21:53 cjfields ok
21:53 japhb NotFound: ./parrot examples/opengl/triangle.pir
21:53 jonathan pmichaud: Ah. That won't work then. :-(
21:53 pmichaud so, I need to treat ACCEPTS the same way I do 'new' then
21:53 jonathan cjfields: It's on my (long, long) list.
21:53 pmichaud or, no, that's not it.
21:53 cjfields np
21:53 pmichaud hrm.
21:54 NotFound japhb: it works :)
21:54 japhb excellent.
21:54 cjfields I can work around for now; looks like raakoo
21:54 jonathan pmichaud: We can leave current hack in until we have a good answer.
21:54 pmichaud yes, I was about to say the same.  I'm being hit with too many interruptions here
21:54 cjfields is more important
21:54 NotFound I will send the updated patch in a few minutes.
21:54 pmichaud (kids are home, paula just came home, etc.)
21:55 pmichaud jonathan: so, okay if I roll branch back into trunk?
21:55 cjfields s/raakoo/rakoo
21:55 pmichaud a bit later tonight?
21:55 jonathan pmichaud: Fine with me.
21:55 pmichaud excellent
21:55 pmichaud thank you for all of your outstanding work on this.  I'm really happy to see this done.
21:55 jonathan It's passing a bunch of tests.
21:55 jonathan Sure, it wasn't as bad to fix up as I'd feared.
21:55 pmichaud same here
21:55 japhb tewk: Note for your NCI stuff ... during my OpenGL header parsing work, I've come across a couple headers that have C++ class declarations in them.  Have you explicitly decided not to handle those, sticking strictly to C99?
21:56 jonathan pmichaud: What are you planning to work on next?
21:56 pmichaud probably PGE refactor.  either that or mutables
21:57 pmichaud PGE refactor may get us list assignment quicker
21:57 jonathan Could they be parallelized?
21:57 jonathan I'll likely have some spare hours hacking time over the coming weekend.
21:57 pmichaud you mean work on both at the same time?
21:57 jonathan Couple of hours at the airport tomorrow, easily.
21:57 jonathan Yeah.
21:57 jonathan Mutables, I've got a rough idea of what needs doing.
21:57 pmichaud the PGE one is conceptually tougher and involves learning more code
21:57 pmichaud so ifyou want to start on mutables, that'd be okay
21:57 jonathan Yeah, I wouldn't take that one on myself.
21:57 jonathan OK
21:57 jonathan You can a moment to run over what you had in mind?
21:58 jonathan I'm awake for another ~ 2 hours if right now isn't good.
21:58 pmichaud mainly I was going to look at default.pmc and delegate.pmc for ideas
21:58 jonathan OK
21:58 pmichaud since delegate tends to forward to another PMC
21:58 pmichaud (and so does default)
21:59 jonathan Right. We can subclass delegate to probably get a lot of what we want.
21:59 jonathan Or create our own thing based upon it.
21:59 pmichaud I wasn't planning to subclass delegate, but if it works then that would be good.
21:59 pmichaud I've had some weird experiences with delegate before
21:59 jonathan Are you thinking that we'll have Mutable, whihc pretty much forwards everything.
21:59 pmichaud yes
22:00 jonathan Then we will in, for example, in Scalar, override assign.
22:00 jonathan In Array, override set_pmc_keyed
22:00 jonathan And so forth?
22:00 pmichaud I'm not sure about overriding set_pmc_keyed, but essentially, yes.
22:00 pmichaud the big one is overriding assign
22:00 pmichaud if we have that, then we can figure out the details on the other stuff
22:01 jonathan not sure about overriding set_pmc_keyed <= as in, should have said keyed_int? Or?
22:01 jonathan Oh, OK.
22:01 pmichaud I don't know that mutable will need a set_pmc_keyed override
22:01 jonathan Yes, in fact Assign may be all we need, now I think about it some more.
22:02 pmichaud anyway, I need to run.
22:02 jonathan OK, sure
22:02 pmichaud thanks again!
22:02 jonathan I'm going to finish up my various slides for the weekend's talks.
22:02 jonathan Thanks to you too - this is looking a lot cleaner now. :-)
22:08 NotFound Patch updated in #54602
22:11 NotFound purl: C?
22:11 purl C is probably for lettuce, it's good enough for me!
22:12 Andy joined #parrot
22:37 IllvilJa joined #parrot
22:41 kid51 joined #parrot
22:48 DietCoke purl, no C is for cookie, and it's good enough for you.
22:48 purl ...but no c is way simpler than Perl...
22:48 DietCoke purl, no, C is for cookie, and it's good enough for you.
22:48 purl okay, DietCoke.
22:53 tetragon joined #parrot
22:53 cjfields Is the plan to merge rakoo back over to trunk?
22:54 * cjfields reads back, smacks self
22:54 cjfields okay, disregard that last bit...
22:59 mire joined #parrot
23:27 ank joined #parrot
23:32 Zaba_ joined #parrot
23:36 Limbic_Region joined #parrot
23:44 kid51 DietCoke:  ping
23:47 kid51 A message concerning the Parrot/Rakudo buildfest workshop at YAPC::NA::2008 in Chicago (Wed June 18).  I'm sending email to people who have expressed interest in mentoring or who *might* be interested in mentoring.  If you can take the time to read/respond to this mail, please do so.
23:47 kid51 And if you're not yet on my list of contacts for this workshop, please ping me or msg me or email me or whatever.
23:48 bacek_ joined #parrot
23:49 bacek_ joined #parrot
23:55 tetragon_ joined #parrot

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

Parrot | source cross referenced