I'm running a compilation process that may take up to a few hours and that occasionally stops waiting for user input (yeah, I know, I'm working on it). I came up with a silly little way to let it run on background and not have to keep an eye on it... by keeping an ear on it. A little snippet of shell:

I ran this in a directory where the output of the compilation process is being logged, so the constant flow ensures ls -l is always changing... unless the compilation is stuck at a prompt. I used a little KDE beep to avoid disturbing my officemate (play is part of sox).

After a few message exchanges with the sf.net bugtracking team, my development tree of htop is finally online on the Subversion repository. I never wanted to put it up there on CVS but now that sf.net supports SVN and I finally embraced the joys of revision control, I was motivated enough to do it.

I stumbled on an interesting article on software patents written by Richard Stallman. Nothing new, but it's written in a fairly non-technical language, so it's a good link to direct your non-programmer friends to. Found it through this pretty interesting blog on "intellectual property".

Once upon a time I published elsewhere (currently offline, sorry) a list of "cool ideas for software that I don't have the time or willingness to implement" (some of them I actually ended up implementing myself). Well, here's another one:

Incremental ldconfig

This one is not a full project, but rather adding a new option to an existing program, ldconfig (part of the Glibc package).

Motivation: when the libraries directory is not in the disk cache, ldconfig takes a long time. In GoboLinux, for instance, it's the longest step when installing a package after downloading and unpacking the tarball (sometimes even surpassing those, when the tarball is small enough). Ldconfig scans the entire libraries directory, opening each file. Here's an excerpt of strace:

It repeats for all 2000+ files I have in my /System/Links/Libraries directory.

Instead of rescanning the entire directory, An incremental version of ldconfig would load the cache file, scan the files/directories given in the command line flags, add or replace the relevant entries in the in-memory copy of the cache file and then rewrite it to disk. Assuming this would be implemented as an "-i" flag, the package manager could then run something like

ldconfig -i /usr/lib/libalsa.*

when upgrading ALSA instead of going through every library.

Before writing this, I looked to see if something of this kind was already implemented somewhere. Didn't find it, but I did find others wishing forthe same thing.

The vast majority of humanity does not use computers. From those who use computers, the vast majority does not use X (which is both a good and a bad thing). From those who use X, the vast majority will never have or want to tweak the settings of individual keys on their keyboard. But for those who do... here's how.

X has two nifty little programs: xev and xmodmap. The first tells you what is a key doing and the second allows you to tell it to do something else.

Say you want shift-4 to do pound signs instead of dollar signs. Run xev from a terminal. It will open a little window. Xev is an event dumper: whenever you do anything with that window (pass the mouse over it, move it around and, of course, press keys), xev will tell you what exactly the window is doing. For shift-4, xev reports:

And there you go: £10.25! The first entry, '4' stands for the standard key, the second entry, 'sterling' for the shifted key. Amusingly, I forgot to put the '4' the first time around and had to resort to the numeric keypad to get it back there when running the command again (so watch out not to bork your keyboard when messing with xmodmap).

To figure out the names of the keys, take a look at include/X11/keysymdef.h in your X distribution. Or just use the Tab key if you're a zsh user like me.

I configured my right Alt key (keycode 113) to be "Mode_switch". This is the magic key that allows you to give more than 2 signs to a key. Doing this:

I used xmodmap extensively to make an internationalized version of Dvorak for my own use (standard Dvorak + accents on strategic Mode_shift positions). Xmodmap tricks are also great for disabling the Caps Lock key, or to turn it into an extra Control key (one can never have too many of those).

[Ok, and now I promise I'll get back to working on my dissertation proposal!]