The Raku Programming Language Collect, Conserve and Remaster Project
Originally published on 2011-06-06 by Jonathan Worthington.
Here in Sweden they have these things called “red days”. They’re basically days off, and June has a load of them. When I first heard the term, I wondered if it was some socialist connection, but got the much more boring answer: “it’s because they’re in red on the calendar”. :-) Anyway, with Thursday and today being red days, and Wednesday somewhat being one too, and a free weekend, there was only one thing for it: hack loads on the Rakudo “nom” branch!
The “nom” branch – short for “new object model” – is where I’m re-building a bunch of Rakudo things on top of 6model. Last time I gave an update of it here, I’d barely got going: the build procedure was updated somewhat and I was digging into a symbol handling refactor and starting to flesh out meta-objects, but there wasn’t anything you could actually take and play with. By now, while there’s still lots to do, things are starting to get interesting. :-)
Over the last 5 days, I’ve made approximately 130 commits to the Rakudo repository, and 20 to the NQP one (mostly 6model core improvements). Happily, others have also been joining in on the fun: moritz++, pmichaud++ and tadzik++ have all committed stuff in the last few days too, and they along with many others have provided useful feedback and comments. Here’s a selection of the things we now have working in the “nom” branch:
.” sigil and rw` trait for accessor generation also work.:U and :D type-modifiers for dispatching by definedness are now implemented (never had these in master)BEGIN time, using multi-dispatch now. In master, they are deferred to INIT time. Thus we only handle the is repr trait in the compiler now, and none of the rest are magical any more.Int, Num and Str, as well as a few methods. These were mostly filled out by moritz++ and tadzik++. They’re defined using the new multis and box/unbox with 6model primitives. Note that those three types are also far more memory efficient and GC-friendly than in master.if / unless / while and probably others that I didn’t check – we didn’t start over from scratch, so a lot of stuff we just get from it having already worked in master, or can fix up pretty quicklyOf course, we’re still missing a load of things and “nom” isn’t ready to start testing anything serious on yet, but it’s exciting that so many of the primitives – including some of the tricky ones – are back in place. Of course, some tricky ones are yet to come: parametric type stuff, lists and deferral to name three of the biggies. Happily, my supply of hacking time is looking to continue to be good for the week ahead, and others are joining in with the hacking, so I’m looking forward to another exciting week ahead. :-)