% iblechbot has left iblechbot!~iblechbot@ppp-62-216-197-244.dynamic.mnet-online.de r27535 | tene++ | trunk: : [rakudo] : * Add a basic isa_ok to Test.pm diff: http://www.parrotvm.org/svn/parrot/revision?rev=27535 % Zaba_ has joined #parrot % ruoso has left ruoso!~ruoso@a81-84-27-88.cpe.netcabo.pt % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru Static vs. Dynamic Languages, Adam Turoff, 14.5.2008, notes-on-haskell.blogspot.co - http://notes-on-haskell.blogspot.com/2008/05/static-vs-dynamic-languages.html mj41's url is at http://xrl.us/bkmso % cognominal has left cognominal!~cognomina@82.67.232.89 allison@perl.org | Concurrency Tasks: link: http://www.perlfoundation.org/parrot/index.cgi?concurrency_tasks dalek's url is at http://xrl.us/bjqpy % donaldh has joined #parrot % iblechbot has joined #parrot % ruoso has joined #parrot % teknomunk has left teknomunk!~teknomunk@r74-195-239-111.stl1cmta01.stwrok.ok.dh.suddenlink.net % jan has left jan!~chatzilla@89-253-66-101.customers.ownit.se % jan has joined #parrot % mire_ has joined #parrot % tetragon has joined #parrot % cognominal has joined #parrot r27536 | jonathan++ | trunk: : [rakudo] Factor out a large chunk of method scope_declarator. Patch courtesy of moritz++. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27536 my first code contribution to rakudo ;-) :-) I have to blog about it! r27537 | jonathan++ | trunk: : [rakudo] Implement declaration and calling of private methods. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27537 jonathan: did you test that with t/spec/S12-methods/private_methods.t ? jonathan: it dies with "Could not invoke non-existent sub private", although there is no sub call at all (only method calls) or am I being too impatient? ;-) moritz: Hmm, I'd have expected that test to pass now... jonathan: it doesn't for me Oh! my method !private... I'd got my method private implemented, but not with the ! there. there's just 'my method private' in the test In http://svn.pugscode.org/pugs/t/spec/S12-methods/private_methods.t ? jonathan's url is at http://xrl.us/bkmxg I see a !private there. jonathan: my fault, I scrolled down to the second class OK. Removing the ! makes it work... curious though, that as the comment in the test file says, the ! is only mentioned in the roles section. jonathan: the difference is that 'my method !foo' can only be called as self!foo, whereas 'my method foo' also can be called as self.foo indeed moritz: But only inside the class? jonathan: as far as I understand, yes Otherwise it's not very private... :-) * moritz summons TimToady * jonathan fears TimToady may be sleeping at this time wait, I think the test case is flawed From S12 Private methods are declared using my: my method think (Brain $self: $thought) (Such methods are completely invisible to ordinary method calls, and are in fact called with a different syntax that uses ! in place of the . character. See below.) so the 'my method !foo' syntax is only applicable for roles? I'll clean up that test btw implementing $! in rakudo would be a great help for the tests so that one can write a lives_ok sub for Test.pm moritz: S12 isn't completely clear either way. I don't think it is, anyways. jonathan: ok, I'll write to p6l to ask for a clarification Thanks, that'd be great. allison@perl.org | Bylaws: link: http://www.perlfoundation.org/parrot/index.cgi?bylaws r27538 | fperrad++ | trunk: : [Lua] : - translates more opcodes diff: http://www.parrotvm.org/svn/parrot/revision?rev=27538 moritz: On $!, I was glancing over the specs for that. Last week. Pondering how to implement it. Will give it another read today. % iblechbot has left iblechbot!~iblechbot@161.18-dial.augustakom.net TapTinder is back ... http://tt.perl6.cz/ % cognominal has left cognominal!~cognomina@cac94-6-82-232-186-105.fbx.proxad.net jonathan: ok, I asked the list (and also lost myself in philosphy ;) % Tene has left Tene!~tene@castro.iodynamics.com moritz: Thanks. Hopefully @Larry replies with sane answers. :-) % allison has left allison!~chatzilla@dsl-241-62-167.telkomadsl.co.za % cognominal has joined #parrot % tetragon has left tetragon!~seneca@CPE0040d001f62f-CM000a736592a8.cpe.net.cable.rogers.com % masak has joined #parrot % iblechbot has joined #parrot % bacek has joined #parrot hi there bacek: hi what's up, jonathan. I have a stupid question about 'morph' :vtable method. It's probably not stupid. :-) Go ahead. I try to implement morphing from List to Per6Hash, but 'morph' just doesn't called on 'copy $P0, $P1'. I've added stub '.sub "morph" :vtable" into src/classes/Hash.pir with only 'say "morphing"'... any ideas what I doing wrong? r27539 | jonathan++ | trunk: : [rakudo] Add clone v-table method for protoobjects, which resolves the bug that showed up after we switched to using the copy opcode for :pasttype('copy'). diff: http://www.parrotvm.org/svn/parrot/revision?rev=27539 http://pastebin.org/36351 bacek: I'd have expected what you're doing to work... $P0 is the PMC that you implemeted morph on, yes? jonathan: I hope so bacek: OK, looks to me like there's two issues at least. First, it appears that the morph v-table method doesn't support overriding. But deeper than that, looking at the copy opcode, we already call the destory vtable method before calling morph Meaning that the association with the class will have disappeared by morph-time. Which means we can't locate the morph method, even if we did support overriding it. So, hmm. :-S jonathan: its in set.ops? Yes. search for inline op copy is the goal to be able to create a Hash from a List? jonathan: yes. I'm rebuilding parrot with this 2 lines commented out pmichaud: Probably. List.pi defines 'infix:,' op and builds list from (a=>b, c=d..) pairs. ah. Converting that into a hash is the job of the 'hash' function. pmichaud: there is now 'hash' function at the moment. pmichaud: is it 'right way' to build Perl6Hash objects? % iblechbot has left iblechbot!~iblechbot@ppp-62-216-201-170.dynamic.mnet-online.de actually, there shouldn't even be a Perl6Hash :-) I'm working on that at the moment. pmichaud: HLL? :-) Protoobjects, actually. Ah, OK. afaict, there's no need to create a separate Perl6Hash class -- just use Hash directly. * bacek is parrot-newbie pmichaud: Not unless you can someohow make that derrive from Any. pmichaud: It was a svn commit comment some time ago: "Use Hash directly". But later it was reverted to Perl6Hash jonathan: ah. good point. pmichaud: Yeah. That's why I've not used any PMCs directly now. Everything needs to be an Object and (expect from Junction) an Any. okay. There's a patch that proposes 'hash' -- just a sec. I've rebuilt parrot with lines 497-498 commented out. Doesn't help. we are *really* going to need a container type soon pmichaud: ok. Thanks. I think I may do that after finishing the protoobject re-implementation. (which, by the way, is looking really good) pmichaud: Scalar type? yes, but I don't think I'll call it 'Scalar' it'll really be for all variables Including arrays, hashes and so on? (if I'm understanding the types correctly) essentially $x, @a, %h, etc are just containers. @a and %h differ from $x in terms of the properties set on them and what they will accept BTW, where I can read more about protoobjects? (Google little bit stupid and offer replace it with 'photoobjects') (and, of course, they syntactically impose a different context) bacek: synopsis 12 pmichaud: 10x pmichaud: OK, but List, Hash and so on are already containers. there's a patch for a 'hash' function in RT#53016. (It still needs a bit of work.) jonathan: yes, but there's a difference between List and Array List is what we currently think of as ResizablePMCArray Array is a container that is allowed to reference List-like objects shouldn't a List (in Perl 6) be read-only? for example (2, 3, 4).push(5) should be forbidden yes Would my @a = (1,2,3) create an Array or a List? at the language level, Lists appear immutable. Underneath the hood there are various implementation strategies, as long as it appears that way. my @a is an Array that references a List (1, 2, 3) my $x = 3; my $x is a Scalar that references an Int (3) OK, so my @a = (1,2,3); @a.push(4); @a now references the list, and then another element 4? conceptually: @a.push(4) creates a new list that is ((1, 2, 3), 4) and stores that in @a OK, but when you iterate over @a, it's flattened? (in reality that's not what happens underneath, but that's how it appears conceptually) yet another stupid question: how 'hash' function will be called? bacek: it will depend on context ((1, 2, 3), 4) is already "flat" I think that the ((1, 2, 3), 4) behaviour isn't even visible in slice context as opposed to ([1, 2, 3], 4) which isn't "flat" :-) pmichaud: hmm... What about '%h = (a=>b, c=>d)'? bacek: because we're assigning to a hash type (%h), whatever implements assignment will coerce the list into a mapping er, Mapping (Mapping being the immutable form of a set of pairs with no duplicate keys) so Mapping <=> Hash is the same relation as List <=> Array? other way around other way around is not better Hash (mutable) is to Mapping (immutable) as Array (mutable) is to List (immutable) jonathan: @a.push(4) conceptually means " create a new List from @a that has a 4 tacked on the end, and make @a reference that new List " did I say something different? ;-) oh, you did I read one of them backwards. pmichaud: OK, but in the implementation we can optimize that some. jonathan: yes, exactly. But what I finally figured out yesterday is that "@a" is a container just like "$x" -- the difference being its properties this also means we move %properties out of the immutables and into variables (mutables) like they should be. :-) pmichaud: so what's the difference between a @a and a $s container? @a has properties on it that say "I hold a List object" a type constraint, ok pmichaud: I think the @ sigil just promises that whatever it holds does the Positional role. Yes, a type constraint. jonathan: yes, that's better. Grrr. I'm tempted to just not use the Capture PMC and write it directly in PIR. hmmm? Just looking at getting captures vaguely working. personally, I think we may have to make some modifications to the parrot calling conventions for that Only really want 'em for implementing .* and .+ method calls... either that or we'll need to layer a bunch of stuff in/out of perl 6 subs Yeah, I saw that thread. ...but why should Capture PMC versus PIR make a difference? However, what did occur to me too was that we need to think about postcircumfix:[] and postcircumfix{} more generally. pmichaud: Because the Capture PMC doesn't have the right semantics, I don't think. It is mutable, for one. well, at the implementation level all of the types can be "mutable". It's more how they're used Sure. I know that the Capture PMC doesn't yet have a scalar component -- I was going to add that. however, the Capture_PIR object does have a scalar component. that is another thing on my task list -- to convert the various tools over to the Capture PMC instead of Capture_PIR (hoping to get some speed improvements) (postcircumfix:[] versus postcircumfix:{}) PCT is adding a keyed_int PAST::Var scope OK. that was really the underlying reason I implemented the register coercions this week. so that I can easily (and smartly) coerce the X in $P0[X] to be an int. But more generally, what if people define their own postcircumfix:[] methods? I guess maybe we can just make set_pmc_keyed_int in Object just delegate to the multi-method, though... either that, or we specially recognize postcircumfix:[] and cause it to generate a :vtable('...') flag. I was kinda aiming for the latter. Oh, that would work nicely too. when it comes to generating custom operators, I think we'll do it with special cases Sure. Well, that's a little way off yet. that's why operator overloading is near the bottom of the roadmap :-) * bacek still don't understand how 'hash' function should be called... bacek: you mean in %h = ( a=>1, b=>2 ) ? pmichaud: exactly... Well, plus or minus 2%. bacek: well, the longer answer is that your question involves some Deep Magic that we haven't implemented yet pmichaud: yeek. but essentially it will be called "automatically" whenever %h (a Hash) recognizes that it's being assigned to. i.e., when the %h container gets an assignment, it will automatically call 'hash' on the value to convert it into a Mapping pmichaud: heh. Where is the source of Deep Magick so I can at least look at it? :) in the short term we'll have to tell Rakudo programmers to explicitly write %h = hash( a=>1, b=> 2); (source of Deep Magick ---> "we haven't implemented yet" ) pmichaud: But looks like it already implemented for lists. or if you just want to know how it works, the answer is Synopsis 2, but I didn't understand it myself yesterday. er, "until yesterday" (implemented for lists) -- actually, what we have now is that Rakudo just fakes lists tolerably well. but even there we can find holes :-) I really wish I had an easy answer today. My best guess is that we'll have an easy answer in a week or two. (or, at least, easier) alas, I have to do about an hour's worth of $otherjob this morning I'll keep the window open but may be slow to respond jonathan: do my musings on Scalar make any sort of sense? pmichaud: have a good day. It's 11pm here :) % mj41_ has joined #parrot bacek: have a good night, then. Sorry I didn't have any more straightforward answers yet. BTW, I have another stupid question about parrot/rakudo. (stupid questions -- no such thing) token fatarrow { \h* '=>' 'b'". Because "'a'" is not "ident" % mj41 has left mj41!chatzilla@pc-jurosz.ro.vutbr.cz % mj41_ is now known as mj41 right In STD.pm "ident" declared as "alpha*", so (as I think) pugs should rejects such statements as well. But it accept them. 'a' => 'b' is handled by infix:« => » not by (in fact, STD.pm didn't have infix:=> until this past Monday :-) pmichaud: Are you thinking, create a Scalar that we can use as the container, which in turn references the PMC representing the value? jonathan: yes. pmichaud: there is no 'infix:=> in grammar... token infix:sym« => » ( --> Item_assignment) line 3265 OK, but not do this for list and array? Because they already are containers? jonathan: no my precisely, my thoughts 1. create a Mutable PMC that does what we think of for "Scalar" It seems that we may just have to do this to get the correct semantics in a neat way. 2. "Scalar", "Mutable", "Hash" are subclasses of Mutable sorry can't type that would be tkil. 2. "Scalar", "Array", "Hash" are subclasses of Mutable % mire_ has left mire_!~Frodo@85.222.174.210 pmichaud: hmm... In STD.pm? Array and Hash differ from Scalar in terms of how they implement the opcode -- primarily they enforce a constructor on the value (either 'list' or 'hash') all of the mutables have a %properties attribute that limits how we can assign to them (e.g., type checking) variables then are instances of Scalar, Array, Hash, etc. values, on the other hand, tend to be the immutables values can be containers, yes, but they aren't variables bacek: yes, line 3265 in STD.pm I think actually having a distinct container type, is probably the only sane way we can expect to support things like tying, further down the road. so, a List is a container, yes, but @a (the variable) is not itself a List. It's an Array that references a list. or, think of it this way if it helps: my $x = [ 1, 2, 3 ]; my @a = (1, 2, 3); in both cases we have a List with elements 1, 2, and 3 in both cases we have a variable that references a List pmichaud: 10x... Got it... There is 800+ lines diff between my and current version of STD.pm... so $x and @a are both implemented as Mutable -- i.e., they reference a value of some sort both $x and @a can reference List objects if we do .WHAT on $x or @a, then we get back the protoobject for what they reference, not the protoobject of the variable itself Right. It just delegates everything to its value, aside from assign? pretty much. There may be a couple of other things that aren't delegated or have to be otherwise intercepted and it handles binding, probably or does binding replace the container? I'm thinking neither (haven't thought deeply about binding yet) moritz: I think binding would replace the container. to me, binding is just tying a symbol to a mutable Right, which means changing the entry in the lexpad to point to another mutable (container) so my @a; my $x := @a; means that $x and @a are the same mutable OK, I think I agree with the Mutable idea. tene: i'm still in scrollbackland, but i noticed you added isa_ok to Test.pm. you should also add it to the list of tests that fudge understands (inside fudge) if it's not already there well, that's the path I'm going to take for now and see how far I get. I'm guessing I can take some implementation cues from the delegate pmc particle: how long are we going to let the list of fudge-understandable-tests get? moritz: yes, please do blog about your rakudo patches! I'm thinking that fudge gives us a nice "spec" for what a Test.pm ought to implement. (isa_ok is already in fudge.) (just checked) pmichaud: Does it mean that someone have to add roto infix:«=>» is equiv(infix:<=>) { ... } into grammar-opr.pir? s/roto/proto/ bacek: yes. bacek: exactly. And write a sub for it. (adding the proto should get 'a' => 'b' to parse properly, though.) fudge currently has: my $IS = '\\b(?:is|ok|is_deeply|is_approx|isnt|like|unlike|eval_dies_ok|cmp_ok|isa_ok|use_ok|throws_ok|dies_ok|pass|flunk)(?:\\b|_)'; pmichaud: yes it is. (fudge $IS) that seems like a reasonable set of test methods. :-) * bacek got +2 to Deep Magick bacek++ * pmichaud remembers that he still has about an hour of $otherjob to go, but is having too much fun chatting on #parrot. % AndyA has left AndyA!~andy@c-68-33-170-161.hsd1.md.comcast.net pmichaud: 'undef $otherjob' bacek: heh. that may happen soon, yes. since I've had $otherjob for over 18 years. I suspect $otherjob.funds($parrot) (even though my role in $otherjob has changed frequently -- it's still the same employer for 18 years) Or rather $otherjob.funds(%pmichaud['parrot']) donaldh: You shoud use angle braces :) :) * donaldh is parrot-newbie too. * bacek Geofrey mode=on rt #53666 * bacek Geofrey mode=off * particle wishes more of the perl 6 talk would happen on #perl6 ...greater, more focused audience Much of this seems to be 'how to implement Perl 6 in Rakudo' No? well, maybe. rt#53666 looks good to me. It probably should have some POD documentation in front of the .sub, and we should check if there are any relevant spec tests. pmichaud: if you could, put tasks like converting Capture from PIR to PMC in rt, so somebody can pick it up we already have a Capture PMC that looks like a reasonable implementation I think it got converted/implemented as part of pdd17pmc pmichaud: ok. I'll add do it. it's just missing a scalar component, and some methods the trickier part of the conversion is switching PGE and PCT to using the Capture PMC instead of Capture_PIR. so, is it two tickets, or just one? pmichaud, I thougt @a = [1,2,3] was supposed to conceptuellement copy the list to make it an array under the wood, it may morph the list, but that's antoehr sotry At the moment, I'm trying to work out why subclassing a Capture in PIR doesn't seem to work out too well. Just another... hmm... question. Is anyone implemnting 'sort' for right now? Because I going to practice in PIR programming and implement trivial merge-sort. for 'List' bacek: I don't think 'sort' has been implemented. pmichaud: definetly not. jonathan: it often has to do with ProxyPMC versus native PMC bacek: afaik, nobody else is working on 'sort' at the moment pmichaud: excelent (from my egoistick POV :) % jhorwitz has joined #parrot pmichaud: Ho! Will 'Dark Magick' work if I'll replace 'infix:=' pirop=>'copy' with handcrafted assignement? don't rewrite sort. just use the sort method you'd inherit from the parrot PMCs. bacek: no. infix:= is pretty special. There's a fair amount of Dark Magick to be done there, even. e.g., getting infix:= to recognize when the rhs is to be parsed at item assignment or list assignment level DietCoke: Inherited methods works only on integers AFAIK. pmichaud: This magick is definitly dark... bacek: as an example, take a look at infix:sym< = > in STD.pm :-) pmichaud: infix_postfix_meta_operator? bacek: are you asking what that is? bacek: or is that related to infix:sym<=> somehow? % cjfields has joined #parrot pmichaud: related to infix:sym<=>. (infix_postfix_meta_operator) is what handles operators like += *= /= //= etc. token infix:sym<=> () { { self. eq '$' ?? make Item_assignment($/) } Looks pretty simple... Or I miss somthing... right. For infix:= , we check the sigil of the left hand operator, and use that to decide whether to parse the rhs as an Item_assignment or a List_assignment. s/left hand operator/left hand argument/ (still in scrollback but much closer to realtime) pmichaud: fudge list should be just reasonable Test.pm funcs, and isa_ok is reasonable (and already in there, TimToady++) particle: agreed. I'm just wanting to avoid a huge amount of test function proliferation in fudge (and by extension, in Test.pm) it does beg the question, however, if Test.pm should be renamed e.g., to SpecTest.pm donaldh: yes, this is implementation talk for rakudo, but rakudo isa perl6. if it's talk about changes required to *parrot* to implement rakudo, it belongs here (#parrot) having SpecTest.pm might avoid naming conflicts with other Test::* modules and make it clear that it's intended for testing specs. pmichaud: capture and pge/pct -- tickets are cheap. make two and relate them particle: I almost need a ticket just to remind me of all the tickets I need to create :-P % slightlyoff has left slightlyoff!~slightlyo@194.158.33.174 what about Spec::Test, or Test::Spec? is parsing namespace colons too much for a baby perl6 implementation to handle? it might be. % AndyA has joined #parrot I suspect a baby perl6 implementation might be able to fudge it, though. I'm not sure I want it to go into the Test:: hierarchy. maybe Perl6::Spec::Test is better? anyway, keep-it-simple is the order of the day for now. pmichaud, is there a reason for nqp not supporting infix:? cognominal: just haven't implemented it, I guess. feel free to add , , , you forgot the ultimate "looser" operator :) hmm? they have a loose precedecence oh. it's not so much "forgot" as following a principle of not adding things until I needed them. :-) nqp aims at conciseness and regularity instead of completeness and dwimminess % slightlyoff has joined #parrot less surprise is good too % Zaba has joined #parrot % Zaba_ has left Zaba_!~zaba@ip102.148.adsl.wplus.ru well, it depends. Almost by definition we expect nqp programmers to be okay with a bit of rigidity -- nqp isn't intended to be a general-purpose programming language. (It might evolve to that someday, but at present it's not.) DietCoke: (late night gaming) -- yeah, that's starting to be an issue for me also. :-P * jonathan is having a hard time working out why subclassing Capture to use in Rakudo isn't working out. what's not working? see "doesn't work" pmichaud: You try to push things onto it, and get back a "push_pmc not implemented in class Undef" message. push from PIR? as in push capture, $P0 ? Yes. Tracing through it with the C debugger, I can see what where it should be getting an instance of the Capture PMC back, it's getting an Undef instead. (Inside class.pmc) oh, I think I know why. It's strange because inheriting form ResizablePMCArray to get List works just fine. And I can't see that much different. Other than the use of ATTR in Capture.pmc. Which I don't think should affect things... (checking.) oh, perhaps that's now resolved. There used to be cases where individual methods had to check for PMCProxy before dispatching other operations but perhaps that's being handled by the PARROT_CAPTURE(SELF) macro iirc, the issue is that SELF in an object of the inherited class refers to the ProxyPMC self and not the Capture self OK, but I don't understand why Capture has this issue, and other PMCs that we subclass don't. right Like Hash, ResizablePMCArray and so forth. oh probably because of the ATTR OK. I don't think any of the other PMCs use ATTR No It appears not. I think for now I'll just do a PIR hack to get me what I need, and drop a message to the list asking for thoughts on this. so, in the case of capture.pmc, PARROT_CAPTURE(SELF) returns the element, but that holds the wrong value for a PMCProxy what we really need is Thanks everyone. I'm going to sleep... OK, but the PMCProxy is in the parents list, we should have a "Proxy" attribute being set on an individual object that has an instance. * bacek got segfault after trying to add infix:=>... % bacek has left bacek!~bacek@123-243-38-218.tpgi.com.au prior to pdd17pmc, the way we would solve it is to explicitly do if (PObj_is_object_TEST(SELF)) { ... get data out of PMCProxy... } anyway, if you put a breakpoint on Parrot_Capture_push_pmc, you may find that pmc->pmc_ext->data refers to something other than a Parrot_Capture struct (and I suspect that none of the other PMC types are using the pmc_ext field, since they aren't using ATTR) pmichaud: The problem is not this. The problem is that we never actually get to making a call to Parrot_Capture_push_pmc Well, the problem might be related to this. oh. There's a codepath that asks for the Proxy object (the instance of, say, the Capture PMC) that we can dispatch on to call it's push_pmc method. okay, you're right. However, in the case of the Capture PMC, instead we get an instance of Undef. And I can't work out, how on earth this could come to be. well, I vote send a message to the list then. :-) chromatic will probably pick it up and can get a fix real quick. write up a quick test example in PIR. Seems something more complex is going on... nopaste? somebody said nopaste was at http://nopaste.snit.ch/ (ask TonyC for new channels) or http://rafb.net/paste or http://paste.husk.org/ or http://poundperl.pastebin.com/ or http://paste.scsys.co.uk/ or don't bother me while I'm eating "jonathan" at 85.216.151.226 pasted "this works" (8 lines) at http://nopaste.snit.ch/12983 That prints "ok" So it seems that it's only inside Rakudo, when we also make it a parent of Any, Object too... (1) try creating a subclass using add_parent instead of subclass Heh. That doesn't fail either. (2) try creating a subclass with multiple parents "jonathan" at 85.216.151.226 pasted "this works too" (12 lines) at http://nopaste.snit.ch/12984 % uniejo has left uniejo!~uniejo@langebro.adapt.dk "jonathan" at 85.216.151.226 pasted "even this works" (13 lines) at http://nopaste.snit.ch/12985 (that latest nopaste is #2) right % Theory has joined #parrot can I see the code you're using to create the class in Rakudo ? "jonathan" at 85.216.151.226 pasted "capture.pir" (89 lines) at http://nopaste.snit.ch/12986 ...and it fails even with the # lines commented out, as in the nopaste? Yes. I'd just commented them out now, to test that...doesn't work with or without them. well, even with 'Any' not being a parent class, make_proto still adds 'Perl6Object' as a parent. True. This is the latest checked in version, if you want to play with it locally. Just run my $x = \(1,2,3); to trigger the bug. I'll have a conference call in six minutes, so it may have to wait until later. OK, sure. Any objections if I put a PIR version in for now, that allows me to progress on the other things I wanted to get in? We can replace it with the PMC version as soon as we work out the issue. no objection... although there's already a PIR version in library/Parrot/Capture_PIR.pbc might run into some protoobject conflicts there, though. Yeah (which would be resolved by my new protoobject stuff, but that won't be until later tonight) I've got a PIR version for Rakudo that works OK for what I want, so will do that. OK. okay, that's fine. By the way, are .list, .item and .hash methods the things to call on something to get it to evaluate in item, list and hash context? yes Ah, that'd make @( ... ) just be a method call? according to TimToady, yes. and this is the way it's now implemented in NQP. Yeah, that's where I spotted it. OK, that makes life rather easy. :-) I'll drop those in later on today. what are you wanting to do with captures, anyway? .+ and .* return captures Which are slightly odd things to implement, but relatively easy. actually, .* and .+ return a list of captures where "capture" is really just "return value" Sorry, yes, that's what I meant to write. Brain -> fingers translation didn't quite work out. so you could implement .* and .+ as a list of return values without having to turn the return values into captures because methods/subs/whatever really return captures anyway. bacek; I don't understand what you mean, "inherited methods only works on integers". I am using the inherited sort in tcl now, it works. Sure, but you need some way to capture returns more complex than just single values. right, but that's a function of overall subroutine calling conventions and not specific to .* and .+ essentially, every sub call returns a capture True. Will we actually implement it like this, though? Or just build a capture on-demand if we need to? % slavorg has left slavorg!~tomi@windmill.london.pm.org conceptually: $x = foo() is the same as $x = (foo()).item() @a = foo() is @a = (foo()).list() % masak has left masak!~user@130.238.45.242 how we actually implement it -- I don't know yet. We could either have every sub always return a capture, or we could get the caller to supply some context Always returning a capture won't play nice with language interop. either way, .+ and .* would seem to simply call all of the methods (in Capture context) and simply create a list of the returned objects (language interop) I agree, which is why I think we may need to do a bit more with Parrot's calling conventions I think it would be really nice if Parrot calling conventions generalized to using captures. we can still do positional and named arguments in such a scheme, but there's also a way to grab all of the arguments and invocant into a single package e.g.: .param pmc args :capture or ($P0 :capture) = foo() i've often thought that would be nice for pcc propose to list? I think might've mentioned it on-list once before, I'll check my archives though and re-send % slavorg has joined #parrot anyway the other possibility for now is to do ($P0 :slurpy, $P1 :slurpy :named) = obj.foo() and then pmichaud: ZOMG, someone reads my blog. $P2 = 'prefix:\'($P0 :flat, $P1 :named :flat) # create the capture object and then push $P2 onto the list Yes, that's what I'd planned to do. (oh. what I said earlier about $x = (foo()).item() is wrong. ignore the blabbering idiot behind the 'pmichaud' nick) Though I don't think it's implemented as infix:\... (although I suspect @a = (foo()).list() is correct.) hmm token capterm { '\\(' ')' {*} } oh, sorry. you're right, '\\(' is a separate token from prefix:<\\> However, that doesn't handle \@array, which also creates a capture % donaldh has left donaldh!~chatzilla@proxy-sjc-1.cisco.com there *is* a prefix:<\\> --- it's just that it's not the same as \(...) (and by "is" a prefix:<\\> I mean that it's defined in S03 even though it's not in STD.pm yet.) we were discussing it a bit earlier in the week or late last week. OK, and that's what handles things like, \@array, \$scalar, \%hash and so forth? yes. OK. And we know what slot to put the thing in by looking at the sigil of what follows, or the type? (did you find it in S03? look for prefix:<\> Yeah, found it, but it also suggests that this handles the more complex case - \($invocant: $pos1, $pos2, :named($arg)) yes, I think that's probably a mis-write. because \(...) is described earlier. Right. I think we know what slot to put the thing in by looking at the type of what follows. I'm not sure prefix:<\> is a syntactic construct. (and we need to decide if we're going to write it as prefix:<\\> or prefix:<\> in text :-) OK, and once we have our Mutable container type, it'll be easy to say "OK, it's a $ container, put it in the $ slot of the capture" right. OK, I'll punt on prefix:\ until we get that in place. % Zaba_ has joined #parrot good idea. but you can still implement \(...) if you wish. :-) Already done here, apart from not the : part to specify the scalar slot. Need to look at how that's parsed more generally, though, so I can do it for naming the invocant of a method. for the Capture PMC, I vote we wait until after protoobjects are cleared up a bit. i.e., your PIR version is good for now. my $x = \(1,2,3,foo => 42); say $x[2]; say $x 3 42 Have nasty hack in too, until keyed_int type is ready in PCT. :-) % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru % lichtkind has joined #parrot r27540 | jonathan++ | trunk: : [rakudo] A PIR implementation of captures for now, since trying to get them working with the Capture PMC has proved problematic. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27540 % Tene has joined #parrot I'll probably be trying to convert PGE and PCT to use the Capture PMC, so maybe I can figure out what's going on then. I guarantee those will be subclassing Capture :-) (and using protoobjects) OK, sounds good. speakers so loud they blow women's clothing off! jonathan: hello what was the name of the other guys who made something on perl 6 docs? % NotFound has left NotFound!~julian@50.Red-213-96-228.staticIP.rima-tde.net lichtkind: Not quite sure what you're referring to, though remember us talking about docs at some point... Maybe it was Perl 6 version of perldoc? In which case I think it was particle jonathan: we talked in erlangen if you remember Sure, remember having the conversation, just trying to recall the content. :-) :) jonathan: im not done much lately except some articles about perl 6 % Zaba has joined #parrot IIRC, you'd got a bunch of Perl 6 documentation, and I was saying it might be good to try and get it into a form that we could make available through a perldoc implementation, which I think we have some progress on in the Rakudo source tree. (perldoc) I think we just have a parser at this point. :-) % Zaba_ has left Zaba_!~zaba@ip102.148.adsl.wplus.ru pmichaud: yes you wanted to point me to some end user docs in parrot svn :) pmichaud: great talk btw thanks. :-) pmichaud: there were some bits i have the feel to find some better words but your great in your perception, getting stuff done, and much better team player than many, so im happy that you able to spread euphoria for the right reasons jonathan: yes but my goal is just deliver what we have throug a perl5 module, % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru % wknight8111 has joined #parrot lichtkind: OK, making them available easily is certainly a good thing... You had them in a wiki format so far, I think? jonathan: no i was just speaking about material not written by me, translating my stuff and adding is next step r27541 | jonathan++ | trunk: : [rakudo] Fix PIR thinko in the last ci. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27541 lichtkind: OK, and I mentioned some back in Erlangen? r27542 | jonathan++ | trunk: : [rakudo] Implement $( ), @( ) and %( ) contextualizers. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27542 jonathan: you mentioned some guy with an effort that would fit nicely OK, and it wasn't perldoc? oh? sorry, wrong window jonathan: i think it had something like that in the name I think I mentioned the implementation (incomplete, mind - how much I don't know) of perldoc that ships with Rakudo And mentioned it would be good to try and work out how to integrate the content you have got with that, somehow. If that was it, the guy is Jerry Gay (particle on this channel) If it was someone else with content, I'm struggling to remember now... :-( jonathan: thanks % cosimo has left cosimo!~cosimo@pat-tdc.opera.com jonathan: its great to see that you make such progress on rakudado, seems to be soon that i can start a article for some major magazine (couldnt do that until some examples work) lichtkind: what examples? i heard examples was Figure 1: A Pear % iblechbot has joined #parrot Tene: examples showing various perl 6 features purl: no, examples is http://shorl.com/bynygruhofrebru okay, Tene. Tene: that example i would write when its time :) Tene: i already writing a perl 6 course for foo magazine Tene: but writing for iX magazine is something different The way I like to work is to have existing examples that don't yet work to focus on. t/spec++ Tene: understand but the point i was making that i need certain percentage working features to publish in iX Tene: its no problem in foo because thats a paper for perl enthusiasts but iX is boring i mean professional programming magazine :) lichtkind: feel free to mention anything specific you want me to work on. lichtkind: Same. :-) Tene: thanks maybe i do good to hear I prefer when someone else tells me what to work on. jonathan: i even wrote the transliteration of the talk i gave in erlangen :) jonathan: i mean i don't Tene: allrigth but first i have to chekc what works but the highligts i like to see in action are things like for loop that iterates over several values simple junctions and chained compasions Aw, we have no evalbot in here. lichtkind: Simple junctions and chained comparrisons already work, I think. As do for loops. jonathan: i think also i read that Tene: Sure, but not iterating over several items at once, I believe. tene: things i like to work are oviosly on http://wiki.perl-community.de/bin/view/Wissensbasis/PerlTafelAnhangC lichtkind's url is at http://xrl.us/bkm88 jonathan: hm? shure you cant german but you will recognize perl hm, looks like interactive mode could use a flush() somewhere. have to go now was great talk guys bye, lichtkind. thanks for stopping by. will appear more stuff on the link i pushed now Ah, for() needs to inspect the arity of the block it's working on. lichtkind: Nice to see you, take care. :-) Tene: Yes, something like that. It's easy enough at PIR level though, I think. > for 1..16 { say "$^a - $^b" } too few arguments passed (1) - 2 params expected As just call .arity method Think it's a PCT change though. yeah ran into a potential pct bug last night. > my @a = 1..10; say (@a)[0] Method 'viviself' not found for invocant of class 'PAST::Stmts' Unsure if rakudo needs to generate a different ast there, or if pct needs to be able to handle a Stmts node in a keyed lookup. Hmmm Maybe we need to diddle the AST a little. It dies the same way on a PAST::Op, too Yeah. I worked around that in my very last ci. PCT's 'for' type already understands arity. Make sure that the PAST::Block has its arity set. Ah, right. i.e., 'for' can already handle for @foo -> $a, $b { ... } I can do that right now! Placeholders weren't incrementing the arity. I'm not sure why say (@a)[0] isn't working. pmichaud: keyed lookup presumes it's working on a PAST::Var sure, but (@a) _should_ be a PAST::Var what about foo()[0]? so I'm guessing that circumfix parens isn't handling the ast correctly Should that be a var? pmichaud: circumfix rule makes (@a) a statement list. keyed lookup is a PAST::Var, but it doesn't presume that the base is a PAST::Var in foo()[0], the entire expression is a PAST::Var node, but the first child of that node (representing foo() ) doesn't have to be a PAST::Var although I think that might indeed be a PCT bug, now that I think about it. vivibase might be trying to read from viviself of the base. Ah. What I was saying was that in the 'keyed()' function, it's presuming that the first child is a PAST::Var eek that code in keyed looks completely wrong $P1 never gets used. so it's a PCT bug, yes. Beyond that, keyed nodes shouldn't require the first child to be a PAST::Var. pmichaud: It seems to me that some things might be simplified quite a bit if PCT had explicit support for a signature on a block. Has this been considered? Tene: I'm waiting for the updated mmd implementation. Ahh. Thanks. then I'll decide. blocks already support arity, though. I'm not sure what other signature information we'd need, other than types. % Zaba has joined #parrot it's possible that blocks will get an explicit 'signature' node, which is where parameters and other type information could exist. Types are fun. Especially once we get into parametric ones. (i.e., instead of using the [0] trick that compilers are doing now.) pmichaud: that's what I was talking about. I kinda like the [0] trick, though. :-) it means that compilers are able to do processing even before handling the parameters. and that might be useful/necessary. Hm. The arity is set properly, but it's still not passing in enough arguments. http://pleasedieinafire.net/~tene/0001-rakudo.patch * Tene needs to go to work now. % davidfetter has joined #parrot I'll look at it a bit later * Tene nods. I have a conference call in 9 mins and I need lunch - I can tell I'm getting low blood sugar * davidfetter passes the food Looks like rakudo can't parse -> $a, $b { ... } pmichaud: want a glucometer? I have some spares. =-) easy enough to fix... probably with /dcc-send pmichaud muffaletta "tene" at 166.70.38.237 pasted "past of for loop with two params" (149 lines) at http://nopaste.snit.ch/12988 % davidfetter has left davidfetter!~chatzilla@start.fetter.org r27543 | fperrad++ | trunk: : [Lua] : - translates more opcodes diff: http://www.parrotvm.org/svn/parrot/revision?rev=27543 r27544 | jonathan++ | trunk: : [rakudo] Implement .?, .+ and .* method calling for literal method names. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27544 jonathan: nice patch % ambs has joined #parrot . % Zaba_ has joined #parrot % jjore is now known as zz_jjore % zz_jjore is now known as jjore % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru particle: Not sure how many folks will use it, but it's another little bit of S12 to tick off. where's coke when i need him? r27545 | jonathan++ | trunk: * particle kicks dalek : [rakudo] Make .?, .+ and .* work for non-literal method names too. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27545 OK, I'm off to get a pizza. More hacking later. well-earned pizza % barney has joined #parrot correct, rakudo has some difficulties with -> $a, $b I have plans to fix that with a term:<< -> >> but I have to re-work the operator precedence parser in PGE for that. % AndyA has left AndyA!~andy@onager.omniti.com % AndyA has joined #parrot jonathan: and when you see this, I think that the Mutable implementation also means that we can get rid of :viviself in the PAST (because each Mutable can be initialized to the appropriate protoobject) (another revelation at lunch :-) pmichaud: Awesome! somebody said awesome was not that word Just going to eat and then study some Slovak, back in ~ 1 hour. % ruoso has left ruoso!~ruoso@195.23.92.2 % wknight8111 has left wknight8111!~Whiteknig@c-71-230-33-251.hsd1.pa.comcast.net r27546 | bernhard++ | trunk: : Remove trailing spaces. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27546 % teknomunk has joined #parrot pmichaud: that PAST looks correct to me. I'm going to dig into PCT to confirm it's handling of arity for for loops. Tene: can you nopaste the PAST ? oh, you already did just a sec how about the PIR ? the PIR is a bofh at tufts or http://www.pir.net or Passive Infra Red or Parrot Intermediate Language (and almost an acronym) or the Price is Right. or http://www.parrotcode.org/docs/art/pp001-intro.html hey! where's my arity! I know it was there before.... % ambs has left ambs!~ambs@255.92.54.77.rev.vodafone.pt Still want the PIR? nope -- I can tell from the code that arity isn't there. But I'm sure I had it there. I wonder if it was only in PAST-pm well, I'm totally lost then. I'll have to add it. Fantastic. maybe I lost a commit somewhere. I'm interested to see the diff. I need to get into PCT more. maybe I implemented it but forgot/decided not to commit oh well. it's surprisingly straightforward. Maybe there are gremlins lurking in your transistors. (or maybe it isn't straightforward once I get into it, which might be why I didn't commit...) oops, I have to go pick up kids. back in 25. I'll go ahead and commit my arity patch, though -- you can test it. Fantastic! My perl6 doesn't set arity on placeholder blocks yet. r27547. back in 25. r27547 | pmichaud++ | trunk: : [pct]: : * Add checking of arity to 'for' loops. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27547 % iblechbot has left iblechbot!~iblechbot@252.16-dial.augustakom.net % Zaba has joined #parrot For rakudo, I'm confused about when I should add tests to t/ versus t/spec/ pmichaud: looks like no. Well, lemme do a realclean. % Zaba_ has left Zaba_!~zaba@ip102.148.adsl.wplus.ru jonathan Prečo sa ty učíš po Slovensky? Moje materščina je Čeština a to je velmi podobný jazyk. "tene" at 67.137.148.11 pasted "Arity test for pmichaud++" (223 lines) at http://nopaste.snit.ch/12989 Ack, I forgot to also capture stderr "tene" at 67.137.148.11 pasted "Arity test for pmichaud++ with stderr" (230 lines) at http://nopaste.snit.ch/12990 That's better. tene: at this point, *always* add tests to t/spec/ particle: thanks. * Tene leaves to find compressed air. % sjansen has joined #parrot mj41: Erm, I don't understand enough to have much clue what you wrote yet! % ambs has joined #parrot * jonathan started studying it less than a week ago. r27548 | bernhard++ | trunk: : [Plumhead PHC] : Adding an enclosing PAST::Block : let's most tests pass. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27548 huh if (!base && !(i && scale) && (!emit_is8bit(disp) || 1)) { can anybody explain me that || 1 part? src/jit_emit.h:231 r27549 | bernhard++ | trunk: : [Plumhead PHC] : past_xml_to_past_pir.xsl has been replaced with past_xml_to_past_nqp.xsl diff: http://www.parrotvm.org/svn/parrot/revision?rev=27549 r27550 | allison++ | pdd25cx: : [pdd25cx] Rip out the old exceptions code that used interp->exceptions and the : related free list. For now leave one last vestige, in the form of a stack of : runloop jump targets, which allow exceptions to resume the runloop at a point : where it's safe to run an exception handler. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27550 Tene: can you go ahead and commit your changes for placing on placeholder blocks so I can try it locally? ambs: Might be a debugging code change that got checked in? tewk, not sure sent it to the mailing list languages/perl6/src/classes/Capture.pir has a trailing space on line 80 ambs: see my reply on the list. :-) cotto_work: good catch, will fix. Thanks. pmichaud, correct I don't know if that makes any difference in this case :-) neither do I the equivalent would seem to be to call emit_is8bit(disp) unconditionally as the first statement in the 'if' also, is that file automatically generated, perhaps? pmichaud, it doesn't include any disclaimer, I think just curious. % contingencyplan has joined #parrot btw, should make testj pass all tests under linux? If it isn't debug, thats very bad practice, even for generated code. r27551 | pmichaud++ | trunk: : [rakudo]: : * Fix trailing space in Capture.pir (reported by cotto++) diff: http://www.parrotvm.org/svn/parrot/revision?rev=27551 thanks, pmichaud emit_is8bit doesn't have any side-effects particle: Can you test the latest patch in 54148? I'd like to get that committed, or know what to fix, before the release. Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/compilers/imcc/syn/regressions.t 1 256 3 1 2 t/op/trans.t 1 256 22 1 13 this without changing anything cotto_work, thanks removed it, not making and runing make testj odd, I can't run "svn blame" on jit_emit.h svn: 'jit_emit.h' has no URL generated? somebody said generated was right no, it's in the repo I think it's ignored. yes, it's in the svn:ignore list. :-S I wonder why, though. the file I looked at was src/jit/i386/jit_emit.h src/jit_emit.h, in my case symlink? well, symlink is create a symbolic link to a file or something else or (: junction) probably Really? Probably? Are you Certain it's not certain? Are you sure it's unsure? I think you need to look harder. no, it's actually in the repo. or copied during configuration http://svn.perl.org/parrot/trunk/src/jit_emit.h it's copied, then I didn't see it after a make realclean so we should remove it from the repo? pmichaud, probably you're correct that it's copied. interesting run configure and it didn't replace it it's probably generated/copied as part of 'make' * ambs removes it and runs configure $(SRC_DIR)/jit_emit.h : $(SRC_DIR)/jit/i386/jit_emit.h $(CP) $(SRC_DIR)/jit/i386/jit_emit.h $(SRC_DIR)/jit_emit.h oops, two lines $(SRC_DIR)/jit_emit.h : $(SRC_DIR)/jit/i386/jit_emit.h $(CP) $(SRC_DIR)/jit/i386/jit_emit.h $(SRC_DIR)/jit_emit.h (from the root Makefile) I vote to remove it from the repo. In fact, I'm going to cast my vote by running "svn remove" :-) pmichaud, lol r27552 | ambs++ | trunk: : : Removed always true condition from jit_emit.h : make testj fails the same tests it failed before diff: http://www.parrotvm.org/svn/parrot/revision?rev=27552 pmichaud, I was unable to remove src/jit_emit.h, anyway probably because it is under svn:ignore :) oh, maybe I'm wrong about it being in the repo. I don't see it now. Oh well. Maybe I need my eyes checked. Or my brane. pmichaud, the interesting thing is that I removed it from the src dir, run configure and make, and it didn't get there again pmichaud: committed. The chicken is involved, but the pig is *committed*. r27553 | tene++ | trunk: : [rakudo] : * Properly increment the arity on a block when using placeholders. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27553 * pmichaud does 'make realclean', rebuilds well, wherever that line came from, it's old it's been that way since r3704 Tene: aha. I was taking the arity of the wrong node. (although I wonder if we should use the 'for' node's arity instead of the arity of its child[1] for this. That would be awkward. well, I'm wondering if there might be a language or situation where the number of things to be taken in each iteration differs from the arity of the thing being executed. Could be. if that's the case, then it should be an attribute of the 'for' node and not the attribute of its body In that case, for rakudo, we just copy the child[1]'s arity into the for node. from a rakudo perspective it's not awkward -- just have the node copy the arity of its block (which it already has.) ++ ...beat me to it. :-) maybe it shouldn't be 'arity' in the for node, though heh so many failing tests Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/codingstd/copyright.t 1 256 2 1 1 t/codingstd/perlcritic.t 255 65280 16 32 1-16 yes, I think I prefer it to be an attribute of the 'for' node. what to call it, though? How about we call it brb-i-have-to-go-check-a-pile-of-optical-drives? that might be too short. Need a more descriptive (i.e., longer) name. so, perhaps number-of-things-to-take-at-each-iteration-and-pass-to-the-body-of-the-loop ? snappy, that heh. pdd26 already says that it's the attribute of the 'for' node itself. % jhorwitz has left jhorwitz!~chatzilla@96.245.16.45 child_arity? block_arity? I'm thinking the child might not be a block (in non-perl6 languages) nodnod ch_arity? (i.e., it needs donations. :-) nice stride? (from OpenGL parlance) how_many_to_grab :by Interesting side effect -- in OpenGL, stride 0 means 'use the child's stride' :-) :by looks possible, it's similar to 1..5:by(2) I'd prefer "stride undef" means "use the child's stride" although stride zero makes sense. that's another reason to have 'for' not use the child's arity -- the child might have an arity of zero but we still want to iterate over the list example: for @list { say "hello"; } I agree re: undef % sjansen has left sjansen!~sjansen@hq-nat2.gurulabs.com OpenGL is constrained by seeing the whole world through a double filter of C and Fortran r27554 | ambs++ | trunk: : svn attributes fixed diff: http://www.parrotvm.org/svn/parrot/revision?rev=27554 so, I propose: (1) we go ahead and use the 'arity' attribute on the for node (2) if that is undef, then use the arity of the child if any. makes sense to me and if the child doesn't have an arity, assume 1. yep r27555 | ambs++ | trunk: : Some more svn attributes fixed. if I end up not liking it, we can change it. It's not as if it shows up in a lot of code. :-) diff: http://www.parrotvm.org/svn/parrot/revision?rev=27555 true! No snappy comeback, purl? japhb: huh? "huh?" may be as snappy as it gets. :-) huh? why is tools/util/dump_pbc.pl empty? ambs: because someone did a partial commit of my patch. It needs to be fully committed by somebody. And I don't have commit rights to fix it, though I am probably going to ask for same after this release cycle japhb: turned in a cla? Haven't started on the procedure yet. Just got this week two committers recommending that I do, which according to bylaws is the first step. japhb, then, I can't fix the failing tests for now :) japhb: is there a reason nobody has committed the rest of it? r27556 | pmichaud++ | trunk: : [pct]: : * Fix 'arity' handling in for loops. The for node itself is allowed : to have an arity, otherwise it uses any arity of its body (child). : (Tene++, japhb++, cotto++ for helpful inspiration and comments.) diff: http://www.parrotvm.org/svn/parrot/revision?rev=27556 japhb: I'll see about committing -- let me rebuild. Tene: supposedly someone was going to test my latest version on Windows, but it is already known to work on Linux. pmichaud: thank you please just commit japhb's patch. it's not core, so not of the utmost importance that it works on windows if my time frees up, i'll test it on windows this weekend particle: thank you japhb: what patch, again? is the patch already in (part of) the repo? 54148, latest patch I'd be glad to commit it. I was also going to commit your opengl update tonight. Tene: Thanks! okay, I'll let Tene do it. I'm eager to get back to working on protoobjects. and then mutables. * particle needs lunch&|nap & I'm a bit confused about why you don't have commit rights. All I did to get commit rights as I recall was a few lolcode patches. "pmichaud" at 76.183.97.54 pasted "for Tene: placeholders in for as of r27556." (7 lines) at http://nopaste.snit.ch/12991 tene: it's a lower bar for hll devs to get commit rights Oh, right. particle: thanks. Tene++ # placeholders in 'for' work. % Psyche^ has joined #parrot Since we're talking about it, * japhb starts going through the procedure to get commitbit % AndyA has left AndyA!~andy@onager.omniti.com % AndyA has joined #parrot "pmichaud" at 76.183.97.54 pasted "for Tene: placeholders in for as of r27556 (more dramatic)" (7 lines) at http://nopaste.snit.ch/12992 Tene++, pmichaud++ (mutual karma society)++ all++ purl karma all all has karma of -8 all needs work. huh :-S all++ all++ purl karma all all has karma of -6 i though all here get a ++ :) % Patterner has left Patterner!~Psyche@e177226097.adsl.alicedsl.de % Psyche^ is now known as Patterner purl karma lichtkind lichtkind has karma of 2 ah all++ gnole++ karma gnole # french pun gnole # french pun has neutral karma arf karma gnole gnole has karma of 104 Tene++ purl karma Tene tene has karma of 61 r27557 | jonathan++ | trunk: : [rakudo] Allow specification of a name for the invocant of a method using the : syntax (method test($inv: $x, $y) { ... }). diff: http://www.parrotvm.org/svn/parrot/revision?rev=27557 * japhb grumbles about having to move cat bed to reach printer so as to produce dead tree version of CLA to send via snail mail to a completely online foundation I just had my hotel fax it for me. I handed mine directly to Allison. :-) pmichaud ftw and used her dead trees, too. :-) heh the cat is displeased wow, that diff was not very complicated r27558 | bernhard++ | trunk: : [Plumhead PHC] : Fiddle with builtins.pir, making remaining tests succeed diff: http://www.parrotvm.org/svn/parrot/revision?rev=27558 * cognominal reading the excellent "JavaScript, the good parts" and had the strange feeling to read the pascal manual. That must be the railroad presentation of grammar instead of bnf for those who haven't heard yet http://news.perlfoundation.org/2008/05/tpf_receives_large_donation_in.html pmichaud's url is at http://xrl.us/bknqc % cjfields has left cjfields!~cjfields@cjfields.igb.uiuc.edu What is the empty tools/util/dump_pbc.pl for ? barney: git-svn gone wrong, iirc pmichaud: wow, awesome barney: it's a mistake I made % iblechbot has joined #parrot yes, it's very awesome. rdice++ Ian Hague += 200000 heh can somebody please commit tools/util/dump_pbc.pl_ ? I'll do it right now. * japhb chuckles Tene++ Awesome about funding! :-) jonathan, indeed :) wow good news Holy cow, that's awesome % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru and, rdice++, indeed Good thinking for the donor to stipulate spending half improving TPF's ability to seek more donations, so that no one can complain when TPF makes that choice .... r27559 | tene++ | trunk: : Apply japhb's dump_pbc work. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27559 % Zaba has joined #parrot Is that right? * japhb finishes reading CLA ... longish, but surprisingly sane Tene, checking $100k to figure out how to get more donations seems like a lot * ambs runs the failing tests how exactly do you spend money on finding donations anyway Eevee: believe me, it's a good investment. Eevee: Because to get donations this large takes a LOT of work. Eevee: build tiny money-seeking robots Eevee: I'm guessing ... hire a full-time donations-seeker, and fund their travel and schoozing er schmoozing Feh. I like my plan better. at the university I worked for, we funded a vp for development for about that much (probably more) Tene++ for best of those four responses And I agree with pmichaud: It's an excellent investment although a title of Official Schmoozer is entertaining too within just a couple of years we had earned it back 10-fold. Within ten years we had earned it back almost 100-fold. okay, as long as it's being used well % lichtkind has left lichtkind!~chatzilla@90.134.31.94 Tene, why is the file... erm... replicated three or four times? eh? Wow, I'm incompetent. I'm not sure. * japhb sees the problem that's ... weird I kept my copy ... do you need me to resend or nopaste just that file, Tene? japhb, please svn up and diff your file with current file r27560 | ambs++ | trunk: : Removed triplicated script from file tools/util/dump_pbc.pl : Hope to get it right now diff: http://www.parrotvm.org/svn/parrot/revision?rev=27560 ambs: in progress ambs++ # fixing my incompetence Tene-- Tene, was just luck :-P "japhb" at 76.191.190.8 pasted "dump_pbc.pl diff" (47 lines) at http://nopaste.snit.ch/12993 in src/ops/core.ops lines 656-680, are we missing some "=cut" directives there? damn * ambs applies ambs-- # removed the wrong copy from the file r27561 | ambs++ | trunk: : Fixed file tools/util/dump_pbc.pl. japhb++ diff: http://www.parrotvm.org/svn/parrot/revision?rev=27561 % wknight8111 has joined #parrot ambs: thank you, looks right now japhb, thanks Tene: what side of the planet are you on? (So I know what "tonight" means. :-) LOL machine named castro... hmmms.. Cuba? :) japhb: North America rumour has it North America is like 30% Spanish... it's more like 95% in South and Central America... there's out of the way places like the Philipines... and, most of western Europe at least UNDERSTANDS it ambs: my previous employer named all of his servers after dictators. LOL castro, stalin, mussolini, mao, etc Any salazar around? nope hussein damn salazar was the portuguese one :) he was going to name one 'clinton', but the business died before we got another server. hehehe Although with how much I've fouled up this patch, I should be cautious about trying another one. Or just do the next one with git, not svn. :) well, night, folks % ambs has left ambs!~ambs@255.92.54.77.rev.vodafone.pt g'night % Ivatar has joined #parrot good night sleep well too % barney has left barney!~bernhard@dslb-084-058-121-201.pools.arcor-ip.net OK, I believe I now have my BitCard account set up. And I've filled out and signed the CLA; need to walk up the street to copy and send it. According to submissions.pod, the next step is to request commit rights for my BitCard account. % davidfetter has joined #parrot r27562 | jonathan++ | trunk: : [rakudo] Remove useless variable declaration from my last commit. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27562 r27563 | jonathan++ | trunk: : [rakudo] Implement prefix:<^>. Note that the list case doesn't work, but that's because of a bug in infix:X rather, which it calls. Metaclass case and int/num cases to produce ranges work fine, though. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27563 % Limbic_Region has joined #parrot mmm... prefix:<^> wish I was implementing more of these operators -- but I keep trying to fry bigger fish :-) oh, ouch. well, maybe okay I'm wondering how mutables will play with mmd :-| The meat doesn't taste as good without the sauce, and the sauce doesn't provide nearly the nutritional value without the meat. I guess if the 'isa' vtable method is functional it may work out okay. % iblechbot has left iblechbot!~iblechbot@ppp-62-216-198-156.dynamic.mnet-online.de pmichaud: Yeah, that might or might not be kinda nasty. :-( MMD needs a good going over anyway, mind. I need to find something simple to tinker with implementing before jonathan++ gets all the low-hanging fruit Eevee: there are still a lot of builtins you could implement. Eevee: Fix infix:X I added List::uniq last night. It was very small. pmichaud: I'm pondering adding an actual Range object at some point soonish. sure, that sounds good. one other nice consequence of mutables is that I think that lazy lists become much simpler, too :-) :-) as you can guess, I'm pretty eager to see the implemented now that I know what we need :-) so that's likely my weekend project Nice. r27564 | infinoid++ | pdd13pbc: : [pdd13] Merge changes from trunk (-r27311:27563) into pdd13pbc branch. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27564 Mine will involve writing more slides than code. Tene: now that you mention it I don't think I've even had a look at S29 since it was first written.. oh, it also looks like I'm very likely to make it to YAPC::EU High on my list is to give roles a good going over. 85% probability at this point. Nice. :-) % wknight8111 has left wknight8111!~Whiteknig@pool-72-78-159-125.phlapa.east.verizon.net Also, I need to work out class initialization a tad more, so has declarations can have default values set upon them and types. the protoobject refactor I'm doing will change that somewhat. (it'll be a tad cleaner than what we have now) Great. There's the whole BUILD submethod and so forth to consider. Need to get that lot straight in my head. oh, I think I have that one straight. It'll go into (Perl6)Object submethods may be another issue, though :-) haven't quite figured out how to do that one in Parrot. Perhaps create them as subs with the first argument as the invocant. but getting Parrot to honor that method syntax may be tricky. My plan for that was, get them created as Submethod PMC type, and then override find_method vtable method to ignore them. that sounds very reasonable. then we just need a way to specify a Submethod PMC type in PIR :-) Argh, I was going to write a mail about that... % mire_ has joined #parrot % Andy has left Andy!~AndyL@host3130.follett.com ...sent. jonathan++ speaking of S29: since undef is an object, will undef.defined()/undef.isa()/undef.can() work? undef is a function. It is? Oh no it isn't! well oh wait it.. returns undefined undef returns a Failure object oh, really (which is undefined, yes.) That's what we do in Rakudo, yes. I think it's correct. See exceptions in S04. though undef is a keyword rather than a function. looking at http://perlcabal.org/syn/S29.html#Scalar which calls it a 0-ary function the synopses that are at http://dev.perl.org/ should supercede S29 when there's a conflict. % Zaba_ has joined #parrot % mj41 has left mj41!chatzilla@pc-jurosz.ro.vutbr.cz * jonathan reads the MMD PMC % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru Looks like we 'just' subclass MultiSub interesting. spec for Failure is a pretty clever way to combine both "returns false on error" and "throws on error" yes. pmichaud: Was the final MMD algorithm actually settled upon? Was some kinda topographical sorting? jonathan: I don't know. It's in the synopses, I think. % mj41 has joined #parrot pmichaud: Aha, found it. % AndyA has left AndyA!~andy@onager.omniti.com pir.vim is the first vim syntax file I have had to "compile" jonathan: what exactly is this bug in infix:X? my @x = (1,2) X (3,4); for @x -> { say $_ } See S03 for what it should do for (1,2) x (3,4) But it sure ain't doing the Right Thing. (It's meant to give all permutations) Oh, hmm my @x = (1,2) X (3,4); for @x -> $x { say $x } # gives output yeah jonathan: try just: for @k { say $_ } Oh, yeah! d'oh! * jonathan should learn Perl 6 some day I can fix that to work if you'd like, but I'm unsure if it's correct or not. Me either. jonathan: I hear that's a pretty cool language jonathan: er. do you just get "1\n2\n"? yes yes Which is wrong. But should get 13\n14\n23\n24 that's not even close list context, again I'm sure it worked at *some* point in the past. things may be flattening that shouldn't be. although that's not a clear explanation, either. because then we'd still see 1\n3\n1\n4\n2\n3\n.... my @x := [[1,2] X [3,4]]; for @x { say $_ } that works is = binding more tightly than X? oh, it may be a precedence problem then. no.. r27565 | fperrad++ | trunk: : [Lua] : - translates more opcodes diff: http://www.parrotvm.org/svn/parrot/revision?rev=27565 or.. wait. .... does [1,2] even work? in rakudo? `my @x := [[1,2] X [3,4]]; for @x { say $_ }` => 13 14 23 24 substituting spaces for \n oh, that looks closer. `my @x = ([1,2] X [3,4]); for @x { say $_ }` => 1 3 1 4 2 3 2 4 I suspect it's the ongoing list context bug. that really is high on my list of things to fix, but I need to get protoobjects and classes and variables fixed first, I think. % pnutr has left pnutr!~okiwan32@cpe-74-67-78-56.stny.res.rr.com `for (1,2) X (3,4) { say $_ }` => 13 14 23 24 Ah. Curious. * purl hands jonathan a dead cat note that "13", "14", etc. are probably also wrong. checking spec I think it should be 1 3\n1 4\n2 3\n2 4\n (i.e., spaces between the individual elements on each line.) ...but that feels wrong too. oh well, I'll let you all work it out. :-) (back to protoobjects.) Does X return a list, or the elements of a list? % Ademan has left Ademan!~dan@h-69-3-235-19.snfccasy.dynamic.covad.net % Ademan has joined #parrot "the X operator returns all possible lists formed by taking one element from each of its list arguments" This becomes a flat list in @ context and a list of arrays in @@ context: * Tene nods say @( X <1 2>) 'a', '1', 'a', '2', 'b', '1', 'b', '2' say @@( X <1 2>) ['a', '1'], ['a', '2'], ['b', '1'], ['b', '2'] I guarantee that rakudo can't yet properly handle my @a = ( X <1 2>); er I guarantee that rakudo can't yet properly handle my @a = X <1 2>; because it doesn't know list assignment yet. (it may be able to do the paren version.) % pnutr has joined #parrot the code/results I pasted in backticks above are what rakudo actually does now so. sorta. a bit. % mj41_ has joined #parrot well.. er. is the argument list of say() just @ context? yes. but note my $x = [1, 2]; say $x # "1 2\n" my @a = 1, 2; say @a "12\n" (forgot a # there.) the argument list to say is @ context, but each element of the list is evaluated in string context. % mj41 has left mj41!chatzilla@pc-jurosz.ro.vutbr.cz % mj41_ is now known as mj41 and string context on a list joins w/spaces. X acting differently with @ and @@ just seems weird.. and I can't imagine quite so much use for the @ result r27566 | jonathan++ | trunk: : [rakudo] Stub in a Range class with a couple of methods. Note that we've some work to go before it's ready to be used by the .. operator. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27566 OK, I think that's all from me today. great work today, again. Will do write-up tomorrow, it'll be more coherent. jonathan++ Not that what I've done today has been especially coherent, it's been bits all over. jonathan is going to absurd amounts of karma by the time rakudo is done purl: karma jonathan jonathan has karma of 538 purl: karma eevee eevee has karma of 4 :( karma pmichaud pmichaud has karma of 1209 :-) MOAR COMMITS EEVEE I got some catching up to do with pm... ;-) I don't even have commit access to the parrot repo! Send patches to me and I'll commit for you. maybe I will Or, y'know, just send 'em to RT and someone else can get them. pmichaud: By the way, it'd be really good if you cross-posted your use.perl.org posts onto rakudo.org - I suspect there may be people who read there that don't read use.perl.org oh, yes. I will be sure to give you a pre-written commit message that happens to have a lot of code examples involving variables named $eevee and postincrement I find you can literally copy-paste the HTML from one to the other. for some reason I thought that was happening automagically. Sadly not. :-( rakudo.org isn't an aggregator * pmichaud makes it happen manualmagically. hehe Cool, thanks. (I'm not sure that's genuine magic) fake magic (It is when *I* do it. :-) % AndyA has joined #parrot uhhhhh.... how do I post to rakudo.org? ;-) I don't see a link to log in or to post % sjansen has joined #parrot pmichaud: http://www.rakudo.org/cgi-bin/mt/mt.cgi Do you have an account there? If not, ask Andy. I'm pretty sure I have one. "japhb" at 76.191.190.8 pasted "Quick hack for finding duplicated lines across files, for those who were around when I asked about that yesterday" (84 lines) at http://nopaste.snit.ch/12994 Warning: will litter HTML files next to all the files you compare, because I haven't implemented outputting to a separate dir yet. I have a movable type account but don't see how to post a new article. the cgi-bin/mt/mt.cgi link keeps taking me somewhere else I'll have to ask Andy. pmichaud: Did you manage to log in? Try http://www.rakudo.org/cgi-bin/mt/mt.cgi?__mode=view&_type=entry&blog_id=6 jonathan's url is at http://xrl.us/bknvs I don't have any way of knowing if I'm logged in or not. quality software I get the "sign in" page, enter my mt username/password, click "sign in" and it takes me to a form to update my profile. if I follow the link to "original page" it takes me to perlbuzz.com. oh hrm signing out and back in again seems to have worked -- at least to the point of letting me add a comment to existing articles. now I'll try the mt.cgi link again heh no, neither of the mt.cgi links work for me. I'll have to check with Andy, I guess. % AndyA has left AndyA!~andy@c-68-33-170-161.hsd1.md.comcast.net pmichaud: problem with the arity: for 1..15 { say "$^b - $^a" } ends with: 14 - 13 StopIteration > 1 that's because the List type doesn't understand unshift from an empty list. or, more precisely, because Iterator stops. we probably need a new iterator. I don't know that it's PCT's job to work around this directly. anyway, it can be filed as a bug ticket so we come back to it. Aye, file a ticket. I'll continue work on the Range object and get its iterator support into shape for this. PCT will probably change so that it doesn't create the iterator directly, but rather expects its first child to be something that understands 'shift' (of which an Iterator would be valid) % tetragon has joined #parrot % codeguy has joined #parrot pmichaud: Why not just use the iter opcode? it's listed as 'experimental' Which in turns calls the get_iterator v-table function... but yes, using 'iter' works for me. I'd like it to be a bit more 'official' then. If we start using it and it works, it gets less experimental. ;-) fair enough. I guess just fire a mail off to the list to make sure there are no plans to get rid of it. But I don't see what it would go away. well, even if it does go away, it's easy enough to fix things that's one of the advantages of generated code -- so much less to change when a core component changes :-) :-) OK, I'm off to drink some weird Slovak alcohol and then sleep. Night all later, jonathan % davidfetter has left davidfetter!~davidfett@start.fetter.org % davidfetter has joined #parrot particle: right here. right here is the best possible place, DietCoke. or right now Sorry, real life intruded. % Ivatar has left Ivatar!~graham@tu055.demon.co.uk % bacek has joined #parrot % bacek has left bacek!~bacek@123-243-38-218.tpgi.com.au % cotto_work has left cotto_work!~cotto@tide531.microsoft.com % cotto_work has joined #parrot % codeguy has left #parrot % pnutr has left pnutr!~okiwan32@cpe-74-67-78-56.stny.res.rr.com % cotto_work has left cotto_work!~cotto@tide503.microsoft.com % cotto_work has joined #parrot % bacek has joined #parrot hi there Hi! Never seen you around here before, bacek. Interested in parrot? % AndyA has joined #parrot Tene, yes. We had a good chat yesterday with pmichaud. % Zaba has joined #parrot % Zaba_ has left Zaba_!~zaba@ip102.148.adsl.wplus.ru % sjansen has left sjansen!~sjansen@hq-nat2.gurulabs.com % davidfetter has left davidfetter!~davidfett@start.fetter.org r27567 | chromatic++ | trunk: : [src] Improved refcounting and recycling of stack chunks, so as to reduce GC : pressure. This improves the Rakduo-building benchmark by 29.24%. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27567 OK, CLA sent off ... so who is a metacommitter? man, it's just amazing how completely HLL performance is being dominated by GC ... % IllvilJa has left IllvilJa!~jilves@emea-netcache1.oracle.co.uk % Theory has left Theory!~Theory@c-24-21-175-208.hsd1.mn.comcast.net japhb: I am. but I don't get the CLAs - I just see when they've been processed. at which point there's a general pinging. DietCoke: Consider this an application for commitbit, then. :-) ag ah if you've sent in the CLA, we'll have a little metacommitter party and discuss it. =-) heh * DietCoke orders some memory for his imac. 32- or 64-bit? (CPU in the imac, I mean) has the bug day begun? somewhere! i think somewhere is SF? japhb: how do I tell? =-) (I don't think mac does 64 bit yet, does they?) % IllvilJa has joined #parrot DietCoke: yep, ever since they started using Core 2 Duos (Core Duo -- no numeral 2 in the middle -- is 32-bit. I know, because that's what's in the laptop I'm typing on right now.) One of several reasons that Core 2 Duo >> Core Duo, performance-wise * Infinoid hugs his core 2 duo laptop hmm... 64 bit would make the fat-library stuff on OSX even more complicated, wouldn't it? * Tene also core 2 duo % cjfields has joined #parrot I have a core 2 duo box. no clue if it's 64 bit, but I'm guessing I would have noticed that. % mire_ has left mire_!~Frodo@210-174-222-85.adsl.verat.net its 64 bit if you are running a 64 bit OS on it otherwise, its in x86 reverse-compatibility mode. % Limbic_Region has left Limbic_Region!~Limbic_Re@c-68-49-236-220.hsd1.md.comcast.net % Theory has joined #parrot % Theory has left Theory!~Theory@c-24-21-175-208.hsd1.mn.comcast.net % cjfields has left cjfields!~cjfields@adsl-76-199-15-240.dsl.chmpil.sbcglobal.net % AndyA has left AndyA!~andy@c-68-33-170-161.hsd1.md.comcast.net % AndyA has joined #parrot % c9s has joined #parrot r27568 | chromatic++ | trunk: : [PMC] Extracted function to calculate class name from Class PMC. This allows : the get_string vtable entry to return a COW version of the name and the isa : vtable entry to operate on the name directly. This is safe, as the latter does : not modify the string. : The result is a 16.23% improvement in the Rakudo-building benchmark. : One complication remains: the PMCProxy PMC either needs a special case (as in : the code in this commit) or its own version of the isa vtable entry, as it : stores the class name differently. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27568 % slightlyoff has left #parrot % Andy has joined #parrot r27569 | pmichaud++ | p6metaclass: : remove p6metaclass branch to resync with trunk diff: http://www.parrotvm.org/svn/parrot/revision?rev=27569 r27570 | pmichaud++ | p6object: : Create re-sync'd p6object branch for updating protoobject : implementation. diff: http://www.parrotvm.org/svn/parrot/revision?rev=27570 % Psyche^ has joined #parrot % Patterner has left Patterner!~Psyche@e177225229.adsl.alicedsl.de % Psyche^ is now known as Patterner % tetragon has left tetragon!~seneca@CPE0040d001f62f-CM000a736592a8.cpe.net.cable.rogers.com * DietCoke resurrects his ancient osx/ppc laptop % Ademan has left Ademan!~dan@h-69-3-235-19.snfccasy.dynamic.covad.net % Zaba_ has joined #parrot % Zaba has left Zaba!~zaba@ip102.148.adsl.wplus.ru parrot takes a long time to compile on those. % Zaba has joined #parrot % Zaba_ has left Zaba_!~zaba@ip102.148.adsl.wplus.ru % teknomunk has left teknomunk!~teknomunk@r74-195-239-111.stl1cmta01.stwrok.ok.dh.suddenlink.net Any committers about? % barney has joined #parrot