Hacker's Diary

A rough account of what I did with Emacs recently.

April 30
Chasing memory leaks in librvp. I'm convinced at this point that valgrind is lying to me.

Murderball absolutely kicks ass. It's a documentary about Wheelchair Rugby, and the rivalry between the American and Canadian teams; the latter was coached during the filming of the movie by a previous American allstar who felt he'd been short-changed by the US. You absolutely have to see this. I think Kyle Smith of the New York Post sums it up nicely:
"The quadriplegic rugby players of this documentary taught us all a valuable lesson: Losing the use of your limbs in no way diminishes your desire to kick the crap out of your opponent."
Which is true.

I had a look at whiteboarding in MSM. As best I can tell, it's essentially application-sharing with MS Paint, which means it's probably not something I could easily implement a clone of in librvp. So, back to bug squishing.

April 29
Cleaned up the file transfer code so it's almost sane. I think I've fixed most of the potential blocking points; I've still not implemented a few things like handling of BYE codes other than "OK" but on the whole I'm pretty happy with it.

April 28
Some pretty nefarious hacking and a few packet traces, and lo, I have bidirectional file transfer in librvp. Of course, now I need to go back over it and clean it up, so it's not yet released. The weirdest part of it that I encountered is a mandatory zero-byte write (!) from a receiving client to effectively acknowledge receipt of a block of data. At least, once I put that into the code it worked, and that pretty much correlates with the packet traces I looked at.

April 27
Oook. Went out for "one" after work. Didn't make it home until laaaaaate.

April 26
Some of the continuity skips in Dog Day Afternoon are so jarring even the normally militant IMDb contributors haven't bothered noting them. That said, it's an impressive piece of work, although like any true story it's hard to believe it actually happened - it wouldn't surprise me if they had to tone down reality in order to make the story plausible.

April 25
The worst part of making such slow progress on file transfer (inbound) is that it was in the large part caused by the fact that I don't understand the code I wrote two months ago, and have to go and figure it all out again. D'oh.

Tried a different tack on the unsubscribe stuff. Still not completely right, apparently, when faced with multiple account types (or some such). I may have to abandon it entirely, or make it a conditional compile.

April 24
Hmm, seems like the unsubscribe stuff is still a bit flaky. There's an undocumented (in the RVP docs) short form of PROPPATCH, and there also appears to be a potential problem with multiple logins with different view-ids.

April 23
Hacking some bits of wbinfo for use in the RVP server. It occurs to me that a wbinfo Perl module would be pretty neat.

Boogie Nights was yet another "enh" movie. Something to while away a couple of hours but not exactly a must-see. I am amused to note that while the director said he doesn't do sequels, there's a sequel in the works for next year. Silly director.

You have successfully received C:\Documents and Settings\waider\My Documents\My Received Files\ganked-from-new-phone.txt from waider. Before opening this file, you may want to scan it with a virus-scanning program.
Gaim has segfaulted and attempted to dump a core file. This is a bug in the software and has happened through no fault of your own.
Yes, I have successfully managed to transfer a file from the Gaim client to the Microsoft client, albeit with a post-transfer segfault.

April 22
Finally figured out what I was doing wrong with the disconnection stuff in Gaim: by the time the disconnection function is called, the GaimAccount no longer has an associated GaimConnection, so the proxy callback stuff quietly fails. So now I have a horrible but working disconnection function (horrible because it essentially busy-waits on the PROPPATCH and UNSUBSCRIBE messages, since there's no way for me to tell Gaim to hang about until they're done) which will, no doubt, cause something else to break.

April 21
It appears that I may have now added Apache 2.2 compatibility to the mod_ntlm_winbind code, through not using a deprecated API call (d'oh).

Added a flickr sidebar to my front page because, hey, I can.

April 20
From what little I recall of Fern Gully, Titan A.E. is sort of the same thing except in space. I'm not sure why I rented this other than yay, quasi-Irish animation house (see Don Bluth's bio) which had, er, no involvement since it folded some years before this was made. I dunno, I have no more excuses.

Important RVP development: interpreting fonts and colours sent by the Windows client. Vital, I'm sure you'll agree.

April 19
Doot doot. Which bug do I fix next? Oh hey, the Samba guys have put my patches for mod_ntlm_winbind in SVN, if you need a copy. It appears to be working pretty damned well at this point.

April 18
Much tooling around with CD-RWs and floppies and handwaving.

April 17
Ok, what the heck. librvp 0.8 released.

And for good measure, here's my test server. You'll note that it's not very secure; it's intended as a testbed rather than an actual RVP server, but it does the job well enough to fool the official client.

Fixed up (I hope) a coredump problem in mod_ntlm_winbind and sent a patch to the Samba folks. I'm not 100% sure, but I figure if you're testing that a pointer to a memory blob is null, then you should null out the pointer when you free the blob.

April 16
Crash is an excellent movie. It's not perfect; there are a few loose ends that I'd like to have seen cleaned up, but on the whole it's a really well-made (to use the director's words) ensemble piece. Well worth seeing.

Cleaned up the last (I hope) of the multi-user chat insanity. I'm debating whether to release this as 0.8; there are a couple of important fixes, but nothing major. I guess I should go ahead and put it out there.

April 15
I found the DVD extras for The 40-Year-Old Virgin far more entertaining than the movie itself, possibly because they required less attention. Having said that, the movie was entirely predictable anyway. It's a bit of American Pie, a bit of Office Space, a bit of Swingers, really nothing you've not seen before. Having said that, there are a few laugh-out-loud moments, and the outtakes/deleted scenes/etc. are worth borrowing someone else's copy for.

Fixed another group chat bug in RVP.

Did a live upgrade to FC5 on one machine. Predictably, it didn't quite work, but I'd intended doing a rip-and-reinstall anyway.

April 14
So, as expected, group chat still isn't fully sorted, but that's okay; the fixes I was putting in last night were mostly side-effects of other bugfixes.

April 13
Found a really obvious bug in RVP which had been plaguing a coworker. Essentially, you're going to be very lucky if you can successfully unsubscribe someone else from their own subscriber list... not entirely sure why it breaks all subsequent stuff, but that's probably a side-effect of the stupidity.

Fixed a few more bugs, and made it so you can instigate multi-user chats from Gaim. It's clunky as hell, but there're no GUI hooks I can hang an Invite button off, so.

April 12
Work's been very busy the last few days, resulting in a slightly knackered Waider with no real interest in tackling bugs on the bug pile. Normal service will be restored shortly. Or not. You know how these things are.

On the plus side, an old friend has reappeared in my life. Hurrah!

April 11
Happy Birthday to me! I bought myself a new domain: despite the lack of whois information, I'm now the proud owner of waider.eu. I've no idea what I'm going to do with this as I registered it largely on spec.

April 10
So it turns out my NTLM Auth stuff for Apache 2 (go look in Samba SVN, it's in there!) isn't exactly correct. In particular, it may SEGV under some circumstances and may leave extra ntlm_auth processes lying around under others. So I'm going to have to figure out what exactly is broken, which means getting deeper into the Apache 2 API than I'd really intended.

Also, as you'd expect, last night's bugfix has a bug. I forgot that Gaim requires a plugin's normalize function to return a static buffer; thus, if you call it twice in a row, you have to save the value in between or it gets stomped on and you end up comparing e.g. "foo" to "foo" instead of to "bar" as you'd hoped. See previous ranting on the topic of the Gaim API. In passing I've also updated my RVP server to hand out the proper response for resubscribes, including (I think) a 412 error if you try to resubscribe with the wrong URI, although since I've fixed the Gaim bug I haven't tested this feature. I should really finish off the ACL stuff for the server and punt it out on the website.

April 9
Finished out the conversion of MPLE code to more generic NW code; now I get to add handling for the newer version of the format, at which point I will hopefully figure out which parts of my API should be generic_function_calls_pointer_function, and which should be call_pointer_function_directly. It's about 50/50 at the moment, and I'm not convinced it's right.

Bug! Found!
When refreshing a lease, a successful response from the PRESENCE SERVICE returns a response code of 200 – Successful.
In my code, I was treating a 200 response to a SUBSCRIBE as always belonging to my own subscription (which is true for the initial subs, just not for lease refreshes). The ironic part is that I'd flagged the code with "I should check this." D'oh. Fixed, as they say, in the next release.

April 8
Finally got around to watching Downfall, which I taped more than a month ago... it's a powerful movie, and I found it interesting in that much of the actual war aspects were implied - the action never leaves a small number of locations in Berlin and the bulk of the scenes are in the FürherBunker; the camera cuts away from many of the suicides - even Hitler's is rendered as a gunshot heard from outside. I've been nosing around in Wikipedia a bit as a result, reading up on stuff like the inhabitants and survivors of the bunker, the post-war trials, etc.

All the MPLE track stuff done, now just the filesystem stuff left. Then I start working on the v2 stuff, and stomping on any memory leaks I've inadvertently introduced along the way.

April 7
Subscription bug continues to elude me, so I'm concentrating on finishing out the MPLE stuff while I wait for inspiration.

April 6
Still chasing the subscription bug. I may have to resort to valgrind to catch this, dammit. I still haven't come up with a minimal test-case, either.

Added another couple of bits to the MPLE stuff.

April 5
Hrm, so I can see the bug, and I can see it's still happening even though I thought I'd fixed it, and the best I can do is put a bunch more logging on it and wait for it to happen again. Bah.

Added another function to the new MPLE stuff. Step by step... soon I'll be at the point I started with!

April 4
Kingdom Of Heaven is about 40 minutes too long and is full of really laboured dialogue attempting to get across the rather simple notion, "why can't we all just get along?". It was engaging enough that I didn't turn it off halfway through, but it didn't exactly have me clinging to the edge of the chair in anticipation, either.

So I think I've fixed one RVP bug, but I'm doing various long-running tests to verify it, plus I'm pretty sure the fix leaks memory and that's another area I've been putting off fixing. I guess I'll have to approach it sooner or later, but what I really need to do first is figure out how to get some arbitrary memory checker tool to ignore everything that happens outside my control, e.g. leaks in GTK.

April 3
In fixing up my code that scrapes Vodafone's photo album into Flickr, I discovered that my phonecam actually puts useful EXIF data into the pictures and updated the script to take advantage of this when setting the date. Excellent! Mind you, the photo album website hasn't gotten any better (it recently vanished for a few hours when (presumably) new code was rolled out referencing a 10.x.x.x address); where previously my photos were turned into a two-shot slide show featuring the same picture (with different filenames) and caption twice, it now features the aforementioned double picture, but with some bizare XMLish caption on the second, and a third image of a blank film frame (you know, with sprocket holes along the edge) with the caption from the first frame. I have no idea what they think they're doing with this. Who knows, maybe it's a function of what my phone actually sends them.

Started looking at the RVP code again as there are a few bugs that need cleaning up.

April 2
Well, the new NW code is now dumping out something resembling the contents of my MP3 player, but it's not quite right. On the plus side, I've inadvertently discovered that my xterm can display kanji...

Aha, that'd be on account of UTF16-to-UTF8 conversion on an already-converted buffer. D'oh. Fixed that, and finished implementing the folder handling, although there's some memory leakage that I'll need to revisit once I've had another shouting match with autoconf.

April 1
Added a function to cddb-mode.el to convert Grip multi-artist files (using TARTIST tags) back to "normal" CDDB files.

Continuing to carve up the MPLE code with a chainsaw. I might well be better off rewriting from scratch...

previous month | current month | next month

Waider | Summer's arrived early