Day 92: New PGE released; Pugs now embeds Parrot!

autrijus on 2005-05-03T21:09:57

I'll start with a fresh quote from #perl6:

* Limbic_Region patiently waits for a "the most productive day in Pugs yet...." journal entry

But, indeed, today is a quite important day to the Perl 6 project. Two announcements happened within the same hour:

Taken together, this not only means Pugs can call PGE natively, but also that we no longer need pugscc to compiler Perl 6 to IMC code anymore; Pugs will soon be able to turn Perl 6 into IMC in memory, feed it into the embedded Parrot, which will run it in blazing JIT speed. Jeff Horwitz, mod_parrot leader and new lambdafolk, is working on getting all this Just Right.

Oh, and there is news #3. I pointed Leo to Jhc, a Haskell compiler. Grin, the low-level intermediate language it uses, is very simple, and a Grin to C compiler is merely 300 lines. I think it would be relatively straightforward to create a Grin to Parrot compiler (or even a Grin to Perl 6 compiler), which would make Pugs itself -- indeed, an entire Haskell compiler -- run on Parrot. We will probably spend some time, during the two-week hackathon time after the Austrian Perl Workshop, to look into this.

There are lots of other developments today, as usual:

  • I started $real_work in Perl 5 today, but I can't stop but noticing the my ($x, undef, $y) = 1..3; idiom, which was not supported in Pugs. So now Pugs supprots undef in LHS lists.
  • Stevan checked in a new TODO model for Pugs, so we can mark our TODO tests with different categories, and have them counted and reported by Harness, instead of grouped under the various reasons umbrella. Now I just need them to show up in different shades of colours in smoke.html...
  • Following that change, iblech marked our :todo tests in t/oo/ as :todo<feature> tests.
  • I inquired about Perl 6 type systems on p6l; Larry gave some sensible answers, followed by Thomas Sandlaß's scary answers.
  • theorbtwo laboured to add function signature declarations to Parser and Lexer, resulting in much nicer Haddock output.
  • scook0 continues to add Haddock API comments to Eval, AST and Types, which (as usual) prompted me to rename the Junc constructor into the more consistent MkJunc.
  • With one line of code, I implemented state $x support, which is like Perl 5's old my $x if 0, but this one works sanely. :-)
  • Limbic_Region promptly submitted a closure-based OO implementation using state as class variables, and my as instance variables. iblech then proceeded to decorate it with helpful comments.
  • iblech also added tests to map, topicalization, and add
  • putter tried to build Pugs on x86_64 but failed; after some discussion in #haskell, a workaround was found and added to README.
  • ninereasons added some failing tests to exercise Pugs's pairs behaviour.

Whew, that's a lot for one day. Oh, and finally, another good news: I don't need to struggle to derive a transformer from SPJ et all's subcontinuation paper anymore, because Oleg Kiselyov et all has just finished it, and they generously agreed to let Pugs use their CC_2CPST module freely. Many thanks to these scintilatting lambdafolks for sharing their wizardry!


Why a Haskell compiler on parrot?

markjugg on 2005-05-04T17:07:00

For those of us standing back at a safe distance,

Why pursue a Haskell compiler that runs on Parrot?

Re:Why a Haskell compiler on parrot?

autrijus on 2005-05-04T19:17:22

Hmm, it is desirable to run Haskell on Parrot, by compiling Haskell to PIR; this will allow Pugs itself, as well as many interesting Haskell applications, be shared natively with other languages running on Parrot.

The fact that we will, by definition, get a self-hosting Haskell compiler running on Parrot, is just a nice bonus. :-)