Camelia, the Perl 6 bug

IRC log for #parrot, 2008-12-05

Parrot | source cross referenced

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

All times shown according to UTC.

Time Nick Message
00:00 dalek r33496 | jonathan++ | trunk:
00:00 dalek : [rakudo] Some initial work on proto support. This finds and extracts the proto from the other candidates, and if there is an ambiguity or we don't have any applicable candidates then we hand back the proto instead. This patch also adds a mixing bit of documentation and fixes a memory leak that could happen if we ended up with a circularity in the narrowness graph (need to free memory up before throwing the exception).
00:01 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33496
00:02 dalek r33497 | jonathan++ | trunk:
00:02 dalek : [rakudo] Add S06-multi/proto.t, which has some tests we pass and has been fudged.
00:02 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33497
00:05 dalek r33498 | kjs++ | trunk:
00:05 dalek : [pirc] Bytecode: Now we're getting somewhere.
00:05 dalek : + fix the parser, couldn't do i = i + 1; fixed now.
00:05 dalek : + offsets are calculated for subs now.
00:05 dalek : + lots of TODOs.
00:06 dalek : + simple programs, with a single sub should work properly.
00:06 dalek : + string and num args don't work yet.
00:06 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33498
00:09 jonathan kj: Nice! :-)
00:09 AndyA joined #parrot
00:10 tetragon joined #parrot
00:12 Tene cotto: try { ... }; if $! { ... }
00:12 Hadi left #parrot
00:15 particle1 kj: do you need to use int/double, not INTVAL, FLOATVAL, etc?
00:16 particle (in bcgen.c)
00:17 lathos Tene: Does that work now? Last I tried $! didn't want to become Boolean.
00:17 Tene lathos: I just added a commit that fixes that.
00:17 lathos Groovy.
00:18 lathos I can clean up some code. :) Still need classname indirection before I can do anything else, though...
00:18 jonathan lathos: Classname indirection? Example?
00:18 lathos ::($foo).new
00:19 jonathan Ah, OK.
00:19 particle aka interpolated namespaces
00:19 lathos Specifically, return ::($driver).getConnection($r, $login, $password);
00:19 particle jhorwitz is no longer pining alone
00:21 particle ::($driver) needs to return 'eval $driver.WHAT', basically
00:22 lathos $driver is a String.
00:22 particle er, sorry, yeah
00:22 lathos I need to cast a string into a class.
00:23 particle lack of parens there
00:24 lathos (eval $driver)?
00:25 lathos Oh, that works.
00:27 jonathan Rakudo sometimes provides a non-obvious way. ;-)
00:30 particle1 joined #parrot
00:35 TimToady joined #parrot
00:37 chromatic TimToady, ping.
00:38 particle1 more like 'pounce'
00:38 TimToady pong
00:38 particle comcast--
00:39 chromatic I'm putting together the final interview Federico and I did.  Do you have any answers for the questions I sent last month?
00:40 TimToady perhaps I can work on them this afternoon
00:40 TimToady or evening
00:41 TimToady at the moment sitting in the Perl track, so a bit distracted...
00:42 chromatic That would be fantastic, thank you.
00:47 dalek r33499 | kjs++ | trunk:
00:47 dalek : [pirc] fix local label offsets.
00:47 dalek : + this makes jumping instructions work (at least a few of them anyway)
00:47 dalek : + update tests
00:47 dalek : + it seems I can't go to bed till I fixed this :-( discipline-- I'd like to have 36-hour days.
00:47 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33499
00:55 tak joined #parrot
01:00 Whiteknight (36 hour days)++
01:26 chromatic Hmm.  Pie.
01:28 magnachef joined #parrot
01:34 magnachef joined #parrot
01:34 magnachef_ joined #parrot
01:36 cheflog__ joined #parrot
01:40 magnachef_ joined #parrot
01:40 cheflog__ joined #parrot
01:41 cheflog__ joined #parrot
01:42 cheflog__ joined #parrot
01:43 magnachef_ joined #parrot
01:47 tak_ joined #parrot
01:49 magnachef joined #parrot
01:49 magnachef joined #parrot
01:50 magnachef_ joined #parrot
01:55 jimmy joined #parrot
01:56 purl joined #parrot
01:59 magnachef joined #parrot
02:01 magnachef_ joined #parrot
02:02 cheflog__ joined #parrot
02:03 magnachef_ joined #parrot
02:05 cheflog__ joined #parrot
02:06 magnachef_ joined #parrot
02:07 slavorg joined #parrot
02:07 magnachef_ joined #parrot
03:05 TonyC joined #parrot
03:26 jimmy does pir suport: $S0 = 'abcdefg' print $S0{2} # just like php
03:26 jimmy and then print 'c'
03:33 bacek_ jimmy: no
03:42 Andy joined #parrot
04:16 jimmy bacek_: yes
04:21 jimmy bacek: wrong words. I should say 'thanks'.
04:38 lathos Rock.
04:38 lathos % ../../perl6
04:38 lathos > use DBDI;
04:38 lathos > say DBDI::DriverManager.getConnec​tion("dbdi:SQLite3:test.db", "", "");
04:38 lathos SQLite3<0x246eb00>
04:57 Andy wel, that's goodness.
04:58 adu joined #parrot
05:14 Tene kick ass
05:14 purl kick ass is probably a PHRASE, not a WORD
05:17 TimToady adamk++ just presented me with a cd containing Vanilla Perl 6 Beta 1
05:17 magnachef joined #parrot
05:18 Tene What revision is it based off of?
05:19 TimToady dunno, but he got it working at 5am this morning, so something recentish
05:21 TimToady 'course, my laptop doesn't have Win32 on it, so I can't try it...
05:22 GeJ is that The Sekrit ?
05:22 tewk He was in here while he was doing it. see the backlog or irclog?
05:22 tewk oppps.
05:30 tetragon joined #parrot
06:16 japhb joined #parrot
06:17 Theory joined #parrot
06:25 chromatic joined #parrot
06:56 cotto joined #parrot
07:03 cotto ubuntu--
07:04 allison joined #parrot
07:22 szbalint cotto: any reason?
07:27 cotto twice in the last week I've opened the lid to find that my screen won't power on and I can't get the system to do anything
07:29 cotto It makes me crabby because it takes me a good 5-10 minutes to get all my virtual desktops back to normal.
07:29 cotto karma ubuntu
07:29 purl ubuntu has karma of 15
07:30 cotto I'm sure there's a solution, but it's not impressive that it's broken by default.
07:30 cotto eor
07:36 iblechbot joined #parrot
07:45 Debolaz joined #parrot
07:50 dalek r33500 | chromatic++ | trunk:
07:50 dalek : [GC] Added a pointer check before dereferencing, as reported by Coverity Scan
07:50 dalek : in CID #8 (though strangely, it's a different problem than the original).
07:50 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33500
07:54 uniejo joined #parrot
07:55 dalek r33501 | chromatic++ | trunk:
07:55 dalek : [IO] Made one more attempt (this time more verbose) to avoid signedness
07:55 dalek : assignment problems in Parrot_io_peek_buffer(), reported by Coverity Scan as
07:55 dalek : CID #148.
07:55 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33501
07:55 chromatic That should clear up everything in level 1.
07:57 japhb joined #parrot
08:18 dalek r33502 | chromatic++ | trunk:
08:18 dalek : [config] Added #define for __USE_GNU when building Parrot with GNU libc
08:18 dalek : backtrace() support.  I'm not completely convinced this will work on Mac OS X,
08:18 dalek : but we can refine it further if necessary.  See RT #58670, reported by
08:18 dalek : Christoph Otto.
08:18 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33502
08:33 cotto chromatic++
08:33 chromatic It was the easiest newly open bug.
08:33 chromatic With that I must sleep.
08:42 elmex joined #parrot
09:00 clunker3__ joined #parrot
09:04 jimmy cid?
09:04 purl i think cid is all MUA
09:04 jimmy CID?
09:04 purl somebody said CID was all MUA
09:04 jimmy MUA?
09:04 purl hmmm... MUA is Mail User Agent or your mail reader, you idiot
09:04 jimmy MUA?
09:04 purl MUA is, like, Mail User Agent or your mail reader, you idiot
09:06 moritz CID is also Coverity ID
09:06 purl okay, moritz.
09:07 cotto where are those reports?
09:10 jimmy Asked the same
09:11 moritz http://scan.coverity.com/rung1.html lists parrot, but it seems like you have to sign in first
09:13 jimmy https://trac.parrot.org/parrot/wiki/CageTasklist
09:13 jimmy lists it : http://scan2.coverity.com:9035/
09:13 lathos OK, here's an interesting segfault.
09:13 lathos called from Sub 'parrot;PAST;Compiler;post_children' pc 1785 (src/PAST/Compiler.class Foo { has $bar; method baz($baz) { given ($baz) { foo($baz, $bar); } } }
09:13 lathos Oops.
09:13 lathos class Foo { has $bar; method baz($baz) { given ($baz) { foo($baz, $bar); } } }
09:14 moritz rakudo: class Foo { has $bar; method baz($baz) { given ($baz) { foo($baz, $bar); } } }
09:14 polyglotbot OUTPUT[Parrot VM: Can't stat languages/perl6/perl6.pbc, code 2.␤main: Packfile loading failed␤]
09:15 lathos Really needs all the bits in place too; get rid of the attribute or the parameter and it'sf ine.
09:15 tomyan joined #parrot
09:16 moritz does it segfault if you run it with ../../parrot -G perl6.pbc?
09:16 lathos Oop, no, hang on.
09:16 dtg would chromatic@wgz.org be the best address for chromatic?
09:16 lathos class Foo { has $bar; method baz() { given (1) { foo($bar); } } }
09:16 lathos moritz: Yes.
09:17 lathos Actually you can get rid of the method call too.
09:17 lathos And the function call.
09:17 lathos class Foo { has $bar; given (1) { $bar; } }
09:17 moritz lathos: 'has $bar' is wrong (you need $.bar or $!bar), but of course it shouldn't segfault
09:18 lathos S12 disagrees with you.
09:18 moritz it does?
09:18 purl if you say so...
09:18 lathos 1The "true name" of the private variable always has the exclamation, but much like with our variables, you may declare a lexically scoped alias to the private variable by saying:
09:18 lathos has $brain;     # also declares $!brain;
09:18 moritz okay, wasn't aware of that feature
09:19 lathos But you raise a good point, if you replace with $.bar it doesn't segfault.
09:19 * moritz should really dive into Perl 6 OO at one point
09:20 * lathos hacks around it.
09:20 lathos our $s := $attribute; given (1) { $s } # Works
09:20 * jimmy waiting
09:48 lathos Ack, no, within that given {} $s is broken.
09:49 gaz joined #parrot
09:53 moritz maybe related to http://rt.perl.org/rt3/Tic​ket/Display.html?id=61034 ?
09:53 tak_ joined #parrot
09:56 lathos Maybe. Not seeing the Null PMC access message though.
09:56 lathos No wait, this is a compile-time segfault, not a runtime one.
09:56 lathos So completely unrelated.
09:56 moritz allright
09:56 moritz please open a ticket
10:01 lathos Ack, I recompiled (added an NCI function) and now it doesn't segfault there
10:04 Tene yay segfaults
10:06 lathos And now I've found a different workaround.
10:06 lathos (Treat everything as if it's a string, SQLite doesn't care.)
10:07 lathos I'm just about ready to give up on this, but you all may be pleased to note that this works: http://nopaste.snit.ch/14818
10:07 moritz w00t
10:13 alvar joined #parrot
10:19 dalek r33503 | simon++ | trunk:
10:19 dalek : Some more work on the DBDI; by no means official, (yet) but submitting it so it doesn't get lost.
10:19 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33503
11:16 jonathan hi all
11:17 * jonathan has a cold
11:17 jonathan But after some extra sleep, it shouldn't stop me from hacking on Rakudo. :-)
11:17 kj hi Jonathan
11:17 jonathan hi kj
11:18 jonathan Looks like PIRC is making some nice progress. :-)
11:19 kj yep! Loads of work to be done though, but it's a nice job to hack
11:51 tak_ joined #parrot
12:01 jimmy joined #parrot
12:02 jimmy line 354 missing ')' in LANGUAGES_STATUS.pod
12:07 dalek r33504 | jonathan++ | trunk:
12:07 dalek : [rakudo] Fix our ability to smart-match against Match (which checks the LHS is of type Match).
12:07 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33504
12:08 cotto nfl?
12:08 purl it has been said that nfl is a religion
12:08 cotto no, nfl is not for long
12:08 purl okay, cotto.
12:08 dalek r33505 | cotto++ | trunk:
12:08 dalek : [docs] fix a missing paren, reported by jimmy++
12:08 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33505
12:14 masak joined #parrot
12:14 cotto night
12:18 jimmy good morning, masak
12:18 jimmy and night, cotto
12:22 tewk what block comments work in rakudo?
12:22 moritz just POD, I think
12:23 moritz \n=begin foo\n ... \n=end foo\n
12:23 tewk =begind comment
12:25 masak jimmy: 早呀
12:25 jimmy masak: 早,呵呵
12:25 masak (though it's past midday here)
12:26 jimmy here is night.
12:30 jimmy i think there should be a script like indent.vim to re-indent all the pir codes.
12:31 lathos That reminds me, anyone got a perl6.vim?
12:31 moritz lathos: there's one in the pugs repo
12:32 moritz perl6.vim is http://svn.pugscode.org/pugs/util/perl6.vim
12:32 tewk google will find it for you, pugs_repo util/per6.vim I believe
12:32 moritz now purl will find it for you :-)
12:33 lathos Ooh, much better.
12:33 jimmy it should be copied to languages\perl6\editor, i think
12:33 moritz jimmy: copying is always bad, we should keep thins in one spot
12:34 * moritz has a symlink in .vim/syntax/ and is happy with that
12:34 masak though one could always put a small text file at the other place where it's expected to be
12:34 tewk jimmy: I wouldn't duplicate it, but you could make the editor/Makefile wget it when it installs parrot vim files
12:34 tewk or add a make target to languages/perl6 to do the same.
12:35 jimmy using wget is also bad, is there wget on windows
12:35 purl okay, jimmy.
12:35 lathos So make perl6 should check it out from svn like it does for the specs.
12:36 lathos Or we could just "Look, pugs is dead, we're taking over."
12:36 tewk lathos++ better idea
12:36 tewk mmm, well the synopsis just got moved to pugs right?
12:36 moritz lathos: bad idea. It's much easier to contribute to stuff in the pugs repo, and we have profited from that before
12:36 lathos I wasn't being entirely serious.
12:37 moritz ok :-)
12:38 jonathan lathos: Does the SQLite bindings let you do select statements and grab the data yet?
12:38 jonathan Nice work on getting it this far along, BTW! :-)
12:38 lathos Doing that right now.
12:38 jonathan Nice.
12:39 jimmy btw: readme.pod is obsolete, since make vim-install works on windows.
12:39 jimmy under editor.
12:39 lathos Next trick is to write a NCI.pm and hoist all the NCI hard work from PIR to Perl.
12:39 tewk lathos: almost done, watch
12:40 lathos OK, next trick is to write a mysql driver, and use it to make sure everything's at the right level of abstraction.
12:40 moritz lathos: there's a very basic mysql driver somewhere
12:40 dalek r33506 | tewk++ | trunk:
12:40 dalek : [ncigen] SQLite autogenerated stubs
12:40 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33506
12:41 moritz lathos: in examples/nci/
12:41 moritz it's rather low level, but there's a Perl 6 example as well
12:41 jimmy tewk++
12:42 tewk jonathan: compilers/ncigen/NCIGENAST.pir defines some pir classes using P6metaclass
12:42 tewk I want to multdispatch off of then in perl6, how do I do that?
12:42 tewk or at a minimum get perl6 to tell me their type.
12:43 tewk compilers/ncigen/sqlite_interface_generator.pl attempts to do this but it doesn't work yet.
12:43 jonathan tewk: Does it just set them us as proto-objects?
12:44 jonathan tewk: Or, if you create an instance of that class, does .WHAT give the expected result (the name of the class you defined)?
12:44 jonathan If so, there's a good chance that it should Just Work.
12:44 tewk I think so, but this is out of my territory.
12:45 tewk .WHAT says they are Perl6Hash I believe.
12:45 jonathan Ah.
12:45 jonathan That's not a good thing. :-|
12:45 jonathan Let me look at the code.
12:46 tewk ../../parrot ../../languages/perl6/perl6.pbc sqlite_interface_generator.pl kk.h
12:46 tewk in compilers/ncigen
12:47 Hadi joined #parrot
12:47 tewk Nevermind it says its a FuncDecl, thats good,
12:48 tewk I just probably need to tare off the namespace if front.
12:48 lathos OK, I'm really getting fed up with this segfaulting when I use attributes inside blocks.
12:49 tewk $v.WHAT says FuncDecl
12:52 lathos Holy crap it works.
12:52 jonathan lathos: Is that the issue you filed an RT for earlier?
12:52 lathos Yes.
12:52 jonathan OK, I'll look at it later today.
12:52 pmichaud good morning
12:53 jonathan pmichaud: morning
12:53 lathos I've hacked around it again, but it does restrict me in interesting ways.
12:54 tewk Ok now I think I just need to learn how to write multis.
12:54 jonathan tewk: In Perl 6?
12:54 tewk yes
12:54 tewk Ambiguous dispatch to multi 'pir'. Ambiguous candidates had signatures:
12:54 tewk :(Any $node)
12:54 tewk :(Any $node)
12:54 tewk :(Any $node)
12:54 jonathan multi foo(ClassName $x) { ... }
12:54 dalek r33507 | simon++ | trunk:
12:54 dalek : And now we can do selects and pull data out of them. Which is pretty much all you need, really.
12:54 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33507
12:55 lathos One day I'll find a person who really enjoys writing tests, and we'll be unstoppable.
12:55 moritz jonathan: speaking of multis and protos... I think that proto foo() {...} implies that later 'sub foo's are automatically promoted to multis - that doesn't work yet
12:55 jonathan moritz: Yes, I know. I even wrote so in my blog post about it. ;-)
12:56 jonathan moritz: I think doing that depends first on getting symbols registered during the compile.
12:56 moritz ah, I only skimmed the code :)
12:56 lathos tewk: There's one in DBDI::RecordSet. :)
12:56 jonathan moritz: So there's some work to do in prep for that.
12:59 * jonathan tries to s/Perl6Str/Str/ and hits a missing piece of Parrot
13:00 randi joined #parrot
13:01 tewk code:
13:01 tewk multi sub pir(NCIGENAST::TypeDef $node) { return ""; }
13:01 tewk multi sub pir(NCIGENAST::VarDecl $node) { return ""; }
13:01 tewk multi sub pir(NCIGENAST::FuncDecl $node) {
13:01 tewk with that I get Ambiguous dispatch
13:01 tewk if I eliminate the first two it works.
13:02 jonathan Hmm.
13:02 pmichaud do we support the :: in param types yet?
13:02 jonathan I'm thinking not.
13:02 jonathan I suspect that when we do the lookup, we end up with an Undef or something.
13:02 jonathan And it gets treated as an Any by the dispatcher.
13:02 pmichaud that's my guess also.
13:03 moritz why do we have to support them explictly everywhere?
13:03 jonathan Since the dispatcher thinks it has three Anys.
13:03 tewk If i change the type of the third to just FuncDecl, I get "Parameter type check failed in call to pir"
13:04 jonathan tewk: I'm in the middle of digging into another bug at the moment - I'll look at that as soon as I finish this one.
13:04 moritz is it so hard to have a mechanism that just supports a type name with colons, and use that everywhere?
13:04 pmichaud moritz: typenames and parameter parsing are things that change frequently in STD.pm
13:04 pmichaud we keep supporting "what STD.pm does", and then TimToady changes it
13:04 Hadi left #parrot
13:04 tewk no problem, I can work around it for now, I could even do my own dispatch based on .WHAT.
13:04 moritz pmichaud: that's unfortunate :/
13:04 tewk perl6 is cool, jonathan++
13:08 jonathan tewk: I think it's a lot of people ++ ;-)
13:09 tewk yep, but I'm trying to incentivize my multi bug fix. :)
13:09 moritz tewk++ # honesty
13:10 pmichaud jonathan: I ran into a few issues trying to use the assign_pmc vtable for assignment
13:10 pmichaud like, it becomes very difficult to "promote" a Parrot type into its Rakudo equivalent
13:12 pmichaud because I don't know that we have a way to do a superclass vtable
13:12 jonathan What do you mean by superclass vtable?
13:12 jonathan If you're inside a vtable method, there is SUPER, I believe.
13:13 pmichaud in PIR.
13:14 jonathan So you're in a PIR subclass of a PMC and want to call a parent vtable method?
13:14 jonathan Where you know the parent is a PMC?
13:15 pmichaud yes.
13:15 pmichaud Perl6Complex <-> Complex is a good example
13:16 pmichaud let $P1 be a Complex PMC
13:16 pmichaud I want to upgrade it to a Perl6Complex
13:16 pmichaud $P2 = new 'Perl6Complex'
13:16 jonathan OK
13:17 pmichaud assign $P2, $P1    # doesn't work
13:17 kj joined #parrot
13:17 jonathan setattribute $P2, [ 'Complex' ], 'Proxy', $P1
13:17 jonathan maybe.
13:17 pmichaud I have to put attributes on the rakudo types?  That would suck.
13:18 jonathan No, no
13:18 jonathan This goes and replaces the proxy object.
13:19 jonathan I think.
13:19 jonathan But it's...evil.
13:25 pmichaud anyway, we may be back to doing a method-based form or something like that.  But it does mean that we're still checking for 'ObjectRef' all over the place.
13:25 jonathan :-|
13:25 pmichaud either that or we figure out how to intercept find_method for certain methods on ObjectRef
13:26 jonathan How many methods do you want to intercept?
13:26 pmichaud at the moment just STORE
13:26 pmichaud (or whatever we decide to call it)
13:26 jonathan Thing is you get the cost on every method lookup.
13:26 pmichaud yes, I know.
13:26 jonathan But let's get it right first.
13:26 jonathan It's possible to do that.
13:27 pmichaud well, "get it right" really should be the assign_pmc vtable, so I haven't completely given up on that.
13:29 pmichaud out of curiosity, how exactly does vtable mmd work?
13:30 pmichaud i.e., can I register multiple :vtable methods with different :multis?
13:30 pmichaud and have parrot dtrt ?
13:32 jonathan As I understnad it, for vtable multis, the multis are reigstered.
13:32 jonathan And then if there is no vtable override, we end up in the default PMC
13:32 jonathan Which then invokves the multi dispatcher.
13:33 pmichaud I'm thinking the the PIR case.  Aren't PIR :vtable functions put into the vtable override?
13:33 pmichaud .sub '' :vtable('assign_pmc') :multi(_, 'Integer')
13:33 pmichaud and
13:33 jonathan Yes. Hmm.
13:34 pmichaud .sub '' :vtable('assign_pmc') :multi(_, 'BigInt')
13:34 jonathan Ah, I don't think assign is one that participates in multi dispatch.
13:35 pmichaud okay, I think I see where I want to head with this then.
13:35 pmichaud it'll be some ugly code, but we'll be able to start to separate the Parrot bits from the Perl 6 ones.
13:36 pmichaud "ugly" == "we really shouldn't have to do this" as opposed to "ugly" == "really hard to understand"
13:36 jq joined #parrot
13:42 pmichaud jonathan: so, what are you planning to work on for today?
13:42 pmichaud (or, what are you working on today?)
13:44 jonathan pmichaud: Well, I went to tackle the "class Str is also { ... }" doesn't work ticket.
13:44 jonathan Since I figured it'd be nice to be able to write bits for Str in the prelude. ;-)
13:44 jonathan Then I realized that there's another ticket that suggests we rid ourselves of Perl6Str and just have Str.
13:44 jq joined #parrot
13:44 pmichaud we don't have the ability to create methods in C yet, do we?
13:45 jonathan No.
13:45 pmichaud Perl6Str exists primarily to provide the get_number vtable
13:45 jonathan But I also realized that if we created Str everywhere that we create Perl6Str, then stuff would be of the right class.
13:45 pmichaud yes
13:45 pmichaud the only reason I was using Perl6Str in some places was for the performance win
13:45 jonathan And it'd solve the is also thing, and be a good step on the other ticket.
13:46 jonathan So I did it. And we started to epic fail - the telling sign was isa.t in the sanity tests failed.
13:46 pmichaud wow, that's surprising
13:46 jonathan I dug in and realized that PMCProxy was failing to build a list of parents (just not implemented yet)
13:47 jonathan So the inheritance check for Str wasn't really working.
13:47 jonathan When it was a Perl6Str, it did.
13:47 pmichaud I'm confused.
13:47 jonathan So now I'm making Parrot explode in various interesting ways trying to build that list.
13:47 pmichaud Str doesn't think it's a String ?
13:47 jonathan It appears that way.
13:48 pmichaud ...but then wouldn't mmd be epic fail right now?
13:48 jonathan At least, after chasing through what's going on, it's the only conclusion I can find.
13:48 pmichaud or do we just not mmd on String anywhere?
13:48 jonathan I think it depends on how you're doing the isa check.
13:48 pmichaud I mean in  :multi
13:48 Hadi joined #parrot
13:48 jonathan MMD looks at something different.
13:48 pmichaud ah
13:48 pmichaud (weird.)
13:48 jonathan ->mro, IIRC
13:49 jonathan Yeah.
13:49 jonathan Anyway, there was a comment in PMCProxy saying "ah, this ain't done yet"
13:49 jonathan So it needs fixing anyway.
13:49 pmichaud well, just a sec.  :-)
13:49 jonathan Trouble is, my first attempt at fixing it causes massive fail elsewhere.
13:49 Hadi left #parrot
13:49 pmichaud the _other_ approach to this for now is to really get rid of Perl6Str
13:50 pmichaud and have get_number on Str be a :vtable that does an NCI call to our C function
13:50 jonathan Yes, we can do that too.
13:50 jonathan OTOH, it might be better to fix the underlying Parrot issue now I've got an idea what it is.
13:50 pmichaud that too.
13:50 jonathan Rather than work around it and then have it bite us in another couple of months.
13:50 pmichaud well, ultimately I do want to get rid of Perl6Str
13:50 pmichaud I'd see the   get_number to NCI as actually getting us closer
13:51 pmichaud because what I'd _really_ like is to be able to write some methods in C
13:51 pmichaud i.e., the Perl6Str is already a workaround.
13:52 jonathan You could probably do it with a "fake" PMC (that we never use for anything other than this) that has all of the methods we want to write in C in it.
13:52 jonathan Then we find_method 'em
13:53 pmichaud can we attach them as vtable overrides and have it dtrt
13:53 pmichaud ?
13:53 pmichaud e.g., to the Str class ?
13:53 jonathan _if_ you don't poke at any guts
13:53 pmichaud poke as in write or poke as in read?
13:54 jonathan e.g. use VTABLE_get_string(interp, SELF), not PMC_str_val(SELF)
13:54 pmichaud right
13:54 jonathan If you do that, you may well get away with it.
13:54 pmichaud I think we do that anyway; if we don't, we should.
13:54 jonathan Right.
13:56 nopaste "pmichaud" at 72.181.176.220 pasted "jonathan: your suspicions are correct" (22 lines) at http://nopaste.snit.ch/14819
13:56 pmichaud oops, second test is wrong
13:57 nopaste "pmichaud" at 72.181.176.220 pasted "jonathan: your suspicions are somewhat correct" (22 lines) at http://nopaste.snit.ch/14820
13:57 pmichaud so, is the issue here that the isa opcode doesn't properly follow the parent of Perl6Str ?
13:59 jonathan Aye.
13:59 jonathan I think so, anyway.
14:00 nopaste "pmichaud" at 72.181.176.220 pasted "more clues" (36 lines) at http://nopaste.snit.ch/14821
14:00 jonathan pmichaud: I've got a fix of sorts.
14:00 pmichaud yes, this is definitely something that needs fixing.
14:00 jonathan pmichaud: Actually, it may be a good enough fix for real.
14:01 pmichaud the last case tells the tale -- $c isa ResizablePMCArray but not a FixedPMCArray   (even though ResizablePMCArray extends FixedPMCArray)
14:02 * pmichaud suddenly realizes that we could really write Parrot/PIR tests in Rakudo
14:02 jonathan Scary!
14:02 pmichaud or, more likely, NQP.
14:02 jonathan Works great until you want some Parrot tests to know why Rakudo is broken. ;-)
14:03 tewk isn't there a perl6 tutorial out there, I want to figure out how to do a simple s///
14:03 moritz tewk: that's not yet implemented in rakudo
14:03 pmichaud tewk:  $result = $_.subst( /pat/, 'repl' );
14:03 moritz but you can use .subst... what pmichaud said
14:03 pmichaud or   $_ .= subst( /pat/, 'repl' );
14:04 moritz that also works with $_.subst( /pat/, 'repl', :g ); if you want to replace them all
14:04 * jonathan smokes stuff
14:06 tewk ok a couple more perl6 questions:
14:06 tewk how do I flatten an array in a sub call
14:06 tewk format_func_decl($pirname, @result) -> format_func_decl($pirname, @result[0], @result[1])
14:07 pmichaud you mean you want @result[0] to be the second argument and @result[1] to be the third?
14:07 lathos Theoretically @*result
14:07 tewk do <<"FMT" style heredocs work
14:07 tewk pmichaud: yes
14:07 pmichaud tewk:  format_func_decl($pirname, |@result)   #  I think.
14:07 dalek r33508 | Whiteknight++ | trunk:
14:07 dalek : [Book] update chapter 11 with some more details about PMCs: INTERP, SUPER, SELF and ATTR keywords, and a few other details about the compiler.
14:08 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33508
14:08 jonathan |@result should work
14:08 tewk I should preface all this with, I', trying to write working code in rakudo.
14:08 pmichaud I'm only giving things that work in rakudo.
14:09 tewk great, just wanted to make myself clear.
14:09 pmichaud if you ask "how can I flatten a hash into named arguments" then my answer will be "we can't do that yet."  :-)
14:10 pmichaud (although in Perl 6 the answer would be |%hash :-)
14:11 tewk does rakudo support heredocs w interpolation?
14:11 pmichaud no heredocs yet.
14:11 pmichaud but you can do qq {{ ... }}
14:11 jonathan Hmm. Now I get some really odd failures.
14:12 pmichaud (or whatever brackets you want on the qq)
14:12 pmichaud qq <<<  .... >>>>  # works
14:12 pmichaud oops
14:12 pmichaud (make those brackets equal and it works)
14:12 tewk last question for now, how do I do optional parameters?
14:13 pmichaud sub foo($a, $b?, $c?) { ... }
14:13 pmichaud or
14:13 pmichaud sub foo($a, $b = 1, $c = 'xyz') { ... }
14:13 pmichaud both have $b and $c as optional parameters.
14:13 tewk thanks
14:13 pmichaud The second provides the value to use if no argument provided.
14:18 jonathan pmichaud: Hmm. Interestingly, making isa $P0, 'String' give the right answer seems to give some new failures, even without my other patch. :-S
14:19 pmichaud in rakudo or Parrot?
14:19 jonathan Rakudo
14:19 jonathan Parrot tests pass
14:19 jonathan We fail a sanity test in Rakudo.
14:19 pmichaud which one?
14:19 jonathan t\01-sanity\08-say.................Method 'say' not found for invocant of class
14:19 jonathan 'Perl6Str'
14:20 pmichaud I'm not sure that test belongs in sanity -- still it's a bug.
14:20 pmichaud ummmm
14:20 Coke msg jimmy now that trac works for tickets, you should be able to submit patches that way.
14:20 purl Message for jimmy stored.
14:21 jonathan I'm just wondering if we maybe have been relying on the Str proto not responding true to isa String, and now we are doing so.
14:21 PerlJam good morning #parrot
14:21 jonathan And thus treating it as if it were a name rather than a proto.
14:21 jonathan Somewhere in P6Object.
14:21 pmichaud in this particular case, Perl6Str is supposed to have its .say method come from String
14:21 jonathan That's my first guess.
14:22 pmichaud oh, I see what you mean
14:22 pmichaud yes, it's possible.
14:23 pmichaud it would be in the 'register' method of P6metaclass
14:23 pmichaud or in get_parrotclass
14:24 pmichaud looking.
14:24 pmichaud P6object.pir:503
14:24 pmichaud try moving the test for String to below the test for  P6object
14:25 pmichaud (and then rebuild P6object.pbc, of course)
14:25 jonathan pmichaud: Oh, I did exactly that just now. :-)
14:25 jonathan It fixes say.t
14:25 jonathan Now let me try spectest
14:25 pmichaud if the p6object.t tests pass, commit that fix.
14:26 jonathan Are they not run in a Parrot make test?
14:26 pmichaud yes, they are
14:26 jonathan Ah, I see, but I did a change...
14:26 jonathan running
14:26 pmichaud right -- I didn't think you had run a Parrot make test yet :-)
14:26 jonathan If that works, I'll commit the Parrot change and the P6Object change.
14:26 jonathan I had run one, it came out fine.
14:26 pmichaud wfm
14:27 pmichaud the P6Object change is definitely needed.
14:27 jonathan And then after that I will try doing the s/Perl6Str/Str/ patch again.
14:27 pmichaud there might be similar issues with Cardinal/Pipp/others that might have been following rakudo's lead
14:28 pmichaud yes, let's go ahead and switch Perl6Str to Str everywhere.  It's a good step towards eliminating Perl6Str
14:28 pmichaud I'll have to go for a short bit -- I forgot I had $otherjob tasks this morning.
14:28 pmichaud should be back in 2 hrs, though.
14:30 jonathan OK, sure
14:30 * tewk really likes .perl()
14:31 gryphon joined #parrot
14:35 jhorwitz joined #parrot
14:36 jhorwitz pmichaud++ # inline PIR
14:36 pmichaud btw, I gave a talk on Parrot last night at our local Unix Users Group and there are many people interested in ncigen
14:37 pmichaud jhorwitz: would inline PIR solve your interpolated namespace issues for a short bit?
14:37 pmichaud I still plan to fix them, but I feel I need to get assignment, slices, and parameters fixed first.
14:37 jhorwitz pmichaud: i solved it by writing ModPerl6::Fudge, which is written in PIR.
14:37 pmichaud okay.
14:38 jhorwitz but it's still extremely useful for me
14:38 pmichaud I figured it would be.
14:38 jhorwitz is the PIR adverb ignored if not understood by other implementations?
14:38 pmichaud I would think it would generate an error.
14:38 moritz jhorwitz: no, but a simple macro could achieve that
14:39 dalek r33509 | jonathan++ | trunk:
14:39 dalek : [core][p6object] PMCProxy should look in the PMC's isa_hash when doing an isa, otherwise we get some wrong answers to isa when inheriting from a PMC that in turn inherits from another PMC. P6Object was relying on the bug in one place, so a correction to that is also in this patch.
14:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33509
14:39 moritz (assuming other implementations do macros... oh well)
14:39 jhorwitz actually, i would imagine you're losing functionality if it's ignored....hm.  just thinking out loud.  :)
14:39 pmichaud right
14:39 pmichaud that's why I think "unrecognized option :PIR" makes more sense.
14:41 * tewk uses given for the first time.
14:41 * jhorwitz fondly remembers his first time...  ;-)
14:43 workbench joined #parrot
14:44 * kj can only imagine what it would be like... :-P
14:44 PerlJam kj: perl 5.10 can show you :)
14:46 * jhorwitz wants him some DBDI
14:48 lathos I put it in the tree.
14:48 lathos Just for safe keeping. :)
14:48 jhorwitz lathos++ :)
14:49 lathos (Basically because I *know* I will go "Urgh, parrot directory is all messed up. rm -rf parrot, svn co. Oh wait.")
14:51 jhorwitz yeah, i'm familiar with that situation.  :)
14:56 jonathan pmichaud: Ah, ouch. Now we have the problem the opposite way around. When .isa is passed a string, then it wants get_parrotclass to treat it as a string, even though it's a Perl6Object!
14:57 jonathan Ah, we cna differentiate on whether it's a proto.
15:04 tewk is there a more concise way to say
15:05 tewk if ( %rename_table{$pirname} ) {
15:05 tewk $pirname = %rename_table{$pirname};
15:05 tewk }
15:06 PerlJam tewk: what does $pirname equal if %rename_table{$pirname} isn't true?
15:07 iblechbot joined #parrot
15:08 PerlJam tewk: I mean you may want to just say  $pirname = %rename_table{$pirname} || 'default';
15:08 tewk a non constant lexical value.
15:08 tewk that will work
15:08 tewk duh
15:08 PerlJam you might want to use // instead of || though
15:08 PerlJam (dunno exactly what you're doing though)
15:16 * jonathan still has a bunch of failures. :-(
15:17 Andy joined #parrot
15:17 Andy http://perlbuzz.com/2008/12/database-acce​ss-in-perl-6-is-coming-along-nicely.html
15:17 lathos And see the comment. :)
15:17 PerlJam lathos++
15:18 pmichaud jonathan: what sorts of failures are you seeing now?
15:18 dalek r33510 | tewk++ | trunk:
15:18 dalek : [ncigen] programmatic control via perl6
15:18 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33510
15:21 jonathan pmichaud: Fairly randomish ones, so far I've got to knowing that join fails
15:21 jonathan Parrot MMD fails somewhere in there.
15:21 jonathan Looking at where
15:22 tewk lathos: lathos I'm going to start generateing SQLite3.pir with perl6 code tonight or this weekend.
15:22 tewk the interface or layout of the file shouldn't change much, it will just have a lot more functions.
15:23 tewk I think we should keep the generated version checked in though, kinda like we keep bison and flex generated artifacts checked in.
15:24 jimmy joined #parrot
15:24 jonathan pmichaud: Ouch.
15:24 jonathan Changing .sub 'join' :multi('String') to .sub 'join' :multi('Str') makes it work
15:24 lathos tewk: Cool, please don't break anything. :)
15:24 pmichaud jonathan: fsvo "work"?
15:25 jonathan pmichaud: Well, it made that particular failing case work.
15:25 lathos I sort of have a test program I'm using but it's not a harness-based one. If someone wants to take it on and turn it into proper tests that would be good, but I don't know anyone who gets a kick out of writing tests.
15:25 pmichaud it really should be :multi('String'), I think.
15:25 lathos Hey Andy, you still here? :)
15:25 jonathan pmichaud: Yeah, me too.
15:25 Andy I am.
15:25 jimmy can trac.parrot.org can attach a file?
15:25 pmichaud is there another 'join' perhaps interfering in the mix?
15:26 jonathan It says no applicable methods, rather than conflict.
15:26 tewk lathos: check it in
15:26 pmichaud ...with :multi('String') it gives "no applicable methods"?
15:26 jonathan Yes. So I just wonder if MMD doesn't really know about all the variants too.
15:26 jimmy purl>You have 1 message waiting. how can i read it ?
15:26 purl no idea, jimmy
15:26 pmichaud jimmy:   /msg purl messages
15:26 jonathan erm
15:26 jonathan I mean, MMD doesn't chase up the tree properly.
15:27 tewk or send it to me.
15:27 pmichaud that wouldn't surprise me.
15:27 jonathan *sigh*
15:27 jimmy can trac.parrot.org can attach a file?
15:27 pmichaud we should add a test to Parrot for the other bug you found.
15:27 lathos tewk: Checked in.
15:27 pmichaud jimmy:  yes, there's a button for attaching on the web page.
15:27 pmichaud (although I don't know that it shows up for everyone.)
15:28 dalek r33511 | simon++ | trunk:
15:28 dalek : Turn this into a DBDI-based test. Dear test fairies: please make it output TAP.
15:28 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33511
15:28 Andy lathos: What did you want?
15:28 Andy Did you just implement Mechanize in P6 for me?
15:30 lathos Not yet. I'm looking for test fairies.
15:30 jimmy there are some functions under pmc dir,they are no docs.
15:32 Andy So are you asking if I'm a test fairy?
15:33 PerlJam Andy: I think he's trying to coerce you into being one.
15:33 Andy I'm of the opinion that you're either born a test fairy or not.  It's genetic.
15:34 jonathan pmichaud: It doesn't. :-|
15:36 jimmy https://trac.parrot.org/parrot/ticket/19
15:38 Coke pmichaud: (superclass vtable) look at languages/tcl/src/class/tclconst.pir
15:40 Andy lathos: What sorts of fairyness do you need from me?
15:41 Coke (button for attaching files) I could never get it to work myself.
15:42 lathos Andy: ext/SQLite/test.p6 needs to be more TAPulous
15:43 jimmy coke: trac ? i just attached a file
15:43 Andy Man, I am tapped on cycles.
15:43 Andy I have a book due end of the month.
15:44 Coke jimmy: excellent.
15:44 jimmy i am using firefox
15:44 jan joined #parrot
15:48 Coke pmichaud: it's a hack but one i've been using for some time.
15:49 Coke # Finally, delegate to our parent's set_string
15:49 Coke $P0 = getattribute self, ['String'], 'proxy'
15:49 Coke $P0 = value
15:49 Coke (I think that's very similar to what someone pointed out before.)
15:50 PerlJam lathos: just have it output "ok" a few times and call it done  ;)
15:54 pmichaud Coke:  oh, that could work for me.
15:54 pmichaud Coke++  # another nice trick
15:55 pmichaud Rakudo and PCT owe some things to Tcl :-)
15:55 Coke leo++, as I think that came from him.
15:55 pmichaud (like, I guess, faster parsing)
15:55 Coke mmheheh
15:56 jimmy leo?
15:56 purl leo is possibly leo lapworth eq ranguard
15:57 Coke leo was one of the main contributers for some time.
15:58 jimmy i saw
15:58 Andy lathos: If I were using P5, I'd be making it look roughly like this: http://rafb.net/p/mR84Di87.html
15:58 Andy But I don't know the state of the P6 Test::More
15:58 Coke er, leo is also one of parrot's older contributers.
15:59 PerlJam I thought leo was youngish  :)
15:59 jimmy i saw him historically
15:59 Coke well, yah, I mean in parrot years.
15:59 Coke (is that like dog years?)
16:00 Coke of course, it's even wierder seeing lathos around again.
16:00 Coke (he's the author of r3)
16:01 jimmy and simon
16:02 PacoLinux joined #parrot
16:03 Andy lathos: I committed my test fairy notes.  I hope they can help.
16:03 dalek r33512 | petdance++ | trunk:
16:03 dalek : Andy makes some test fairy notes
16:03 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33512
16:06 * jimmy is going to sleep
16:11 tewk how do I give rakudo a @INC from the cmdline?
16:12 PerlJam tewk: you may not ... perl6 --help
16:12 pmichaud @INC from command line not implemented.
16:12 pmichaud It's also not clear that Perl 6 has an @INC -- we just stopgapped it for now.
16:13 lathos Andy: Thanks, that's a start!
16:13 tewk :(
16:13 pmichaud put "use Test;"  at the top and it might even work
16:13 pmichaud I'd eliminate the quotes on the classnames in isa_ok
16:13 Andy lathos: You're welcome.  I didn't know if that was too basic.
16:14 Andy I try to have about a 2:1 executable vs. *_ok() lines ratio
16:14 Andy But especially at this early stage, just documenting your very basic assumptions can be crucial
16:14 Andy in diagnosing future problems and assumption.
16:15 Andy "Aha, that no longer returns an object of type Foo, it's now of type FooWhatever"
16:17 tewk ../../parrot ../../languages/perl6/perl6.pbc test.p6
16:17 tewk Can't find ./Test in @INC
16:18 pmichaud tewk: yes, we have to figure out how a "standard location" for perl 6 libs
16:18 pmichaud s/how//
16:18 pmichaud which is why I'm kind of eager for some pdd30 guidance and implementation
16:19 tewk so can I work around it somehow? put a relative path in the use statement?
16:19 pmichaud we can probably put the build directory in @INC
16:19 * pmichaud looks at that.
16:19 dalek r33513 | tewk++ | trunk:
16:19 dalek : [sqlite] make all and make test
16:19 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33513
16:20 pmichaud oh, @INC also comes from PERL6LIB
16:20 tewk lathos: do you have sqlite/test.p6 changes, I's like to move it to t/
16:20 tewk pmichaud: so set PERL6LIB
16:20 pmichaud yeah
16:21 tewk where is Test.pm
16:21 purl Test.pm is evil
16:21 pmichaud $BUILD_DIR/languages/perl6
16:21 tewk duh its in la,, yeah what pmichaud said
16:21 lathos tewk: I'm done for the day.
16:21 pmichaud _eventually_ we expect many of the testing functions to become builtins
16:22 pmichaud so even 'use Test;' wouldn't be necessary.
16:22 pmichaud we're just waiting for a spec on that.
16:22 * tewk focuses on works today.
16:22 pmichaud but actually
16:22 * pmichaud grins evilly
16:23 tewk perl Makefile.PL; make test
16:23 tewk PERL6LIB=../../languages/perl6 ../../parrot ../../languages/perl6/perl6.pbc test.p6
16:23 tewk 1..1
16:24 lathos ../../perl6 would make that less hideous.
16:26 pmichaud I could certainly take a crack at drafting Synopsis 24 and making it look the way I want B-)
16:26 dngor joined #parrot
16:28 cognominal joined #parrot
16:28 pmichaud then we could get rid of "use Test;"
16:29 pmichaud maybe I'll do that this weekend :-)
16:29 moritz 24, "common practices"?
16:29 moritz or is that list on feather outdated?
16:30 pmichaud 24 is now "Testing"
16:30 pmichaud where's the list on feather, perhaps I can change it
16:30 moritz docs/feather/syn_index.html in the pugs repo
16:31 moritz I want to change something else as well
16:31 moritz so I can do that too
16:31 pmichaud current list is https://spreadsheets.google.com/ccc?k​ey=p8pKFfWF0Bj2rv7Fsq9u4eA&amp;hl=en
16:32 pmichaud perhaps that should migrate to be S00-index.pod or something.
16:32 pmichaud or S00-toc.pod
16:33 moritz no such file or directory.
16:34 tewk is .WHAT suppose to return namespace::classname, if not is there another fucn that does?
16:35 pmichaud .WHO might
16:35 pmichaud .WHAT is not supposed to return the longname, no.
16:35 allison joined #parrot
16:36 pmichaud I don't know that we have .WHO implemented
16:37 jonathan We don't.
16:37 pmichaud using .WHAT and/or .WHO is typically not recommended
16:37 pmichaud (in general for Perl 6, not just Rakudo)
16:38 pmichaud there are usually better ways of getting at whatever it is you're wanting.
16:38 pmichaud (on phone, meeting)
16:38 PerlJam is the eval bot that executes perl 6 written in perl 6 or is it just a POE bot that executes the appropriate binary?
16:38 moritz p6eval and polyglotbot are both p5 and POE based
16:38 moritz there is also a p6 evalbot written in perl 6, but it had some issues
16:39 moritz (like, stopped working)
16:39 PerlJam moritz: where is it?
16:39 purl it's it!
16:39 moritz PerlJam: p6eval is misc/irclog/ in the pugs repo
16:39 PerlJam thanks.
16:39 tewk I'd like to print the isa of an object I guess, isa_ok($conn, DBDI::DriverManager);
16:39 tewk is failing
16:40 tewk not ok 1 - The object is-a 'DriverManager'
16:40 moritz does $conn ~~ DBDI::DriverManager return true?
16:41 tewk moritz: nope
16:41 moritz the irc logs will go down in a few minutes (server reboot)
16:41 moritz rakudo: say 3.WHO
16:41 polyglotbot No output (you need to produce output to STDOUT)
16:42 moritz polyglotbot borked again. sigh.
16:42 PerlJam misc/irclog appears to only have a p5 bot.
16:42 moritz PerlJam: the p6 one is somewhere in examples/ iirc
16:43 apeiron_ joined #parrot
16:43 moritz_ joined #parrot
16:45 jonathan Typical. Fixing the MMD thing...causes another breakage to emerge.
17:35 ilbot2 joined #parrot
17:35 Topic for #parrotis now Parrot 0.8.1 "Tio Richie" Released | http://parrot.org | 588 RT | 11 trac
17:39 moritz joined #parrot
17:40 moritz_ left #parrot
17:50 pmichaud ...you know...
17:51 pmichaud the getattribute self, ['String'], 'proxy'   trick that Coke showed sounds _very_much_ like the behavior I'm wanting for morphing subs
17:51 pmichaud ideally I'd like
17:51 pmichaud .const 'Sub' $P0 = 'foo'
17:51 pmichaud morph $P0, 'Method'
17:52 pmichaud to change $P0 "in place" to be of type Method (which is a subclass of Sub)
17:52 pmichaud e.g., where we've previously done   $P99 = subclass 'Sub', 'Method'
17:53 pmichaud internally, we should (1) create a new instance of 'Method', (2) copy that instance into the current PMC, (3) bind the old PMC value to the ['Sub'], 'proxy' attribute
17:53 pmichaud (maybe swap steps 2 and 3)
17:53 jonathan pmichaud: Sadly, we explode at (2) I think.
17:53 pmichaud jonathan: isn't that what we basically do for 'copy' opcode now?
17:53 jonathan Because we're doing copy onto a constant PMC.
17:53 pmichaud yes, I figured that might be the case.
17:54 jonathan I'm pretty sure I attempted such a thing recently and it segfaulted.
17:54 pmichaud still it seems like it ought to be doable
17:54 pmichaud but it's the same sort of thing for Integer and Int
17:54 pmichaud $P99 = subclass 'Integer', 'Int'
17:54 pmichaud $P0 = new 'Integer'
17:54 pmichaud morph $P0, 'Int'
17:54 pmichaud iwbni that simply did steps (1), (3), and (2) above.
17:54 jonathan Yes, but that's different.
17:54 pmichaud agreed.
17:54 jonathan Here, $P0 is a newly allocated PMC.
17:55 jonathan I didn't look into exactly why it didn't work.
17:55 * jonathan is still digging his way through Parrot guts to work out why having a more complete MRO causes things to fail horribly.
17:55 particle joined #parrot
17:56 pmichaud it would be very helpful if 'morph' (or some other opcode) could get this behavior for automatically turning PMCs into a subclass type
17:56 pmichaud PCT could then easily cast all of the PAST::Block nodes into the appropriate type
17:56 pmichaud and we aren't doing a lot of cloning/copying
17:57 pmichaud (the copying we're doing is just a memcpy)
17:57 pmichaud (if we follow the copy opcode model)
17:57 pmichaud and HLLs could easily cast Parrot PMCs into the appropriate boxed types
17:57 jonathan Sounds like what the rebless_subclass op does. ;-)
17:58 pmichaud oh, I forgot we had that
17:58 * pmichaud looks.
17:58 jonathan Don't. You'll go blind.
17:58 jonathan ;-)
17:59 pmichaud I'm just thinking it might be a more general behavior for 'morph'
17:59 pmichaud or something like it
17:59 pmichaud anyway
17:59 pmichaud lunchtime here, back in 1h
18:02 jonathan ok
18:09 tewk Infinoid: tools/build/nativecall.pl:709 is the place where jitted nci code is placed in a managedstruct.
18:10 tewk I'm only familiar with jitted nci code, I'm not sure how or if the lifetime of other jitted code is managaged.
18:12 Infinoid great, thanks
18:14 rdice joined #parrot
18:35 ThF joined #parrot
18:37 dalek r33517 | jonathan++ | trunk:
18:37 dalek : [core] Remove some effectively dead code. Since PMCProxy was made to inherit from Class, then this code would never do anything for it, plus this original approach was changed.
18:37 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33517
18:39 dalek r33518 | jonathan++ | trunk:
18:39 dalek : [p6object] The last change to p6object missed a subtle detail. You might have the proto-object for the thing that inherits from String rather than something you want treated as a string and looked up as a name, so if we find we've got a thing that is a proto for a string type, we treat it as a proto, not a string.
18:39 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33518
18:40 Infinoid amazingly enough, that worked and passes tests
18:41 Infinoid an earlier crash looked like it was actually trying to free() a subset of the original map, so it's still possible that munmap is returning an error and we're leaking maps.
18:41 Infinoid but in the meantime... time to try it feather3
18:42 dalek r33519 | jonathan++ | trunk:
18:42 dalek : [core] Fix to the default clone routine for objects. Before, if there were multiple PMC types inherited from, it would do the wrong thing. We never tried, so we never knew, and it worked by accident.
18:42 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33519
18:43 chromatic joined #parrot
18:43 allison joined #parrot
18:45 dalek r33520 | jonathan++ | trunk:
18:45 dalek : [core] PMCProxy wasn't yet building and keeping an MRO nor a parent list. This amongst other things meant if we had an object inheriting from a PMC that inherited from another PMC, and we tried to use that highest type in :multi(...), it failed to see instances of the object at the bottom as matching.
18:45 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33520
18:46 * jonathan hopes that mass of changes won't cause any problems - they should almost get us being a lot more correct that before and make things that didn't work, no work.
18:46 jonathan *now
18:47 chromatic Oh, yes.
18:47 moritz it seems they require a realclean (or at least reconfigure=
18:47 jonathan It started off with wanting to do a small change in Rakudo, then discovering a trail of broken Parrot bits.
18:47 jonathan moritz: Really? I didn't do one...
18:48 moritz jonathan: sorry, was on the wrong machiine
18:48 jonathan I've got a bunch of Rakudo changes to switch us over to using Str rather than Perl6Str.
18:48 moritz this one had a really old parrot tree
18:48 jonathan Got two individual tests failing...rather obscure.
18:49 particle chromatic: what do you think about making intsize on win64 equal ptrsize?
18:49 Infinoid isn't that an MSVC thing, not a parrot tunable?
18:49 chromatic That'll help in the short term, but I fear that it covers up some bad code.
18:51 nopaste "particle" at 76.121.106.245 pasted "win64 build warnings and miniparrot segfault" (7957 lines) at http://nopaste.snit.ch/14824
18:51 jonathan ...at 8k lines I'm thinking there's a lot of warnings!
18:52 particle you betcha!
18:52 jonathan pointer truncation from 'v
18:52 jonathan oid *' to 'unsigned int'
18:52 chromatic Okay, that gives us a start at fixing them.
18:52 particle opcode_t to unsigned int
18:53 jonathan That looks like it'd cause some issues.
18:53 particle size_t to UINTVAL
18:53 particle etc
18:54 particle i have a win64 vm with a full x64 stack
18:54 chromatic I'd like to see what happens when you make the sizes identical.  Hopefully that fixes things.
18:54 Infinoid rakudo: say 1
18:54 polyglotbot OUTPUT[1␤]
18:54 particle yeah, i'm looking for the place to specify that now, and failing to find it
18:54 Infinoid Ok, that patch works.
18:54 chromatic Fortunately a lot of those errors are in generated code (ops, NCI).
18:55 particle ah, maybe defaults...
18:56 Infinoid so I hacked ManagedStruct so that the "private0" flag makes it do munmap/mremap instead of free/mrealloc, and that makes polyglotbot work again
18:56 Coke rakudo: 1.WHAT.say
18:56 polyglotbot OUTPUT[Int␤]
18:56 Coke rakudo: 1.PARROT.say
18:56 Infinoid it's still building the other languages.
18:56 polyglotbot OUTPUT[Int␤]
18:57 Coke will tcl work? =-)
18:57 Infinoid good point, I don't think it's running from a checkout that includes partcl at the moment
18:58 * Infinoid works on that while he's in here
18:59 Infinoid lolcode: VISIBLE 1
18:59 polyglotbot OUTPUT[1␤]
19:01 Infinoid what's the more correct version of the private0 flag hack?  subclassing ManagedStruct to ManagedMmapStruct or ManagedJitBuffer or somesuch?
19:04 chromatic I think the Pointer PMC should work.
19:07 dalek r33521 | coke++ | RELEASE_0_8_0:
19:07 dalek : [APL] Copy partcl's Configure.pl to give us a way to regen our makefile without
19:07 dalek : having to run something at the top of parrot's build dir.
19:07 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33521
19:07 particle coke: WRONG BRANCH
19:08 Coke rant: tortoise svn complains when you try to commit to a tag.
19:08 Coke my plain svn does not.
19:08 particle svn switch brain
19:08 moritz is that a rant about tortoise or about plain? ;-)
19:09 Coke plain.
19:09 Coke I just tried to delete it, it said it doesn't exist.
19:09 * Coke tries again.
19:10 Coke removed.
19:10 dalek r33522 | coke++ | RELEASE_0_8_0:
19:10 dalek : Bad Coke. Don't commit to a tag.
19:10 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33522
19:11 allison joined #parrot
19:11 Infinoid Pointer doesn't seem to have a provision for freeing the buffer.
19:11 tewk q
19:12 chromatic Look in its destroy.
19:12 chromatic Or was that its mark?
19:12 chromatic It must be its mark.
19:12 Infinoid I saw the mark, I just don't see a destroy
19:12 dalek r33523 | coke++ | trunk:
19:12 dalek : [APL] Copy partcl's Configure.pl to give us a way to regen our makefile without
19:12 dalek : having to run something at the top of parrot's build dir.
19:12 dalek : (And this time, don't do it in a release tag)
19:12 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33523
19:12 chromatic Nevermind then.
19:12 Infinoid okay.  next idea?
19:12 purl well, next idea is the mailing list
19:13 chromatic We could do something similar in ManagedStruct, though -- give it a function to call to free the memory.
19:13 Infinoid that sounds like a great idea.
19:13 chromatic No flag, no subclassing.
19:13 Infinoid yep, works for me
19:13 * Infinoid works up a patch
19:18 Coke good idea?
19:18 Coke bad idea?
19:18 purl Coke: Good Idea: Kissing a loved one. Bad Idea: Kissing a total stranger.
19:19 PerlJam if people didn't kiss strangers there wouldn't be much kissing methinks
19:19 particle rakudo: grammar s19 { token p { '++' $<i>=['A'] <.ws> [ $<d>=[.*] <.ws> ]? '--' $<i> }; }; say '++A --A' ~~ s19::p;
19:19 polyglotbot OUTPUT[Could not find non-existent sub s19::p␤current instr.: '_block11' pc 25 (EVAL_13:17)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1227 (src/PCT/HLLCompiler.pir:674)␤called from Sub
19:19 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1403 (src/PCT/HLLCompiler....
19:19 particle rakudo: grammar s19 { token p { '++' $<i>=['A'] <.ws> [ $<d>=[.*] <.ws> ]? '--' $<i> }; }; say '++A --A' ~~ s19.p;
19:19 polyglotbot OUTPUT[invoke() not implemented in class 'Hash'␤current instr.: '_block11' pc 31 (EVAL_13:17)␤called from Sub 'parrot;PCT;HLLCompiler;eval' pc 892 (src/PCT/HLLCompiler.pir:508)␤called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1227 (src/PCT/HLLCompiler.pir:674)␤called from Sub
19:19 polyglotbot ..'parrot;PCT;HLLCompiler;command_line' pc 1403 (src/PCT/HLLCompile...
19:19 moritz particle: type names need to be uppercase
19:19 dalek r33524 | jonathan++ | trunk:
19:19 particle oh right
19:19 dalek : [rakudo] Switch us from using Perl6Str to using Str. Either this, one of the Parrot changes that were required to make this work or something else entirely means we are failing a couple of tests in S02-builtin_data_types/bool.t. These relate to expecting an isa test for Int is a Num to work (it works with smartmatch, where we override the Num proto's ACCEPTS to specially handle this, but they aren't actually in a type relationshp); not sure how that test ev
19:19 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33524
19:19 Tene rakudo: say "polyglotbot works again now?"
19:19 polyglotbot OUTPUT[polyglotbot works again now?␤]
19:20 Infinoid momentarily.
19:20 particle rakudo: grammar S19 { token p { '++' $<i>=['A'] <.ws> [ $<d>=[.*] <.ws> ]? '--' $<i> }; }; say '++A --A' ~~ S19::p;
19:20 polyglotbot OUTPUT[++A --A␤]
19:20 particle rakudo: grammar S19 { token p { '++' $<i>=['A'] <.ws> [ $<d>=[.*] <.ws> ]? '--' $<i> }; }; say '++A foo --A' ~~ S19::p;
19:20 polyglotbot OUTPUT[␤]
19:20 Infinoid there's a local patch that will get wiped in about 20 minutes
19:20 particle why does that fail, moritz? something with $<d>=[.*]...
19:20 mfredrickson joined #parrot
19:20 Coke would it be helpful if polygotbot told you revision # it was running against?
19:21 particle parrot rev and tcl rev, for tcl
19:21 Coke one thing at atime. =-)
19:21 Infinoid it would be helpful if polyglotbot detects a parrot segfault and nopastes a backtrace.  but I've got enough on my plate at the moment
19:21 Tene tcl: polyglotbot supports tcl now?
19:21 polyglotbot OUTPUT[Parrot VM: Can't stat languages/tcl/tcl.pbc, code 2.␤main: Packfile loading failed␤]
19:21 moritz particle: dunno, I'm writing up the 'Perl 6 Tidings' for december, and can't really concentrate :(
19:22 Infinoid Tene: I'm thinking about adding that
19:22 particle mortiz++ # keep at it, i'll bug pmichaud when he returns
19:24 Infinoid you know... here I am hacking ManagedStruct to have a custom destroy hack similar to Pointer's custom mark hack, and it occurs to me... if I'm going to be playing games with PMC_struct_val() to store the pointer to the free function, won't people get confused and think the PMC_struct_val is a pointer to the Struct being Managed?
19:25 particle shouldn't you be using ATTRs instead of PMC_*_val ?
19:26 * Infinoid doesn't know what an ATTR is, he just got it in his head to do things the way Pointer.pmc does them.
19:26 particle optionally caching things in PMC_struct_val, if needed
19:26 particle ok, it seems the Pointer PMC is old-school
19:27 Infinoid well, I can certainly put it in an ATTR, it just means I need to figure out how to set it from external C code.  no big deal.
19:28 particle yeah, there's macros generated for that
19:32 Infinoid the buffer resizing in ManagedStruct.set_integer_native() makes things more complicated.
19:32 PerlJam particle:  .*  is greedy and since you're using token, there's no backtracking.
19:32 particle ah, perljam++
19:36 particle rakudo: grammar S19 { token p { '++' $<i>=['A'] <.ws> [ $<d>=[.*?] <.ws> ]? '--' $<i> }; }; say '++A foo --A' ~~ S19::p;
19:36 polyglotbot OUTPUT[␤]
19:37 moritz particle: in a token .*? will never match anything
19:37 jonathan rakudo: grammar S19 { token p { '++' $<i>=['A'] <.ws> [ $<d>=[\S*] <.ws> ]? '--' $<i> }; }; say '++A foo --A' ~~ S19::p;
19:37 polyglotbot OUTPUT[++A foo --A␤]
19:37 jonathan WIN
19:38 particle jonathan: cheater!
19:38 PerlJam yep.  that highlights .* as a "regex-smell"
19:38 PerlJam (it's almost always the wrong thing :)
19:38 particle i really want to match anything up to end of string or '--' $<i>
19:39 PerlJam use a look ahead?
19:39 Infinoid in the meantime, I'm going to throw an exception when a custom free() function was specified and a buffer resize is requested.
19:39 Infinoid I suppose a better solution is to add a resize() function too... but I want to get to a point where something works first
19:40 particle Infinoid: working trumps good
19:44 Infinoid I'm off to lunch; polyglotbot will re-break itself from cron at 12:07 pacific time
19:46 PerlJam I've discovered that one of the hardest things for me using perl 6 regex is actually because the idea of backtracking is ingrained in my head so well, I will often screw up using token/rule
19:47 particle apparently, you're not alone
19:47 PerlJam for instance, just now I suggested a look ahead, when there's a much simpler solution:  use regex instead of token  :)
19:48 pmichaud back
19:48 jonathan Wow. It turns out that if you add something so we die when you use a type that does not exist, a bunch of spectests fail because they rely on you silently getting a Failure object instead.
19:49 jonathan They'll be compile-time errors once we have the type registry, I expect.
19:49 moritz when we have the type registory, it'll be easy to identify them and turn them into eval_dies_ok
19:49 jonathan moritz: If you want to do the clean-up, I've got a patch that shows those up now.
19:50 jonathan And it'd be helpful to be able to give people a nicer error now anyway.
19:50 moritz jonathan: I'm interested, but I don't know if I'll find the tuits right now
19:50 moritz (but likely within a few hours)
19:51 pmichaud note that "type registry" is simply "look up protoobjects"
19:52 nopaste "jonathan" at 85.216.157.73 pasted "moritz: for when you have time, this is the patch that shows it up; if you can clean up the new test fails it gives, feel free to apply it too" (17 lines) at http://nopaste.snit.ch/14825
19:52 jonathan pmichaud: Yes, the namespace is just our registry. ;-)
19:52 jonathan Well
19:52 jonathan Or lexicals table I guess.
19:53 PerlJam jonathan: so ... how do I get a list of all of the types that rakudo knows about?  :)
19:53 dalek r33525 | chromatic++ | trunk:
19:53 dalek : [src] Added configuration code to include the header which defines Dl_info
19:53 dalek : (used to find backtrace information in Parrot_print_backtrace()).  If this
19:53 dalek : doesn't break the build on non-GNU systems, this fixes RT #58668, reported by
19:53 dalek : Christoph Otto, we can use make cover again.  If it does break the build, we'll
19:53 dalek : have to be smarter and probe for glibc.  Either way, this is closer to correct.
19:53 dalek : It also includes some minor code tidying in src/exceptions.c.
19:53 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33525
19:53 jonathan ls src/classes/ | perl -ne 'print s/\.pir//' # ;-)
19:54 jonathan Oooh! It's 9pm and I didn't eat yet...
19:54 particle ack -ag \.pir src/classes
19:54 particle er, oops, i missed the removal of .pir there
19:54 PerlJam okay, how do I get such a list from within rakudo?
19:54 PerlJam (including user-defined  types)
19:55 pmichaud PerlJam: there's not really a "type registry" as such.
19:55 pmichaud there are just protoobjects.
19:55 pmichaud at least, I haven't seen any mention for a type registry
19:56 apeiron joined #parrot
19:56 Tene Well, when we're compiling "class A { ... }; A.foo();", we haven't actually created the A class or protoobject yet
19:56 Tene When we get to A.foo
19:56 Tene Get to compiling A.foo, that is.
19:56 pmichaud yes, we have.
19:57 pmichaud at least, according to the Perl 6 spec we have.
19:57 pmichaud because class definitions happen at BEGIN time.
19:57 PerlJam not having a mechanism to get the types that perl 6 knows about seems like introspection fail to me.  Surely there will be a type registry of some sort.
19:57 pmichaud PerlJam: propose one on p6l.
19:58 pmichaud what rakudo will do is that when it recognizes it has a new type definition, it'll put a "placeholder" into the appropriate slot so that the rest of the compiler recognizes the symbol as a type
19:58 pmichaud that slot will then be overwritten by the true protoobject when it's created
19:58 jonathan PerlJam: They're just symbols in the namespace - if there's a way to iterate over things in the namespace, you'd be able to find those.
19:58 masak greetings gentlemen.
19:59 PerlJam pm: when will rakudo move out of the parrot repo?
19:59 * masak backlogs
19:59 jonathan hi masak
19:59 masak \o
19:59 jonathan I didn't fix much in Rakudo yet today, I'm afraid... :-|
19:59 Coke when rakudo moves out, are you looking to preserve history?
19:59 pmichaud pj: I'd like to see parrot have its "make install" house in order.
19:59 pmichaud technically, rakudo won't be the one "moving out"  :-)
19:59 PerlJam heh
19:59 pmichaud parrot will be moving out of rakudo's repository.
19:59 * particle hands pmichaud the keys
19:59 masak jonathan: good. I've been so busy I've only been able to submit one rakudobug a day or so. :)
20:00 masak (on average)
20:00 Coke pmichaud: I've been doing pretty well with tcl's current setup, which basically involves piggybacking on a locally built version of parrot.
20:00 PerlJam Coke: who cares about the past? We'll just repeat it again at some point  ;-)
20:00 pmichaud anyway, rakudo will just move to a different perl.org repository, and then parrot will move to its own repo somewhere else.
20:00 pmichaud so yes, we'll preserve history.
20:01 PerlJam pm: the reason I ask is that I have that perl6 regex intro that I wrote a while back and I was going to update it and include instructions on how to get and compile rakudo.  I'd like for  that part to not be invalidated too soon  :)
20:02 pmichaud well, I'm thinking it'll happen in the january or early february timeframe
20:02 * Coke pokes feather with a stick.
20:02 pmichaud it doesn't make much sense to me to move rakudo to a new repository and then move it back to perl.org
20:03 pmichaud PerlJam: you could speed things along if you wanted to work on the 'make install' issues :-) :-)
20:04 allison joined #parrot
20:04 PerlJam pm: I want to work on everything I'm able and that's part of the problem.  I need  to get my head settled so that I can focus on something and make progress.
20:05 pmichaud make install is I think (1) fairly well circumscribed, (2) timely, and (3) important.
20:05 PerlJam but it's not as fun or interesting as other things  :)
20:05 PerlJam (that where my head gets in its own way)
20:06 nopaste "particle" at 76.121.106.245 pasted "S19 grammar (in progress)" (54 lines) at http://nopaste.snit.ch/14826
20:07 PerlJam <ident> doesn't match '-' ?
20:07 pmichaud why does the value token include quotes?  Aren't those normally stripped by the shell?
20:07 particle chromatic: svn head builds for me
20:07 particle PerlJam: no, it doesn't, there's an apostrophe rule in STD for - and '
20:08 particle pmichaud: yes, i'm poorly emulating shell there still
20:08 pmichaud might put a comment about that in the grammar
20:08 particle pmichaud: it's a grammar for me to test my synopsis
20:09 pmichaud particle: yes, but it still might be worth a comment if anyone else is going to take a look at it
20:09 particle i can feed it -a b ++C=d e -f ++G h -i --C=d -- etc
20:10 particle once i'm getting the correct parse tree (and i think i am now) i can test like mad and erase  ambiguity from my spec
20:10 PerlJam Is the S19 that describes this in the repo?
20:10 particle not yet, just notes in a google doc
20:10 pmichaud okay.  It just seems to me that whatever comes after the equals sign is essentially going to become .*
20:11 pmichaud and I'm not sure how commas will parse well there.
20:11 particle euals sign? in option?
20:11 PerlJam particle: what's the ++ stuff all about ?
20:11 pmichaud yes, in option
20:11 particle commas work there. i can run all the examples in S06...
20:12 particle except i need to get clarification on spaces after commas
20:12 particle right now i had to remove those
20:12 particle PerlJam: we need to be able to pass options through to underlying components
20:12 pmichaud particle:  my point is that the shell removes the quotes (more)
20:13 particle ++name ... --name is the syntax i'm using
20:13 particle pmichaud: depends on the shell
20:13 pmichaud $ echo --name=val1,'val 2',val3
20:13 pmichaud --name=val1,val 2,val3
20:14 pmichaud so if you split on commas, we can end up with something like
20:14 pmichaud $ echo --name=val1,'hello,world',val3
20:14 pmichaud --name=val1,hello,world,val3
20:14 PerlJam particle: so   ++foo and --foo are delimiters?
20:15 particle pmichaud: my parser gets 'hello,world'
20:15 pmichaud are you entering strings directly into the parser, or are you taking the arguments that come into the program?
20:15 particle PerlJam: yes, specifically, it'll be ++RTS=parser ... --RTS=parser etc
20:15 particle RTS is run-time system
20:16 particle entering via repl
20:16 pmichaud for a _real_ test, you should be running your grammar against @*ARGS
20:16 pmichaud because that's what the program will get
20:16 particle i'm not there yet, and it's highly dependent on os
20:16 pmichaud in Parrot, you'll be getting   args
20:16 pmichaud and that's _not_ dependent on the os, iiuc
20:17 pmichaud (er, .param pmc args in 'main')
20:17 particle windows doesn't do anything with single quotes
20:18 particle they're just another character
20:18 pmichaud so you're saying that @*ARGS gets different values when run from windows than when run from unix?
20:18 particle perl -e'say "hello world"' # windows fails
20:18 pmichaud I mean in parrot.
20:19 particle doesn't matter, it's a shell thing
20:19 pmichaud it does matter
20:19 pmichaud I think you're missing or overlooking my point
20:20 pmichaud if I do:    ./parrot foo.pir a "b c" d
20:20 particle in windows, the above is <perl> <-e'say> <"hello> <world"'>
20:20 pmichaud what arguments does foo.pir get ?
20:20 bacek joined #parrot
20:20 particle pmichaud: foo.pir gets <a> <b c> <d>
20:20 particle but, for ./parrot foo.pir a 'b c' d
20:20 pmichaud correct.  No quotes -- they've been stripped already.
20:21 particle it's  <a> <'b>  <c'> <d> on windows
20:21 pmichaud correct.
20:21 particle and <a> <b c> <d> on linux
20:21 pmichaud correct.
20:21 pmichaud none of those give you anything that you can parse out using this grammar.
20:22 pmichaud (at least, not if you want quotes to work in the way you're describing <value> in the grammar.)
20:23 particle i'm not emulatnig the parsing of 'value'
20:23 particle it doesn't need to be exact, it's just there for testing
20:23 pmichaud okay.
20:23 pmichaud I'm simply saying that the = <value> part of this grammar is going to have to be adjusted radically.
20:24 pmichaud because you never have the full shell command line, you only have what's left over after the shell (whatever shell it happens to be) has done its thing and split the command line into what *it* thinks the arguments are.
20:24 apeiron joined #parrot
20:24 particle here, do this: tools/dev/mk_language_shell.pl S19
20:25 pmichaud done.
20:25 particle paste http://nopaste.snit.ch/14826 to src/parser/grammar.pg
20:25 particle make
20:25 nopaste "particle" at 76.121.106.245 pasted "S19 tests (in progress)" (79 lines) at http://nopaste.snit.ch/14828
20:26 particle you can add that file to t/ if you want
20:26 PerlJam (this is partly why I wanted to look at S19 btw :)
20:26 particle but run --target=parse
20:26 particle try --foo=bar,'baz,quux',"hello world" -- chunky-bacon
20:27 pmichaud try   system "@cmd"  instead of system @cmd
20:27 pmichaud and that will be more accurate.
20:27 pmichaud by using system @cmd (no quotes) you're bypassing the shell.
20:28 particle yes, i'm doing that on purpose, so i can get reliable results on any platform
20:28 particle the value token strips quotes for me, rather than the shell
20:28 particle ...using unix semantics
20:28 pmichaud I'm just saying this isn't very realistic.
20:29 pmichaud in terms of something that can actually work.
20:29 particle it's not designed to work
20:29 particle it's designed to help me develop the spec
20:29 particle it's completely throw-away code
20:29 particle (but the tests are good)
20:30 pmichaud I think the spec has to acknowledge the reality that shells exist and that they do things to the command line before Perl ever starts.
20:30 particle correct
20:30 particle it will acknowledge that, without question.
20:30 pmichaud okay.  This grammar doesn't.
20:31 particle this grammar emulates what perl6 sees *after* all shell processing
20:31 pmichaud not really.
20:31 pmichaud well....
20:31 purl Three holes in the ground!
20:32 particle if it doesn't, then i'm doing something wrong.
20:32 PerlJam particle: it is meant to be shell agnostic at some point (i.e. it should work if the shell eats quotes or if the shell gives you a single string that you have to parse yourself)?
20:33 particle my grammar allows a value to have embedded spaces in it, and even embedded quotes
20:34 pmichaud so, using this grammar, I'd have to write      perl6 foo.pl "--option=a,'b,c',d"
20:34 particle the only thing it doesn't allow that is in S06 is --name=val1,'val 2, etc
20:34 pmichaud and I'd have to do
20:34 particle ...the 'etc' won't be part of --name
20:35 pmichaud perl6 foo.pl "++RTS=parser option option option --RTS=parser"
20:35 pmichaud i.e., I'd have to quote things on my command line so that they'd be passed as an entire string for this to parse
20:35 particle pmichaud: i'm using C<..\..\parrot s19.pbc --target=parse>
20:36 particle imagining that's my shell, but i never have to write 'perl '
20:36 particle *perl6
20:37 pmichaud right now you're using   ..\..\parrot s19.pbc --target=parse -e "--name='spacey value'"
20:37 pmichaud i.e., your parser gets "the entire option command line" as a single string.
20:37 pmichaud which it then parses.
20:37 particle in the test file, yes, that's true
20:37 pmichaud I'm saying that's not real.
20:37 particle correct. it's emulation
20:37 pmichaud I'm saying it's not even emulation.
20:38 pmichaud because in the real world, you never get the complete command line as a single string
20:38 pmichaud you get an array of strings
20:38 pmichaud where some things have been taken out
20:38 pmichaud so you would never get "--name='spacey value'", you'd get   <--name='spacey>  and <value'>    (on windows)
20:39 pmichaud and you'd get <--name=spacey value>   (on unix)
20:39 particle right
20:39 pmichaud and this grammar doesn't handle either case.
20:39 particle ah, okay, i was thinking the wrong way around on unix
20:40 particle i see what you mean there, now
20:40 pmichaud in particular, someone does     ++RTS=foo  option --name=value option --RTS=foo
20:40 pmichaud you get
20:40 pmichaud <++RTS=foo>  <option> <--name=value> <option> <--RTS=foo>
20:40 ruoso joined #parrot
20:40 pmichaud and so the grammar has no chance to match the beginning and ending ++/-- because they aren't in a single string.
20:42 pmichaud it's perfectly okay to use this approach to test various things -- I'm just wanting to point out that in reality we never have a single string that contains all of the command line, we have an array of strings that is whatever our shell and C environment have decided to give to us
20:42 pmichaud and so whatever is processing the command line has to look at it as an array of strings, and not a single string.
20:43 pmichaud because ultimately, when   main(int argc, char* argv[])    runs, all we have is argv.
20:43 particle yes, but i'll be describing passthru options based on my current regex, not based on semantic analysis of an array of options
20:44 pmichaud based on your current regex?
20:44 particle regex passthru
20:44 pmichaud regex passthru?
20:45 particle in grammar.pg
20:45 particle http://nopaste.snit.ch/14826
20:45 pmichaud what are you matching passthru against?
20:46 particle this grammar is intended to guide me in writing S19
20:46 particle not in implementing S19
20:46 pmichaud okay.
20:46 pmichaud I understand then.
20:47 pmichaud you really are emulating your own "shell" but not being concerned with how it might work in any real shell.
20:47 particle yes
20:47 particle the test data will be kept, the test harness rewritten
20:47 moritz jjo   +
20:48 particle it's getting me to a point where i can do test-driven-specification
20:48 moritz sorry, dead session (ssh)
20:49 pmichaud okay.
20:49 pmichaud apologies for misunderstanding, then.
20:49 particle np, i got at least one good nugget of info out of that ;)
20:50 moritz jonathan: your type registry patch fails with generics (::T), see t/spec/S06-signature/type-capture.t
20:51 pmichaud we probably need to check the block symbol tables as well.
20:52 jonathan moritz: Thanks, did you update the others?
20:52 moritz jonathan: I'm currently working on it
20:52 jonathan moritz: OK, thanks.
20:52 jonathan pmichaud: Did you have any thoughts on the now-failing Int.isa(Num) test?
20:52 pmichaud ...this patch dies on unrecognized types?
20:53 pmichaud that's.... wrong
20:53 jonathan pmichaud: http://nopaste.snit.ch/paste
20:53 moritz jonathan: wrong url
20:53 moritz http://nopaste.snit.ch/14825
20:54 jonathan pmichaud: Aye, in the end typename should fail to match.
20:54 jonathan And then we'd know it wasn't a type.
20:54 pmichaud that's more of what I was looking/hoping to do.
20:54 jonathan Right. But for now we treat everything that is starting with an uppercase character as a type.
20:54 pmichaud I was looking to get rid of that, too.
20:55 jonathan Same, but we need to start installing stuff in the symbol table first.
20:55 pmichaud my point is that except for lexicals it's already there.
20:55 pmichaud or can be there quickly.
20:55 jonathan ?
20:55 pmichaud what are you thinking of as "the symbol table"?
20:56 jonathan If it's lexical, it'll have an entry in the blocks (as already happens), if not it'll get stuck in the namespace (at compile time, as we're compiling).
20:56 pmichaud all of our symbols are already in the namespace at compile time
20:57 pmichaud except for the ones we're compiling
20:57 jonathan class Foo { }; # after seeing the Foo we should have something in the symbol table
20:57 jonathan or namespace
20:57 purl namespace is the internal namespace for things like $c->forward and template paths, anyway
20:57 pmichaud right
20:57 jonathan Or call it what you will. :-)
20:57 pmichaud as soon as we see the Foo, we'll be putting an entry in the namespace.
20:57 jonathan Right. But we're not there with that yet.
20:57 pmichaud right.
20:58 jonathan So having at least some error now is an improvement on the current situation where we just silently fail and you get surprised later on, IMO.
20:59 pmichaud okay, I agree with that.
20:59 pmichaud actually, though, I'd like to go a step further.
20:59 jonathan I wasn't seeing it as a long-term solution.
20:59 jonathan Oh? Generate a call node instead?
21:00 pmichaud I was thinking "check to make sure we really got a type"
21:00 pmichaud but maybe that's not so good just yet.
21:00 jonathan Ah, I see.
21:00 jonathan Hmm. Could do.
21:00 pmichaud I'm trying to disable the    ~~ Grammar::Regex meme
21:00 jonathan I wasn't doing anything complicated because I knew it wasn't going to last all that long.
21:01 pmichaud but I don't have an easy way to do that at the moment.
21:01 jonathan We don't have any equivalent thingy that works/is spec'd yet, do we?
21:01 moritz pmichaud: so what should be the alternative? ~~ &Grammar::Regex?
21:01 pmichaud one can always do :    ~~ / <Grammar::Regex> /
21:01 jonathan Aha, OK
21:02 pmichaud that works, *and* it has the advantage that the overridden rules work as well.
21:02 jonathan If there is *a* way (that one does it for me) then I'm happy to see the certainly unspec'd one fail.
21:02 particle +1
21:02 purl 1
21:03 pmichaud the problem we have now is that   Grammar::Regex parses but gives us back a sub
21:03 pmichaud (which then gets invoked)
21:03 pmichaud but we also have to be careful that   Namespace::foo continues to parse and gives us back a sub
21:03 pmichaud and I'm not sure that we aren't ending up with the same   <typename> rule handling both cases right now.
21:04 jonathan Hmm
21:04 jonathan It may be.
21:05 jonathan typename currently appears to look in the blocks. Wonder why it fails to find the type in there...
21:05 pmichaud I wonder how STD.pm currently parses   Foo::bar( )
21:06 jonathan .oO( currently...lol )
21:06 pmichaud it can't see 'Foo::bar'  as a typename itself
21:06 pmichaud maybe it's in listop
21:06 jonathan It may try typename and fail.
21:06 pmichaud yes, I know it fails, but then what parses it?
21:07 jonathan Aha, I see what you mean.
21:07 pmichaud oh
21:07 particle look at the syntax-highlighted tests for Bool::True
21:07 pmichaud it gets parsed by <longname> in term:name
21:08 pmichaud okay, that's good.
21:08 jonathan OK.
21:09 pmichaud so yes, if we can just get our existing typename rule to recognize that 'Foo::bar' isn't a type then we'd be in better shape.
21:10 jonathan Oh! OK, ouch. Turns out generic types in signature objects don't work out so well right now (a problem that goes away after the parameter refactor).
21:11 Tene pmichaud: what's the best option for passing something by name in a past node?  I'm looking at adding stuff for CATCH and CONTROL and friends for PAST::Op :pasttype<try>
21:11 pmichaud Tene: I'm thinking that's the wrong way for us to do it.
21:11 Tene Oh?
21:11 pmichaud I'm thinking these need to be traits on PAST::Block
21:11 Tene Ah.
21:11 Tene Yeah, I can see that.
21:11 moritz jonathan: fixing up all the spectests correctly is harder than expected
21:12 pmichaud that's why this affects the loop refactor so much
21:12 davidfetter joined #parrot
21:12 jonathan moritz: OK. I suspect that what I just discovered is going to kinda kill off this patch.
21:12 jonathan moritz: It's not wasted effort, as when we get the symbol table stuff in they'd also fail.
21:12 pmichaud I'm not wanting a bunch of special-purpose attributes in PAST nodes
21:12 Tene right
21:12 moritz jonathan: ok
21:13 pmichaud and I particularly would like to avoid special-purpose attributes on different :pasttype values
21:13 jonathan moritz: I think the patch can go in after the parameter refactor.
21:13 pmichaud (unless they're generic across several :pasttype values, such as 'arity')
21:14 Tene right
21:14 pmichaud following that a bit further, though
21:15 pmichaud what it means is that CATCH, CONTROL, etc are really just ways to create ExceptionHandlers
21:15 moritz jonathan: it would be helpful to have stubs for types that are official, but not yet in Rakudo (like StrPos)
21:15 jonathan moritz: We can probably do that.
21:16 pmichaud stubs are okay.
21:16 pmichaud ...so perhaps exception handlers are just another :pasttype
21:16 Tene pmichaud: So possibly an EH past... yeah, that
21:17 Tene and blocks can have a list of them
21:17 pmichaud or they could be an entire PAST::... node type
21:17 pmichaud I wonder if they're limited to blocks or if they could be attached to PAST::Stmts
21:17 Tene Do you see any reason not to?
21:17 pmichaud so that we have an exception handler in effect for a range of statements as opposed to an entire block.
21:18 particle that seems odd
21:18 pmichaud is it?
21:18 purl it's it!
21:18 pmichaud that's effectively what "try" means in the generic sense
21:18 particle i'm trying to imagine a language that uses a construct like that
21:18 Tene particle: not all languages necessarily create a new lexical scope for exception catching?
21:18 pmichaud we want to try a sequence of statements with an exception handler imposed for that sequence of statements
21:18 Tene I don't know of any specifically
21:18 pmichaud ...what Tene said
21:19 pmichaud yes, some languages do try/catch without imposing a lexical scope.
21:19 particle well then, there you go.
21:19 cotto joined #parrot
21:19 jonathan C#
21:19 jonathan try
21:19 jonathan bar()
21:19 jonathan catch
21:19 Tene PHP has something like that.  If you put @ in front of a statement, it catches and discards errors.
21:19 jonathan argh()
21:19 particle so you'd attach the EH to each statement?
21:19 jonathan With some semicolons after the )
21:20 pmichaud in particular, loops (not Perl) will often impose an exception handler for the loop itself but not create a new lexical scope
21:20 particle or to a Stmts node?
21:20 Tene particle: stmts node
21:20 pmichaud the EH would probably go on a stmts node
21:20 pmichaud or a block
21:20 Tene pmichaud: would this depend on the PCT refactors you have pending?
21:20 Tene Can I start on this?
21:20 particle ok, then you've got to be very careful when constructing a block out of multiple Stmts nodes
21:20 pmichaud Tene: it might
21:20 particle can't splice them together, in general
21:20 Tene particle: if it's block-based, set it on the block
21:21 particle sure, but when it's statement-based
21:21 * jonathan gives moritz a ticket
21:21 pmichaud you can group the PAST::Stmts nodes (multiple) into a single one that has the exceptions
21:21 pmichaud note that Stmts is not "one node per statement" (although it can be)
21:21 particle right
21:21 particle it's a group of statements. so a Block can contain multiple Stmts, some of which have EHs
21:22 pmichaud sure, that's no problem.
21:22 particle as long as you can introspect the attribute
21:22 pmichaud Tene: if you want to start on it, great.  I may come up with additional ideas and/or refactors for it, though.
21:23 pmichaud it may effectively eliminate the 'try' pasttype
21:23 pmichaud I still have to figure out how I'd want BEGIN/END/INIT/CHECK blocks to be handled in this scheme, however.
21:24 pmichaud and we also need ENTRY/LEAVE/etc.
21:24 moritz we need at least stubs for StrPos and Regex
21:24 Tene pmichaud: I imagine those as additional attrs
21:24 Zaba joined #parrot
21:25 pmichaud Tene: I don't.
21:25 pmichaud "attrs" is what bugs me
21:25 Tene wait, right
21:25 pmichaud or maybe it's "additional attrs" that bugs me
21:25 pmichaud perhaps "additional values for an attr", but I'm not quite certain of that either yet.
21:27 pmichaud afk for a bit
21:29 pmichaud Tene:  here's what I'd suggest
21:30 cotto joined #parrot
21:30 pmichaud let's have a new :pasttype or PAST::* node type
21:30 Tene preference on that?
21:30 pmichaud I'm still thinking
21:30 * Tene nods
21:30 pmichaud not :pasttype
21:30 pmichaud maybe an attribute on PAST::Stmts
21:31 Tene to hold what?  the type of exceptions to catch?
21:31 pmichaud anyway, I want something that says "this node is an exception handler", and an attribute that can be LAST/NEXT/REDO/CATCH/CONTROL/whatever that says "these are the exception types I'm interested in"
21:31 pmichaud the children of the node are the steps to be performed when such an exception is caught
21:31 * Tene nods.
21:32 pmichaud the exception caught should be preloaded into the 'exception' pmc register
21:32 Tene and how are these set on a block or stmts?
21:32 pmichaud I'm not yet sure how to attach that to a surrounding ::Block or ::Stmts
21:32 pmichaud ideally I think I'd like it to just be a child of a ::Block or ::Stmts, and dtrt
21:33 pmichaud that may be a bit tricky
21:33 jonathan I was about to suggest that last one.
21:33 Tene orly?
21:33 purl YA RLY.
21:33 Tene Curious.
21:33 * purl hands Tene a dead cat
21:33 Tene I don't think I like that one very much, but it's feasible, sure.
21:34 pmichaud Tene: you would suggest instead...?
21:34 Tene not sure
21:34 pmichaud the other approach is to turn it around, and have PAST::Stmts be a child of the handler
21:34 pmichaud ...but that seems to make it icky to try to have multiple handlers in effect
21:34 pmichaud for a single block of code
21:35 Tene And you don't like an "exceptionhandlers" attribute on Blocks why again?
21:35 pmichaud we might do that as well
21:35 Tene Well, handler contains handler contains handler works fine
21:35 pmichaud I just like to avoid too many special-purpose items
21:35 Tene right
21:35 pmichaud especially at an "abstract syntax tree" level, it's better if everything is composed of similar elements
21:36 * Tene nods
21:36 pmichaud makes more like scheme.  or lisp.  or haskell.
21:36 pmichaud okay, I have to walk the dog a bit, so perhaps I'll get a cleaner idea from that.  Often helps.
21:36 Tene have fun
21:39 particle hrmm: -name val1, 'val 2,' val3
21:39 particle i wonder how that'll parse, based on S06 as written
21:40 particle will val3 be assigned to :name, or taken as a resource?
21:40 stockwellb joined #parrot
21:41 Infinoid hmm, pmc2c doesn't like:  ATTR void (*free_func)(void *, size_t);
21:42 Infinoid I'm using void *free_func for now, but I would feel a little safer with type checking
21:42 particle the name of the attribute is (*free_func)?
21:43 chromatic Throw a typedef in the pre-PMC block.
21:43 Infinoid the name of the attribute is free_func.  the (*name) bit is just how you declare a function pointer in C
21:44 Infinoid thanks, c
21:44 PerlJam does parrot have a REPL somewhere?
21:44 particle parrot -
21:45 PerlJam that's not quite a REPL
21:45 PerlJam :)
21:45 particle not exactly a repl, it's a rep
21:46 cotto it's a manual loop
21:50 * davidfetter waves to cotto
21:51 * cotto waves back
21:53 davidfetter cotto, your employer's been doing some pretty cool stuff re: cpan :)
21:53 cotto my former employer
21:54 davidfetter oh
21:54 cotto My contract ended back in Sept
21:54 davidfetter are congratulations in order?
21:54 cotto I'm hoping to go back in Jan
21:54 davidfetter break a leg, as they say in show biz
21:56 particle joined #parrot
21:57 cotto (leg breaking)++
21:58 davidfetter heh
21:58 cotto davidfetter, do you have a link?
21:58 davidfetter cotto, not yet, but basically they've given everybody with a CPAN module access to all the current platforms for testing, &c
21:59 cotto v nice
22:00 * davidfetter composing an email to see about getting postgres developers similar access
22:00 davidfetter vs. the current, "does anybody have a copy of $foo_OS to try this out? anybody? bueller?"
22:03 * Coke skips a ton of rakudo chat.
22:04 Coke ->
22:04 cotto Coke, what's that mean?
22:04 cotto ->
22:07 Infinoid I thought it was a gang sign, "east siieeeed" sort of thing
22:07 pmichaud Tene: ping
22:08 * Tene is here
22:08 pmichaud okay, back from my walk, here are my "decisions"  (subject to later revision)
22:08 Whiteknight joined #parrot
22:09 pmichaud * exception handlers are a new PAST::* type
22:09 pmichaud it can be called PAST::EH, PAST::Control, PAST::Handler, or something else, but hopefully not too long a name
22:10 pmichaud * exception handlers have to be a member of the Block/Stmts they handle.  This is important for lexical variable handling issues (from a p6 sense)
22:11 pmichaud * we can either do it as a child, or with a special "handlers" attribute on Block/Stmts nodes.  We may even have a "handlers" attribute for every node type, but i'm only interested in Block/Stmts for now
22:11 pmichaud * The 'name' attribute of a PAST::EH (or whatever) node is its label
22:11 pmichaud (e.g., for when we do next/last/redo followed by a label)
22:12 pmichaud * PAST::EH nodes have a type that indicates what types of exception they handle
22:12 pmichaud to begin with, we can just use the p6 control traits as the types
22:12 pmichaud eventually we'll provide a way for hlls to specify their own types if the p6 types don't fit
22:13 Whiteknight i'm obviously here in the middle of the conversation, but I like what I see!
22:13 pmichaud * by default, handlers "re-throw" the exception they handle, unless there's a flag or some other indication that they "handle" the exception
22:14 pmichaud this is important because there may be multiple handlers in effect that expect to receive the exception (e.g., multiple 'NEXT' blocks in a p6 'for' loop)
22:14 allison joined #parrot
22:15 pmichaud * The children of the PAST::EH node are the steps to be performed when the handler is invoked
22:15 pmichaud ...I think that's about it.
22:17 pmichaud a lot of this may be subject to refactoring, but I think that covers it
22:17 pmichaud it's at least a good start
22:17 Tene Great.  I like it.
22:17 pmichaud from a loops perspective, it means that we can do the loop exception pretty much however we want
22:18 pmichaud I think I'll still want to refactor it into a common loop exception, but we don't have to worry about handlers in the blocks/stmts themselves, because those will already be handled as part of the "nesting"
22:18 pmichaud (and the fact that they re-throw their exception)
22:19 * jonathan fixes a hilarious IMCC bug
22:20 pmichaud INIT/CHECK/BEGIN/END we'll handle by attaching them to whatever is being generated for load/init modules -- i.e., they'll be special cases of the code generation for PAST::EH nodes.  We can deal with those a bit later, for now the control exceptions are more "interesting"
22:21 pmichaud if anything looks like it's getting messy, stop, because it means we're doing it wrong.  :-)
22:21 chromatic Oh good, hilarious bugs.
22:22 chromatic Good news, everybody!
22:22 chromatic Coverity will move us up a rung in testing, partly because we cleared out all open tickets and partly because we're approaching 1.0.
22:22 pmichaud Yay!
22:22 pmichaud Coverity++
22:23 moritz YaY
22:23 pmichaud chromatic++ # clearing open tickets
22:23 jonathan Nice!
22:23 pmichaud blog that.  :-)
22:23 chromatic It wasn't just me; the code improved tremendously between February and November.
22:24 Infinoid particle: yakkity yak.  Turns out I can't use an ATTR there, without first fixing up all the callers who are assume PMC_data() is the generic pointer being managed
22:24 Infinoid s/are //
22:24 * masak finds a nasty, nasty bug in Rakudo
22:24 Infinoid (in other words, I tried it and it broke horribly)
22:25 chromatic Collectively we corrected some 80% of the open issues.
22:25 * jonathan fixes a nasty, nasty bug in Rakudo
22:25 dalek r33526 | jonathan++ | trunk:
22:25 dalek : [imcc] If we fail during the compile, don't try and run any :init subs we might have been lucky enough to have already compiled by that point.
22:25 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33526
22:25 tak joined #parrot
22:25 jonathan ...the traces were...interesting...
22:26 * masak reports a nasty, nasty bug in Rakudo
22:27 cotto chromatic, what info should I give the Coverity guys to get access to the reports?
22:27 pmichaud what's the bug?
22:27 purl somebody said the bug was http://www.cbttape.org/funny/bug3.jpg or http://img227.imageshack.us​/img227/2596/featureiu1.jpg
22:29 tewk I use to have coverity access, can I retrieve my name and password from somewhere?
22:30 masak pmichaud: [perl #61068]
22:31 masak don't ask me how I find these things.
22:31 jonathan inside an eval inside an ok it's too dark to read.
22:31 masak apparently.
22:32 pmichaud well, we don't really handle re-using classnames yet.
22:32 pmichaud I don't expect we'll fix that anytime soon.
22:32 masak ok.
22:32 masak that's understandable.
22:32 masak but now it's in RT, at least.
22:32 pmichaud yes.
22:32 jonathan I guess it should give an error, just not that one. :-)
22:32 pmichaud no, I think it's legal.
22:32 jonathan Oh?
22:33 pmichaud evals have their own lexical scope.
22:33 masak it shouldn't crash Rakudo, anyway.
22:33 jonathan It was written class, not my class.
22:33 pmichaud ...what happens if we don't have 'my' in front -- where does it go?
22:33 jonathan The package.
22:33 purl the package is perldoc -f package or lexicaly scoped
22:33 jonathan AFAIU.
22:33 pmichaud okay.  in that case it's a redefinition error, yes.
22:33 randi joined #parrot
22:34 jonathan Only other way to see it would be that an eval creates an anonymous package within it that the class was nested within.
22:34 pmichaud another reason we should be doing the class registry -- we can detect these redefinition errors more easily :-)
22:34 jonathan But then you couldn't use an eval to eval a generated class and easily have it installed in the namespace...
22:35 jonathan And I don't think eval is meant to work like that.
22:35 pmichaud correct.
22:35 pmichaud but being able to look up existing types would catch that particular error for us.
22:36 jonathan Yes.
22:36 pmichaud or at least give us an appropriate hook for it :-)
22:36 jonathan If my grant gets approved, I'll be able to work on that stuff Real Soon Now.
22:37 jonathan (I expect I'll work on it pretty soon either way, mind...)
22:37 dalek r33527 | jonathan++ | trunk:
22:37 dalek : [rakudo] Fix lookup of attributes in nested scopes of methods when they are declared twigilless.
22:37 dalek diff: http://www.parrotvm.org/svn​/parrot/revision?rev=33527
22:38 jonathan That's the ticket from lathos++ resolved.
22:39 * jonathan suspects he's fixed more Parrot bugs than Rakudo ones today
22:39 pmichaud that's okay, the parrot ones were very important for Rakudo
22:40 jonathan Oh yes, I know. I wasn't complaining. :-)
22:40 pmichaud and we got rid of some Perl6Str's.  Excellent.
22:40 jonathan They're less fun though.
22:40 pmichaud I may see about moving get_number into an NCI sub.
22:40 jonathan We get rid of almost all references to Perl6Str in the Rakudo codebase.
22:40 pmichaud I'd feel better about that.
22:41 pmichaud where should the .c code go for that -- do we have an obvious place for subs that aren't dynops and aren't pmcs?
22:41 pmichaud s/subs/C functions/
22:41 jonathan As I mentioned earlier, the only easy way that I can think of is having a PMC that we never use, other than for its METHOD.
22:42 pmichaud well, I could certainly just stick the sub into an existing .pmc or .c file
22:42 pmichaud I'll be calling it by name anyway
22:42 jonathan Yes, that would work too.
22:42 jonathan Use find_method to get it.
22:42 jhorwitz masak: i have november working under mod_perl6, including logging in w/cookies, etc.
22:42 masak woot
22:42 jonathan Wow!
22:42 jonathan jhorwitz++, masak++
22:42 jonathan Is it notably faster?
22:42 masak jhorwitz: that's great news!
22:42 pmichaud ...does it have to be a method?  (it's been so long since I've done NCI)
22:43 pmichaud jhorwitz++
22:43 jonathan pmichaud: Yes.
22:43 pmichaud why?
22:43 jonathan (more) ;-)
22:43 pmichaud I'm just thinking of doing
22:43 jhorwitz jonathan: yes, but not much faster since the november modules are precompiled
22:43 pmichaud .namespace ['Str']
22:43 jonathan Because it needs to obey that Parrot calling conventions.
22:43 pmichaud .sub :vtable('get_string') :method
22:43 pmichaud # call NCI here
22:43 pmichaud .end
22:44 jonathan Isn't it get_number?
22:44 particle this is ridiculous. within 24 hours, we have the first perl 6 alpha distro release, dbdi access to sqlite, and a wiki engine ported to mod_perl6.
22:44 pmichaud right, get_number
22:44 pmichaud sorry
22:44 chromatic cotto, http://scan2.coverity.com:9035/
22:44 jonathan OK
22:44 pmichaud so I don't need the PCC conventions, just the NCI ones
22:44 jhorwitz ridiculous++
22:44 jonathan What I was going to suggest was that you stick it in some other PMC
22:45 jonathan As a METHOD
22:45 jonathan Then make an instance of that PMC, do a find_method on it, which should hand you back the method.
22:45 jonathan Then insert what you get back from find_method as a vtable override on Str.
22:46 cotto chromatic, I mean what info does Coverity need so I can get a login for those reports.
22:46 jonathan You may be able to write it just as a vtable method too (a more normal NCI), but then I don't know how you'd get hold of it...
22:46 pmichaud that sounds very Evil.
22:46 pmichaud but I think I like it.
22:46 chromatic cotto, I think name and email address and project name.
22:46 jonathan I *think* it should work.
22:46 pmichaud I think it should too.
22:46 cotto easy enough
22:46 jonathan If it doesn't, I'd want to know why.
22:46 cotto thanks
22:46 pmichaud so, we'd just have a dummy PMC where we stick all of our methods we want written in C
22:46 jonathan Yup
22:47 pmichaud very very evil.
22:47 pmichaud it's perfect.  :-)
22:47 pmichaud okay, I'll try that way.  It does seem slightly easier than figuring out the NCI conventions, and it's easy to build the PMC
22:47 pmichaud (since we already do that)
22:47 jonathan Well, it means the NCI conventions get figured out for you. ;-)
22:47 pmichaud I prefer that to having to create yet another .o file to load.
22:48 jonathan Indeed.
22:48 pmichaud and it does mean all such methods are conveniently located in one place.
22:48 jhorwitz masak: i'll send my patch to the list.  most of it deals with path prefixes, which you were going to work on, but there's some small CGI.pm changes as well
22:48 jonathan I close one ticket, masak opens two more... :-P
22:49 masak jonathan: mwhahaha!
22:49 rhr joined #parrot
22:49 pmichaud what's our ticket count now?
22:49 jonathan 164
22:49 masak jhorwitz: excellent.
22:49 pmichaud oh, not too bad.
22:49 jonathan I've closed a few up today.
22:49 pmichaud as long as we're hovering around 150, we're in a reasonably steady state.
22:49 jonathan Yes.
22:50 masak I heard that.
22:50 pmichaud I'm expecting slices to close a few.
22:50 jonathan That's a managable number.
22:50 jonathan At that size, I can easily glance over the queue each week and keep the open problems in my head somewhat.
22:50 jonathan Slices will.
22:51 jonathan And parameter passing will close at least 5 more, I expect.
22:51 pmichaud thus far I have a completely free weekend (no kids), so I'm hoping to get a lot done.
22:51 jonathan Nice
22:51 jonathan I'll be around tomorrow I think...
22:51 * jonathan checks
23:01 jonathan ...after a few moments trying to find the concert ticket...
23:01 jonathan Yes, I'm around tomorrow.
23:02 jonathan It's Sunday I'm heading over to Vienna for the concert.
23:02 pmichaud excellent
23:02 jonathan Though will probably be around between chruch and going there, and after I get back.
23:02 jonathan (Vienna is just an hour away on the train...)
23:03 pmichaud I may sleep a little late tomorrow (been under the weather the past few days), but otherwise I expect to be here.
23:03 jonathan OK.
23:03 * jonathan slept late today
23:04 jonathan Managed to catch a cold in England.
23:04 jonathan I'm fine after being up for a while, but first thing I currently get bad throat/ear ache etc.
23:05 pmichaud anyway, time to take wife to dinner
23:05 pmichaud bbl
23:05 jonathan Sounds nice. :-)
23:05 jonathan Have fun, later.
23:05 * jonathan tries to decide between another fix and relaxation
23:07 chromatic Just one more!
23:07 masak you can quit whenever you want, right?
23:08 * masak chooses relaxation
23:11 jonathan ...talk about starting a trend ;-)
23:13 TiMBuS joined #parrot
23:13 bacek joined #parrot
23:20 allison joined #parrot
23:22 cotto joined #parrot
23:23 cotto We've replaced cotto's old broken e1000 driver with the newer e1000e driver.  Let's see what happens.
23:24 Infinoid e1000 was broken?  been working nicely for years, here
23:24 cotto I found a forum post that pointed to it as the culprit of some recent freezes I've been seeing.
23:25 Tene make sure you don't have the version that can toast your nic.
23:31 cotto (old kernels)++
23:35 cotto joined #parrot
23:36 lifeless joined #parrot
23:36 lifeless allison: ttps://blueprints.edge.launchpad.n​et/subunit/+spec/combinedreporting - tres minimal but I think I caught all agreed items
23:36 cotto Infinoid++ #the link in the forum was for an old version of the driver
23:38 wknight8111 joined #parrot
23:54 tetragon joined #parrot

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

Parrot | source cross referenced