December 28, 2009

Seven Days between the Parrot and the Camel

from Monday, December 21 to Sunday, December 27 in the year 2009

Considering the Language:

The spec remained quiet during Christmas.

Considering Rakudo:

Apart from some core setting work by Solomon Foster and David Romano, the ng branch was silent.

The master branch learned :s for getting file sizes.

Considering Parrot:

Work is going on to make PIRC easier to build. (PIRC is an alternative PIR compiler with a yacc/bison grammar and a flex-generated lexer. It is meant to replace the IMCC compiler.) The pirc_config branch has been created for adding a --pirc configure option. The goal is to make using PIRC an option before Parrot 2.0.

Will Coleda (a.k.a coke) improved the optional automatic testing of make dependencies (tools/dev/ and fixed many of the reported errors.

Christoph Otto cleaned up the description of the bytecode format in PDD 13 and made packfiles somewhat smaller and faster by omitting redundant pc → filename mappings.

Peter Lobsinger and Kevin Tew continued work in the pmc_freeze_cleanup branch that aims at cleaning up and unifying PMC freeze/thaw serialization and packfile reading/writing.

Geoffrey Broadwell has completed the migration of plumage glue code to nqp-rx. All regexes are written in nqp-rx now, so PGE is no longer required. All plumage-specific code has been removed from Util.nqp in order to prepare the file for possible inclusion as a library in the nqp-rx distribution. However, Util.nqp still needs tests and a ticket has been opened in order to encourage contributors. There is also a document explaining how to add tests to plumage.

[As mistakenly reported for week 51,] Bob Kuo, a.k.a. bubaflub, celebrated his new commit bit with a firework of changes, converting many further tests to PIR among other things.

December 22, 2009

Seven Days between the Parrot and the Camel

from Monday, December 14 to Sunday, December 20 in the year 2009

Considering the Language:

The Cool class appears, an ancestor for all classes that are willing to convert their values in order to support the "culturally universal" methods defined in Cool (for example .abs or .substr). The mutable Cool namespace will also contain the multi methods of last resort that are searched if normal multiple dispatch does not find a viable candidate. All built-in classes except junctions and Whatever derive from Cool. User-defined classes do not derive from Cool by default.

The verbs for leaving a when block early will be proceed and succeed (instead of the false friends continue and break). proceed resumes execution after the closing curly of the when block. succeed immediately leaves the surrounding topicalizer block.

The loose prefix operator for testing truth has been renamed from true to so in order to make it more distinct from True and shorter than not.

The REJECTS method has been removed. The negated smart match operator !~~ will use !foo.ACCEPTS instead.

Picking from baggy containers has been refined. A separate .grab method will do a mutating .pick which removes the selected element (once) from the container. When used without replacement, .pick will keep a private temporary copy of the Bag and .grab from that. The .pickpairs and .grabpairs methods will treat each key/replication count pair as a single item to pick (and remove).

Considering Rakudo:

Shortly after Parrot's 1.9.0 release, the Rakudo master branch was released as development release #24 ("Seoul"). Due to spectest changes, this release passes fewer tests than #23, but the relative percentage of passed tests has increased. The most visible changes in #24 are the switch from Object to Mu and the removal of undef.

In the ng branch, Jonathan Worthington reimplemented does in terms of the meta-model, not relying on Parrot's primitives. Work continued to make more spectest pass with the ng branch.

Considering Parrot:

Gerd Pokorra released Parrot 1.9.0 "Blue-fronted Amazon" on December 15. Among the most notable changes are the greatly improved nqp-rx compiler and the extensible profiling runcore.

The Parrot developers held a roadmap meeting, identifying priorities for upcoming Parrot milestones. An important outcome was the change to a shorter 3-month support cycle. Parrot development for 2.0 and 2.3 will focus on the needs of Rakudo *.

The context_unify3_simple branch by Vasily Chekalkin landed and merged the Context and CallSignature PMCs into CallContext. The branch is a descendant of context_unify3 that omits some more involved changes to context creation.

In the pmc_freeze_cleanup branch created by Peter Lobsinger, the Parrot developers are busily cleaning up and merging freeze/thaw serialization and the PBC bytecode format. The new code uses the visit_info struct as its pivot and keeps out of string internals.

François Perrad continued to improve distutils and languages infrastructure.

Bob Kuo, a.k.a. bubaflub, celebrated his new commit bit with a firework of changes, converting many further tests to PIR among other things.

December 13, 2009

Seven Days between the Parrot and the Camel

from Monday, December 7 to Sunday, December 13 in the year 2009

Considering the Language:

Role composition rules changed so the collision of has attributes with the same name will always be considered a conflict, even if their types happen to match.

The p{...} quoting construct for filenames has been removed in favour of the :p modifier, so paths will be written as q:p{...}, or qp{...} in short.

Bare say and print were reduced from errors to warnings. Upon a question about useful defaults, Larry Wall explained that Perl 6 will free the programmer from memorizing arbitrary lists of special cases. He also pointed out the concise forms .say and .print for printing the topic.

Considering Rakudo:

On the Rakudo ng branch, Jonathan Worthington continued work on the meta-object protocol, filling in more parts of role composition. Attributes are now properly composed into packages by calling the compose method on the meta-attribute. For initialized attributes, a build closure is passed along. The RoleHOW meta-class moved towards independence from Parrot's Role PMC.

Notably, the does and but operators for mixing in roles are now written entirely in Perl 6, and the role appliers are NQP classes with only a little Parrot-specific code.

Jonathan Worthington also added a first sketch of an implementation of enumeration types.

Solomon Foster, Moritz Lenz, and Stephen Weeks did more work on the core setting. As of this writing, the ng branch passes over 2400 spectests.

In the nqp-rx repository, Patrick Michaud started to rewrite the HLL::Compiler class in NQP.

Considering Parrot:

Christoph Otto refactored the profiling runcore to allow multiple output formats. Currently it supports the human-readable pprof format and the silent none format (for profiling the runcore itself). Plans are to add binary output and output in callgrind format. The updated runcore also supports recording annotations in pprof files. Environment variables are used to control these features.

Working on the last part of his Hague grant, Patrick Michaud committed a new draft for PDD 31 on HLL compilers and interoperability.

The running of :immediate, non-:anon subs is now delayed when writing PBC bytecode, so the subs can run during reading PBC, which should make .const more usable for HLLs (as :immediate subs may set up things for creating the constant data from the bytecode).

Vasily Chekalkin created the context_unify3 branch in the third attempt to merge the CallSignature and Context PMC types. The unified PMC will be known as CallContext.

Bob Rogers posted a proof-of-concept patch for unwinding nested runloops upon the invocation of an exception handler.

Peter Lobsinger is looking into merging the PBC bytecode format and the freeze/thaw serialization format for PMCs.

The December 12 pre-release hackathon focused on removing uses of the strstart field outside the string internals. However, many occurrences cannot be replaced easily, and Andy Dougherty and Patrick Michaud warned about breaking code for cases of substrings that may not be tested.

A lot of cage cleaning happened this week: JimmyZ contributed many patches to make PMC code use GET_ATTR and SET_ATTR macros. Bubaflub converted further tests to PIR. François Perrad improved C code indentation in areas not yet tested by codingstd.t. Michael H. Hind fixed g++ build failures.

Geoffrey Broadwell added Mercurial support to plumage and documented how to add new build tools to the system.

December 09, 2009

Seven Days between the Parrot and the Camel

from Monday, November 30, to Sunday, December 6, in the year 2009

Considering the Language:

Enumeration types will be collections of Enums, that is of pairs with constant values (formerly known as PairVals). Like a Pair, an Enum has .key and .value, but both are read-only. An (anonymous) enum declaration creates an EnumMap, a sequence of Enums, the values of which are determined at compile time. An .enums accessor will be provided by enumeration types to get at the associations (instead of .mapping), and by other containers as a read-only analog to .pairs.

The collection types EnumMap and its modifiable value analog PairMap (a sequence of Pairs) will do roles for both positional and associative access. At the implementation's discretion, the latter may use anything from linear scan to optimized hash-like lookup.

The mixins created with but fall into two categories: Mixing in an enumeration type adds a modifiable attribute. Mixing in a value adds a read-only accessor method. The attribute added for rw mixins starts out uninitialized, unless a WHENCE closure is given.

Considering Rakudo:

While the master branch remained quiet except for an improvement of Rat operators, the ng branch continued to be the focus of development. In the course of his work on the meta-object protocol, Jonathan Worthington implemented role to instance application. Stephen Weeks committed a first draft of CATCH and CONTROL. Solomon Foster and Moritz Lenz restored many parts of the core setting, and perlpilot added while and until statement modifiers.

Stephen Weeks plans to implement lazy gather and take, but is blocking on the redesign of Rakudo's iterator interface.

Meanwhile, nqp-rx acquired an initial version of the smartmatch operator, the /.../ construct for writing regexes and improved longname syntax.

Considering Parrot:

Garbage collection gained further attention when Patrick Michaud posted an observation about heavy GC overhead which he presumed to be caused by a small number of mortal but long-lived objects and inefficient marking. Contrariwise, chromatic attributed the overhead to the large number of short-lived objects generated internally by the Parrot Calling Conventions (PCC). Both supported their arguments with interesting experimental data.

Various approaches were suggested, among them separate pools for immortal and PCC objects, combining objects to superobjects with escape pointer lists, stack allocation, and avoiding needless autoboxing.

Traces of recycled objects showed pointless GC runs during startup, which led to an adjustment of the replenish level factor.

Vasily Chekalkin merged the CallSignature and CallSignatureReturns PMC types in order to reduce the number of objects created. This change improved the fib.pir benchmark by 7%.

PCC learned to use the HLL type map when autoboxing values.

Patrick Michaud questioned the deprecation of label-based exception handlers, which led to discussions of continuations invoked as/by exception handlers and the resulting inferior runloop problem. [To the reporter's understanding this problem arises when an exception handler declared in one runloop is invoked in another (nested) runloop and then resumes execution by falling through to the surrounding code.] The general consensus seemed to be that while nested runloops should be removed on the long term, an intermediate solution — e.g. an explicit opcode for resuming execution in the runloop declaring the handler — was needed.

Jonathan Leto provided microbenchmark results for past and present parrot versions.

The question was raised whether PIR should get an __END__ tag, but the response was mostly negative.

François Perrad committed many additions to and refactorings of distutils.

Geoffrey Broadwell reports that 80% of plumage refactorings are done and that it is time to add new features again.