Categories

Posts in this category

Mon, 27 Apr 2009

Perl 6 Tidings from May 2009


Permanent link

Specification

  • masak, ruoso and I worked on the question how method calls could do autovivification, ie how %array{'foo'}.push: 'bar' knows how to build an Array in %arrray{'foo'} if that item didn't exists previously. Sadly the outcome was a bit vague and dissatisfying (r26069).
  • The join method now defaults to the empty delimiter. If you want spaces, you can still use the .Str method to coerce to String, which will add a space between List items (r26129).
  • The strive to make built-in methods and subs not depend too much on the type of the invocant found two new "victims" - string reversing is now done with flip (and reverse always reverses lists), and the hash reversal is now called invert). The new Hash.push method adds items to an existing hash, turning items into Arrays when they would otherwise collide (r26129, r26135, r26182)
  • Listop sigils are gone, so @ @foo Z @bar is now illegal, you either have to write list @foo Z @bar or @( @foo Z @bar). Having only two ways to do the same things is still no violation of the timtowtdi principle ;-) (r26167).
  • when is also a statement modifier now, so you can write say "foo" when 'bar'; (r26241).
  • The prefix = operator for iterating over a file handle is now gone. Instead you can iterate over $handle.lines or get a single one with $handle.get. lines optionally takes a limit. readline is also gone in favor of get. (r26292, r26295, r26299, r26302).
  • Some more bracketing constructs are now allowed wherever any kind of bracket is allow - Unicode-fu above my head (r26401).

Implementations

Rakudo

As happens each month, Rakudo had another release in April, featuring (among other new features) typed hashes and arrays, lexical subroutines and multis, Perl 5 regexes, Unicode character names both in Regular expressions and double quote interpolations, Sockets and many bugfixes.

This is also the first release where Rakudo passed more than ten thousand spec tests (mainly due to the regex improvements).

The Rakudo team is also proud to welcome the first new committer since Rakudo left Parrot's nest: Cory Spencer contributed lots of patches to move built-in subs and methods to the setting (ie the Perl 6 library holding built-ins), thus enabling for example the Trig export, so that you can now say use Num :Trig; to import trigonometric functions.

SMOP

Paweł Murias spent much time bringing re-smop, the refactored version of SMOP, up and running. He will implement multi methods for SMOP as a project for this year's Summer of Code.

Summer of Code

I'm glad to inform you that this year The Perl Foundation will mentor nine Perl related projects, four of which are somehow related to Perl 6 or Parrot: Paweł's project as mentioned above, Hinrik "Literal"'s Enduser documentation for Perl 6 project, Kevin Tew's prototype for an LLVM based JIT core in Parrot, and Daniel Arbelo will plug the libdecnum libraries for large decimal arithmetics into parrot..

These all look like excellent proposals, and all of the students have already proved their hacking skills in some Perl or Parrot projects. I wish them and us the best of luck.

Others

I probably missed this in my last summary, so here it comes: There was a large discussion about a logo for Perl 6 and/or Rakudo. Larry Wall told us both what criteria a logo must fulfill, and what is initial proposal was. So unless somebody comes up with an even better idea, it will be Camelia, a colourful female butterfly.

It also appears on perl6-projects.org, which has gained a pleasing number of occasional contributers.

[/perl-6] Permanent link

Comments / Trackbacks:

Trackback URL: /blog-en/perl-6/tidings-2009-05.trackback

Samuel Harrington wrote


Thanks for doing these summaries! Just mentioning, the links to GSoC applications need passwords. Is there any other place to view them?

Justin Ossevoort wrote

Autovivification
I understand people like te do autovivification and stuff, but this seems a bit like a really crude workaround.

Even in perl5 autovivification didn't work right when using arrayrefs, but perl5 has a shorthand that's makes it usable (although I don't know the operator, but perl6 kan do a similar trick):
push @{$array{'foo'} ||= []}, 'bar';

Sure autovivification is a bit less typing, but this is less magical/more explicit which helps the reader understand what is happening. And I assume it should also be solvable using Parametric Roles / Typed hashes/arrays, which is the elegant (right?) solution IMHO.

Moritz wrote

Perl 6 design
I appreciate your comment, but you can be sure that it'll be pretty much lost here in a blog comment.

If you want to contribute to the language design, please send a mail to perl6-language@perl.org, that's where the discussion should take place.

Hinrik Sigurdsson wrote

About GSoC applications
Samuel Harrington:

Google usually doesn't make the applications, but you can read mine here: http://nix.is/gsoc/

Hinrik Sigurdsson wrote


...make the applications *public*, I meant to say.

Write a comment

The comments on this blog post have been disabled; the comment form below will not work.

 
Name:
URL: [http://www.example.com/] (optional)
Title: (optional)
Comments:
Save my Name and URL/Email for next time