12 April 2008

Computing Truisms, or, My 39th Birthday

We build our computer (systems) the way we build our cities: over time, without a plan, on top of ruins. — Ellen Ullman



I hope I can be a computing industry pundit when I grow up. They get to mouth off about whatever they think the next big thing is, make gross generalizations about what the "average programmer" is like and even grosser generalizations about the "average user." I have no idea what the perfect X in computing, but there are exactly two gross generalizations I'm prepared to make with confidence:

First, Most programming is devoted to converting data from one ridiculous format into another ridiculous format. Actual programmers I've told this to tend to agree with me. I've recently started to churn out lisp libraries and of the four I'm working on now only one isn't obviously a data transformation problem.

Second, Most systems administration is a form archaeology. At an IT shop of any size it will really take months — up to half a year — for a new hire to really understand what's going on and where everything is, and that only in broad outline. Worse, even long-time staff may not know everything the computers are up to. In the last month I've run across things I once knew about and then basically forgot when they stopped being relevant. For example, we once used Netscape's (RIP) calendar manager program. Two weeks ago I discovered that we migrated that entire application infrastructure at least twice since shutting it down. Whenever a particular web service moved to a new machine, the calendar manager came along, a sort of junk DNA. I got rid of it this week.

Nine years ago Bryan, while he was a student working for me, wrote a perl script to do a small piece of file system sanity-enforcement. It has run once a night every night during those nine years. I feel I should publicly apologize to Bryan for not afflicting him — or the other students — with code reviews. More idiomatic but still readable perl could have saved him about 30% of the typing that went into the script. It works, so it'll probably run another nine years, and since it's so well-behaved I'll probably forget about again in short order.

A few months ago user C had a problem he suspected was related to his quota. It wasn't but he wanted a way to see what his quota was. Because of the oddball file system we use the normal tools for that don't work. I just work with C directly when he has disk issues, but thought up a scheme to let people check their quotas more easily, dashed off a quick note in the req (other people might call that a "trouble ticket") about it, and left it there for when I had time to code up a solution. Last week, while looking for something else, I discovered that I already solved the problem in 2004. Not only solved, but because my programs log compulsively, I know that users have been using it, including the newest faculty hires. Who told them the program existed?! The design that went into the req wasn't an invention but a memory.

Today I turn 39 (next prime birthday: 41, next power of two, 64). In a computing age it's too easy to compare a brain to a computer, but recently I've started to wonder if my own brain isn't rather too much like another computational archaeology site. Things burble up out of my unconscious onto the whiteboard in my brain with every sign of novelty and shoot out my mouth. An hour later I wonder if it's new, or if the scent of yinhao jasmine tea, the act of scratching my nose, or trying to remember if I turned off the stove has reactivated some random tangle of a hilbert-space memory trace in my neurons and shot a context-free memory upstairs to be misidentified as a new thought. As aging worries go, this one's pretty minor. My martial arts abused joints should probably get more of my attention.

26 February 2008

Somewhere a cardiologist got their wings

Last week a group of us had dinner and tasty if a bit snooty beers at Brasserie V.  One appetizer was almond-stuffed dates wrapped in bacon.  These were so good that it was decided the recipe should be reproduced at this week's Geeks' Night In.  So, along with the evening's bottling and brewing of beer, dates were stuffed, wrapped in bacon, skewered, lightly sprinkled with brown sugar and broiled.

Our version was also delicious.  My brilliant innovation came when I spied the loaf of French bread looking lonely on the table.  I ripped a hunk off, and dipped it into the date-flavored bacon fat left in the broiling pan.  Everyone else was appalled — including, I hasten to add, Chuck. Until they tried it.

17 February 2008

I should be studying...

Instead I did this:



I blame Nicholas' recent posts.

I had brief anxieties when the wind and the cold really started.  Branches were falling off neighbors' trees and my working area was right under some suspicious branches.  I was ready to bolt at the first hint of a crack above me.

14 February 2008

It's the little things: Lisp + Unicode

This little snippet of code makes me giddy out of proportion to what it accomplishes:

 ;; A non-final sigma cannot occur at the end of the string.
(when (char= (elt uni (1- (length uni))) #\σ)
(setf (elt uni (1- (length uni))) #\ς))


That this is so easy is a lucky accident of Common Lisp's history. The "common" in Common Lisp is because it was supposed to unite several popular (hey, it was the 80s), but incompatible, Lisp variants. There were lots more kinds of computers in wide use in the 80s, and many different encoding schemes for text. Thus, Common Lisp strings were always arrays of characters which were not necessarily bytes, or even ASCII. EBCDIC, anyone?

Well, the betacode to unicode conversion library works. Next up, indexing Perseus' exotic XML texts.

04 February 2008

Weekend Puzzlements

1) If the system name of the DTD is a 404-ed URL is your XML document valid?

2) What's the point of a DTD, anyway, if you're just going to obliterate it when you think up something cleverer?

3) Anyone who thinks the modern world is "too coldly rational" isn't paying attention.

30 January 2008

Answering him she spoke...

I recently read the BMCR review of A. Kelly's A Referential Commentary and Lexicon to Homer, Iliad VIII. It seemed very interesting so I was delighted to find it in our library. The review will give more details, but basically he presents the text of Iliad VIII on one page and on the facing page gives the title and number indexed to the referential lexicon for every phrase of interest. The entries in that lexicon may be specific phrases, like κέκλυτέ μοι or more general thematic matters — a chariot journey, say.

For each of these entries he has checked the rest of the Iliad for similar words, phrases and scenes, seeking out narrative similarities. The results are really fascinating. For example, the phrase κέκλυτέ μοι is in every case used by someone under a delusion: "[s]peeches so introduced are allotted to figures of particular authority, and contain proposals which are not usually carried out (a narrative disjunction being the result when they are not) and reveal the speaker's delusion" (p. 76). Or οὐδ’ ἀπιθήσεν "denotes acceptance of a command or suggestion (usually from a previous speech), connoting that its substance is then played out in the course of the narrative in the manner forseen by the character giving the command. The command is usually successful." (p. 54). Or again, ἰθὺς μεμαῶτος ("straight eager") "accompanies the onset of a character about to be defeated."

So not only is Homer helping to keep the audience straight with the usual pragmatic tools available to Greek — like those flourishing particles — but the formulaic language itself has a sort of, well, narrative semantics I guess you might call it.

Appendix A is devoted to three speech introduction formulae. He hunts down every scene in the Iliad where two or more of these are used. According to him τὸν δ’ ἠμείβετ’ ἔπειτα indicates emotional perturbation, τὸν δ’ αὖτε προσέειπεν is used when the speaker "will or wants to align himself in a co-operative relationship with the first speaker," and the (similar to the first) τὸν δ’ ἀπαμειβόμενος προσέφη "represents a relatively greater determination on the part of the speaker to impose his or her will upon the narrative."

Considering the size of Iliad VIII, the commentary is substantial — 515 pages total for the book. I've barely begun to stare closely at all the comparative passages Kelly mentions, and I suspect some of his comments hang of very thin threads indeed. But I've have been paying closer attention to the speech introductions in the Odyssey books we're reading in class. So far Appendix A seems rock solid.

Arc, or, Láadan for Programmers

Paul Graham, six years after announcing it, has released arc, his new dialect of lisp.

One of the odder corners of my library — for most people at least — will be the section that has all the books on constructed languages. Of course there's Esperanto, but Klingon is represented along with several works on Tolkien's languages. I also have the second edition of A First Dictionary and Grammar of Láadan by Suzette Haden Elgin (neatly abbreviated SHE). SHE is a linguist by training, but is also a science fiction writer. She created Láadan not only for a series of books, but as an experiment to see if a language designed specifically to represent the views of women could change society, sort of an informal test of the Sapir-Whorf hypothesis. Láadan is thus presented as representing women's views better somehow. I've never really been convinced that it does so — I know more gay men who have learned the language than women — but there is no doubt it does represent the viewpoint of one extremely intelligent woman.

Arc is just Láadanified lisp. It represents the particular views of one particular lisp programmer. He may be aiming at a hundred year language, but all I can see is perfectly conventional lisp with a few common functions spelled differently and a few parentheses eccentrically deleted.

This was my first warning sign:

It's not for everyone. In fact, Arc embodies just about every form of political incorrectness possible in a programming language.


Whatever one's feelings about speech codes, I think it's safe to say that any time someone warns you, or brags, that they're about to be politically incorrect you're almost certainly in for some first class assholism or lunacy. I've not previously seen it used in a programming language context, but it seems to hold here, too.

At long last, Graham's vaporous Microsofting of lisp is over. I need to prepare some Homer (I'm taking a class again this semester), but I think I'll spend some time this evening refining my Common Lisp betacode to unicode conversion library, and maybe play with Hunchentoot some more.