Wednesday, November 02, 2011

CoffeeScript and Raphael.js

I've been working on a project based on some of my recent artistic works. I thought I'd do it using a Processing sketch embedded in a web-page. It's not that I was particularly happy with Java applets (in 2011!) but I figured I'd make use of the Processing code I already had.

After a whole lot of faffing around trying to get the applet talking to my server, I'm realising that this is really NOT going to fly for a whole bunch of reasons. I wasn't really seeing Java as my long-term future anyway, but I've realised that it isn't even going to be the quick, dirty but workable prototype that I'd hoped. So, if I have to make a break, I might as well do it now and quickly. And look to the future rather than the past. So I've made a decision to rewrite with CoffeeScript and Raphael.js. (I'm generating SVG designs anyway, so Raphael is ideal.)

After a spending a couple of hours today, that's feeling like good decision. There's still the hassle of having to convert a lot of code, and it's a bit of a fiddle going backwards and forwards between the editor, the command-line compiler and the browser. But CoffeeScript feels like a good language. Obviously meaningful whitespace indentation is comfortable for a Pythonista like me, and I'm getting used to the Rubyisms without too much pain.

Not much in the way of debugging information, which hasn't bitten me yet, but might. Still, I'm positive.

Post a Comment