Categories
Posts in this category
- A shiny perl6.org site
- Creating an entry point for newcomers
- Sprixel, a 6 compiler powered by JavaScript
- Another perl6.org iteration
- Blackjack and Perl 6
- Why I commit Crud to the Perl 6 Test Suite
- Report from the Perl 6 Hackathon in Copenhagen
- Custom operators in Rakudo
- Defined Behaviour with Undefined Values
- Dissecting the "Starry obfu"
- Perl 6: Failing Softly with Unthrown Exceptions
- The first Perl 6 module on CPAN
- Google Summer of Code Mentor Recap
- Building a Huffman Tree With Rakudo
- Immutable Sigils and Context
- Is Perl 6 really Perl?
- Perl 6: Lost in Wonderland
- Lots of momentum in the Perl 6 community
- Musing and the future of feather and the Pugs repository
- Musings on Rakudo's spectest chart
- My first executable from Perl 6
- Trying to implement new operators - failed
- Let's build an object
- Perl 6 is optimized for fun
- How to get a parse tree for a Perl 6 Program
- Perl 6 in 2009
- Perl 6 ticket life cycle
- The Perl 6 Advent Calendar
- How to Plot a Segment of a Circle with SVG
- Publicity for Perl 6
- Rakudo architectural overview
- Rakudo Rocks
- Rakudo "star" announced
- Rakudo's rough edges
- Rats and other pets
- Releasing Rakudo made easy
- Set Phasers to Stun!
- Starry Perl 6 obfu
- Recent Perl 6 Developments August 2008
- Strings and Buffers
- Subroutines vs. Methods - Differences and Commonalities
- A SVG plotting adventure
- A Syntax Highlighter for Perl 6
- Test Suite Reorganization: How to move tests
- The Happiness of Design Convergence
- Perl 6 Tidings from September and October 2008
- Perl 6 Tidings for November 2008
- Perl 6 Tidings from December 2008
- Perl 6 Tidings from January 2009
- Perl 6 Tidings from February 2009
- Perl 6 Tidings from March 2009
- Perl 6 Tidings from April 2009
- Perl 6 Tidings from May 2009
- Perl 6 Tidings from May 2009 (second iteration)
- Perl 6 Tidings from June 2009
- Perl 6 Tidings from August 2009
- Perl 6 Tidings from October 2009
- Timeline for a syntax change in Perl 6
- Visualizing match trees
- We write a Perl 6 book for you
- When we reach 100% we did something wrong
- Where Rakudo Lives Now
- Why was the Perl 6 Advent Calendar such a Success?
- What you can write in Perl 6 today
- Why you don't need the Y combinator in Perl 6
Mon, 04 Jan 2010
Perl 6 in 2009
Permanent link
Much has happened in the Perl 6 land in 2009. Here is my humble attempt to summarize some of it; If you find something that I missed, feel free to contact me, I'll try to add it.
Specification
The year started with lots of improvements to S19. In January we also learned
that *-1 constructs a closure, which means that Perl 6 has
semi-automatic currying features built into most operators.
Lists, Captures and Parcels
We've seen a lot of talk about slices, lists, captures and parcels.
The heart of the discussions is always how interpolation and non-interpolation
of lists can be made both flexible and intuitive. For example: should 1,
2, 3 Z 'a', 'b', 'c' return a single, flat list? or instead a list of
lists? How can a function which receives the result decide for itself what it
want to receive? How does that mix with multi-dimensional arrays?
I haven't followed these discussions very closely, and so I'm hard pressed
to give a good summary; however it seems that in the end an agreement was
reached: each parenthesis constructs a Parcel, short for
Parenthesis cell. A Parcel can
behave context sensitively: A single-item Parcel degrades to its contents; as
a signature list it is converted to a Capture object; code object
also return parcels.
It remains to be seen how multi-dimensional slices (with the
@@ sigil) evolve, and if we can't find anything suitable to
replace them.
Built-in Routines
S29, the list of built-in functions and methods, finally got some long awaited attention in 2009, starting with Carl Mäsak's S29 Laundry List, and later carried on by Timothy Nelson, who split S29 into a set of documents summarized as S32.
In December it was decreed that most built-in
methods have a candidate in a new class Cool, (Convenient
OO Loopbacks), of which all value types and container types in Perl 6
inherit. That way maximal DWIMyness can be retained, while keeping user
defined types clean of the more than hundred methods defined in Cool.
It is rather perlish to have a distinct name for each operation,
and make it coerce its arguments. A few exceptions exist in Perl 5 (like reverse, which is
list reverse in list context, and string reverse in string context); in
Perl 6, most of these exceptions have been removed: reverse now
only reverses lists, strings are reverted with flip, hashes with
invert.
At the Nordic Perl Workshop, Larry decided that the
prefix:<=> operator had to go, and replaced it with the
.get and .lines methods.
Operators
The Cross Meta Operator is now Xop instead of
XopX; in analogy the R meta operator reverses the
argument list, so $a R- $b is the same as $b -
$a.
Ranges served two purposes: one for denoting ranges in the sense that the
mathematicians use them, and for generating lists according to simple
schemes. These two functions have been separated: ranges are still constructed
with two dots, but the :by adverb is gone; more intricate, lazy
list generation can be achieved with the new series operator:
.say for 1, 1.1, 1.2 ... 5; .say for 1 ... *+0.1, 5;
Numbers
The above actually works, and doesn't suffer from floating-point
arithmetics, because 0.1 isn't stored as a floating-point number,
but rather as a fractional number of type Rat.
Other languages decided against that approach, because some very simple loops quickly produce rather large numerators and denominators, degrading performance of the integer operations. Perl 6 instead has a limit in denominator size, and falls back to floating-point operations when that limit is crossed.
Implementations
Rakudo
A lot of work has been done in Rakudo; in fact it's hard to remember how it used to be in January 2009; Most features were implemented by Patrick Michaud and Jonathan Worthington, but we had a lot of other contributors too.
In January, Rakudo left the Parrot repository and since then lives on github as a git repository. It now relies on an installed parrot.
Rakudo implements many new features and lifts old limitations:
- Many built-in routines are now written in Perl 6
eval()and classes now have access to outer lexical variables- Much improved Unicode support, both in IO and regular expression
- punning of roles when
.newis called - Typed arrays and hashes, parametric roles
- Routine return types are now enforced
- Error messages now contain backtraces with filenames and line numbers
- Multi dispatch is now implemented with a custom dispatcher and signature binder, bringing much improvements over the dispatch and binding semantics that parrot supports.
- User-defined operators now possible, and automatically generate some of their associated meta-operators.
- Contextual variables
- User-defined traits are now possible; some of the built-in traits are now written in pure Perl 6.
- Rational numbers are now implemented, and support for Complex numbers has been much improved.
- routine signatures can now be introspected properly.
SMOP and Mildew
SMOP and Mildew have seen a major refactoring, connected to the changed semantics of slices, captures and parcels, and to the way method invocations are stored.
Paweł Murias implemented multi dispatch as a Summer of Code project. Mildew now supports an impressive set of features, but since it is not very user oriented, I know of no projects that actually use mildew as a platform.
Other implementations
Elf development seems to have stalled. Pugs mostly sleeps, too, though Audrey updated it to work with the latest Haskell compilers. (It doesn't live in the Pugs repository anymore though, and is distributed by cabal, the Haskell package manager).
New in the field are Sprixel, a Perl 6 to Javascript compiler, and vill, an experimental LLVM backend to STD.pm+viv.
Test Suite
The test suite continued to grow; most tests have now been moved to
t/spec/, the official Perl 6 test suite. Most tests in the other
remaining files are either rather dubious, or rely on behaviour that's not
officially specified (or are specific to an implementation).
Many new tests have been contributed by two new faces: Solomon Foster contributed a large number of tests for trigonometric functions on the various number types, and rational and complex numbers. Kyle Hasselbacher provided us with many regression tests for Rakudo which are also useful to other implementations.
Documentation
Bemoaning the fact that Perl 6 has nearly no user-level documentation, Carl Mäsak started u4x, User-Level Documentation for X-Mas. Hinrik Örn Sigurðsson chimed in, and started to write grok, a tool for retrieving and showing documentation, sponsored by the Google Summer of Code project.
Patrick Michaud, Jonathan Worthington, Carl Mäsak, Jonathan Scott Duff and Moritz Lenz started to work on a Perl 6 book, with a few chapters already being written.
Websites
In an attempt to provide an up-to-date link list, Moritz registered perl6-projects.org and collected links. Later Susanne "Su-Shee" Schmitt contributed a nice design, and Daniel Wright made the domain perl6.org available to us.
So we now have a community driven, central Perl 6 site at perl6.org.
Leo Lapworth redesigned perl.org, and also the old Perl 6 development page, and updated it a bit.
Blogs
As an attempt to improve the visibility of the Perl community, Matt S. Trout issued the Ironman Perl Blogging Challenge. So far it's a huge success, and quite a few hackers blog about Perl 6 there. Also the blog roll of the Planetsix Blog Aggregator continued to grow, some excellent new blogs were added in 2009.
Carl Mäsak blogged at least once per day in Novemeber, same procedure as least year :-)
IRC
The #perl6 IRC channel has been very pleasant and active in 2009, with three times the activity of 2008.
The Future
For April 2010 the Rakudo developers have planned a big release called Rakudo *, not feature complete but still useful and usable. Around the same time the new Perl 6 book will be released.
The specification is still evolving, and has some areas that are in need of implementation before they can evolve more; among them are macros, concurrency and IO.
Update: improved floating point example as per comment from Matthias.