Thursday, July 26, 2007

OSCON: Perl 6 on Parrot

I'm sitting in Perl 6 on Parrot with Patrick Michaud the pumpking for the Perl 6 compiler. Of course we have to talk about Perl 6 compilers, there are lots; Perl 6 on Parrot ("perl6"), Pugs, v6-alpha and KindaPerl6.

You've probably heard of "perl6" and Pugs, but you might not have heard of v6-alpha which is a Pugs based Perl 6 implementation on top of Perl 5, or KindaPerl6, which is a Perl 6 implementation on top of Perl 6.

But Patirck will be mostly talking about "perl6" today, and if you want to check-out and build Perl 6, you can do it using the following incantation,

$ svn checkout http://svn.perl.org/parrot/trunk parrot
$ cd parrot
$ sperl Configure.pl
$ smake
$ scd languages.perl6
$ smake
$ smake test
$ smake spectest

# run a Perl 6 program
$ parrot perl6.pbc hello.pl

The big focus right now is on the Perl 6 test suite, there is a definition on Synopsis 1 which says the anything that can pass the Perl 6 test suite is an official version of Perl 6. The Perl6/Parrot syncs tests with the Pugs master repository, which continues to host the canonical version of the test suite, which are of course all written in Perl 6.

The tests in 01-sanity/ are the "threshold" to running other tests in the suite, unfortunatley Pugs' Test.pm evolved beyond features in 01-sanity/, so the Perl6 people have now built a simpler Test.pm that only requires these threshold features which allows development to take place on other components.

Commonly asked Perl 6 compiler questions,

Are you really planning to write the (whole) compiler in PIR?

The answer is "No", this has never been the plan. There are a lot of components written in PIR, but most of the compiler is written in Perl 6.

What about Perl6 bootstrapping/self-hosting..?

This is a longer term goal. Patrick's more immediate goal is a stable platform for compiling /running Perl 6 on Parrot, the medium term strategy is to use whatever tools facilitate feature coverage.

Apparently there is a floating garbage collection bug somewhere in the Parrot virtual machine which really needs more eyeballs on the test suite as sometimes it's there, and sometimes it's not...

...and we're done.

No comments:

Post a Comment