Today I tried a new product of the Perl 6 project: Not Quite Perl. "NPQ" is a subset of the Perl 6 syntax. It runs on Parrot.
To put this in context, Pugs has been the most feature-complete implementation of Perl 6, but has suffered from poor performance and lack of Haskell-enabled contributors.
KindaPerl6 currently supports a subset of Perl6, and is executed with Perl5, but also has slow performance now.
"Not Quite Perl" is a similar effort, using Parrot to execute the code. Parrot is expected to be the fastest performing implementation of Perl 6. Right now "KindaPerl6" and "Not Quite Perl" are developing separately, but there have been discussions to coordinate, according to fglock, a KindaPerl6 contributor.
Here's what I found tried when I tried both technologies today.
First, getting started with the latest parrot release on Ubuntu Feisty was incredibly easy. I ran command to have Ubuntu install the dependencies of parrot:
sudo apt-get build-dep parrot
From there, I downloaded and unpacked the Parrot 0.4.15 release, since no Ubuntu package had been made for this version yet.
Building parrot was easy:
Next, I moved into the "Not Quite Perl" language directory and made sure it was built as well:
I created my own "nqp" script to make it easier to test Perl 6 code with it. The script, which I kept in that directory, just looks like this:
The README there and the tests in "t/" convey what subset of Perl6 is supported so far. It's not a lot, but I believe t he idea is that is enough to to start writing more of Perl 6 using this subset.
The performance is impressive. It executed a basic statement in .3 seconds:
$ time -p echo "say(42);" | ./nqp
The same test using KindaPerl6 took about 15 times longer!
$ time -p echo 42.say | perl -e 'use v6-alpha'
Update: As a commenter pointed out, the above syntax is for the "v6", Perl6-on-Perl5, project. The "KindaPerl6" project is available through checking out the "pugs" repository, and provides a major speed improvement through pre-compilation:
$ time -p echo 42.say | perl kp6-perl5.pl > test.pl
$ time -p perl -Ilib5 test.pl
Notice that 'v6-alpha' and KindaPerl6 supported the new method call syntax of "42.say", while NQP required a more conventional subroutine calling syntax "say(42);".
To provide some further context, I timed the same thing with the latest build of Pugs (r17041). It's performance fell somewhere in between, still close to 10x slower than NQP:
time -p echo 42.say | pugs
(This result was even less scientific than the others, because I logged into a different, presumably faster, machine to get access to a recent 'pugs' build).
And to put all that into perspective, I tried the same thing with Perl 5.8.8:
time -p echo 'print "42\n"' | perl
The result here was practically instant, or about 30x faster than the Parrot-based NQP test.
Since all of these Perl 6 projects are still in development, I expect there is still a fair amount of room for optimization.
If you want to start playing with Perl 6 syntax now, "Not Quite Perl" and KindaPerl6 may well be easy enough to install and fast enough to please you.