click here for my current blog

this blog is no longer maintained and is here only for archival purposes

Archive for May, 2008

Cheetah Style Remix

Saturday, May 24th, 2008

I’ve been working on a tune on and off for a few months. It’s a remix/remake of ‘Cheetah Style’ by the inimitable Keith! Party. I used Reason 4, and particularly the new Thor synthesiser (in fact I think all the synths use the Thor). Since it’s about as finished as it’s going to get, I’ve decided to release it. Download the tune here (4mb), and please, let me know what you think.

I’ve been too busy to work on much music recently, apart from practising the guitar whenever I can. However, Meyrick and I have just started sending Reason files back and forth with the hopes of creating something amusing, if not worth listening to. I’ll keep you posted.

Something old, something new

Saturday, May 10th, 2008

Here are a couple of JavaScript things I’ve done, one of them about a year ago, another last week. I thought I’d better just write these up while I think of them, lest they disappear forever.

The first (and oldest) is the basis for a browser-based Raiden-esque game that I put together using Prototype. At the time I called it Journey to the Stars, and I’d intended to make it lightweight enough to be used as a loading screen for my (as yet unfinished, or really “unstarted”) web site.  The game was never completed, and the engine notably lacks collision detection among other things. What I like most about the game is its CSS-based sprite engine, which seems to work pretty effectively. (It even supports animated sprites, although I never got around to animating anything.) If I were to do it again, I’d use a more lightweight framework like jQuery. That Prototype ‘extends’ (ie adds a bunch of helper functions to the prototype) of every object you call with its $() function creates a lot of unnecessary memory overheads that must certainly compromise speed.

The second more recent thing is this simple JavasScript implementation of cellular automata. I was prompted to write it after I’d read th wikipedia aricle on Rule 110, and thought “hey, why not?” It would definitely benefit from being rewritten to use the new <canvas /> element, as its current method of flippng the background colours of hundreds of DIV elements is dog slow (and very “old world” in its approach, I think).

I’m highly sceptical that either of these will work in Internet Explorer. I doubt anyone reading this site is running it, anyway.

John Resig never ceases to amaze me.

Friday, May 9th, 2008

As if the guy hasn’t done enough impressive things lately, he’s now gone and implemented Processing in Javascript. This required him to write a parser for the Java-like Processing language and convert it into JavaScript, and re-implementing the Processing graphics API for the new “canvas” element.

Now I must resist the temptation to port processing.js to Rhino using native Java graphics widgets, thus bringing the whole exercise full circle.

When ASCII reflects reality

Friday, May 9th, 2008

Emil beat me to it, but this ASCII Art Fart couldn’t be closer to the truth. (although they’re rarely off the mark, in any case) Having just bought a new MacBook (and a very slick Airport Extreme base station to go with it), the one thing that pains me is the poor virtual desktop and focus model. God damn it, Apple! Get it right!

The things that Should Not Happen

Friday, May 2nd, 2008

I was completing a Parser for my Compilers subject at uni a couple of days ago, and I ran into an issue where my program (which is written in Java) was ending prematurely without producing any error messages. As I’m not very experienced with Java, I emailed my lecturer asking if he knew what was up. Kindly, he offered to take a look at my source file and tracked down the offending code (that was throwing an exception caught silently by the test framework (that I didn’t write)):

The error is that new_tAST = null before that constructor is called.
If you look back in your code to see what had gone wrong earlier:

// this shouldn’t happen

in parseType() had actually happened:-)

Moral of the story: if it shouldn’t happen, it most certainly will.