Announce: Rakudo Star Release 2015.09

2015-09-26 Thread Moritz Lenz
On behalf of the Rakudo and Perl 6 development teams, I'm excited to
announce the September 2015 release of "Rakudo Star", a useful and
usable distribution of Perl 6. The tarball for the September 2015
release is available from .

This Rakudo Star release comes with support for the MoarVM backend (all
module tests pass on supported platforms).
Please note that this release of Rakudo Star is not fully functional
with the JVM backend from the Rakudo compiler. Support should be
restored shortly.

In the Perl 6 world, we make a distinction between the language ("Perl
6") and specific implementations of the language such as "Rakudo Perl".
This Star release includes [release 2015.09] of the [Rakudo Perl 6
compiler], version 2015.09 of [MoarVM], plus various modules,
documentation, and other resources collected from the Perl 6 community.

[release 2015.09]:
https://github.com/rakudo/rakudo/blob/nom/docs/announce/2015.09.md
[Rakudo Perl 6 compiler]: http://github.com/rakudo/rakudo
[MoarVM]: http://moarvm.org/

Some of the new compiler features added to this release include:

* Great List Refactor (GLR) - See http://design.perl6.org/S07.html
* All Deprecations removed in preparation for Christmas release
* Added support for calling into C++ libraries and calling methods on
C++ classes
* New slurpy parameter, +args or +@args, to allow for one-argument style
binding
* New with/orwith/without conditionals allow you to check for .defined
but topicalize to the actual value returned
* New `supply`, `whenever` and `react` blocks for easy reactive programming
* All Unicode digits can now be part of literal numbers
* `val()` and allomorphic types implemented
* Most European quoting styles are now supported
* New $[...] and ${...} constructs allow prefix itemization
* The .gist and .perl methods can now deal with self-referential structures


Notable changes in modules shipped with Rakudo Star:

* All modules fixed to work with GLR where needed
* Panda now includes JSON::Fast and no longer precompiles to byte code
* Terminal::ANSIColor replaces the deprecated Term::ANSIColor
* New Perl 6 tutorial replaces original perl6 book draft

There are some key features of Perl 6 that Rakudo Star does not yet
handle appropriately, although they will appear in upcoming releases.
Some of the not-quite-there features include:

  * advanced macros
  * non-blocking I/O (in progress)
  * much of Synopsis 9 and 11

There is an online resource at 
that lists the known implemented and missing features of Rakudo's
backends and other Perl 6 implementations.

In many places we've tried to make Rakudo smart enough to inform the
programmer that a given feature isn't implemented, but there are many
that we've missed. Bug reports about missing and broken features are
welcomed at .

See  for links to much more information about
Perl 6, including documentation, example code, tutorials, reference
materials, specification documents, and other supporting resources. A
Perl 6 tutorial is available as docs/2015-spw-perl6-course.pdf in
the release tarball.

The development team thanks all of the contributors and sponsors for
making Rakudo Star possible. If you would like to contribute, see
, ask on the 
mailing list, or join us on IRC \#perl6 on freenode.


Does Perl 6 use $a and $b in sorting?

2015-09-26 Thread Parrot Raiser
Because of the the special significance of $a and $b in Perl 5's sort
comparison, I always avoid using the names in examples, lest it set a
booby-trap for later.

I've noticed "a" and "b' being used in some P6 examples. Are they no
longer significant, or are they just a poor choice of identifier?


Re: Does Perl 6 use $a and $b in sorting?

2015-09-26 Thread Tobias Leich
sort accepts something callable with an arity of 2.

Subroutines, blocks and pointies will do:

say sort { $^a cmp $^b }, 5, 3, 2, 6, 4
OUTPUT«(2 3 4 5 6)␤»

say sort { $^left cmp $^right }, 5, 3, 2, 6, 4
OUTPUT«(2 3 4 5 6)␤»

say sort -> $a, $b { $a cmp $b }, 5, 3, 2, 6, 4
OUTPUT«(2 3 4 5 6)␤»

sub foo($a, $b) { $a cmp $b }; say sort , 5, 3, 2, 6, 4
OUTPUT«(2 3 4 5 6)␤»

The { $^a cmp $^b } form also creates a anonymous sub that has two
parameters, $^a and $^b.
The funny thing about these params is that their position in the
implicit signature is obtained by the
alphabetical order of the parameter names.

So, there are no $a and $b special variables, it is just the common way
of naming them.

Am 26.09.2015 um 18:00 schrieb Parrot Raiser:
> Because of the the special significance of $a and $b in Perl 5's sort
> comparison, I always avoid using the names in examples, lest it set a
> booby-trap for later.
>
> I've noticed "a" and "b' being used in some P6 examples. Are they no
> longer significant, or are they just a poor choice of identifier?