Thanks to iblech and putter, we now have a beginning of Prelude::PIR, a set of built-in Perl 6 functions implemented in Perl 6 for Parrot. I expect these, along with other primitives implemented in PIR, to be compiled to bytecode eventually.
After days of hacking, chromatic finally conquered Pugs's parameter binding to implement submethod BUILD (+$.x, +$:y)
that works with .new
calls. The next step toward OO nirvana is probably class variables (my $foo
and our $foo
inside a class declaration), which should make sri
much happier.
Other progress on the PIR front:
&infix_postfix_meta_operator:<=>
now works: $x += 3
my @a = 1..10; @a[5]=100; say join ",", @a
&infix:=<
constructs a Pair object.
pugs -C
no longer create the misleading dump.ast
file -- the compiled code is now simply piped to stdout.
&sub.goto()
.
Most of my time today are spent on sleeping -- the last week has stressed me out a bit -- as well as reading papers and other people's implementations. Of particular interest to me is the CLR family of languages -- Nemerle, Mondrian, F#, Boo, etc. Of those, Nemerle is especially interesting; like Perl 6, it is designed around metaprogramming, parametric polymorphism, good ML-style functional programming primitives, and a nice OO core.
Chasing the bibliographies from Erik Meijer of Mondrian fame, I have found some nice algorithms for codegen to register-based machines ; Dan's arguments for a register-based design and Leo's arguments for variable-sized frames all makes much more sense to me now. If AbsIL has a free Haskell counterpart, or if its F# library can interperate with Mono, I'd seriously consider working on Emit.IL for CLR too...
Anyway, I need to sleep now. Hopefully tomorrow I'll have enough time to roll a release. Then I'll fly to Toronto and participate in the next Hackathon -- will keep you posted.