Revolver

21 March 2006

Uh, well everything manifests itself in processes of three. Proton, neutron, electron. Sun, earth, moon. Masculine, feminine… child.” The Channel 4 website reviews the DVD of Revolver by listening to the commentary. Funny.

Memo to self

19 March 2006

Memo to self: bash profile is in /etc/profile. Not anywhere else, they don’t work. No idea why. But next time you need to alter your $PATH – it’s there.

So I’ve been fiddling with Rio recently. I’m trying to write a little script to find and replace throughout a directory – and all its subdirectories, recursively. Given the end result of this might end up being an application based upon Rails, it seemed best to write this in Ruby. And I remembered someone (Tiest, I think) mentioning Rio at one of the LRUG meetings. So I gave it a shot.

Rio is, in short, lovely. It acts as a convenience wrapper around a whole host of modules – including Kernel, File, Dir, and others – and basically makes reading and writing files a doddle. It’s also quite powerful, and makes batch operations across directories really easy, once you’ve figured it out.

So my global find/replace script comes down to this:

rio('dirname').all.files.skip(/^\./).do |eachfile|
   eachfile < eachfile.contents.gsub("search", "replace") end

And that's it. Obviously, this being gsub, "search" can be replaced with any regular expression of your choosing. I'm sure I could do it faster in sed/awk/grep, but I'm not as familiar with them as many - and this way around, I can patch this snippet into a larger Ruby application. The skip clause forces Rio to ignore files beginning with a dot, as .DS_Store and friends cause it problems (it seems).

Anyhow, I'm very impressed with Rio - saves a lot of faffing with read and write modes - and can highly recommend it if you need to faff with the file system in Ruby.

  • Avant Game — Jane McGonigal’s weblog – Jane guided us through a few games of Werewolf on Tuesday night at Etech. Much fun was had, and many innocent villagers slaughtered…
    Tagged as: blog games gaming play
  • KartMatch — Ning-powered app for finding other Mario Kart friendcodes. Fun!
    Tagged as: ds mariokart ning nintendo socialsoftware
  • Phonogram — Kieron Gillen goes to work on what looks like a cross between Quadrophenia, Hellblazer, and the best of Plan B. Can’t wait.
    Tagged as: comic music pop

Time to leave

12 March 2006

Well, that was America. Thanks to the very generous Dan Heaf, I’m sitting in the Virgin Atlantic Lounge at LAX, sipping free drinks and catching up the world online. The presentation went down well, it seems; I’ve had some interesting emails as a result and some kind words. The PDF isn’t up online yet, but the most indepthwrite-up – featuring pictures of yours truly + slides – is over at Near Near Future. Given Regine was in the front row, hammering away at her notes, there are obviously some gaps but the basic premise is there. I’d argue it’s less a “consumer” perspective and more just a perspective on the gaming industry (rather than academic/research perspectives), but it’s still great to see it out there, and to a huge audience. Thanks very much for the write-up, Regine!

And so I’m about to board a plane and hop back to the UK. I’ve had a great time at Etech – it all began sinking in late on Thursday¬†(and especially very late on Thursday, when I had a fantastic night, thanks to danah, Matt, Alex, and many others).

Many thanks must also go to the organisers of the conference, O’Reilly and especially to all those (friends and new acquaintances) in the British contingent who put up with me, nerves and all, and steered me through safely. It’s slowly sinking in just how wonderful an experience it was. My further thoughts from the conference – and there are, as ever, several, will follow in due course.