Hague Grant Application: Lists, Iterators, and Parcels
Mon, 05-Jul-2010 by
Karen Pauley
edit post
We have received the following Hague Grant application from Patrick Michaud.
Before the Board votes on this proposal we would like to have a period of community consultation. Please leave feedback in the comments or if you prefer send email with your comments to karen at perlfoundation.org.
**Name:**
Patrick Michaud
**Project Title:**
Lists, Iterators, and Parcels -- Synopsis 7, 8, and other general Rakudo improvements
**Project Overview:**
This project will focus on solidifying the design of lists, iterators, and
Parcels in Perl 6 and Rakudo. Over the past several years the Synopses have
gone through successive designs for Perl 6 lists and iterators, and in
implementation all have been shown to have significant flaws or
contradictions to other parts of the specification. Recently I worked
with Larry to prototype a new design for Rakudo Perl 6 based on "immutable
cursors"; this new design appears to neatly resolve the many difficult
issues confounding the earlier designs. This grant proposes to
(1) complete the Rakudo implementation of the new design, (2) rewrite
Synopsis 7 ("Iterators") and Synopsis 8 ("Captures and Parcels") to
document the design, (3) update all remaining Synopses to be consistent
with the design, (4) document key details of Rakudo's implementation of
lists and iterators, and (5) review and update the test suite as appropriate.
**Benefits to Perl 6 Development:**
Lists and iterators are at the core of many of Perl 6's basic features.
Much of the power of Perl 6 comes from its ability to aggressively combine
and exploit the fundamental behaviors of its list structures across
many language features, including laziness, eagerness, flattening
behavior, slices, slurpy lists, pipes and feeds, etc. However, our
experience in implementation has shown that it's quite challenging to
come up with a completely workable design, such that the core design
for lists and iterators has changed many times in the Synopses. As
such, over time the Synopses have accumulated many inconsistencies
due to the different attempts, and the information in Synopses 7 and 8
is almost completely out of date.
In order to achieve a working Perl 6 implementation, the existing
documentation needs substantial updating to reflect the current
design. This will drive needed refinement of the existing
prototype in Rakudo Perl 6, as well as provide a clear roadmap for
other implementations of Perl 6. Having a clear description of
list and iterator semantics has also proven to be critical for the
development of the core libraries and other Perl 6 modules.
**Deliverables:**
D1. Completion of the new list implementation in Rakudo Perl 6.
D2. Reviewed and updated tests for iterables and lists in the official
test suite.
D3. A new version of Synopsis 7 describing Iterator, Iterable, List, and
related classes and roles.
D4. A new version of Synopsis 8 describing Parcels, Captures, and
(to the extent known) Slices.
D5. Updates to S32 API descriptions for Lists, Iterators, Parcels, etc.
D6. A compiler design document and blog postings describing the details
of Rakudo's list and iterator implementation (including how it manages
laziness and eagerness, list flattening and itemization, Parcels
and other list-like structures, vivification of list elements, etc.).
**Project Details:**
The primary focus and work to be performed in this grant will be
to develop a robust specification for Perl 6 iterators and lists
in the Synopses, based on the prototype implementation in Rakudo Perl 6.
Drafts of the updated Synopses will be maintained in the Pugs repository
to invite comments, updates, and feedback from the Perl 6 design team
and other members of the Perl community. There will also be design
team meetings on the phone, in person at conferences, and via email and
IRC.
Updating the synopses with the new iterator and list details will also
undoubtedly require additional refinements and improvements to the
prototype implementation in Rakudo. And, throughout the project the
test suite will be reviewed and updated to improve coverage and quality
of the iterator, list, and related tests.
**Project Schedule:**
The entire project should be completed within approximately two months
from its start date. Work will officially begin as soon as the project
is approved (although some items may start before then to meet other
Rakudo Perl 6 needs).
**Report Schedule:**
At least three interim reports will be provided during this project;
these will typically be in the form of blog postings describing the
grant work and/or many of the details of the design and implementation.
A new report will be posted approximately every other week to use.perl.org.
**Public Repository and License:**
All code and documentation will be developed and stored either in the
standard repository for each component (typically either the Rakudo Perl
or Pugs repositories). All copyrights for this work will be held by
The Perl Foundation, and licensed under the Artistic License 2.0.
**Bio:**
Since 2004 I have been the lead architect, developer, and project
manager for what is now Rakudo Perl (Perl 6 on Parrot), and I recently
led the development of the new design for iterators and lists in
Perl 6. My previous work on Perl 6 and Rakudo provides me with
unique experience and background for achieving the critical deliverables
described by this project.
**Country of Residence:**
United States
**Amount Requested:**
USD $3000
Comments (3)
The last sentence of the proposal is supposed to have the word "achieving", not "archiving".
(The original proposal text had this misspelled as "achiving", so some spell-checker in transit chose the wrong word. :-)
Thanks!
Pm
I think this is really a good idea, and Patrick is certainly qualified. To my knowledge he is the first to have implemented a robust system of lazy lists and iterators for Perl 6. (There was a fairly good pugs backend at some point, but it's quite out of date wrt curernt spec).
I'd just like some clarification about D1: What is actually left to do?
Clarification about D1: Experience has shown that writing the documentation for any implementation almost always results in at least minor tweaks to the implementation itself. And in the case of lists and iterators, the minor tweaks sometimes aren't so minor. D1 covers that.
Pm