Interim Grant Report: Lists, Iterators, and Parcels

No Comments

Patrick Michaud writes:

This is an interim report for my Hague Grant on Lists, Iterators, and Parcels. This report has been far too long in coming; at the time of the original grant proposal (July 2010) it was expected that the design and implementation of Perl 6 lists and iterators was near completion, and that most of what remained to be done would be updating the documentation, tests, and Synopses.

Since that time we've essentially learned that the design as of July 2010 still had some holes in it, especially in the area of performance, and thus I have been working to solidify the underpinnings of both. The lists and iteration implementation in Rakudo 2012.07 is some 40 to 50 times faster than the one that existed at the time of the original grant proposal, and is now written almost entirely in Perl 6 instead of PIR.

As of this report, we now have an updated draft of Synopsis 7 that reflects the best understanding of Perl 6 lists and iterators as of July 2012. In addition, I have given several presentations at YAPC::EU 2011 and YAPC::NA 2012 (1 2) on Perl 6 lists and iteration. The draft is still a draft, even as recently as June 2012 there have been some questions regarding the funamental semantics of Perl 6 lists that may affect the ultimate design. I am currently working with people on #perl6 and the Perl 6 design team to resolve the remaining issues and have them fully documented.

Here is the status of the deliverables identified in the original report:

D1: (Completion of the new list implementation in Rakudo Perl 6.) The list implementation referred to in July 2010 was essentially completed in the following month, but it became quickly apparent that it had performance problems. In Spring 2011 the list code was completely reimplemented in Perl 6 as part of the "nom" branch of development and was about 2x faster than previously. Since then several improvements and refactors have been made to basic list and map operations such that list handling is now 40x to 50x faster than it was in 2010.

More changes are left to be made; there are still some spec-related questions regarding the handling of Parcel flattening and combining of lists, which are waiting on input from the Perl 6 design team. I expect these to be resolved within the next six weeks.

D2: (Review and updated tests for iterables and lists in official test suite.) All of the existing tests have been updated for compliance with the current Lists and Iterables implementation and description. A new section in the test suite is being created to specifically test the features defined by the new Synopsis 7 draft. A key focus of this additional section will be to explicitly document and enforce the list-related design decisions that have been made by the design team over the past several years of development.

D3: (A new version of Synopsis 7.) A draft of a new Synopsis 7 has been checked into the perl6/specs repository. [3] Over the next couple of weeks it will be enhanced with detailed descriptions of List-related methods and functions, as well as incorporate any new decisions made by the design team.

D4: (Update Synopsis 8.) After working on drafts of Synopsis 7, it seems that it will make more sense to document the Parcel and Capture classes directly in Synopsis 7, rather than in a separate synopsis. The handling of slices has changed somewhat since July 2010, and now belongs more naturally in Synopsis 9 (which already covers a fair bit on slicing). The end result of this grant will likely be to eliminate the current Synopsis 8 document, leaving the slot open for documentation of some other Perl 6 feature dealing with data structures (perhaps hash-related items will go here).

D5: Updates to Synopsis 32 will be held until D1, D2, and D3 above are nearing completion.

D6: As mentioned earlier, several presentations have been made regarding List implementation in Perl 6; the material from these presentations will be translated into blog posts over the next couple of months (and updated to reflect changes from deliverables above).

Rakudo users have all remarked at the improvements in list handling over the past couple of years; Rakudo lists now handle infinite sequences and lazy behaviors in a much more intuitive manner than existed in July 2010. What remains to do in this grant is to iron out a few of the remaining details with the design team, document them, add more tests reflecting the decisions made, and write up the final reports and blog postings. In spite of the delays that have occurred thus far with this grant, I believe we are now at a point where the remainder of this grant can be completed within the next two or three months.

Leave a comment

About TPF

The Perl Foundation - supporting the Perl community since 2000. Find out more at www.perlfoundation.org.

About this Entry

This page contains a single entry by Karen published on July 31, 2012 2:42 PM.

TPF Now Accepting Nominations for Conferences Committee Chair was the previous entry in this blog.

Cooking Perl with Chef - Grant Report #4 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.38