< | >

Hacker's Diary

A rough account of what I did with Emacs recently.

October 31
So I'm still using shout to stream the stuff into icecast, and I'm now actually listening to the stream. And for some reason, it gets choppy every so often. This is on a 100MBit ethernet circuit. I have no idea what's happening here, although I'm vaguely suspicious of assorted clock skewing so I've killed off xntpd for now. I had a look at the shout code, too. It looks like someone wrote it by figuring out what functions they'd need in, for example, main(), writing function calls for all those functions, and then figuring out how to implement each one. It's clean in one way, but in another way it's bloody impossible to follow. Too much jumping around between functions.

Looking at netstat I notice that the icecast stream is backing up data on the Recv-Q. What the hell? Maybe there's something in a newer kernel to fix this. I had a look at patching Klortho up to pre9, and ran into some trouble - after pre6, adding a vga=792 to the boot command no longer brings the machine up in usable graphics mode. However, it does work up as far as pre8 if you specify vga=ask and then feed it the mode number (in hex, without the leading 0x) on bootup. This is a MAJOR pain. I looked through the patches, but nothing really stood out as being the culprit. There's been some very minimal change to the VESA framebuffer stuff, and a bit elsewhere in things like fbcon.c, but nothing that I can imagine would cause what I'm seeing.

Also, VMware breaks under pre7 or pre8, although I think I recall some discussion on the VMware news server about this.

Huge patches to OMS today. Including something which breaks the esd build (change 'rate' to 'speed' and it'll build). I wish they'd use a damn ChangeLog. Oh, you'll need to change 'filds' to 'flds' in the ac3dec build too. And after all that, it still won't work. Perils of bleeding edge, etc.

October 30
Midtown Madness 2 is an exceedingly fun game, mostly when played in "Cruise" mode whereby you can drive around trying silliness. Currently, I've managed to leap clean over Lombard Street, park a car on a roof, get a car stuck in a compound with no exit (another jump), jump a firetruck over the Tower Bridge, push a police car into both San Francisco harbour and the Thames, and flip a car end-over-end in Hyde Park with some help from a fountain. I like the idea that you can just implement some basic physics, a three-dimensional world for 'em to live in, and some assorted AI for the traffic, cops and pedestrians, and then let people do what the hell they like.

The Perl 5.6 patch has reappeared in the pilot-link source. Bizarre. Looks like someone rodgered the CVS tree, then repaired it.

October 29
Happy Birthday, JoeV!

October 28
Left shout running overnight. No small children were harmed. A good sign.

Feh. OMS is still upset. Works with some DVDs, doesn't work with others. Bizarre. I had a poke around in the code, but it's a bit complex and I gave up, rebooted to NT, and watched Blade instead.

October 27
Played around with Gronk today, starting with making it read Grip's config file to find out how MP3 files are tagged.

I've just crashed Gonzo for the first time in quite a while by trying out LiveICE-xmms (as recommended in the Gronk README). Hmm. I think I'm gonna use shout or something instead of it. I'm talking hard crash, too. It stopped cold. Of course, I've the Magic SysRq key disabled, so I guess it's kinda my own fault. Please wait, fsck in progress.

After some abuse, I got shout compiled and built. And running, after a fashion. I'm not sure that all the commandline flags work, and the Makefiles are a little toasted, but heck. It's a start. Now to glue it on to Gronk.

October 26
Put a little VM randomness on a page, for anyone insane enough to borrow it. Also cleaned up/updated a few other pages around the site. I still haven't stylesheeted everything, and some of the stuff in the Emacs hacking section hasn't been touched, quite literally, in years.

It appears that I imagined the entire Perl 5.6 fix for pilot-link. Bizarre. What you want to do is add 'POLLUTE'=>'1' in Makefile.PL.

The useradmin problem for the helpdesk was solved by upgrading to a version of Apache that supports the -b flag for htpasswd. Shazam. Fixed over the phone, thank you Louise!

OMS is dumping core again, this time somewhere in threading code. Argh.

October 25
Paul called this morning to briefly check a couple of things with the helpdesk. The useradmin stuff isn't working for some reason which I thought might be permissions-related but apparently isn't. Hmm. Might need to go back in and check it.

October 24
A little more hacking on the helpdesk, and presto, it's working. Paul has said he's going to spend the rest of the week breaking it, and then it goes live on Monday next along with any fixes I make. Oh, hang on. Monday's a bank holiday. So, Tuesday, then.

Posted my id3lib patch for Grip on the sourceforge Grip site at the maintainer's request. Whee! Then I downloaded the new release (2.95), played with it for 30 seconds, and went back to my hacked copy. I should make a proper patch for the changes I've made, I guess.

I poked around at the DGA code in xmms, and looked at what I'd have to rip off to make DGA work in OMS. It doesn't look exceedingly difficult, but I still don't know DGA, so... *battens down hatches*

October 23
Spent a few hours working on the helpdesk today. Most of it works, now, including at least one "I didn't think of that, but the code handles it okay" incident.

October 22
Final F1 of the season today, as Ferrari go for the constructors' championship to add to the drivers' championship of a fortnight ago. Cars off after the first lap. Whee! There's a camera view mid-circuit that looks somewhat surreal, due to the colouring of the grass and, I guess, the angle of sunlight on the track. Schumacher won the race, giving Ferrari the constructors' title. Good stuff!

Klortho fell over really hard just now. The hard drive was clicking. Nothing lost, but I did have to do a hard reset - not just the power switch, Fn and the power switch!

As predicted, hotmail guy was unhappy with my reply. Very unhappy. Like, name-calling unhappy. Sheesh. Some people.

The Plucker folk have done some updates on the pilot-link source. The Perl stuff should now build on 5.6, although I'm not sure their solution is the right one. I've removed that portion of my patch; what remains is the malsync stuff and the other bugfixes I'd stuck in.

I'm writing a helpdesk for Stepstone to tide 'em over until the official corporate helpdesk gets installed. Much as I dislike the sort of "not written here" attitude that leads to 57 different varieties of the same piece of code existing on freshmeat, I'm doing this from scratch for two reasons: firstly, I'm more offline than on, so searching for the right components is a PITA; secondly, this is paying for my laptop. It wouldn't be very ethical to just glom together a bunch of netstuff and call it "work".

October 21
Shopping (music, DVDs, book) and drinking (the pub).

October 20
Second TV booster returned to Maplin. Seems like I won't be watching TV in bed...

Managed to build a shared DGA library, eventually - I resorted to adding a patch to the 33 or so already in the RPM that modifies X11.tmpl, which is kinda abusive, but I was fed up with tooling with X. It takes longer to build X than it takes to build a kernel. This makes little or no sense to me. Of course, I then discovered that the X11 plugin for OMS merely requires DGA; it doesn't actually use it! So, I had a look at the DGA readme to see if I can figure out how to use it. Looks simple. That's "simple" as in "primitive", like if I want to draw a line I need to write my own routine to do it. Euw.

OMS has improved since I last had it running - it's less choppy, even though the framerate appears to have halved(!); also, I can skip a few chapters before the mpeg plugin dies. Not anywhere near perfect, but certainly improving.

And I have a :CueCat. I have no idea what use I'll put it to, but hey. Geek toy!

October 19
Finally figured out why OMS wasn't running: I don't have a shared library for DGA. Cue immense silliness as I rebuild XFree86 from source, trying to figure out which magical incantation persuades it to build libXxf86dga.so. Dealing with X source is bad enough; what complicates things further is that I'm building from an RPM file, and I'm too lazy to read the build commands the .spec file uses. So it's sort of "pushd, tweak tweak, popd, rpm -bc --short-circuit XFree86-3.3.5.spec". Lather, Rinse, Repeat.

Of course, I tried usinq the SDL output plugin first, since I have SDL 1.1.4 installed. Blammo, core dump. I suppose I should try fixing it, although the required fix is probably more complicated than upgrading to the recommended SDL 1.1.5. Also, OMS is full of shared libraries (ok, plugins) and from memory, debugging them with gdb is, to put it mildly, not fun. Of course, I've always been a "printf, make and run" debugger. Old sk00l timewasting.

Some random hotmail guy mailed me about making money out of my CCSE. He obviously missed the tone of the paragraph concerning qualifications. Also, the mail read like a marketing pitch. Ick. I'm sure he'll love my reply.

October 18
Spent much of the day attempting to coax NT back into life. Once I figured out why the network driver wasn't loading - the "Upgrade" button didn't work so I had to manually remove the existing driver and then install the new one - it was plain sailing, right up to and including installing DVD software. Woo woo! Spent the rest of the day poking at the installation (black desktop, check; toys on desktop, check...) and playing Unreal. I know, how very 1998 or something.

October 17
Aie! Work! Fixed up a website problem for Stepstone today. It was so traumatic, working after almost a month of slacking, that I spent the rest of the day knocking around with JoeV again.

I'm writing this on my Pilot while taking the bus to the office, and it occurs to me that a Pilot-based web authoring system would be kinda neat. For my own use, I could tie it into the linkfarm toy I've been playing with. The Pilot end of things needn't be any more complex than parsing a particular category of Memos and applying my near-standard markup to them.

Managed to pretty much total my NT installation. Just as well I don't keep anything actually useful on it. In the process of trying to untotal it I failed miserably, and it looks like being a rip-and-reinstall job. Gah. I HATE WINDOWS.

October 16
Called over to JoeV's again to fix a few things on the Micromail site. In the process, I discovered the pain involved in upgrading GnoRPM. Lots. It's not helped by the fact that GnoRPM likes to fail quietly rather than telling you what's wrong, and also by the fact that half the RDF information is useless - most of the Metalab-based packages don't seem to exist, and a few of the entries appear to be corrupted. And it would be really nice if I could tell it that I don't have the slightest interest in (a) packages for older versions of RedHat and (b) packages for non-x86 architectures. This is the latest, Alan Cox-blessed version of GnoRPM, too.

October 15
I'm getting far too much amusement out of watching XMMS playing something like "track #1345".

Called over to JoeV's place and abused his net connection for a few hours, allowing me to check in all those BBDB patches I'd been generating.

There's a second problem with the perl Monitor module; if I suspend the laptop, Perl::Tk's timer gets all hosed and the monitors all go to sleep for a few centuries. No biggy, just restart the monitors. So I guess the next thing is that I need to bind a default restart gesture into the module.

Modified the mud client to use Emacs' customization interface. I'm going to have to read some more documentation to get the setup right, and possibly hack up a few helper functions, but it's certainly looking good. Especially on XEmacs, where they've had in-buffer graphics for, oh, years now...

Had another peek at the required evil to get VM to behave sensibly with POP mailboxen. I've got a good idea of what I want to do with it now, and it's horrific, but it confines the modifications to the POP handler rather than requiring me to go delving in the folder code and all the rest of that funky stuff.

October 14
Bob: I think I'll go to the pub today and get drunk while it's still bright!
Waider: I feel morally obliged to help you!

Boy, was that ever a dumb thing to say. Being hung over at 9:30 in the evening, when most people are just getting ready to go out, is not fun.

October 13
Upgraded Gonzo to test9 since the latest version of the SB Live! Driver requires some random PCI-related call in it. The cost of being on the bleeding edge, etc. etc.

Investigated Gronk installation, seeing as I now have a rash of MP3 files to throw at it. Parts of it look needlessly complex and I suspect I can dig some bits out of mp3name.pl for it. Also it's another candidate for reading .griprc to discover things like MP3 filename formats, etc. And hey, now that I've hacked Grip to put in ID3v2.3 tags, I don't REALLY need all these damned CDDB files, right?

Started converting my id3lib module to C++, since the C interface to the library leaves out a bunch of stuff. And now I've broken the code somehow. Gah.

October 12
Argh. 800K of an email message. Not much, except that I'm still confined to mobile access. And it's probably some bloody Windows executable flong.

And now a 900K message. Gonna have to kill my siblings, I think.

Discovered that the perl Monitor module chews memory like nobody's business. Turns out that calling $main->after() at the end of the update function is the wrong way to do it; a single call to $main->repeat() is the Right Thing.

October 11
Brought my apparently-not-working TV booster/splitter back to Peats, where they gave me a replacement. No quibbles. I like that.

October 10
After some experimentation, I discovered that the bulk of my original pilot-link patch could be replaced by a one-line patch to Makefile.PL. So that's what documentation is for. I've updated the pilot-link patch to cope.

Went messing with snorq some more so that you should now be able to dictate how it lays stuff out. I also added in Goats and JerkCity. JerkCity is offensive. Really, REALLY offensive. Don't click on that link and then come whining to me about your poor offended sensibilities.

Modified cddb-mode.el's readline code to work a little like Microsoft's AutoComplete - it inserts a default string, and then positions the cursor at the start. If you type the same stuff, it behaves as if it's in overwrite mode; if you type something different, it kills the rest of the line the first time you do it. I've even got it to switch on transient-mark-mode in the minibuffer so you can see what it's doing. I'm thinking of making this a general minibuffer keymap hack for my local Emacs, since it stops me having to use C-k all the time. And I'm lazy, dammit.

Did some more work on my linkfarm toy, including a bunch of lisp code that tries to find a link for the text preceding the current point in the buffer, which is kinda neat. Tying this into live typing kills Emacs, though. Well, not exactly "kills"; more like "makes so slow as to allow for coffee between keystokes ". Two things spring to mind: caching and only searching when a word-terminator is entered.

October 9
Dixon's phoned me at some ungodly hour (i.e. before lunch) to tell me that my Pilot is ready for collection. Cool!

Modified Grip to use id3lib for tagging. One less thing to wish for.

October 8
Yay! Schumacher wins Suzuka Grand Prix, becomes 2000 World Champion. That rules.

I've decided I'm happy enough with my perl Monitor module that I'll stick it here. Essentially this is a silly little module designed to make it easy to build monitors that use periodic polling to update themselves, such as a battery monitor or a share monitor. I now have an IrDA monitor on my desktop toolbar, too.

Hushed up some compiler noise in BBDB. I need to commit a bunch of changes really soon before I get out of hand.

Wrote a bit more of the id3lib Perl module. It's slow, since I'm learning about XS as I go along, and also since I'm learning about id3lib as I go along. Far too many functions have no return value, IMHO.

And Klortho's still doing that once-a-day lock-up thing. GRR.

October 7
Klortho locked up hard again while ripping. Looks like the incessant disk activity is causing the CD drive to drop an interrupt here and there, and then the whole machine locks up as it tries to access the hard drive - looks like the entire IDE controller gets locked out. Ouch. After running fsck I modified rc.local to check if I'm networked and to mount the NFS share on Gonzo if it's available. This way the laptop boots without errors but will also pick up network facilities if they've been provided, which is nice.

October 6
Started reading about how Perl's XS mechanism works, and then started trying to write a module for id3lib. Slightly hampered by the fact that I don't know how to use id3lib, I had a look at downloading it and decided that I didn't have the patience to wait for 800+K over a 9600-baud link. So I got Conor to download it onto a floppy from his office. Sigh. Brings back memories of college...

I also had a look at trying to figure out how CDDB-commercial's HTML interface converts a 32-bit discid into a 128-bit hunk o' junk with the intention, I'm guessing, of not allowing people to randomly haul disc data out without actually having a disc. I can't think of a motive for that, though. Anyway. I'm beginning to suspect it's some sort of hashing algorithm since I can't see any obvious derivation from the discid, and also since the resulting number is actually too big to handle as an actual number without special-purpose libraries, which I refuse to believe they're doing. No, I have no idea why I have this notion. Problem here is that I really don't know anything about hashing algorithms; this is going to have to be a reversible algorithm, too, since otherwise it just makes more work for the search engine - unless they've simply databased all the precomputed values or something silly like that.

Played around a little with VM, trying to see if I could quickly hack up better POP support as ranted about here. It's a little more involved than I first guessed, but I might be able to do something nasty that works. Hyuk hyuk.

Modified Grip to not pop up a modal dialog box when it can't look up your disc (should be a status bar on it for this sort of lark, I think) and also added a "Load Disc Info" button which reloads the local CDDB file after I've edited it. So, the procedure at the moment is insert disc, save blank CDDB file, edit CDDB file in Emacs - I now have a fully-fledged cddb-mode.el - reload edited CDDB file, send to CDDB server on Gonzo, press "Look up CDDB" button, and it does the rip for me. Not overly painful.

October 5
Fiddling around with stuff like BBDB in between entering new tracklists for the CD ripping. Klortho fell over hard today, and ate a few unspecified disk blocks. Hope it was nothing important. More annoying was that I had an Emacs session running with at least a dozen active buffers, at least one of which was unsaved. Gah. The first sign of this, btw, was an apparently frozen Netscape, and I've just noticed it's frozen again. Yikes.

Phew, it's unfrozen again.

I've decided that mp3name.pl should, in the interests of peace and harmony, be able to read Grip's config file (~/.grip) in order to prevent overzealous relocating of files.

Got annoyed with Grip's data-entry (it's not optimised for entering data on your entire collection, is one way of describing it) and threw together some elisp to make it easier to edit the files in Emacs.

October 4
I'm trying not to think about what my phone bill is going to look like. Mobile access is costing me maybe an hour or two of phone time per day, and the Irish mobile rates aren't cheap. Actually, I've no idea what they are at present, beyond "not cheap". I could look up my provider's website, but that'd require me to go online again...

Finally caught up with the relocated pilot-link code; you need to use pserver:anonymous@cvs.gnu-designs.com:/cvs/openpalm as the CVS root, as opposed to .../cvs/palm which is what you'd think from the website. They've STILL not fixed the Perl interface, and a lot of the changes I saw appear to be code reformats.

The MP3 ripping continues apace.

October 3
Caught up on the files I'd nuked yesterday and added some more. Had a brief foray into understanding how inetd-invoked programs work, culminating in two discoveries: one, I can't seem to use a Perl script as such a program, and two, I can't figure out how to do what I was going to do with inetd. The latter revolves around the fact that I don't always use my main ISP dialin for net access, but I can't get at their news server if I'm not in their IP pool. So I've set up Gnus to connect to localhost:119, which I tunnel on an as-required basis through the waider.ie mailserver - which IS in the ISP's IP pool - and from there connect to the news server. Now, I'd rather that this happened on demand, but I can't run the ssh tunnel all the time for two reasons: the obvious one being that I'm not online all the time, and the non-obvious one being that ssh tunnelling, at least in my instance, appears to be broken such that it only works once and silently fails after that. Hence the inet idea, whereby the tunnel gets spawned off when I fire up Gnus. Part of this requires ssh to use ssh-askpass, which I think is incredibly cool and reminds me of Ordo in Cryptonomicon. Anyway. Not gonna happen just yet.

Dug up a few RPMs I had lying around for IBM's speech-rec toy, ViaVoice. It won't work on Klortho because the Maestro drivers for Linux have a fixed recording rate, and it's apparently not anything that ViaVoice is happy with. Gonzo, on the other hand, was quite happy to run the stuff. It's kinda neat in that it was able to comprehend a bunch of speech straight away with pretty much no calibration, but I need to read up on the doco and find out how to "educate" it. All sorts of amusing things occurred to me to do with this, like recording phone calls, movies, spoken-word stuff from CDs...

October 2
Spent a lot of the day ripping MP3 files. I'm using Grip to do the ripping and I've a few issues with it which I should probably look into fixing. Firstly, it's jumpy as hell. This is particularly evident on a virtual desktop system where, if it does something like scanning a newly-loaded disc while it's on a non-visible desktop, the whole thing jumps to some arbitrary point on the current desktop - occasionally offscreen. And this is without asking it to keep the window at a minimum size. Secondly, a common Gtk complaint (so maybe it's a Gtk problem!): it uses Windows metaphors and then fails to implement them properly. Typical examples of this are that you can resize the column widths, but it doesn't remember them between sessions, and the pulldown lists don't have a binding for `Enter'; rather, hitting `Escape' collapses the list with your current option selected. How's that for non-intuitive? Thirdly, it doesn't, by default, do anything with data you enter for tracklists, etc. This meant that I had to type in a few tracklists twice because I'd forgotten to either send them to CDDBwriting Motif code to do this sort of thing in 1992, I fail to see why it's so difficult in 2000. Fifthly, well, I'm going on a bit here, I guess I really should see about fixing some of this stuff...

I did a little more messing with the MP3 renaming program, too, adding options to override the artist, album and title. Which turned out to be incredibly useful. Then I added some more code to figure out duplicates, and managed to nuke about 5 hours worth of ripped MP3s. Doh. At least I still have the CDDB files.

October 1
Some random MP3 mucking about. I finally built myself a local copy of CDDB to keep me amused or something; it turned out to be non-trivial for a few reasons, some associated with me failing to read the manual. Some, on the other hand, are IMHO down to boneheadedness SOMEWHERE along the line. And why has noone implemented the SRCH command? Hmm? It'd make life SO much easier for mp3name.pl.

previous month | current month | next month

I'd fix it for you, but I don't want to break into your site.