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.

20 January 2008

A new convert to the LOOP facility

Some Common Lisp programmers hate the LOOP facility, some don't.  I used to fall into the first camp, for various reasons, the most important of which is that LOOP is effectively a specialized looping language grafted onto lisp.  Normally I'm a big fan of a single syntactic mode for all corners of a language (like the lisp family, or Smalltalk, quite unlike C or, god help us, perl).

I've been working on some basic forecasting and time series code recently, and I have to say, when you're looping over different time series and smoothing windows, LOOP results in neater code than almost any language I can think of. Here's a simple moving average forecast (in the interest of space, all examples have my anal-retentive sanity checking assertions removed):

(defmethod single-moving-average ((data sequence) (order integer))
(let ((n (length data)))
(/ (reduce #'+ data :start (- n order))
order)))


For such simple sums, the functional style reduce does the job. Once you get to a weighted moving average the math starts to get tricker. As I was thinking about the many, many traversals of sequences I'd be doing, I decided to check out LOOP more seriously by reading a chapter from Seibel's book I had previously skipped, 22. LOOP for Black Belts. I started to develop warm feelings for LOOP immediately. For starters, it does a great job of encapsulating the various sorts of set-up and tear-down you have to do when rolling your own loop so the mechanical bits for doing loops don't infest the rest of your code.

One really lovely touch makes it easy to avoid the off-by-one error — and fussing about — that comes when you use zero-indexed arrays. The FOR clause may indicate exclusive or inclusive bounds, with TO n including n, and BELOW n going up to but not including it. So here's a simple weighted moving average function:

(defmethod weighted-moving-average ((data sequence) (order integer))
(let ((n (length data)))
(/ (loop for i from 0 below n
sum (* (elt data i) (+ i 1)))
(/ (* n (+ n 1)) 2.0))))


Now I didn't really have to use LOOP for this, but the code I think is somewhat cleaner. The SUM clause accumulates by summing successive values of the expression after it, and in this simple LOOP clause that final sum will be the value of the expression.

My biggest example of LOOP-fu this weekend is a weighted moving average smoothing function. It takes a sequence of data and a sequence of weights and spits out a vector of the smoothed data. In this implementation I simply take the original values at the edges of the data where the smoothing sequence is longer than available values. What I need to do at each step is apply the weight vector to a window of data to compute the moving average for that step. This brings out the other really lovely feature of LOOP: parallel loop values. Here's the scary result, somewhat un-lisp-like to my eyes, but clearer I suspect than I'd be able to produce with functional style tools and DO:

(defmethod weighted-average ((data sequence) (weights sequence))
(let ((d-n (length data))
(w-n (length weights)))
(loop with smoothed = (make-array (list d-n))
with start = (- w-n 1)
with end = (- d-n w-n)
with denom = (reduce #'+ weights)
for i from 0 below d-n
if (or (< i start) (> i end))
do (setf (aref smoothed i) (elt data i))
else
do (setf (aref smoothed i)
(/ (loop for j from 0 below w-n
for dj from (- i start) to i
summing (* (elt weights j) (elt data dj)))
denom))
finally (return smoothed))))


A LOOP within a LOOP! The underlined section shows the parallel loop indices, j going over the weights sequence and dj going over the current window on the data. In the outer LOOP I went a bit crazy and used a lot of its abilities — initializing temporary variables, LOOP conditionals, a FINALLY clause — with the results that look like an Algol-Lisp chimera.

If I were a code purist weighted-average would probably make me crazy. Good thing I'm not.

07 January 2008

Aoidoi: more cranky poetry

The Delectus Indelectatus — a collection of brief, cranky poems — has been converted to unicode and has grown by five more poems.

06 January 2008

APA Sunday, Jan 6th — Winding Down

In addition to the receptions the evenings are filled with meetings of various specialized organizations. I spent some time last night at a reading session for the Society for the Oral Reading of Greek and Latin Literature. Most of the time was spent on Latin, and in a desperate attempt to get to Greek I tried to get people interested in one of Palladas' grumpy elegiacs. Alas, though comfortable with public speaking, public reciting makes me nervous. And I badly overemphasized a semantic range of one of Palladas' words in my disordered mental state. On the plus side, several of the attendees were very fluent reciters of Ovid. This is motivating.

Linguistics II



One of the organizers of this session was Benjamin Fortson, IV, and I had to restrain myself from full-on fanboy mode and gush about his Indo-European book at him. The first talk from Tim Barnes on a common epithet formula for Nestor, amassed evidence suggesting the word γερήνιος isn't a toponym at all but a non-Ionic (and non-Aeolic) by-form related to γέρων (old man). The rest of the track was on Italic languages, hardly my speciality. I got to hear le sauvage noble talk about Paelignian, after he was humorously introduced as one of the "last native speakers of Oscan" (or something like that). I do expect van den Berg's talk about the semantic range of malignitas to be useful to me in the future — far in the future, given the rate at which I'm reacquainting myself with Latin these days.

Homer



Several of these talks were very literary in nature, and I'll pass over them.

R. Blankenborg's talk, however, Tuning in: Tracing the Rhythmical Phrase in Homer, made me rather cranky. Most unwelcome to me are (1) the reintroduction of the terminology of thesis and arsis and (2) the analysis of the Homeric hexameter in terms of feet. From his hand-out, "Meter is about the balance within the individual foot." He made the not (to me) controversial assertion that any given thesis (argh!) is measured against the arsis, not against other theses. That is, the hexameter isn't stuck on a fixed tempo. He then went on to say that the arsis necessarily has less duration than the thesis:

μῆνιν ἄειδε > (synaphaea) μῆ.νι.να.
duration of μῆ must be longer than νι.να.


This struck me as typologically unlikely, and I asked him to clarify if he was saying this duration difference was phonetic or a recitation artifact. He said it was the later. Unfortunately this still seems to fly in the face of several Homeric practices. First, sometimes Homer will play some surprising stunts in the princeps (= thesis) position, with the result that a short, open vowel is scanned heavy. This same sort of behavior is not deployed in the biceps (= arsis). Paraphrasing West, a contracted biceps must come by it's length more honestly. I personally would expect the licenses and restrictions to be reversed under Blankenborg's metrical regime.

Finally, if I understand him correctly (our speakers had no mics, very annoying) he seems to be saying that an intonation unit (a phrase) crossing the metrical line will not be modified by crossing the line, that is, phrase structure wins out over metrical segmentation. This would make the hexameter unique among Greek stichic meters. We know in the iambics of Attic drama certain kinds of trickiness are avoided when you get close to metrical line end, which is often taken to signify a slower speaking speed, in which stunts are harder to get away with, near the metrical line end. Indeed, a weak metrical line end would take the Hexameter out of Indo-European poetics altogether, where it is precisely the line end which is most highly regulated.

On the other hand, what he said about rhythmical prominence seems potentially more productive. In particular, the idea that there are pre-pausal metrical habits (sort of like the clausulae of prose, I suppose). He believes pre-pausal word ends should be shaped like an anapest (uu- or --) and end on a princeps (thesis) position. This seems reasonable, and I'll be watching for that when next I read Homer.

Comics



The last session I went to was on comics and the classics. Frank Miller got two papers, one of course on 300, but evidently Thermopylae also figures in one of the Sin City story-lines. I was happy to see Neil Gaiman (Sandman #30, August) get a paper. I never know what to say about classics reception.

Varia



I have yet more poems I want to work on for Aoidoi.org.

I cannot justify the cost of attending the APA every year, but I wouldn't be surprised if I make it a few more times.

05 January 2008

APA Anecdote: The Name Tag

The best response to learning my background came today: "you came here for fun?"

APA Saturday, Jan 5th — Fewer Handouts

I just got back from a papyrological session, Culture and Society in Graeco-Roman Egypt. Several of these were fiercely technical, but one paper on the distribution of postponed γάρ was short, sweet and full of numbers, which always makes me happy (Stephen Bay, Postponement of Conjunctive γάρ in the Papyri). He noted the contexts in which this postponement occurred. It turns out it frequently keeps company with prepositions, which immediately brought to my mind that in Modern Greek some ancient prepositions have merged with the article so tightly that they're written as one word. *εἰς τὸν γὰρ... or the like might sometimes have seemed like natural enclitic behavior.

The morning session, "The Future is Now? Digital Library Projects and Scholarship and Teaching in Classics," was somewhat exasperating to me. Last spring I attended a giant workship about "cyberinfrastructure" in the University setting, and there was a rather serious disconnect between the haves up on stage and the have-nots in the audience. It was hard to get the big computing centers to really take the problems of smaller departments seriously. This same issue showed up today. The people on stage might be getting tenure by virtue of their digital publications, but in my life graduate students are often unprepared to admit in public they use Perseus.

Second, the orthodoxy of Moore's Law was the sole faith represented. In the traditional publishing model you write a book, it goes to reviewers and an editor, finally gets typeset and is sold for a modest fee (ha!) and at the end you have the most reliable mass storage and retrieval device for text so far ever created. In the brave, new digital and open world you have to do all of that and commit to maintaining the work indefinitely. We know almost nothing about really long-term digital storage, and we need only look to Perseus for the sad state of even short-term reliability. My books never crash for an entire weekend. Doing this correctly will cost beaucoup bucks, and neither I nor other people in the audience were able to get firm comments on funding except for catechismic recitation about ever-cheaper disk storage.

It was also suggested that some of these issues should be foisted off on university libraries. This is doubtless correct in the long term, since librarians have some experience in storing and, rather more importantly, finding again intellectual production. But university libraries are for the most part just as squeezed for resources as everyone else, at least those in the Humanities.

Once again I heard it said that, at least for infrastructure, the Humanities should parasitize the hard sciences, who get much more funding for giant digital projects. This just makes me sad.

In terms of facts, one thing that struck me is that evidently a lot of digitial Humanities resources are very poor at identifying to the world what they are and how you would use them.

I played my "gloomy sysadmin" role and asked everyone if they knew what would happen to their data when the died. We need data wills, including a list of executors so it doesn't get deleted by accident.

Varia



By now I have several poems I want to work up for Aoidoi, thanks to papers.

I look forward to flitting between this evening's many receptions, where I can think happy thoughts.