This is a blog about me, Seinfeld, okonomiyaki, japanese toilet seats, and other things of interest

Thursday, January 31, 2008

The Songlines

Just finished reading Bruce Chatwin's The Songlines. An interesting mix between a travel book and a philosophical treatise on human nature and nomads. I love the first sentence that sets the scene for an amazing adventure:
In Alice Springs - a grid of scorching streets where men in long white socks were forever getting in and out of Land Cruisers - I met a Russian who was mapping the sacred sites of the Aboriginals.

It is a good book, but I still prefer In Patagonia. In Patagonia has less philosophical musings and more of interesting anecdotes and stories of weird and interesting people and places.

After threehundred-something pages of Chatwin's poetic and philosophical writing, I longed for something drier and more formal. So now I'm reading Economics - Making Sense of the Modern Economy, consisting of a number of articles from The Economist.

Tuesday, January 29, 2008

I want one of those

It is every engineer's dream to build the ultimate machine. Shannon, the father of information theory, &c, succeeded. From his eulogy in the Guardian:
But Shannon's pride and joy was his 'Ultimate Machine', which was based on an idea of Marvin Minsky, and described by Arthur C. Clarke in Voice Across the Sea. 'Nothing could be simpler,' wrote Clarke. 'It is merely a small wooden casket, the size and shape of a cigar box, with a single switch on one face.

'When you throw the switch, there is an angry, purposeful buzzing. The lid slowly rises, and from beneath it emerges a hand. The hand reaches down, turns the switch off, and retreats into the box. With the finality of a closing coffin, the lid snaps shut, the buzzing ceases and peace reigns once more.

'The psychological effect, if you do not know what to expect, is devastating. There is something unspeakably sinister about a machine that does absolutely nothing except switch itself off.'

Thursday, January 24, 2008

JPod

After finishing the Baroque Cycle I figured I needed something more lightweight and the last few days I've read JPod. I finished it today on my way back from work and I can't say that I'm very impressed. Some cool one=liners and ideas but in general a cheap rip-off of Microserfs, a book I really love and have re-read. I'm sure won't re-read JPod.

Wednesday, January 23, 2008

Delayed substitution of Ruby strings

Today at work I faced an interesting problem I didn't know immediately how to solve: how do you delay substitution in Ruby strings? That is, I wanted to declare a string like s="delayed substitution:#{i}" and not have #{i} evaluated until later. The difference between declaring a string with single or double quotes is the solution:
irb(main):001:0> s='delayed substitution of i:#{i}'
=> "delayed substitution of i:\#{i}"
irb(main):002:0> i=42
=> 42
irb(main):003:0> eval('"' + s + '"')
=> "delayed substitution of i:42"
irb(main):004:0>

Here #{i} is not evaluated until between doubles quotes.

Sweet!

Dinner

I just had one of the weirdest dinners of my life. Or, rather, all the components of the dinner were completely normal, but the combination was slightly unorthodox. I started with natural yoghourt and muesli with a side of corn that were left over from yesterday's bbq. To drink I had a glass of 2003 Garnacha from Mansfield wines of Mudgee. The wine was quite peppery and went quite well with the bbq:d corn but I can't really recommend it with yoghourt. As I was still hungry I had two pieces of wholemeal toast with peanut butter watered down with another glass of Garnacha while reading the latest issue of Gourmet Traveller.

Tuesday, January 22, 2008

There and back again

After months in the company of half-cocked Jack Shaftoe, Daniel Waterhouse, &c, I've now read the final page of the Baroque cycle. It feels good and bad at the same time - like coming home from a long back-packing trip. I'm worried that I will never read anything as grand and chokeful of ideas again - it's probably easier to find a virgin in Essex than to find another series of books as interesting and fun.