In the novel *Cryptonomicon*, one of the lead characters finds himself implicated in a (comical) drug bust, and is placed in a jail cell under the watchful (electronic) eyes of hi-tech eavesdroppers. It’s a scene out of a spy novel (although *Cryptonomicon* isn’t quite that), minus the secret agents, plus one savvy Unix sysadmin. He’s given his laptop, to boot.
The rest of this lead-up contains spoilers, so skip to the image if you’re the ear-cupping-and-yelling kind.
Food, bedding, and a computer- it sounds far too pleasant a way to imprison an inveterate hacker, so he proceeds, ostensibly, to hand over the information they need, carrying out some phony cryptanalysis in the process. And then he conjures a little script, writing out small pieces of code to a file at intermittent intervals. When executed, this script reads out text files (the Real Thing) by flashing the LEDs on his keyboard in morse.
Wow. Using intractably complex technology to simulate simple tasks is a fascinating idea, if only because it goes against design. It’s the joy of complete control over a programmable machine- articulated amazingly well in this extract (from Cory Doctorow’s Little Brother):
If you’ve never programmed a computer, you should. There’s nothing like it in the whole world. When you program a computer, it does *exactly* what you tell it to do. It’s like designing a machine — any machine, like a car, like a faucet, like a gas-hinge for a door — using math and instructions. It’s awesome in the truest sense: it can fill you with awe.
Flashing text in Morse off a keyboard LED is the sort of thing I can’t read without wanting to do myself. So I did.*
Internet, meet Morseblink. Assuming even that you’re not digging for gold in the Philippines with several governments seeking your hard drive for forgotten world war II treasures, it’s still perfect for those someone-over-shoulder moments- or minutes- when you’re trying to give the impression of being at work and want to continue catching up on your feeds.
If you know Morse, that is. At least it gives that oft-ignored scroll-lock LED something to do, the poor thing. (Alternatively, you could relegate that annoying system beep to scroll-lock by having it flash instead.It’s an old idea)
It’s fully customizable, if your binary encoding of choice happens to be different. Alternatively, you could use it to practice your Morse, which is all I’ve found it useful for (yet).
You can download it here (written in Perl 5.8, should run on all *nix systems).
Below the cut: Some usage tips and a refresher on the Morse code.
Use the -dot and -dash options to set the duration of the dot and dash flashes. -gap sets the duration of the gap between letters. The gap between words is twice this.
If you want to use this as a Morse tutor, run it with the -v (verbose) flag enabled. To get the encoded output to STDOUT (no flashing), use -e (encode). All of these are optional; it should work fine with the defaults. Finally, it accepts input from STDIN (terminate input with ^D), so you can use the script interactively:
The morse code doesn’t cover all printable ASCII characters. There’s no !, for example. Any unrecognized character in your input is replaced with the code for 0.
*Turned out to be a trivial hack, as simple to write as it was to describe.