alan little’s weblog archive for november 2005

yoga globalization

30th November 2005 permanent link

In my mailbox this morning I learn that a Russian yoga magazine containing a translation of excerpts from my Mysore Diary will soon be on its way to me in the post. I will be interested to hear what Maria has to say about the the translation.

Old-school Russian yogis have a reputation for being amazingly hardcore. Apparently yoga was banned in soviet days, or at least heavily frowned upon, as a quasi-religious activity, so only the most dedicated yogi dissidents pursued it. I am honoured to be admitted to their company, even if only in writing.

Yoga globalization: this came about because the Russian magazine editor met my German yoga teacher on a train in Delhi. And Russia becomes the fourth country where I’ve had yoga photographs published in newspapers and magazines – the others being the USA, Germany and Australia.

related entries: Yoga

sandow on cynicism

29th November 2005 permanent link

Greg Sandow has a book in progress about the decline of classical music, especially orchestral classical music, and what if anything can or should be done about it. One of the problems he puts his finger on is a lack of any passion, any unpredictability in yet another run-through of something like Beethoven’s Pastoral Symphony – fine piece of music though it is.

I wrote to him pointing out a couple of counter-examples:

I'm following your online book with great interest, and was struck by your comments about the musicians' (orchestral musicians at any rate) lack of involvement in what they're playing.

My brother is a freelance orchestral string player, and your book isn't going to tell me anything I haven't already heard from him about disillusionment in the orchestral music business. Mostly. But once he got me tickets to hear him playing Mahler in the Liverpool Philharmonic. It turned out to be the day Michael Tippett died; they didn't have anything by him rehearsed, so instead they added Elgar's Nimrod to the program because apparently he loved it. It was an absolutely glorious, performance-of-the-century moment. When my brother met us in the bar afterwards he was glowing, and wanted to know immediately if that had sounded anywhere near as good as it felt. We told him it had.

So here you have a decent but not great orchestra, and a totally overexposed piece of music that any English orchestral musician has performed a thousand times and could play in their sleep. Surely a recipe for tedium. But, given a reason to play it that they care about - plenty of them had probably met Tippett - and an audience to whom it has been explained that this is what we are playing and this is why we are playing it, it turned into a moment of absolutely transcendent wonder. Art, even. I will remember it all my life.

Another example: last year I went to hear a local amateur orchestra perform the Eroica at a charity concert. It was great fun. They had hired a professional conductor, and he and they were clearly determined that they were damn well going to *perform* the thing, not just get through the score without falling apart. They damn near did fall apart, but I admired them and enjoyed the concert far more for that than if they had played it safe. The Eroica is so great it can survive a lot of abuse, and nobody was expecting them to be the Vienna Philharmonic. (On the other hand, what does it do to the Vienna Philharmonic, knowing that everybody *is* expecting them to be the Vienna Philharmonic? Does the pressure of all that expectation to be perfect stop them taking enough risks?)

Of course, for members of that amateur orchestra, this might have been the only chance of their lives to be in a public performance of one of the greatest pieces of orchestral music ever written – and in front of an audience that probably contained large numbers of their friends, relatives and colleagues. Whereas an orchestral professional might acknowledge in an abstract sense how great and wonderful the Eroica is – but how big a deal is any given performance of it?

Another example occurs to me: Arild Remmereit’s amazing Tchaikovsky performance with the Munich Philharmonic that I heard last winter. The band might have thought they were up for just another run through of a too-familiar piece they’ve played a hundred times before – but for the conductor it was his chance to make a splash with a big-name orchestra, and by god he did.

I’m not saying – and nor is Greg, I assume – that it’s all cynicism, all the time with professional orchestras. I used to vaguely know the lead trumpet of the BBC Philharmonic (friend of a friend), and he would get excited and go around drumming up support in the pub whenever they had a big brass showpiece like Mussorgsky’s Pictures or Beethoven’s Fifth coming up. My brother, too, waxes lyrical about the times when he’s been involved in great performances like that Elgar, or when he has heard really great orchestras like the Vienna Philharmonic.

While we’re on the subject of music that is heard and played too often, don’t forget to go and read Brian Micklethwait’s magnificent piece on the Eroica:

It is one thing to hear the first two chords of the Eroica for the hundredth time, in an age of stadium rock and hi-fi volume knobs on our CD players; quite another to hear these two explosions when they were the loudest and most bad-mannered musical noises that anyone had, until then, ever heard indoors.

related entries: Music

dreaming on the right

28th November 2005 permanent link

I dreamt last night that I was driving a carload of people to a wedding reception. It was one of those dreams where things were constantly going wrong: after skidding wildly out of control across the carpark, barely managing to stop before the road, there was too much traffic on the road to turn left. So I turned right instead, intending to turn round further up the the road. Then my carload of wedding guests insisted on stopping for tea & cakes in the wrong hotel …

The point being not the doubtless deeply fascinating content of Alan’s inner worries, but that I was driving on the right. (So was everybody else – it wasn’t that much of a nightmare.) Does this mean that after seven years I’ve finally internalised the once-bizarre concept of driving on the wrong side of the road? Oops, but the next time I’m likely to be driving a car is when we go to visit my parents in England for Christmas …


28th November 2005 permanent link

Is it just me, or is Sri Ganesha Tea & Book Stall (mythic tea, real books, basic information) clearly the best yoga news’n’links blog in the world? (And not just because they link to me)

Sri Ganesha (not, I assume, his real name) appears to have some kind of affiliation with Eddie Stern’s ashtanga yoga school in New York – thus knocking rather a large whole in NY ashtangis’ reputation for being dedicated and proficient, but perhaps a little wanting in the self-deprecating humour department.

related entries: Yoga

interconnected zen

26th November 2005 permanent link

I’ve never been much into pure link blogging, and since I’ve been using I do even less of it than I used to. But Matt Webb’s adventures in the land of meditation look like they are going to make interesting reading.

related entries: Yoga


26th November 2005 permanent link

Wow. I won the yogalila sweatshirt draw. I haven’t won anything like that for ages. Sophie informs me it is actually a ladies’ sweatshirt – I hope Maria will like it.

related entries: Yoga

dealing with idiots

25th November 2005 permanent link

The continuing saga of trying to get iTunes to handle classical music in a half-sensible manner. Andy Baker convinced me that there is actually a case for putting the composer instead of the performer in the “Artist” field – at least for people who for whatever reason choose to use benighted software that doesn’t recognise the standard ID3 Composer tag. This one is quick and easy to fix in iTunes anyway. I really can’t begin to imagine what the people who came up with the other common anti-pattern were thinking. (Achtung! wide picture)


Here we have “Song” used for the title of the work and “Artist” (!) holding the names of the movements. Composer might be embedded in the album title if you’re lucky, and you have to guess the performer. <unahimsic>The idiot(s) responsible for this should be shot</unahimsic>. This nonsense is so widespread that I suspect the idiot responsible is the author of some widely used piece of crap software – my naïve faith in the human race is such that I have difficulty bringing myself to believe in a large number of people all choosing to do the same utterly stupid thing in exactly the same way. This one is much more of a pain to fix – iTunes doesn’t let you bulk edit the movement names from “artist” across into “song name”, you have to cut and paste them one by one.

Which is of course a time-wasting pain in the arse, and after you’ve done it too many times (because it’s still marginally better than typing everything from scratch) you realise that it might be worth spending half an hour learning Applescript. A quick search for “itunes classical applescript” reveals nothing that directly does the job, but a huge library of other scripts for doing things with iTunes which we can easily borrow & adapt. Applescript turns out to be quite a cute little scripting language, and a few minutes’ work produces this:

"Artist to Song Name" for iTunes
fixes one of the most common problems with CDDB classical data, 
where movement names are idiotically placed in the "Artist" field
written by Alan Little

based on
"Track Number to Song Name Prefix" for iTunes
by Doug Adams

tell application "iTunes"
	if selection is not {} or view of front window is not library playlist 1 then
		if selection is not {} then -- use selection
			set theseTracks to selection
		else -- use whole playlist (this doesn't work)
			set theseTracks to every file track of view of front window
		end if
		display dialog "Select some tracks or a Playlist..." buttons {"Cancel"} default button 1 with icon 2
	end if
	display dialog "Overwrite Song Name with Artist, or append?" buttons {"Overwrite", "Append"} default button 2
	if the button returned of the result is "Append" then
		set myAppend to true
		set myAppend to false
	end if
	display dialog "Artist" default answer "" buttons {"OK"} default button 1
	set newArtist to text returned of result
	set fixed indexing to true
	with timeout of 30000 seconds
		repeat with aTr in theseTracks
			set newName to artist of aTr
			if myAppend then
				set newName to name of aTr & " " & newName
			end if
			set name of aTr to newName
			set artist of aTr to newArtist
		end repeat
	end timeout
	set fixed indexing to false
end tell

… which works.

related entries: Music Mac

xml races (3)

22nd November 2005 permanent link

XML Races, Part Three. In Parts One and Two, we discovered that for parsing moderately large Apple plist files Fredrik Lundh’s cElementTree is very fast and memory-efficient, whereas python’s standard xml.dom.minidom and Ruby’s REXML are very slow and memory-inefficient.

I was curious to try out another good C implementation – libxml2 with one of its python bindings. I know I have had libxml2 working with python before, but now I have a feeling that may have been on a Windows machine at work, because now when I try to do it on a Mac I find myself firmly back in Open Source Dependency Hell. (No matter how many smooth and positive experiences you have with open source installations, you still always know Open Source Dependency Hell could be lurking behind the next download)

Mac OS X comes with the libxml2 C libraries installed by default, but can Mac OS X’s default python installation see them? It cannot. Can I find anywhere how to cause it to do so? I cannot. I try installing lxml, which is supposed to provide a nice ElementTree-style interface in place of libxml’s default low-level and rather fiddly C-style interface. lxml needs pyrex. I install pyrex. lxml collapses in a heap anyway when I try to compile it.

Oh well. According to Martijn Faassen, libxml might not be that fast with python anyway.

I give up on libxml for the time being, and think instead of Chris Petrilli’s comment that ruby (and python) performance is “not quite in the league of Smalltalk (or Lisp, likely), which have extremely mature VMs with on-the-fly compilation and optimization”. Is Smalltalk then much faster than python or ruby, or comparable with C, for the task of parsing moderately large XML files?

No. Time to load and parse my iTunes library file, an 11mb Apple plist, on a 1 GHz G4 Powerbook with VisualWorks Non-Commercial 7.3.1: about three minutes.

Much faster than REXML, a little faster than python’s default parser. A little slower than a good fast python implementation. Not even vaguely in contention with a good C implementation.

On the subject of unrealistic XML benchmarks, Uche Ogbuji rightly points out that “Nobody reads in a 3MB XML document just to throw all the data away”. True. But in the eight to ten minutes you might otherwise spend waiting for REXML to creep through the document, you can get an awful lot done with your data that you already parsed in four seconds with cElementTree.


James Robertson is surprised, and finds that on his Mac Mini my file loads and parses in 61.7 seconds. Roughly comparable machines – 1.25 Ghz versus my Powerbook’s 1GHz (and a faster frontside bus), but 256 MB versus my 512MB – so clearly something wrong with my test setup. Faster than elementtree, though still much slower than cElementTree. More. More more.

related entries: Programming

emergency camera

19th November 2005 permanent link

We just had our first snowfall of the year, and there are still a few autumn leaves on the trees. The result in our local park was extraordinarily beautiful when Jack & I went for a walk this morning.

Landscape photography doesn’t mix well with keeping an eye on an energetic toddler. I didn’t even think I had a camera with me. Then I remembered I did, but you’ll have to be content with my phone’s impressionistic effort:

Munich Westpark

related entries: Photography

the kids these days

14th November 2005 permanent link

A Monday Family Life Vignette:

The kitchen table being temporarily (?) occupied by Daddy’s Woodworking Project(*), and Maria having departed for an early meeting, Jack and I had breakfast in the living room this morning. We don’t watch much children’s TV, and a couple of things struck me seeing it today.

Most children’s TV animation is utter garbage compared to the golden age Disney and soviet-era stuff Jack usually watches on DVD. Since I know animation geniuses like Miyazaki and Nick park are still very much in business, I’ll give TV animators the benefit of the doubt and assume their problem is more lack of budget than lack of talent in the industry.

The amazingly in-your-face advertising. This seems to be evenly divided between dolls with accessories and costumes, which are blatantly exploitative crap, and lego vikings with ships & sea monsters and knights with castles & dragons, which are Way Cool.

Jack has some lego stuff – fire engines, tractors and suchlike – and I have to say I’m impressed. Bits are rather too prone to getting lost, but the remaining bits are well designed and seem to be pretty much indestructible. Such are the wonders of modern materials science. In My Day, though, you didn’t buy ready-made tractors and fire engines and suchlike; you bought boxes of various shapes and sizes of bricks and wheels and made stuff up. Now, what you made up probably wasn’t as cool as the prefabricated fire engines & tractors, and you had to buy the big expensive boxes to get a decent selection of the cooler & more useful parts, such were the wonders of Danish marketing even back then – nevertheless I have the feeling something is being lost here.

I assume it’s still possible to get the boxes of DIY bricks’n’wheels – I’ll have to look into that when Jack is a bit older.

(*) Latest discovery: if you put screws in the middle of the base of a wooden cupboard, the corners warp. Maria’s (pragmatic soviet engineering) theory of what to do about this: put screws in the corners then. My theory: too late, warped is warped. I’ll have to buy a new bit of wood and perform major surgery. But since (1) costs half an hour and four screws, it would be stupid not to try it before resorting to (2).

UPDATE: screw those corners folks. It works.

better on record?

12th November 2005 permanent link

You just don’t necessarily want to be sitting confined in a chair, surrounded by strangers, as those intermittent waves of sound wash over you.
Kyle Gann

… on hearing the premier of John Luther Adams’ For Lou Harrison, and wondering whether it isn’t music that would be better heard recorded than live.

related entries: Music

beethoven plays mozart

11th November 2005 permanent link

Not a “currently listening to …” entry, although wouldn’t it be lovely if it were.

Apparently Beethoven once performed Mozart’s D minor piano concerto (K466) at a benefit concert for Mozart’s widow and children. That must have been something to hear. This information from an interesting biographical sketch of Constanze Mozart by Jane Glover, which I just pulled out of my to_read pile where it had been sitting for a few weeks.

(If you want a recording of the piece that you can actually listen to now, Martha Argerich’s is pretty damn fine)

Ms Glover, like many other serious Mozart fans, dislikes Elizabeth Berridge’s breathtakingly sexy performance as Constanze in Amadeus. I don’t.

related entries: Music


11th November 2005 permanent link

Just out of curiosity, I decide to continue my XML parser benchmark series with Ruby’s REXML. REXML’s stated design goals are portability (but few things are more portable than ANSI C), standards compliance and a clean API. It’s just as well they don’t include being blazingly fast, because oh dearie me:

Time to load and parse my iTunes library file, an 11mb Apple plist, on a 1 GHz G4 Powerbook with Ruby 1.6:

REXML 3.1.3: eight to ten minutes! Memory used 510mb. At least it garbage collects after it’s finished a lot faster than python does.

The next contender: one of the python libxml bindings. These should be capable of giving cElementTree a run for its money.

(Some people listen to music on the subway; I find the level of background noise too high so I benchmark XML parsers instead. Both beat wasting two hours a day driving a car.)

related entries: Programming


10th November 2005 permanent link

Although I’m interested in Smalltalk, I also have projects I want to work on now in a language I can already use productively. These days that basically means python. Python has its frustrating aspects, but one of the great things about it is that it has really good libraries for lots of things. Fredrik Lundh’s elementtree, for example, has been my XML handler of choice for a while now – it provides a reasonably simple & clean interface whilst also being faster and more efficient than the rudimentary XML tools that come as standard with python.

elementtree is written in pure interpreted python; there’s also cElementTree, a version written in C that Fredrik says is 15-20 times faster and uses 2-5 times less memory. This is interesting: one of the projects I have in mind involves working with some fairly large XML files. So download, uncompress, install. Change one line in my source code to use cElementTree instead of the python version, and my tests pass first time. Another win for open source installation.

Fredrik’s performance claim appears to be true, even an understatement, for the largest XML file I happen to have lying around just now.

Time to load and parse my iTunes library file, an 11mb Apple plist, on a 1 GHz G4 Powerbook with Python 2.3:

(py)ElementTree 1.2: 70 to 80 seconds, memory used 160mb

cElementTree 1.0.2: 3.3 to 3.5 seconds, memory used 32mb

(Unfair comparison with python’s built-in xml.dom.minidom, which makes no claim to be either fast or compact: 267 seconds to parse the file, plus approximately a week to clean up after itself, memory used 573mb)

UPDATE: in Part Two, we are unimpressed by Ruby’s REXML. In Part Three, we look at VisualWorks Smalltalk, and think about whether the whole exercise has any value.

related entries: Programming

second impressions

7th November 2005 permanent link

Regular readers (?) might recall that I used to believe one advantage commercial software had over open source was general quality of fit & finish, including slick easy-to-use installers that don’t involve faffing about with version repositories, C compilers and incompatible versions of libraries.

That belief took a large knock a few months ago, when I spent a thoroughly unpleasant and unsuccessful day with Oracle’s byzantine installation rituals before giving up and installing MySQL and PostgreSQL in under an hour (including voluntarily building PostgreSQL from source with a C compiler)

The story continues with my attempts to venture into the wierd world of Smalltalk. A while ago I downloaded Squeak but decided it was just too strange an environment to be worth the effort of learning to use in my severely limited free time. The download and installation were completely painless though, and everything worked first time.

Still hankering after a real programming language, however, I decided to have a look at Cincom’s VisualWorks Smalltalk, which is free for non-commercial use. It has a very good reputation, is the subject of an interesting blog by James Robertson, and Chris Petrilli points out how svelte it is compared to a (roughly) comparable Java/Eclipse setup. Can’t be bad.

Oh yes it can. First of all, you have to register to download the free non-commercial version. This is mildly irritating but understandable for commercial software – perhaps somebody’s bonus (James?) depends on counting the number of “developers proselytised”. Having got past the registration, we are offered a choice of an online installer or downloading a CD image. I look at the installation instructions (pdf) for the CD image; they were last updated in 2002 and refer to the Mac OS X version as a beta. I sincerely hope that is not actually the case, but decide to try the online installer just in case. It (slowly) fires up an installer screen which is clearly a product of the “look out of place everywhere” school of cross-platform GUI development: the fonts and icons it uses aren’t bad, and would probably even look decent on a Windows or Linux box, but they also clearly aren’t Mac-native. I am disappointed to discover that the download is several hundred megabytes despite what Chris Petrilli said, and that Cincom’s ftp server seems to be capable of about 30 kb per second. This is clearly going to be a long job; tracking how long isn’t going to be helped by whoever decided that showing the progress of a several hundred megabyte download in kilobytes, without commas, would be a good idea – so you have to squint at the screen and count digits to even read the numbers.

The progress glacier creeps across the screen, until I forget about it while looking at something else and accidentally put the laptop to sleep. When the installer tries to resume it crashes immediately. I start it up again and go to bed, since by now it is nearly midnight, having already told it at the beginning of the process to skip any existing files it finds. In the morning it has puked this thoroughly slick and professional looking buffer overrun onto my screen:

VisualWorks error message

I will persist with VisualWorks. I am writing this on the subway to work, and have left my desktop Mac gradually downloading the CD image (which I hope really has been updated since 2002). But on quality of installation experience, open source has already won again. Hands down.

UPDATE: kudos to Cincom, though, whose CD installer works just fine, and whose installer guy emailed me within hours of this appearing on the web, saying he has already tried to reproduce the problem and can he have more details? I hadn’t emailed anybody at Cincom yet, partly because I was curious to see whether they would pick up on a blog entry about their product. Test passed, and good luck reproducing and fixing the problem Dave.

related entries: Programming


4th November 2005 permanent link

A couple of quotes from Charles Allen’s Search for the Buddha that I found interesting:

Hard to disagree with this one written in 1835 by Brian Hodgson, the British envoy in Katmandu, in opposition to British plans to cease funding education in Indian languages:

Sound knowledge generally diffused is the greatest of all blessings; but the soundness of knowledge has ever depended and ever will on its free, equal and large communication

And this one from the 3rd century BC buddhist emperor Ashoka. Ashoka ruled more of the Indian subcontinent than the British did – the characteristic inscription pillars marking his domains and expounding the buddhist dharma have been found from Afghanistan to Kerala – and turned to buddhism after his spectacular career as an empire-conquering thug.

Beloved-of-the-Gods, King Piyadasi, conquered the Kalingas eight years after his coronation. One hundred and fifty thousand were deported, one hundred thousand were killed and many more died (from other causes). After the Kalingas had been conquered, Beloved-of-the-Gods came to feel a strong inclination towards the Dhamma, a love for the Dhamma and for instruction in Dhamma. Now Beloved-of-the-Gods feels deep remorse for having conquered the Kalingas

He must have been a remarkable man. I find it hard to imagine other “great” empire-conquering thugs like Alexander, Genghis Khan or Napoleon publicly repenting, or even thinking twice about, the hundreds of thousands of deaths they caused.

There’s a rather fine Bollywood epic about the life of Asoka. Being a Bollywood epic it doesn’t really explore the historical and philosophical issues in much depth (!) but it’s great fun, not least due to the presence of top notch babes Kareena Kapoor and Hrishitaa Bhatt as Asoka’s wives.

what would jesus do?

4th November 2005 permanent link

Things I learned on Tuesday whilst managing not to saw any bits off of myself, even though woodwork was by far my weakest subject at school:

Even mitre joints that would barely have scraped a C-minus on close inspection from Mr Ashcroft can still look fairly ok from a few feet away. Especially if you squint or are the loving spouse of the carpenter.

Hinges for doors that cover the entire front of the cupboard are different from hinges for doors that fit inside the front of the cupboard and if you have bought the wrong type of hinges for the type of door you have made, it simply isn’t possible to get them to fit or work. And on a public holiday in Germany, if you find yourself in that situation it is Game Over; you are not going to find a DIY shop open anywhere in the country.

What would Jesus have done? He would have cut everything perfectly straight and square first time, by eye, without use of any precision measuring tools. Just like any other competent carpenter of his day.

hooking up macs (part 2)

4th November 2005 permanent link

After Brian Tiemann revealed to me that the way get my Macs to connect by Ethernet instead of WiFi was too obvious for me to see it, Michael Jennings wrote pondering why it isn’t possible to network PCs over Firewire, that being a nice even faster route that is available on lots of machines.

I replied assuming there must be some reason why that doesn’t work, because otherwise surely everybody would be doing it? But apparently it works perfectly well and has been in OS X for a couple of years, as I discovered on Chris Petrilli’s blog; and, googling further, even works in Windows XP. Here are Apple’s website and slashdot on the subject.

So why doesn’t everybody do it, given that Firewire is four to eight times faster than 100mbit Ethernet as commonly found on laptops and lots of older or low-spec desktops (maybe more, if you count realistic sustained throughput rather than theoretical peak speed)? Well, Firewire is only good for four metres or so, versus about a hundred for normal Ethernet cabling, and Firewire cables are a lot more expensive. But if you have a Firewire cable already, and you have two machines right next to one another, one or both of which have slow Ethernet connections, then it seems like the obvious thing to do. I must try it some time.

related entries: Mac

black tuesday?

1st November 2005 permanent link

A Tuesday Family Life Vignette:

All Saints’ Day is a public holiday in Bavaria. Time for heathy, wholesome family activities; I’m beginning to think we would have all been safer going to work. The score so far: Jack dropped his glass of juice on the kitchen floor, I boiled the milk over, Maria spilt what was left of the milk all over the table. Having somehow survived breakfast, Jack and Maria set off to the park. Two minutes later they were back with blood pouring from Jack’s lip where he had fallen down the stairs.

My mission for the day, meanwhile, is doors for a new shoe cupboard for Maria. If I don’t write anything for a few weeks, it will probably be because I have sawn my thumb off.

all text and images © 2003–2008

< october 2005 december 2005 >