Jonathan Worthington has submitted a request for an Ian Hague Perl 6 development grant for his proposal "Rakudo Dispatch and Role Enhancement". A part of the Hague grant process is that submitted grant requests may, as opted by the submitter, be provided for public and community comment.
Jonathan's grant request is included here, below. Any interested Perl community members may provide their comments regarding this grant request here.
Name: Jonathan Worthington
Project Title: Rakudo Dispatch and Role Enhancements
Less than a year ago, Rakudo implemented just a small fraction of the Perl 6 language specification, passed very few of the spectests and was far from ready to develop any real software with. By contrast, today Rakudo supports a wide range of Perl 6 features, passes over 4,000 spectests, can run as an Apache module and is being used to implement a November, a wiki.
Even though it has been a year of great progress, there still remains a lot of work to do to make Rakudo into a complete, production-ready implementation of Perl 6. This project aims to add some of the missing major OO and type-related features that are specified in the Perl 6 synopses, mostly in S12, and which are required to bring us closer to a complete Perl 6 implementation.
Benefits to Perl 6 Development:
All items listed in the deliverables of this proposal are required in any full implementation of Perl 6.
D1. Register symbols in the namespace at compile time, allowing elimination of current "types must start with upper-case letters" hack and detection of re-defined routines, as specified in S06 and S12
D2. Implementation of junction auto-threading, as specified in S09
D3. Implementation of submethods, as specified in S12
D4. Finish implementation of delegation ("handles" trait verb), as specified in S12
D5. Implementation of parametric roles, as specified in S12
D1 involves removing a hack that has seen us through the early stages of Rakudo, making sure classes really are composed and installed in the namespace at compile time.
D2 through D4 all involve work on the dispatcher. Therefore, there will likely be an initial refactor that paves the way for them, followed by getting each of them in place after it. Here are some notes on each of them.
D2: Currently, we have some junction support, but instead of being hard-coded as it is now, it should really all fall naturally out of the dispatch mechanism. Furthermore, since the dispatch mechanism doesn't currently account for junctions, dispatches with junctional parameters don't auto-thread when they should.
D3: We don't currently implement submethods at all; they are needed to move us closer to a complete S12 implementation.
D4: We currently implement some use cases of the "handles" trait verb on attributes. However, they should also be available on methods. Furthermore, only strings and pairs are currently available; the specification allows for a role or class to be mentioned as well as regex or substitution to be used for * as a wild card.
Rakudo currently has a basic implementation of roles. However, roles can also take parameters, which may form part of their long name (essentially, multiple roles share the same short name but with different long names - just like multis). D5 involves implementing this.
Assuming this grant is approved before/in early December:
December 2008: D1 mostly complete, dispatcher refactored in preparation for D2 through D4, D3 complete
January 2009: D1 through D4 complete, progress on D5 to the point where can declare and do a parametric role (differentiation of roles by their long and short names)
February 2009: Completion of D5
Blog posts (at least one for each deliverable) will be made throughout the duration of the work on rakudo.org blog as well as my blog on use.perl.org.
All code, documentation and other relevant files that relate to Rakudo and Parrot will be checked into the Parrot repository (or a separate Rakudo repository if Rakudo is moved out of the Parrot repository while this work is taking place). All contributions to the specification tests will be checked into the Pugs repository.
Grant Deliverables ownership/copyright and License Information:
All work on produced as a result of this grant will be licensed under the Artistic License Version 2.0. I already have signed the relevant CLAs for both The Perl Foundation and The Parrot Foundation regarding ownership.
I first started contributing to Parrot in 2003, and since then have contributed to both the design and implementation of Parrot. I have been involved in Rakudo development since December 2007, and have implemented a wide range of features, with a focus on the object model and the type system. In addition to writing code, I am also a frequent speaker on Perl 6 and Parrot at European Perl conferences and workshops.
As well as experience, I also have strong academic underpinnings, holding a first class Computer Science degree with honours from the University of Cambridge.
I believe that my unique combination of Parrot internals knowledge and in-depth knowledge of Rakudo Perl 6, as well as my academic background and existing contributions to Parrot and Rakudo so far, put me in a very strong position to successfully deliver an implementation of the features described in this proposal.
Country of Residence:
Okay to publish proposal?: