Hague Grant Application: Numeric and Real Support


We have received a Hague grant request, submitted by Solomon Foster.

Before the Board votes on this proposal we would like to get feedback and endorsements from the Perl community. Please leave feedback in the comments or send email with your comments to karen at perlfoundation.org.

Project Title:

Numeric and Real Support


This grant aims to refactor Rakudo's current numeric classes to support the
Perl 6 specification's new Numeric and Real roles, in the process making it
easier to create new numeric classes.

Benefits to Perl 6 Development:

In late 2009, in response to users' and developers' experiences with Rakudo,
the Perl 6 specification was enhanced with the creation of the Numeric and
Real roles. This grant's purpose would be to implement those roles and
refactor Rakudo's core numeric type implementations to work with them,
including Int, Rat, Num, and Complex. Special care will be taken to simplify
adding new classes that fill the Numeric and Real roles, as there are more in
the specification that will need to be implemented at some point. In addition,
the relevant portions of the test suite would be revamped. Straightening this
all out before Rakudo * will present the newcomers to Perl 6 with a clean,
consistent numerical interface instead of the current obsolete hodgepodge.


D1. Implement Numeric. [S32::Numeric: "Numeric"]
D2. Implement Real. [S32::Numeric: "Real"]
D3. Refactor Int, Rat, and Num to be Real. [S32::Numeric: "Int", "Rat", and
"Num", also S02::Bits and Pieces]
D4. Refactor Complex to be Numeric. [S32::Numeric: "Complex"]
D5. Refactor the trig functions to fit in this scheme. [S32::Numeric:
"Trigonometric functions"]
D6. Add Numeric and Real specific tests to the spectests.
D7. Enhance our current numeric tests to better work in the new system.

Project Details:

D1 and D2 require implementing a the Real and Numeric roles, and possibly
modifying the Spec a bit in the process. Probably the biggest issue here is
working out to what extent Real should implement default versions of its

D3, D4, and D5 involve refactoring the existing methods for these classes to
fit into the new role-based scheme. Special attention will be given to
facilitating the addition of new numeric types which fill these roles.

D6 would include simple tests -- do the classes belong to their appropriate
roles? -- as well as more complex tests -- can users readily create their own
Numeric class?

D7 would reorganize the existing numeric tests to better take advantage of the
new system, as well as forking role-based versions of those tests.

Project Schedule:

This is envisioned as a two-month project. The first three weeks would be spent
establishing the basic framework and getting the Numeric methods in place for
Int, Rat, Num, and Complex. The second three weeks would be spent working on
the Real methods for those classes. The last two weeks would be set aside for

I am able to begin work on this project at any time.

Report Schedule:

Blog posts every other week on a new Perl 6 programming blog on Wordpress,
also to be submitted to Perl Planet Six.

Public Repository:

All code, documentation and other relevant files that relate to Rakudo will be
checked into the Rakudo 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 CLA for The
Perl Foundation.


After flirting briefly with Pugs back in its very early days, I started
regular experimentation with Perl 6 via Rakudo in late 2008. In mid-2009 I
started contributing, first to the spectests and then in August to Rakudo
itself. Since then I have been the third most active Rakudo committer,
including extensive work on Rat, Complex, and trig support.

I have an MS in mathematics and a BS with honors in mathematics and computer
science, both from the University of Michigan. I have twelve years' experience
as a professional C++ library developer.

Country of Residence:

United States


United States

Amount Requested:


Okay to publish proposal?:


Suggestions for Grant Manager:

Jonathan Worthington

Reblog this post [with Zemanta]


It sounds good, but is it realistic to talk about this helping Rakudo Star? That's planned for an April release, as I understood it, and this says it will take two months. Even if the grant were approved today (and grant approvals seem to take closer to a month), it would not be delivered until May.

Is this off the mark?

I support this grant proposal.

Solomon has been doing much of the math implementation that you find in
today's Rakudo (trigonometric functions, rationals, complex) and brought the
corresponding tests to a better shape than I would have ever dared to wish
for. I am sure he is up to the task.

I would welcome to see this work at least started before the "Rakudo Star"
release, because the current implementation corresponds to an old snapshot of
the spec, and the mis-matches between implementation and specification will
greatly confuse people who try it out.

Ricardo, I'm pretty sure I can squeeze the schedule to six weeks and still get it done for Rakudo Star. Though obviously if it doesn't get approved before April it won't be all done in time.

I've been very happy with Solomon's contributions to Rakudo so far - both generally and especially in the area of our numeric handling. This grant will help bring this area of Rakudo in line with the specification and imrpove test coverage (something Solomon has shown himself to be very good at). Of course, the more that can be done before Rakudo *, the better, so I both support the grant application and hope that it can be approved on a short timescale once the public comment period is over.

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 Pauley published on March 4, 2010 8:40 AM.

YAPC::NA 2010 Request For Sponsorship was the previous entry in this blog.

Grant Update: Archive::Zip Fixes Complete 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 6.2.2