Posts in this category

Tue, 06 Jan 2009

Perl 6 Tidings from January 2009

Permanent link


Jerry Gay continued his work on S19 - Command Line Interface with various improvements and corrections.

Larry Wall clarified the meaning of things like *-1, which can be used in array indexes to access the last element. If a noun starts with a Whatever Star *, it constructs a closure, so *-1 is really the same as { $_ - 1}. The routine that handles the array subscript operator [ ] passes the number of elements to that closure.

Daniel Ruoso asked whether @@a (slice view of array @a) and @a could be made distinct variables, since the originally planned unification between them would imply too much magic to allow an efficient implementation (so far no Perl 6 compiler implements slice context and variables). Larry replied that it's OK to separate them. However that separation didn't make it into the specs yet.

Carl Mäsak published a S29 laundry list, and both encouraged other to work on S29 - Built-in Functions and Methods, and announced that he would try to tackle at least some of the missing items himself.

We've also seen a few spelling and grammar corrections - the move of the Synospis documents to the pugs repository did have a positive impact on hackability.



Since my last update there has been a lot of progress in Rakudo: Arrray and Hash slices (as in @array[1..3, 5]) now work, list assignment (as in my ($x, $y) = 0, 1;) is implemented, and many reduction and some hyper meta operators now work, so you can write things like this:

    my $sum     = [+] 1..10;
    my @product = [*] @numbers;
    my @sum     = @n1 »+« @n2;

Rakudo now passes more than 6000 spec tests. As always you can monitor its progress in the test suite on


The smop developers added support for the return function and control exception, and for integration with a C level coroutine library.

Test Suite

Over the hollidays I spent some time moving tests from the old part of the test suite to t/spec/, in particular tests for object orientation. I also moved many of the tests in t/examples/99problems/ to t/spec/integration/, which is the place for tests that don't correspond to one particular synopsis, but which are common sense, or interaction between features from different synospis. To reduce the number of tests, I merged ten of them into one.

I also noticed with joy that other started to move files to t/spec/ as well, and added more tests.

The moving and test review is still an ongoing task. To give you an idea of the dimensions of the test suite, here are some numbers:

Category Files Plan
spec 461 10272
unspecced 16 108
examples 26 136
pugs 4 38
other 197 7624

The plan is the estimated number of invididual tests. spec menas the part that are official test suite, and are hopefully reviewed. unspecced are tests that people wrote for features they would like to have, but that aren't covered in the synopsis. They will only make it into the official test suite if the language design team decides that these features are desirable, and make it into the specs. examples should be self-explanatory. Some of them will likely be moved to t/spec/integration/. The same holds true for xx-uncategorized, which is full of assorted tests. pugs are the pugs specific tests. other is the whole rest of the not yet moved tests, all of which need some review.

Cool Uses for Perl 6

Carl Mäsak started the implementation of a cool, 2½-D board game named Druid.

A note to Implementors

You have probably noticed that these roughly monthly tidings are mostly about the Spec, the test suite and Rakudo. That's not because I want to neglect the other implementations, but because it's hard to actually get news from them.

I read the mailing lists (p6l, p6c, p6u), the blogs, I'm on #perl6 quite often, and try to backlog when I'm not.

I can only encourage all compiler hackers and users to blog about their progress and challenges (and, if it's not already there, get it included in the planetsix feed by sending a mail to the webmasters). If you don't want to write a full-blown blog entry, just drop me a line on IRC about your progress and its impact, and I'll include it in my next "tidings" post.

[/perl-6] Permanent link