Two days ago I invited Leo to coordinate Pugs/Parrot issues on IRC; tonight he showed up on #perl6 and #parrot. Much discussions ensued -- this is definitely my wisest course of action during the past 56 days!
Alas, unlike #perl6, #parrot is not yet logged on the web, so here is an abridged transcript of the hour before the (brain)storm...
* acme summons leo <@Psyche> now that's a spell gone wrong, eh? <@acme> have faith, young Psyche <@acme> drat, i really thought he was going to pop up -!- leo_ has joined #parrot <@Coke> holy smokes. <@Coke> now, if autrijus were awake... <@autrijus> hi leo! -!- Coke changed the topic of #parrot to: OMG, is that *LEO*?
A two-hour brain tennis session followed, focusing on how to extend the calling convention and IMC types, so that the Parrot AST interface can work correctly. We reached many fruitful courses of action:
Pugs: Multi-pass compilation architecture.
Eval.hs
becomes a compiler, generating a Parrot AST.
Pugs: Combinator library to emit Parrot AST.
Parrot: IMCC enhancements.
.lexical
pragma to simplify pad creation and management.
VThunk
postponed-evaluation value type in Pugs.
want
in Perl 6) to the callee, via tags like "PerlContext" = "Int"
stored in a Hash PMC register.
@ARGS
may be introduced to IMC to abstract away parameter processing code in the calling convention, and let us change the underlying convention mroe freely.
Here is some closing notes:
<@autrijus> leo: I need to sleep soon too. I'll be online ~20hr later <@leo> and as IRC isn't that bad I'll try it again soon <@leo> any final questions? <@autrijus> leo: thank you a lot for doing this immensely sane system :) <@autrijus> leo: also, if you have a server somewhere <@autrijus> you can use GNU screen <@autrijus> to stay on irc <@leo> yep - thanks for the hint WRT sreen <@leo> see you allOther committers did not relax either, churning out enormous amounts of code in the past couple days:
q//
literals, fixed numerous problems in the build system, and hacked on luqui's perl6.vim.
.o
files, and install them correctly. Now I need to get some time to make it work with Cabal to build the pugs package.
:key(123)
, :key<abc>
, :key[1,2,3]
and :key
working. He succeeded.
$.x
and $:y
as variables, in anticipation of the upcoming OO core.
t/pugsrun/
tests run pugs in a saner way.
Context.hs
and normalized test files to begin with #!/usr/bin/pugs
, instead of #!/usr/bin/perl6
.
Finally, Jeff Horwitz released mod_parrot 0.2, which greatly helped my understanding of Parrot's embedding API. He also added a new high-level-language layer to support plug-in style development for languages targetting Parrot. Specifically, he plans to learn Haskell and implement a GHC layer for Pugs. This is likely to be very useful, and may pave a way for us to unify Haskell FFI with Parrot NCI in the future. Way to go, Jeff!
Now, I have yet to demonstrate that this works with a language other than IMC, but it looks like Pugs will soon have the necessary OO support so I can try it out.
I _do_ plan on learning Haskell though -- I really don't like the feeling of illiteracy when browsing the Pugs source.