Andy Lester: September 2007 Archives
Parrot 0.4.16 has been released to the wild. As always, code is available at parrotcode.org. Notable in this release:
- Code review on every PMC
- PMC code generation now uses Storable to reduce compile time
- Automated test coverage data of C source
- Design document PDD17 covering PMCs is complete
- Added lists, for loops, operators, comparison and multiplicative operators for NQP
What's NQP? It's "Not Quite Perl", and is an implementation of a subset of Perl 6 in Parrot. NQP will be used for all compiler tools for languages using Parrot as a way to bootstrap the Perl 6 implementation.
Finally, Allison Randal has been working on Parrot full time, with her machine funded by a Perl Foundation grant. Details of the grant progress are available, including ... <fanfare type="trumpet"/> a schedule! And she's reached the milestones on it! Huzzah! Perhaps other parts of the Parrot and Perl 6 projects could create and publish schedules as well...
Chris Dolan writes in his use.perl.org journal:
The policy that has generated the most talk so far has been Subroutines::RequireArgUnpacking which says that you can only use @_ in the first lines of your subroutine, and only to populate lexical vars. If you use more complex patterns like Params::Validate, then this policy is not for you and you should consider deactivating it by putting "[-Subroutines::RequireArgUnpacking]" in your perlcriticrc or putting "##no critic(Subroutines::RequireArgUnpacking)" near the top of your .pm file.
The first batch of changes from Chris's work have been released in Perl::Critic 1.07.
If you haven't given Perl::Critic a try, do so today. I guarantee that running Perl::Critic against your code will find at least two or three little bugs or bugs-in-waiting.
Jeff Horwitz, who has previously embedded Perl 5 code in Oracle PL/SQL code, has embedded Perl 6 in Apache. He writes on the perl6-internals list today that:
It gives me great pleasure to introduce you to the world's first mod_perl6 handlers! They are run using Parrot's Perl6 compiler on top of mod_parrot, and are compiled on the fly the first time a handler is called. Each handler is passed an Apache::RequestRec object instantiated by mod_parrot, and the handlers can call methods on that object from Perl6 land.
The code is simple and familiar, yet uses new Perl 6 constructs.
sub counter_handler($r)
{
our $x;
unless ($x) {
$x = 1;
}
$r.puts("<h1>Hello, I'm a mod_perl6 response handler!</h1>\n");
$r.puts("Page views for this interpreter: $x\n");
$x++;
0; # Apache OK
}
Seeing working Perl 6 code, especially interoperating with other software, is what Parrot and Perl 6 need to show the community that these two projects, crucial to the future of Perl, are making progress. Bravo, Jeff!
Today Andy Armstrong released Test::Harness 2.99_01, the alpha version of what will become Test::Harness 3. Curtis Poe discusses it in detail in his use.perl.org journal. Test::Harness is the module that takes care of running tests and reporting on the results. When you run "make test" when you install a Perl module, that's Test::Harness.
As the maintainer of Test::Harness 2.x, I'm glad to see this day finally come. The bugs in the Test::Harness queue have been piling up, most of which would require plenty of breakage to fix. I'm seeing Test::Harness 3 as a fresh start.
It's certainly a fresh codebase. As far as I know, no code from 2.x has been brought over, and with good reason. It's old and crufty and has so much stuff bolted on it's a nightmare to work with inside.
Thanks to Andy Armstrong, Michael Schwern, Curtis Poe, Eric Wilhelm, Leif Eriksen and everyone else who has been pushing to make this happen.