7 November 2011
Last week’s celebration of the Day of the Dead (aka All Souls’ Day, 2 November) was a little more thoughtful for me than it is in some years. Partly this was because John McCarthy had just died, and partly because this year seems to have taken an unusually high toll in people whose work I have had occasion to value.
News of McCarthy’s death came through when I was on the phone with John Cowan and my brother Roger Sperberg. We paused for a few moments, and then we spent half an hour thinking about technical topics, which seemed like a good way to mark the occasion. (For example: if the original plan was for Lisp programs to be written not in S-expressions but in an Algol-like syntax called M-expressions, is that a sign that McCarthy was less far-sighted than he might have been? How could he not have seen the importance of the idea that Lisp data and Lisp programs should use the same primitive data structures? Perhaps he had feet of clay, so to speak? Or on the contrary should we infer, from the fact that the plan for M-expressions was abandoned and that Lisp became what it became, that McCarthy was astute enough to recognize great ideas when he saw them, and nimble enough to change his plans to capture them? On the whole, I guess I lean toward the latter view.)
This year, Father Roberto Busa also died. Many people (including me) regard him as the founder of the field of digital humanities, because of his work, beginning in 1948, on a machine-readable text of the work of Thomas Aquinas. The Index Thomisticus was completed in 1978, several IT revolutions later. Busa, too, was astute enough to adjust his plans in mid-project: his initial plans involved clever use of punched cards and sorters, and it was only after the project had been going for some years that it began to use computers instead of unit-record equipment. I met Busa only briefly, once as a young man at my first job in humanities computing, and once years later when I chaired the committee which voted to award him what became the Busa Award for contributions to the application of information technology to humanistic scholarship. But he made a strong impression on me with his sweetness of temper and his intelligence. He made an even stronger impression on me indirectly: Antonio Zampolli worked with Busa as a student. And without Antonio, I think my life would have had a rather different shape.
Oh, well. Nobody gets out of here alive, anyway.
“And he will be seen as he really was; for I profess to write, not his panegyrick, which must be all praise, but his Life; which, great and good as he was, must not be supposed to be entirely perfect. To be as he was, is indeed subject of panegyrick enough to any man in this state of being; but in every picture there should be shade as well as light, and when I delineate him without reserve, I do what he himself recommended, both by his precept and his example.” —Boswell’s Life of Johnson
In particular, Paul Graham translated some of JMC’s code (PS) from “Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I” into Common Lisp to see if it still worked. It did, and indeed he found some code that worked better in modern Lisps than in Lisp 1 — because it had a dynamic scoping bug. Graham writes:
After giving the definition of
eval
he goes on to give some examples of higher-order functions — functions that take other functions as arguments. He definesmaplist
[definition omitted] then uses it to write a simple functiondiff
for symbolic differentiation. Butdiff
passesmaplist
a function that usesx
as a parameter, and the reference to it is captured by the [first] parameterx
withinmaplist
.It’s an eloquent testimony to the dangers of dynamic scope that even the very first example of higher-order Lisp functions was broken by it. It may be that McCarthy was not fully aware of the implications of dynamic scope in 1960. Dynamic scope remained in Lisp implementations for a surprisingly long time — until Sussman and Steele developed Scheme in 1975. [Elisp and NewLisp are dynamically scoped even today.]
I’ll just cross-reference my translation of McCarthy’s theorem prover into Scheme.