Hague Perl 6 Grant request, "Traits, Introspection and More Dispatch Work For Rakudo", open for comment
Tue, 28-Apr-2009 by
Coming off the completion of his first Hague grant, Jonathan Worthington has submitted a request for a new Ian Hague Perl 6 development grant for his proposal "Traits, Introspection and More Dispatch Work For Rakudo". 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.
Traits, Introspection and More Dispatch Work For Rakudo
This project aims to add additional functionality specified in S12 and
S14 to Rakudo Perl 6.
**Benefits to Perl 6 Development**
Today, Rakudo is one of the most advanced, and certainly the most actively developed, Perl 6 implementation. I am seeking this grant to fund my time to continue implementing features in Rakudo that are on the path to it being a complete implementation of the Perl 6.0.0 specification. In fact, the work proposed under this grant would bring us very close to a complete implementation of S14, and fill out a substantial amount of the bits of S12 that Rakudo currently does not support.
**D1.** Implementation of .WALK, .can returning an iterator, dispatches of the form $foo.@candidates, and all of callsame, callwith, nextsame, nextwith and lastcall, as specified in S12. This work will also give coverage of the section of S12 under the heading "Interface Consistency". Furthermore, it will layer Rakudo's dispatch more neatly onto Parrot's own dispatch mechanisms, improving Rakudo performance.
**D2.** Refactoring of .wrap and .unwrap, as specified in S06 to work in terms of the same candidate lists as these S12 features.
**D3.** Implementation of the parallel dispatch section in S12.
**D4.** Filling out of the default Perl 6 metaclass to support the introspection capabilities specified in S12.
**D5.** Implementation of defining methods on the metaclass, as described in the Class methods section of S12.
**D6.** Implementation of traits, as specified in S14.
In my last grant, I did some significant improvements to dispatch in Rakudo. However, there's still some work to go. D1, D2, D3 and D5 aim to fill out what is missing, and will incorporate a refactor that will bring improvements to method dispatch performance in Rakudo.
Rakudo currently allows very limited introspection. D4 will fill out the meta-model and provide much fuller introspection capabilities. This work will also bring us closer to implementing the HOW API suggested by the smop project, which is likely to be incorporated into S12. This also means the foundations for people to define their own metaclasses will have been laid by the end of this grant. Completing this section of the
grant will require getting input and consensus on some currently under-specified bits of the introspection interface and ensuring those clarifications are made explicit in S12.
Currently we cheat a bit to support the Perl 6 built-in traits in Rakudo. In D6, I aim to implement the traits section of S14, refactoring existing trait handling to match up with this model while providing support for user-defined traits.
Work will begin as soon as the grant is approved. I expect to accomplish the majority of the deliverables during May, and if all goes smoothly aim to wrap up the grant for the end of June or early July. Here is a rough timetable.
Middle of May: Substantial progress on D1, D4 started
End of May: D1 and D2 mostly complete, notable progress on D3, D4 and D5
Middle of June: D1 through D5 mostly complete, clear plan for how to do D6
End of June: Progress on implementation of D6, tweaks as needed to D1 through D5
Early July: Completion of all deliverables
Blog posts 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 will be checked into the Rakudo repository. All code, documentation and other relevant files that relate to any Parrot fixes/additions arising as a result of this grant will be checked into the Parrot repository. All contributions to the specification and 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 my extensive Rakudo development 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?**
**Suggestions for Grant Manager**
Patrick Michaud has indicated that he is willing to act as grant manager for this grant.
Jonathan is the right man for the job, he contributed many great features and bug fixes to Rakudo and parrot so far, and interacted very will with the community.
The experience has shown that Jonathan's previous work on the object system and the dispatcher have been a very solid foundation for both user programs and other parts of the compiler (namely writing built-ins in Perl 6 would have been impossible without it), so I think the features he wants to implement are well chosen, even though they might seem a bit obscure to some.
D6, implementing traits, also implies that parsing improvements that are badly needed for using STD.pm, Larry's Perl 6 grammar written in Perl 6.
I'd just like to chime in on Moritz' praise of Jonathan. It has been exhilarating to observe all the progress so far. Looking forward to more of the same.