Luke Melia


February 17, 2002

2/17/02, 7:48 pm

Hung out with Mary in TriBeCa yesterday. Went to Bubby’s, where I used to bus tables. Mary used to work down there, too. We talked of love and relationships. A frequent theme for me of late.

Afterwards, I headed out to Long Island to help my stepdad celebrate his 45th birthday. I had the inspired idea of buying him a great bottle of balsamic vinegar for his birthday. He’s Italian, loves to cook… perfect present! At BuonItalia, I found a bottle of the good stuff — aged eight years. It turned out he got three bottles of balsamic vinegar for his birthday.

It was my grandfather’s birthday today. We don’t see him much and stopped by to wish him a happy one. Conversation doesn’t always flow between us, but I tried to get it going, asking him what his favorite book was. He thought for a bit. “The one I wrote,” he said. Turned out he wrote a book about international labor negotiating. I never knew.

I want to start collecting these stories about my, umm, elders. In a different conversation this weekend, I happened from my grandma that my great-great-grandmother left Lithuania for “the Americas” in the middle of the night against her parents wishes! I feel like I should know this stuff and be able to share it with the next generation. The world can use some more legends.

Geek project of the day (non-geeks feel free to stop reading here and help me not embarass myself): If my home computer is playing an mp3 on iTunes, the front page of this site will now show you what song is playing and the artist it’s by. If I’m not listening, or there’s a connectivity problem, the feature won’t appear on the page. I currently have the artist name linked to a search on that artist on I would have preferred AllMusic Guide, but they don’t make it easy to plug into their search.

How it works: a cron job runs on my home machine (Mac OS X on a G4) every 5 minutes and asks iTunes what’s playing via AppleScript. If something’s playing, the script securely connects to a CGI running on this site and tells it the artist and song. The CGI script writes that info to a file. At request time, this page instantiates a PHP object that knows how to access and parse the artist and song info from the file and asks the object if it has fresh info. If so, the page displays a floating css div with the info, otherwise the blog posts flow right along uninterrupted.

The toughest thing to overcome was osascript’s inability to communicate with iTunes when being called from cron rather than an active Terminal session. The workaround I came up with was to make the AppleScript do a remote call to the same machine and that worked. Performs more slowly, but it’s only running on my home machine, so it’s OK for now.

Leave a Reply created 1999. ··· Luke Melia created 1976. ··· Live With Passion!