Yesterday evening, at the behest of The Powers That Be, and against the questionable judgement of my lazy self, I tentatively picked up the rest of these converters. And as I told Anna, the recently promoted Fearless Leader, I'd try to get one of them done for 0.5, whose deadline is today. So, without further ado, I present to you int() for Pjs.
Who wants to write the thousand words?
Lo, see now int() in action in Pjs, and compare it to how the same code renders in Processing:
Your eyes do not deceive you: Pjs' int() fails a test. But don't break out the torches and pitchforks just yet! There's a good reason for this. int() may take a byte or an array of bytes as an argument. In Processing, a byte may have a value from -128 to 127, but more importantly: byte is a static type. Through overloading this allows Processing methods, written in Java, to behave differently to accommodate different variable types.
A possible solution may be to add a second parameter to int(), a flag called 'isByte' or something. That might be something to bring up in next week's telephone conference.
- Lighthouse ticket #220 int(), float(), str(), et al are suppose to work on all primitive datatypes including arrays
- GitHub commit
A Quick Recap of 0.5
Just for the record, here are the links to the rest of the stuff I did for 0.5:
- Enhance existing min() and max() implementation
- Implement String::equals()
- Enhance existing nf() implementation
I'll be making a (hopefully) shorter post soonish outlining what I hope to accomplish for 0.6. But for now, it's time to switch gears and call it a morning.