Hacker's Diary

A rough account of I did with Emacs recently.

October 31
Happy Hallowe'en. I'm going to hide in a pub somewhere.

October 30
Much fiddling about with Apache on this very server; for some reason, the server started keeling over and one of the other admins wasn't able to trace the problem beyond noting that it went away when custom logs weren't used. My fiddling has resulted in me determining that the problem appears to be with PHP's IMAP module, but I'm not actually clear on what the problem is. It seems to dump when it can't find /etc/cram-md5.pwd, and creating one will require me to set everyone on the server up with new passwords for email access, so that's not a satisfactory solution. So right now I'm rebuilding PHP. This, of course, requires me to learn about the Debian package building process.

Did another Micromail update while working on this, and logged into the office to bounce a server. There's something wacky going on with the DSL connection, though.


October 29
While I admire the guys at Chronic Logic for shipping Linux versions of their games, I'm not quite so impressed by their spamming or their defence that "it only takes seconds to press the delete button". Thanks, guys, but how about in future I forward you all the spam I receive, since it will only take you seconds to delete it. You can be my own personal mail attendant.

To be fair, they did take me off the list.


October 28
Five hours to travel 200 miles. This country is screwed.

October 27
Watched My Big Fat Greek Wedding in Castlebar. Entertaining movie - there was a constant flow of giggles throughout.


October 26
Fecked off to Ballina to hang out with JamesC and Clarkey for the weekend. About the geekiest thing I did was to check my mail via the Pilot.

October 25
Install Windows NT, observe Blue Screen Of Death, snigger, etc.

October 24
Predictably, ow my frickin' head.

Danny at NTK passed on an email from someone asking about getting the Linux-WLAN 2Mbit drivers running under a 2.4 kernel, something Danny's done the initial patch for and I've hacked on a little further. I've put my current patches in a tarball here, in case anyone else wants them: linux-wlan-patches.tar. I've actually been working (slowly) on porting this stuff forward into the linux-wlan-ng framework, but this stuff works well enough to establish a link and use it. Caution is advised, though: it will lock up the computer under heavy transmits.


October 23
Happy Birthday, Conor!

October 22
Hacking around with some work-related stuff, I found an odd bug in what I assume is my setup plus DBD::File, where it tests fine but one of the functions fails to work in a CGI environment (possibly elsewhere, but I'm too busy to test elsewhere). Hacked the module to work around the problem and went back to what I was doing.

Well, that was the plan, anyway. The hack didn't work, as you'd imagine. Then I inserted my brane and realised that the problem was that I was using the File driver instead of the CSV driver. DUH.

To redeem myself, I did something pretty awful in Perl that actually worked first time. Haw. I've basically written a semi-automated Windows workstation tracking tool - semi-automated in that it makes intelligent guesses at the correct values for several of the items. 343 lines of fairly readable Perl. This tool is WAY too powerful.


October 21
Spent an unpleasant few hours wrestling with OpenOffice. Their tables (in Writer) implementation seems to be annoyance-for-annoyance compatible with Word. On the other hand, Writer was quite happy to read in the document I was working on, despite it being saved from Microsoft Office XP. Oh, and I was further irritated by the fact that it wouldn't let me attempt to open a .doc file in Calc, the spreadsheet. As it was a document full of tables, I was hoping that the spreadsheet would be smart enough to convert it, but no. Every method I tried to feed it to Calc resulted in OpenOffice "cleverly" opening Writer instead. GAH.

October 20
Spent some time farting about with Intermezzo again; either it's confused by my attempts to use it in a useful fashion, it's confused by Red Hat 8, or the .5 release is more confused than the .4 release. All things considered, I'm not terrifically impressed with the error handling; it has a tendency to leave its httpd process running even if the sync process bombs out, and the kernel error messages, while potentially useful to the developer, are completely opaque from a user POV. I'm tempted to start hacking on it, but there's quite enough things on my started-hacking-and-then-stopped list that I really don't need to add any more to it.

RMS says that the Emacs bug I mentioned is (a) known (b) not fixable by him because he doesn't know X.

Micromail update, too. I still need to do some work on these scripts, but since I'm only using 'em once a fortnight or even less frequently I keep forgetting about 'em until it's time to run the update.

Some minor changes to the PGP stuff in BBDB also. I should probably integrate it into the main codebase rather than leaving it out in the bits directory.

Updated the "documentation" for my Monitor toy. Hacked on my MPG toy a little, as well. It's amazing how these things just rot away until they're so broken you can't figure out how they ever worked...

Rebuilt the Red Hat 8 pilot-link RPM with Perl support enabled. They ship it with Perl support switched off by default, despite the fact that anyone using the Perl support has, by default, to be some class of hacker. Losers.



October 19
Ok, this is annoying. Back in the days of Emacs 19 I wrote a chunk of lisp to figure out the size of the tallest possible window on the current screen in the current font, which I then stuffed in my .emacs so that I'd always get a maximum-height window. This stopped working in Emacs 21, and when I finally got around to debugging it I discovered that I had to explicitly call set-frame-height. Great. The problem with this is that it scales up the window in both directions, while blatantly lying to the window manager. Right now, it's telling the window manager that it's 80 x 47, when in fact it's 102 x 47. I guess I need to hack it some more. But really, this is the sort of stupidity that makes me wonder why I don't just use XEmacs instead.

Uh. This makes NO sense. I've tried doing (set-frame-width (selected-frame) 80), and it doesn't work. I still have a 102-column-wide window. What sort of idiotic behaviour is that, exactly? Helpful comment from the source:
;      (set-frame-width appears bugged: It didn't always take
    effect)
Well, duh.

Further investigation reveals the font specification in my Emacs X Resources to be the source of the problem, but I've no idea why that is. I've mailed a bug report and asked for clarification.

Ouch. Cut my finger trying to do things to the Mac that probably aren't smart anyway. Pesky plugs.

Decided to bite the bullet and rebuild Klortho's Linux side from a fresh Red Hat 8 install.

Figured out why various things pick up the default Red Hat kernel as being an SMP one: it's because they're parsing version.h with sed and the first line they see happens to define a SMP kernel. Duh. I guess the correct fix would be to include version.h in a short C proglet that prints out UTS_RELEASE.

More duh: Red Hat renamed the Apache package to "httpd" in Red Hat 8. However, they didn't put a Provides: apache in the RPM, so anything that requires apache breaks. Of course, I guess given the version change (Apache 1.3 to Apache 2) this might not be a bad idea, but from where I'm standing it doesn't look terribly smart.


October 18
Met up with JamesC for a few beers.

October 17
Set up winbindd on spec in the office where I'm doing a network rearrange. Okay, it rules. I now have an evil plan to convert one of the servers here to Linux without anyone noticing, although for sanity's sake it involves spare hardware that I don't have handy at the moment. I foresee a late Friday, since the bait-and-switch has to be done on a live box.

October 16
Wah. Beaten 2-1 by the Swiss at soccer. Predictably, I drowned my sorrows. Hic.

October 15
VM + stunnel = secure IMAP access, but only in VM's limited "IMAP is a POP spool" form. Still, I'm back to using Emacs/VM as my primary mailer. I had a look at Sylpheed on recommondation from Henrik, but the version installed on Red Hat 7.3 doesn't do secure IMAP, so it's a non-starter.

One of those "no comment" moments:
/dev/hda4 is mounted; can't resize a mounted filesystem!


October 14
Still haven't figured out how to get Gtk::Perl to handle X resources on the command line the way I was doing it with Perl::Tk.

Upgraded Klortho to Red Hat 8.0. I gotta say, I like the blue shading on the powerbars. Less impressive was the fact that it upgraded without mounting my /boot partition, meaning that I needed to do some manual crap to get it to come up properly. Still, not overly painful.

Something I forgot to mention in my MM2 brag yesterday: a neat trick with the slower cars. Well, specifically the VW Beetle Dune. It's got better initial acceleration than everything, including the GTR-1, so when you're racing GTR-1's you get in front of one and have it push you. In the last SF circuit race, this gets you 150MPH at the end of Market rather than the 130MPH the Bug otherwise tops out at.


October 13
Watched the delayed coverage of F1, and woohoo! Sato finished fifth. At the end of the race, you'd have thought he was the winner, given the fantastic reaction from the crowd.

OOOOH! COMPILE FARM! Let's GO!. That is just the neatest thing I've seen. Time to put these crap machines to WORK, dammit.

Currently engaged in a giant consolidation effort between the two laptops; I think I've managed to safely merge everything together. The next step is to hack off a slice of the Linux end of each laptop, call it /home, and Intermezzo the heck out of it.

Forgot to mention that while I was away, I finally completed Midtown Madness 2 at Professional level. I've not managed to get maximum points - I'm less than 1,000 off, but I can't seem to make that little jump - but heck, I was pleased to finish the thing.

It's nice to be popular and all, but somehow I don't think that's what happened here:
Waider (qaz.waider.ie) $ > wc -l access-log-20020929-20021006 
  19248 access-log-20020929-20021006
Waider (qaz.waider.ie) $ > wc -l access-log-20021006-20021013
 147028 access-log-20021006-20021013
    
The first one is pretty indicative of the normal traffic I get. The second one, well, I'm still trying to figure out what happened.

Okay, here's an hour-by-hour breakdown of hits for October 8th:
00    186
01    103
02    130
03    248
04    102
05     90
06    208
07     76
08    162
09   5239
10  22258
11  22826
12  22156
13  22125
14  25727
15   6764
16    216
17    210
18     96
19    180
20     85
21    249
22    263
23     82
What appears to have happened is that someone loaded up my jmatrix hack at about 9:50, and left it running for five hours. During which time their web browser repeatedly hit my server for one of the 80+ files that makes up the jmatrix screen. Now, this could be because I've written the thing badly, but it doesn't happen with Mozilla, and I've never noticed a bubble like this happening before.



October 12
Bwahah. I made NTK again. Maybe I should apply for a staff position or something.

Utterly failed to see any F1; this is the last race of the season (Suzuka, Japan) and is on at an awkward hour. Instead, I went to the bar with Cliffy.


October 11
D'oh moment: wondering why my cellphone failed to dial when I put the number into the chat script. I'd forgotten the ATDT part of the modem line... I'm using it cos I'm stuck in Arlanda for a bit; my flight was overbooked, and I bravely volunteered to accept $200 and a later flight.

Converted my Monitor object to Gtk::Perl. Finally. Still missing a few things, but I'll get around to it once I'm back on-line (doing this on the plane, gnee gnee).

Got home at about 22:30 to discover my main server had hung; after a few failed boots I switched off the floppy drive in the BIOS and it came up ok. No idea what that was about.


October 10
On reflection, it makes sense that the Red Hat 6.2 compatibility libraries don't build on Advanced Server, because, well, they're supposed to be built on a 6.2 system.

October 9
Woah. Cool. Hard failovers also working. Of course, now I need to try it with some actual database traffic going on, as opposed to the current quiescent database abuse. That should prove interesting...

Ran into a guy in the bar who works for a company that competes with a company I used work for. That was amusing.


October 8
Urp. Hacking DBD::Oracle stuff again. Thought I'd given this up in favour of sanity... anyway. Non-Oracle clustering works fine using clean failovers, I now need to try a hard failover and see what happens.

Went poking through anaconda trying to figure out what it would take (aside from a UML install) to set up a Linux-on-Linux installation on the laptop. I don't want to run a UML box; I want a realistic Linux installation in something other than the root directory.


October 7
Went to the office. Plugged GPS toy into laptop, ran maptest.pl. Worked perfectly. I have NO idea what it is about the hotel that's preventing my serial port from working, but it's damned irritating.

Checked the changelog for the latest ACPI patches. Turns out the blacklist logic was broken. Unfortunately, the diffs are against a newer kernel than I have source for, so I now need a kernel tarball. Gack.

Aaaaand back in the hotel, battery-powered, serial port is working. WTF? Took the opportunity to unload the camera before trying with mains power. Still working. Freaky.

Went fidgeting with the digicam while I had it hooked up, and discovered that I can indeed frob the shutter-speed from photopc, as well as the aperture - the latter seems to keep resetting itself, though. Neat stuff.

I saw the Linus Torvalds interview in BBC World's dubiously-named "Click Online" (complete with Stephen-Hawking-style computer voice in the credits) and while some of the questions were utterly moronic, and some of the BBC explanations where cringeworthy, Linus himself was articulate and amusing and the whole show had a very pro-Linux spin on it.

Prodded ACPI a little with the Intel dev tools. Fed my DSDT to the disassembler, the resulting source wouldn't compile. Heh. Go Compaq!

Watched The Time Machine, which was quite enjoyable - although I've not read Wells' original story, so I don't know how closely it matches the movie.


October 6
Rebuilt a kernel with ACPI enabled, and ran acpid. Still no fan, however. Even when I ran a kernel compile. Grr.

Okay, further reading on the subject has lead me to http://acpi.sourceforge.net which has given me a set of kernel patches, a piece of software with so many "Alpha Quality" caveats that I'm sure even unpacking the tar file is a mistake, and a strong hint that the only way I get fans running is if I have a piece of software that'll do so. Humma. Rebuilding ye olde kernel at the moment.

Still no serial port, either. I have no idea what's up with that. I even used it in the office on Friday evening. Must be some heavy bogon flux in the hotel room or something.

Further investigation of my ACPI-enabled kernel reveals that the DSDT table (see, I'm learning the jargon already, although I've a suspicion that the T in DSDT stands for Table...) on any given Compaq should be considered suspect, and this is backed up by the fact that three of the GPE methods are apparently misnamed (must read spec!), and also one of the methods bombs out of the parser. Conveniently, it's the Thermal Zone method, which is what I suspect should be frobbing my fans or at least causing the system to shut down before it bursts into flames. KWATZ. Oh, and the ACPI stuff has blacklisting code which doesn't seem to notice that my BIOS should be blacklisted, even though it appears in the list. Better check what's up with that...



October 5
Went for a walk around Gamla Sten (old part of Stockholm) with the GPS toy, but since the area is full of narrow streets with high buildings I spent more time out of coverage than in. Took a few photos, regretted not bringing my comfy black hat, wandered back to the hotel.

I've effected a nasty hack to deal with the link status issue mentioned yesterday. Turns out that mii-diag is included in Red Hat as mii-tool. No idea why they renamed it, the tossers. Anyway. The nasty hack takes advantage of Red Hat's complex sequence of scripts invoked by doing ifup eth0 and is made more nasty than it should be by the fact that the pre/post scripts aren't sourced, so you can't use them to modify the environment variables that govern things like use of DHCP. So basically this nasty hack intercepts the config process and checks for a link; if there's no link, it modifies the interface configuration and calls ifup eth0 again, carefully taking itself out of the way to avoid a config loop. It's awful, and probably more fragile than it needs to be, but it works perfectly, and doesn't leave me with modified default scripts - which is something I try to avoid, to make upgrades easier.

Amusing discovery: Superman, in Swedish, is something like "Stalmanmann" (didn't have anything on me to note the exact spelling, and there was at least one accented character). I'm sure RMS'd love the notion.

Went to grab some photos off the digicam and some coords off the GPS toy only to discover that my serial port seems to have stopped working. Now what? Booted to Windows, serial port is fine. Back to Linux, it ain't working. I wonder if this is anything to do with the DMA hacking last week? Ironically, the IrDA port - normally the flaky piece of communications hardware I have to beat into submission - is working perfectly.

Installed pam_ssh, since I've already got a .bashrc hack to make sure there's always an ssh-agent running with my keys registered in it. Really, though, it would be nice if OpenSSH supported the use of regular PGP keys for authentication, because then I could congeal the whole lot into a big glob of single-signon goodness. It would also be pretty clever for ssh itself to notice that you're running an agent without a registered key, at which point it could optionally stack the key you just unlocked into the agent.

Added hints support to the IrDA Monitor. I need to do some more work on it, but the more work requires me to learn more Perl::Tk which is something I'm reluctant to do. Also hacked up a quick WebLater-like idea based on the Monitor code. Again, making it actually useful would require more Perl::Tk. Bleh.


October 4
Oop. Did the "cancel alarm, forget to reset" thing, so I overslept by about an hour. Today's task: Oracle, in a cluster, without "Real Application Clusters", which is Oracle's way of saying "give us more money".

On the networking issue of last night, it turns out that there's a separate tool to check link status called mii-diag. This is neat, and cool, and keeps such code out of the actual drivers, but it seems like it would be smarter to put it in to the drivers and return some ghastly failure in the event that traffic is given to a disconnected ethernet port for transmission. I'll see about hacking this into my own kernel.

Found a bug in my .emacs that stopped the diary helper hook being added to HTML mode. I guess the hacked copy of jwz-html-mode that I normally use had it hard-coded anyway.


October 3
Hmm. I think I broke my sleep cycle somehow - I fell asleep in the hotel room when I got back from the office, then couldn't get to sleep later, then couldn't get up this morning without much concentration of effort. Bleah.

On the positive side, I fixed most of the stuff that was missing from my Emacs source/library directory (the files I lost on the flight) so I'm now back with more or less my standard hacking environment. Including the linkfarm and the diary hacks. Whee!

Investigated why it is that an otherwise sensible OS like Linux can't apparently tell that I'm not physically connected to a network so there's really no point in waiting for a DHCP packet to come back. Results inconclusive so far.

Met up with Henrik again. He took me to a Czech bar this time, which was pretty cool. All of my acquired Swedish to date revolves around acquiring beverages.


October 2
More Oracle abuse. Eventually, I resorted to a clean install on the second machine of the cluster, and it didn't work. I rebooted, and it worked. What I keep telling people about Oracle is that the database is pretty excellent (caveat: once you actually tune the damn thing, in most cases) but the surrounding tools are apparently built by three-year-olds with the attention spans of dead gnats and the programming skills of lobotomized stoats.

There are other problems, mind you, which I suspect may be down to my choice of window manager (FVWM2) - there's a jdk-related FVWM2 bug which I think may have been the cause of some of my irritation over the last two days, but there are still things such as the installer leaving temp files behind it, the default setup crashing with meaningless error messages and little or no logging information, the database creation assistant doing likewise (worked when I rebooted; I still don't quite know what was wrong). Having done some QA work many moons ago on an installer, I appreciate that it's boring, repetitive and thankless work - especially having to return the machine to a pristine state before retesting. But given the license fees Oracle charge, there's really no excuse for this sort of crap.


October 1
Spent most of the day arguing with an Oracle install. Met up with Henrik (who I met briefly at the Linux Bierwanderung in Doolin) and proceeded to consume quantites of beer in fine stereotypical-Irish fashion. Hurrah!

previous month | current month | next month


Waider Bork Bork Bork