2015.34-40 Birthday!

It has been waaaaay too long. A lot has happened in the past 7 weeks. Seven weeks in which large parts of the internal machinery of rakudo Perl 6 were replaced by a new shiny set of features. In which several key features that were on the Christmas list, finally got implemented. And which saw some other very interesting developments. I will try to summarize them, please let us know if I missed anything important. But first:


Rakudo Perl 6’s version got officially bumped on the 27th.

$ perl6 -e 'say $*PERL'
Perl 6 (6.Birthday)

Guess why? Happy 61st, Larry!

New Rakudo Star

A new Rakudo Star 2015.09 has been made available by Moritz Lenz. All of the modules in there have been made to work with the post-GLR rakudo Perl 6. It’s the best way to quickly get up to speed with Perl 6!

The Dust Is Settling

Well, sort of. The Great List Refactor (GLR) has basically been done. For developers using Perl 6, the most important change is probably the way flattening is now done in Perl 6.

Perl 6 only flattens Iterables automatically if there is 1 argument specified.

This so-called “One Argument Rule” now makes flattening consistent throughout Perl 6 (whereas before it wasn’t, unfortunately). What does this mean? Well, in (very) short:

my @a = ^3;
for @a { # flatten because 1 argument
} # 0␤1␤2␤ (3 iterations)

for @a,@a { # no flattening, because 2 arguments
} # 0 1 2␤0 1 2␤ (2 iterations)

But what if you do not want to flatten? Well, than you can itemize, e.g. by prefixing it with a $:

for $@a { # do not flatten because itemization
} # 0 1 2␤ (one iteration)

And what if you do want to flatten? Then you should slip it, e.g. by prefixing it with a |:

for |@a,|@a { # flatten because of slip
} # 0␤1␤2␤0␤1␤2␤ (six iterations)

Supporting this pattern in Perl 6 is now so common, that a new signature has been developed for this: +:

sub foo(+@bar) { .say for @bar }
foo(@a); # 0␤1␤2␤ (3 iterations)
foo($@a); # 0 1 2␤ (one iteration)
foo(@a,@a); # 0 1 2␤0 1 2␤ (2 iterations)
foo(|@a,|@a); # 0␤1␤2␤0␤1␤2␤ (six iterations)

That, in a nutshell, is how the Great List Refactor turned out for developers using Perl 6. Internally, a lot more has happened of course. Check out new spec of S07 – Lists if you want to know more. Or just ask the fine folks of #perl6 in irc.freenode.org.

Larry’s Birthday Present To Developers

On his birthday, Larry answered a long standing question by many developers with regards to whitespacing of method calls on objects. So, since then, you can align method calls using whitespace:

  .grep( * %% 2 )
  .grep( * %% 5 )
  .say # (0 10 20 30 40 50 60 70 80 90)

Or as Larry put it in the commit message:

As much as I mistrust “fluent” programming, we already have an infix:<.=> operator, so it’s not a big stretch to have infix:<.>. We limit it to actual method names so that we can detect (most) accidental use of P5’s use of . for concatenation. Note that this is a term/infix distinction now, so .meth where a term is expected still defaults to $_. Community standards for method cascades will likely ask for whitespace around infix:<.> to make a visual distinction from the term form, but we don’t enforce that, if for no other reason than to refrain from giving the fluent programmers something to yammer on about. Basically, I’ve decided that the slight possibility for greater confusion is outweighed by consistency with .= and utility of have a . that can also serve as a precedence modifier. (Since both .= and . parse leftward with item assignment precedence, but rightward as a term.)

Other notable changes

Each of these changes involved a lot of work by the people involved. This is really just the tip of the iceberg:

  • All deprecations have been removed
  • .return with $foo will now return $foo if defined
  • <42> is now an allomorphic value (either Int or Str)
  • .gist/.perl methods can now deal with self-referential data-structures
  • can now call into C++ libraries and methods on C++ classes
  • most European quoting styles are now supported
  • runaway quotes are now properly detected and reported
  • to facilitate proper development of S11/S22, 🐼 (panda) temporarily no longer installs precompiled module versions

Perl 6 Core Development Grant

Jonathan Worthington submitted his grant completion report to the Perl Foundation. He would like to continue working this way: if you feel he should, please leave a comment to that effect here. Please note that any additional work by Jonathan on this grant, has also been made possible by a generous donation from Oetiker & Partner.

Pittsburgh Perl Workshop

It looks like there will be two Perl 6 related presentations at the PPW 2015, on 10/11 October.

The week before that, on 5 October, Larry will also give Perl 6 presentation at The Kanbar Forum in the Exploratorium, San Francisco.


Blog Posts


Other Notable Links In The Backlog

Ecosystem additions

Thank you, brave souls, who kept adding modules to the ecosystem during the turmoil that was GLR, and who made their modules running after the GLR.

Closing down

That was quite a blog post to read (let alone to write). Next week, we hope to be able to present a more normal sized Perl 6 Weekly. Until then!


2 thoughts on “2015.34-40 Birthday!

Got something to note?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s