Weird question, but, did you possibly, by chance, develop/debug this in part in a café in Berkeley on Saturday with a copy of Think Bayes on the table? 'Cause I may have been sitting at the next table if so.
omg! yeah, i was. small world. do you go to Berkeley?
Freakish--I don't go to Berkeley, hadn't been to that cafe before! Anyway, woot, very cool hack! (And cool enough for the glance at it to stick in one's memory for a few days, apparently.)