Numeric Plan of Attack

As you may know, the Perl Foundation has accepted my grant proposal to work on implementing the Numeric and Real roles in Rakudo. I’d like to thank the Perl Foundation and Ian Hague for this support, and Jonathan Worthington for his help in putting the proposal together. I’m quite excited to be working on this, and hope to have a solid implementation ready in time for Rakudo *.

I’d like to sketch out my current plan of attack on this grant. I’ve already blogged twice on changes I think the Numeric/Real spec needs. Those ideas still need some more thought, and I’d like to address Larry Wall’s suggestion for ordering Complex numbers too. Glancing over the spec just now, I think there are a few functions that ended up in the wrong role, so I’ll address that in another post soon. These are all intended to be practical changes to make the current roles work better.

I’m planning on diving right in by creating empty roles Numeric and Real and assigning them to the appropriate numeric classes. I think that can work with minimal disruption to Rakudo, and then once tests have been established for this, I will push on and start moving functions to their new locations one-by-one. (If it turns out this does create disruptions for Rakudo, I’ll branch Rakudo to work on it — but right now I expect that won’t be needed.)

As I said in the grant proposal, one thing I think is important is making it as straightforward and simple as possible to create new numeric types. As such, I plan on creating tests for this ability as well, checking how new classes fit in with the existing ones.

Schedule-wise, I expect to only get light work done in the next ten days or so, as we are in the midst of moving. Once we are settled in I plan on seriously tackling the work in an attempt to get significant work on it done by the April 22 Rakudo release.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: