< April 2007 >
SuMoTuWeThFrSa
1 2 3 4 5 6 7
8 91011121314
15161718192021
22232425262728
2930     
Mon, 09 Apr 2007:

While on my way back from Sydney on Singapore airlines, I ran out of things to do. Now, rather than play Mario on their onboard entertainment, I took a look at their comedy section. That's how I saw my first episode of Futurama - Roswell that ends well. And I was a fan in a few minutes. Thanks to set of borrowed DVDs, I've finished watching every single episode - yup, all 72 of them. I love the series for the the very same reasons I love the other Matt Groening creation - the Simpsons. The referential coherence of both series shows a nearly impossible amount of research put into the script and story line.

Good News, Everyone: Just like every other good cartoon, the jokes are at every level of the series - the characters, situations and even tag lines. In fact, the whole plotline is one giant inside joke about how things change, yet stay the same. For instance, Fry who was a delivery boy in the year 1999, ends up as a delivery boy in the year 3000 - except the deliveries are now to far-off planets, rather than to city blocks.

The Characters: The character set for the show is literally identical to my standard comedy situation. A befuddled hero, a self-confident heroine, one weirdo side-kick and then a couple of total reverse stereotypes. This is literally identical to say, h2g2 (Arthur, Trillian, Zaphod) or Coupling (Steve, Susan, Jeff) - we find Fry, Leela and Bender in each of those slots. Of course, Futurama would be a non-starter without Bender (aka Bender Bending Rodríguez). Rather than being a logical minded machine, he's the ultimate personification of the human vices - drinking, smoking, swearing, gambling, stealing ... in short, the whole deal. Or take the professor for instance, who is actually Fry's nephew by a long way, but is older than Fry. Even Dr Zoidberg, who sounds like a Jewish doctor but is not a doctor (heh, the intro sequence is amazing) and of course, a shellfish (i.e not Kosher). Even Leela, whose one eye gives her no depth perception which is actually essential to flying an aircraft. Add a rich intern, a rastafarian accountant, a shatner clone in short underpants, a robot devil (Beezelbot), a killer Santa - stop laughing !

Cultural Leakages: Bender's "bite my shiny metal ass" has moved out the world of cartoons into being a real cult phrase. For instance, if you do a reverse dns lookup of the pirate bay servers you'll get bite.my.shiny.metal.ass in the domain name. I occasionally run into even more obscure Futurama references such as "What ? My mother was a saint !" in response to utter gibberish. Even the "Why worry about this planet ? It's not like this is the only one we got" makes me smile, although wryly.

Episodes: If I had to pick a couple of favourite episodes. I'd definitely pick Spanish Fry as the one I liked best. The concept of poaching humans for their human horn truly draws parallels to the african rhino situation. The Godfellas episode is also thought provoking - especially the last few minutes. And the section about greenhouse effect in the Crimes of the Hot truly belongs in an educational film - especially the silencing of the questioning child. There are touching episodes as well, like The Sting or The Luck of the Fryrish - both of which have heart-tugging endings.

Language: Every good Sci-Fi sequence requires its own language. Futurama doesn't just stop at using new words like Blernsball or Slurm, but also goes onto redefine some old words like XMas which is pronounced as it is written and nobody remembers the Christ part of it. They even went further to invent a whole new alphabet to put alien messages in. Here's how it actually looks - I wonder if I can get a t-shirt printed (but nobody except Futurama fans will get it).

All in all, a thoroughly enjoyable but pleasantly thought-provoking animated series for educated adults.

--
You can't go faster than the speed of light.
That's why scientists increased the speed of light in 2208.
                -- Futurama, A Clone of My Own

posted at: 23:27 | path: /movies | permalink | Tags: ,

X11 programming is a b*tch. The little code I've written for dotgnu using libX11 must've damaged my brain more than second-hand smoke and caffeine overdoses put together. So, when someone asked for a quick program to look at the X11 window and report pixel modifications my immediate response was "Don't do X11". But saying that without offering a solution didn't sound too appealing, so I digged around a bit with other ways to hook into display code.

RFB: Remote Frame Buffer is the client-server protocol for VNC. So, to steal some code, I pulled down pyvnc2swf. But while reading that I had a slight revelation - inserting my own listeners into its event-loop looked nearly trivial. The library is very well written and has very little code in the protocol layer which assumes the original intention (i.e making screencasts). Here's how my code looks.

class VideoStream:
    def paint_frame(self, (images, othertags, cursor_info)):
        ...    
    def next_frame(self):
        ...

class VideoInfo:
    def set_defaults(self, w, h):
        ...

converter = RFBStreamConverter(VideoInfo(), VideoStream(), debug=1)
client = RFBNetworkClient("127.0.0.1", 5900, converter)

client.init().auth().start()
client.loop()

Listening to X11 updates from a real display is that simple. The updates are periodic and the fps can be set to something sane like 2 or 3. The image data is raw ARGB with region info, which makes it really simple to watch a particular window. The VNC server (like x11vnc) takes care of all the XDamage detection and polling the screen for incremental updates with that - none of that cruft needs to live in your code.

Take a look at rfbdump.py for the complete implementation - it is hardcoded to work with a localhost vnc server, but it should work across the network just fine.

--
You can observe a lot just by watching.
                -- Yogi Berra

posted at: 19:45 | path: /hacks | permalink | Tags: , ,