What the Perl 6 and Parrot hackers did on their Christmas vacation

| 1 Comment

chromatic provides us with more insight into the Perl 6 process that's picking up steam. His original post ran here at oreillynet.com. I've edited it a bit to emphasize the goodies.

A running joke in the Perl 6 world is that we'll release a stable Perl 6.0.0 by Christmas. We just won't tell you which Christmas.

As many community-developed projects have noticed, long blocks of holidays can be very productive for contributors. Both Parrot and Perl 6 on Parrot have made a lot of visible progress in the past couple of weeks.

mod_parrot

Jeff Horwitz took over the maintainership of mod_parrot a while back and has steadily made progress. The new news is that he's writing a user's guide. The older news is that mod_parrot supports languages built on top of Parrot, including Perl 6 and Plumhead (PHP on Parrot).

make perl6 just works

In terms of code, I dusted off some proof of concept code that Jerry Gay and I wrote several months ago, with advice from Nick Forrette, added one new feature, and checked it in. The code is pbc_to_exe and it allows you to build an executable named perl6 by typing make perl6 (or make perl6.exe on Windows) once you have the Parrot source tree configured on your machine.

The initial proof of concept took about two afternoons to write up; I wrote the first version in Perl 5 and then Jerry and I translated it to PIR (Parrot's native programming language). Then it sat for a few months, until someone convinced me that the progress we've made would be much more accessible if we could provide an executable file named perl6 with the compiler linked in nicely. It took part of an afternoon to add the last missing piece and put things in place. (For that, see downloading the Parrot source code. Until the next stable Parrot release on 15 January, you need to check out Parrot from source code.)

I'm proud of this little project in a sort of mortified way; it just writes out a C file that wraps a tiny exectuable header around the PBC file and calls a couple of functions in libparrot to run that code, much like the parrot executable does (but without all of the latter's command-line options). It may be the most useful code I've written in a while though.

More developers, and Debian packaging

The biggest surprise to me is that, besides myself and Jerry, Francois Perrad, James Keenan, Patrick Michaud, Cosimo Streppone, Will Coleda, Curtis Poe, Bernhard Schmalhofer, Jason Porritt, and Andy Dougherty have all worked on this system in the past week. One small change -- one small feature representing perhaps an ideal day's worth of work -- inspired so much additional polish and evolution. That's not counting all of the other people who might now download and play with Perl 6 on Parrot. (It gets better too. Allison Randal and some of the other Parrot developers have resurrected the old Debian packages for Parrot, so Debian and derivatives will likely be able to install and run both Parrot and Perl 6 on Parrot after the next release.)

That's not the only interesting thing.

Parrot's new object system

The November and December 2007 Parrot releases were significant because each one added a major new feature. Parrot 0.5.0 introduced the new object system which we believe is capable of supporting all of Perl 6's OO features (and by extension, just about every OO system available in dynamic languages, though there's one design question remaining about the multi-dispatch system in CLOS). Parrot 0.5.1 includes the new Parrot Compiler Tools, which allow you to build compilers using, more or less, Perl 6.

LOLCODE in Parrot

Though most of my work in Parrot is fixing weird bugs and adding new features to the platform itself, it's been fun and a little scary to watch the development of LOLCODE on Parrot. Will Coleda started this on Wednesday, and the project has picked up contributions from Simon Cozens, Jerry Gay, Patrick Michaud, Klaas-Jan Stol, Bernhard Schmalhofer, James Keenan, and Stephen Weeks.

I know that you know that LOLCODE is a joke language, and I know that Simon Cozens is a smart guy who worked on Parrot several years ago and then retired from programming, but he wrote up his experiences in Parrot is really quite wonderful.

How to build a Parrot compiler

Patrick and I gave a talk at OSCON last year about building a Parrot compiler, and I repeatedly said that our goal is to make it possible for you to build a working compiler in an afternoon. You won't build a language as rich and powerful as Perl, Python, or Lua in an afternoon, but we hope to get all of the boilerplate out of the way in the first thirty seconds so you can spend four hours adding just the features you want. (The frosting part of this dessert is that you can bundle up your compiler into a cross-platform C program you can distribute as source code to compile and run on any machine which has libparrot installed.)

I think we're starting to succeed.

Parrot New Contributor Day

The next Parrot New Contributor Day is Saturday, 12 January 2008. Please join us in #parrot on irc.perl.org then or any time.

chromatic is an editor and technical evangelist at O'Reilly Media and has contributed to Perl 1, Perl 5, Perl 6 and Parrot.

1 Comment

Any chance that slides for the Parrot compiler talk are available?

Leave a comment

Job hunting for programmers


Land the Tech Job You Love, Andy Lester's guide to job hunting for programmers and other technical professionals, is available in PDF, ePub and .mobi formats, all DRM-free, as well as good old-fashioned paper.