< | >

Hacker's Diary

A rough account of what I did with Emacs recently.

May 31
Socialising day... met up with relations (including mom) for elevenses, and Lou and some of the Lou crew for lunch. Summer seems to have come back again: blazing sunshine all day long. Too nice to sit inside with a computer, really.

May 30
A quiet couple of beers in the office local with some of the crew, and a quieter night at home.

May 29
Home of the Brave isn't particularly bad, but the problem is that it doesn't do anything new - it's essentially a generic anti-war movie updated to refer to the current Iraq conflict instead of, say, Iraq I or Vietnam. Not really worth chasing down if you've already seen something like In Country or The Deer Hunter.

Had a go at figuring out why streamripper wasn't working right on the Mac. First off, the included tre library is bad news: trying to build it causes a mass of warnings, and trying to use it causes bus errors. It looks at the very least like there's some sort of "my pointers and my integers are the same size" mess going on, but I wasn't going to dig into it too far since streamripper's configure script has an option to skip it. Next, there's an argv.c file which you're supposed to be able to disable, but it apparently ignores that option, and the file won't compile due to some curious conflicting prototypes for a few standard functions like memcpy. The #define that permits these appears to be based on whether you're using the GNU C Compiler, which is silly, as it has these prototypes built in. Then there's the iconv library: if you use the one that comes with fink, it doesn't work, but if you use the system one, it does. The annoying thing is that both the fink version and the system version are 2.4.0, but somehow the fink version doesn't export some critical symbols. Removing iconv-dev is sufficient (apparently) to fix the problem, which suggests that it may actually be a header file problem. So eventually, this is what gets me a buildable source directory: ./configure --without-included-argv --without-included-tre CFLAGS=-DANSI_PROTOTYPES.

Of course, after all that it still wants to skip the first track in the stream. It also prints a bitrate of -1, which is incorrect for this particular stream. The first problem appears to be a failure to initialise prefs->dropcount correctly; adding -k 0 to the command line appears to cure the problem nicely. I suspect the second is actually an artifact of me not including Ogg support - from a casual glance, it appears to unconditionally try to set up the Ogg decoder even if you don't use one; however, there may be a number of other factors causing this, including (again) a failure to initialise things correctly. Remember kids, just because you haven't used the memory yet doesn't mean it's set to zero (hello to you folks at OpenSSL who relied on this, and you folks at Debian who commented it out...) Anyway, the upshot of all this is that I now have one less thing that I need to do with the Linux laptop.

May 28
Went back to the aforementioned Perl banking stuff problems, and fixed them. More HTML changes, mostly. I'll post an updated set of modules before the weekend.

May 27
Charlie Wilson's War is a rather excellent piece of work, and sufficiently close to the truth that the eponymous congressmen is quoted as saying that all the bits he'd object to are provable. Well worth a look.

May 26
Gym night. No geekery to speak of. I'd started looking at problems with the Perl banking stuff and gave up on it.

May 25
...and back to Dublin. With an Airsquire Micro Helicopter, no less.

May 24
Off down the country again... stopped along the way to buy a new digicam. More toys, whee!

May 23
Happy birthday, big(ger) Bro!

May 22
Gattaca is one of those movies that I keep missing when it's on TV, so I finally rented it instead. It's a bit too slow for my liking; nothing inherently bad about it, but I just found myself looking for something to engage my attention at various points throughout.

May 21
Hurrah! Gym telemetry all repaired. Well, at least on all the machines I'm likely to use, anyway.

May 20
Gah. The plan for the evening, such as it was, was to head to the gym and try and get myself back into something approximating working order after my exertions on Sunday; said plan was somewhat scuppered by arriving at my house only to discover that I'd left my keys on my desk. Further scuppering was induced by the fact that it was the landlady's bridge night, so she wasn't back until 10:30. I wound up treating myself to a restaurant dinner and a few too many coffees.

May 19
As suspected, running streamripper on the one linux box I'd previously installed it on results in successfully ripping the track that the MacOS version skipped. More investigation required, I guess.

Ok, that's pretty funny. I have some code that I've been tooling around with for a long time that scrapes one website and then crossreferences it with another site (deliberately vague, I know). Recently I ran into a problem with the first site using a single quote in a significant place; it's something that commonly breaks either your javascript, your database queries (although this is an unforgivable rookie error AND a potential security hole) or some combination of both. I ran into a third set of problems while trying to cope with this, mainly to do with how the MacOS browser handles the data I was throwing at it. Having half-heartedly poked at this for a few days I left it in favour of other things, and now I discover that the original data has been updated to avoid using a single quote after all - I guess it breaks their in-house systems or something.

[Guide for Mom: what's wrong with the single quotation mark? It's a simple enough problem: normally, if you want to put a piece of text into a program in such a way that the program treats it just as a piece of text and not some piece of code to be interpreted, you put it in quotation marks - almost as if it's reported speech, which presumably is where the syntax originates. Some languages require single quotation marks, some require double quotation marks, and some allow you to use either, occasionally with subtle distinctions between how either variant is handled. But what if you want to include a quotation mark as part of your quoted text? Written English has some rules - or perhaps guidelines - on this, but that aside, a person can look at a quotation mark and generally figure out from context if it's part of the quoted text or part of the surrounding unquoted text. Computer languages generally aren't quite smart enough to do that, so a spurious single quotation mark can get interpreted as the end of the quoted text, leaving the computer to plough through the rest of the quoted text as if it were, in fact, code. How you get around this problem again varies from language to language, and dealing with the different variants almost inevitably causes bugs, occasionally of the hair-raising sort that leaks vast amounts of personal data onto the Internet.]

May 18
Got up, drove to Terenure, ran 5 miles, drove home, drove to Wicklow, hung out with the guys, gals and offspring, drove back to Dublin. Legs are still a bit sore from the 5 miles bit.

Built streamripper from source on the MacBook; the included TRE library craps out somewhere, but there's an option to disable it, so that's ok. The resulting binary skipped the first track on the stream I was trying to rip, however, which is not so ok. Will have to power up the FC6 laptop to find out if the problem is the stream or the binary I've just built (my guess is the latter).

May 17
Back in Dublin again.

Balls of Fury: Balls of fun. Not high art or anything, but high art rarely makes you laugh out loud, right?

May 16
Down the country for a wedding. Congrats to Ralph and Eilis.

By "down the country" I mean "five and a half hours in the car, covering about 250 miles". Some of the driving was quite, uh, entertaining.

May 15
Hitman was about as good as you'd expect for a movie made from a video game, i.e. not very. Bizarrely, Timothy Olyphant seems to walk as if he's a character from the game, i.e. in that odd part of the Uncanny Valley where he looks creepily non-human yet human-like. Anyway. Not even a movie to switch off your brain to.

May 14
Happy Birthday, dad!

May 13
One of the guys in the office loaned me a Flight of the Conchords DVD. I watched one episode. It's pretty awful, and that's being kind.

May 12
Poking at the phone with Perl again. Managed to trigger a spontaneous reset simply by connecting to it via Bluetooth... such quality software these phones have.

May 11
War was a bit more cerebral than I was expecting, and I certainly didn't see the twist coming. Pretty good movie, though.

The Palm is playing silly buggers, failing to sync completely for reasons unknown. And getting wedged while it's trying to cancel the sync process. And it managed to lose about a week of EatWatch data on me when I finally did get it to sync. Gah.

May 10
Oof, woke up with a head full of BEES. Or something. That'll teach me... or not.

Indiana Jones and the Last Crusade was on the box, so I watched that, and then half-watched Windtalkers which I've seen before. Both excellent movies, for varying reasons.

The non-movie-watching half of my attention was focused on a pile of rancid perl scripts that I've accumulated for dealing with phones, mainly concerned with retrieving SMS messages from the phone and archiving them, including cross-referencing my Vodafone bills to get datestamps for sent messages (since for some reason the phone never bothers updating the date on outbound stuff).

May 9
Office drinkies.

May 8
I can vaguely recall one of the video shops of my youth had, for years, a movie poster for Videodrome - basically James Woods' partly there, partly not body on a blue spiral background. Eventually I saw it on TV at some point, and while it's fairly typical Cronenberg (visceral goop apparently being one of his favourite things) it's also rather a good piece of work; I recently picked it up on DVD for rather a small amount of cash and watched it this evening. I find it funny that the scenes featuring the aforementioned goop are, in fact, more realistic in many respects than the more straightforward VFX of people getting shot... if you've not seen it, it's at least worth seeing as a cult classic.

May 7
Noticed some further breakage on the MBNA scraping stuff. Dammit. This always happens - I hold off for ages on making a fix to see if the site "settles" and then as soon as I make the fix they change it again.

May 6
Michael Clayton could probably have done without the entire opening segment (particularly given that it's out of sequence and recapped in sequence later in the movie) but aside from that is a pretty good piece of work. Worth a look. Coincidentally starring Tilda Swinton in a role that has certain parallels to her role in last night's fare.

May 5
Crazy phone discovery of the day: phone becomes very erratic when SMS mailbox fills up. To add to the fun, I received a SMS from Vodafone (apparently) to tell me my SMS box was full. How am I supposed to receive that message, exactly?

Watched Constantine's director/producer/whatever commentary; as these things go, it was pretty wacky. Not quite Kevin Smith, but certainly more interesting than the usual mutual back-slapping crud.

May 4
Lou was at fencing practice again so she stopped by for the usual coffee and gossip. We took a wander around Dalkey as well, what with it being sunny.

Hacked up some Plua to allow my Palm Pilot to talk to a mobile phone via IR (Plua 1.x comes with no support for Bluetooth, alas). Surprisingly little code was required, too. Nice language, although the non-regexp regexps are a bit wacky.

May 3
Mostly fixed the TV listings toy. The source from which I'm scraping the listings changed their layout somewhat - ah, the joys of webscraping.

Usually, "based on a true story" is Hollywood-speak for "we took one person's real name for the movie. Except we changed it a little". Howver, Breach doesn't ever stray far (if at all) from the truth - given that what's actually known is only as much as the FBI felt comfortable enough to okay. Aside from all that, it's an excellent spy movie; as the director noted, you really can't make up any of this stuff - what actually happened (with caveat as noted) is far better than any fictional storyline. Well worth seeing.

May 2
Hmm. Looks like the toy I use for scraping TV listings is (a) broken and (b) not reporting the fact. Curses.

Watched Grosse Point Blank - one of the few things I own on VHS rather than DVD - and it's still as good a movie as when I first saw it. If you've not seen this, you really should.

May 1
Some of the more fascinating TED talks are the ones where the speaker has way too little time for what they're trying to cover - Dean Ornish, for example, giving you the dirt on how a change in diet can dramatically change your health - and he's only got three minutes to do it. It's so punchy you're almost left reeling from the flood of information.

Trying to refamiliarise myself with the more obscure corners of the code I wrote myself in librvp, such as the file transfer stuff. My recollection of this is that I mostly hacked it together over the course of a few nights with the help of some packet traces and what we will laughingly refer to as "documentation"; it's certainly entertaining to read some of the error messages I put in, but there's also a few potentially nasty bugs.

Hmm, interesting. I think it's not originally my code, but it looks like some of the network write stuff tries to read a response immediately, which should really be decoupled into a separate function. Note to self, etc. Might explain some of the more persistent yet difficult to reproduce bugs, too.

previous month | current month | next month

Still waiting for the sun