November 22, 2009

Seven Days between the Parrot and the Camel

from Monday, November 16, to Sunday, November 22, in the year 2009

Considering Parrot:

The Parrot trunk remained mostly quiet after release 1.8.0 went out, while the Parrot developers finished the move from rt.perl.org to the Trac issue tracker in a burst of activity. James Keenan, in particular, did a huge amount of ticket updates and documentation fixes.

Most notably, nqp-rx, Patrick Michaud's self-hosting reimplementation of "Not Quite Perl" and Perl 6 regexes, is now distributed along with Parrot and gaining new users. Among them is plumage which became the source of several nqp-rx feature requests.

François Perrad's build system "distutils" saw many additions, among them an update step, smoke target, plumage target, and a Win32 Inno installer target.

Similar to PMCNULL, STRINGNULL is now available for representing the lack of a STRING.

Addressing the needs of HLL developers, chromatic implemented several performance improvements, squeezing over 12% [reporter's calculation] out of the nqp-rx Action.pm benchmark. Most of this is due to the addition of a method cache in the Object PMC and special-casing of hot paths in the Hash PMC.

A new mailing list parrot-users (with group) was installed so language authors can seek assistance undisturbed by the sounds of Parrot's internal machinery.



Considering Rakudo:

Development release #23 "Lisbon" was cut from master, but most of this weeks activity took place on the new "ng" branch where Patrick Michaud and Jonathan Worthington are quickly rebuilding Rakudo's internals using nqp-rx. As more features become available, contributors are starting to implement parts of the core setting in Perl 6.



Considering the Language:

The seventh meta-operator S appears with the ability to attach a sequence point to any non-fiddly infix operator. The resulting operator guarantees that its operands are evaluated sequentially and that shortcuts are taken where applicable. Former also is now spelled S&, and the junctive sequential else -- which only made a brief occurrence -- is spelled S|.

An area that might still need some sorting out is the combination of the sequencing S with the reversal meta-operator R. Conjecturally, application of R reverses the sequence of evaluation along with the operands, i.e. a RS/ b evaluates a first and b second, while a SR/ b evaluates b first and a second.

The semantics of rational numbers were elaborated and balanced between precision and performance. FatRats joined the pack providing arbitrary precision in both numerator and denominator at any cost. The parametric Rational role serves as the general abstraction for rational numbers, analogous to Integral for integers.

The stringification prefix ~ got divorced from .Str. Unary ~ imposes a Stringy context and -- like Perl 5 stringification --, will turn undefined values into the empty string (with warning).

Slightly changing, constant now considers itself a type declarator, declaring a type that has a single value determined at BEGIN time (so the optimizer can inline its uses). Scope declarators as in my constant, has constant, etc. can be used to specify visibility and storage location. By default constants (like enums) get our scope.

A new scope declarator, anon, can be used to create anonymous subs with "of" type (i.e. anon Foo sub {...}), so you don't have to abuse my or our for this purpose.

The "void" context got tentatively renamed to "sink". (Like its big sister, Perl 6 has three main contexts (sink, item, and list) controlling whether an expression should yield none, one, or many of its values.)

Parcel semantics got some attention this week and the is ref parameter trait changed to is parcel. Larry encourages us to spell \$p instead of $p is parcel, however, as the trait is mainly meant for introspection. (As every language feature needs its antagonist, Parcels show up when context is not called for. They provide a way for passing data without imposing context.)

In other cont...areas the heavily overloaded word "context" was allowed to drop some of its burden: "contextual" variables became "dynamic" variables and are now accessible via the DYNAMIC pseudo-package. Things formerly known as "dynamic contexts" or "activation records" are now simply "call frames".

2 comments: