Archive: 2006-07

  • Iterative development in irb

    There are times when irb’s line-based interface is too constrained for experimentation with an algorithm or other piece of Ruby code. When that happens, I usually switch to a proper editor, edit the file, and run it. It works pretty well.

    More …

  • More progress on rb2js

    千里之行,始於足下 ―― 道德經

    More …

  • Gravity strikes!

    This morning, I saw that a wall down the street had succumbed to its inevitable destiny. I’m no builder, but I’m pretty sure that you aren’t supposed to make a wall like that.

    More …

  • Mumbai duck

    Everybody has a right to pronounce foreign names as he chooses.—Winston Churchill

    More …

  • Thoughts on Ruby to JavaScript conversion

    My quick hack the other day received a lot of attention, as the graph of visitors shows. I must emphasise that it is just a quick hack, however. It does work to the extent that it can turn a subset of Ruby into working JavaScript, but there’s more to Ruby than just the syntax: non-trivial code is going to fall into the gaps between Ruby and JavaScript semantics rather quickly. JavaScript isn’t as dissimilar from Ruby as some languages, but it’s different enough.

    More …

  • Convert Ruby to JavaScript

    This is old! You should also check out RubyJS for a fuller implementation of the same idea.

    More …

  • Coincidence is a fine thing

    I wrote earlier about my 666 coincidence at school. (To summarise, I correctly predicted my next throw of three dice as being 6-6-6.) It seems freakish, but it’s not that unlikely when you consider the odds (a generous 216 to 1). Furthermore, there’s Littlewood’s law to back it up: if a human being experiences an event every second, they experience about one million events in a thirty-five-day period. Therefore, each person can expect a ‘miraculous’ one-in-a-million event about once a month.

    More …

  • In praise of granny bikes

    For some reason, mountain bikes have become commoditised and ubiquitous in the UK. It doesn’t really make sense, because they aren’t especially well suited to any task except off-road cycling—and that’s something that, I am sure, only a minority of owners actually do. Most of the time, they are ridden on the road, where their knobbly tyres make pedalling much harder, while the lack of mudguards and chain protection sartorially endanger the rider. And who would ever need 21 gears?! Two or three is surely more than enough considering the versatility of human legs.

    More …