17 November 2014

Old programs

These remarks are my contribution to a keynote address by Eliza Brock Marcum at Nodevember, a JavaScript and Node.js conference in Nashville, Tennessee. Eliza’s talk was on history and the value of history in computing.

I’m always delighted by the light touch and stillness of early programming languages. Not much text; a lot gets done.

—Richard Gabriel, “50 in 50”

Old programming books are better on average than new ones.

Today there are a lot of meh programming books bringing down the average. Hastily written, barely edited, extravagantly typeset, quickly obsolete. Not bad, exactly, but not outstanding. Maybe you’ve written one!

The books we need aren’t necessarily being written. Fortunately a lot of them were written 30 years ago and they’re still good.

I’m going to drop a couple of examples here, but please take these as a literally random sample, not particular recommendations.

I was recently given this copy of Programming Pearls by Jon Bentley. He wrote for the ACM’s magazine before the ACM turned evil, and this is a collection of his columns. It was just one a big box of old programming books, but it stood out because it has some of the worst cover art I have ever encountered. I figured it had to be the content that was good.

And it’s good. I challenge you to name a programming book with as much sheer joy in its pages as there is in the first twenty pages of this book. There’s this one page with three programs written in three different languages that work together to solve a problem because that’s the Unix way. The right way.


    #define WORDMAX 101
    {   char thisword[WORDMAX], sig[WORDMAX];
        while (scanf("%s", thisword) != EOF) {
            strcpy(sig, thisword);
            qsort(sig, strlen(sig), 1, compchar);
            printf("%s %s\n", sig, thisword);


    $1 != prev  { prev = $1; if (NR > 1) printf "\n" }
                { printf "%s ", $2 }
    END         { printf "\n" }


    sign <dictionary | sort | squash >gramlist

Publication date: 1986. These programs still run today.

This month I opened a book that was written in 1977 and unexpectedly found the annotated source code of an operating system in it. It’s chapter 5. Seventy pages of a slim, 300-page book that isn’t even about operating systems. It’s Architecture of Concurrent Programs by Per Brinch Hansen.

It says that the whole operating system, including some parts that aren’t in the book, is five thousand lines of code. It was written by a team of two.

Imagine understanding a whole operating system.

(In fact later I found out this book contains listings from four different small operating systems. It also contains a summary of the book in Danish.)

These old books are a delight to read. The programs in them are a delight to read. There is beauty and poetry in them. This will sound trite, but they were written in a simpler world. They really were. Programming was simpler. There was no client/server divide. No HTTP, no URLs, no network, no browser, no events, no queues, no GUI. There was no concept of your data living in some other database process. You always had your hands on the data directly. These programs have a clarity and simplicity and immediacy that is strange to us now. But I can’t shake the feeling this is what we need to be striving for.

If you haven’t experienced it, you can’t strive for it. You’re designing the platform we’re all going to be using tomorrow.

Read yesterday’s programs. We’ll all be better off.

The past is a foreign country: they do things differently there.

—L. P. Hartley

There is another reason to dip into the past. Travel is broadening.

Programming was once younger, and people had crazy ideas. Ideas that were uncontaminated by practice, formed by brains that weren’t ground down by hard experience.

One out of every thousand crazy ideas you hear is going to change your life.

Take functional programming. The first major functional programming language was APL, implemented in 1963. It looked like this (example from Wikipedia):

life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}

And when did the golden age of functional programming begin? It was last Tuesday actually. Yeah. We need it today.

Seven years ago I remember sitting in an ECMAScript standard committee meeting, thinking we can’t expect JS programmers to understand closures and lexical scoping. I have never been more wrong in my life. FP is here to stay (with slighty different syntax, as it turns out). It only took 50 years to catch on.

The operating system I was telling you about earlier? That was never a commercial product. As far as I can tell it never went anywhere. And yet.

That book is full of ideas that make me think of Erlang (but it was written 9 years before Erlang) and even more so, Rust (but it was 25 years before Rust).

It makes me want to build new things.

27 January 2014

He who fights the future

Over a hundred years ago a Scandinavian philosopher, Sören Kierkegaard, made a profound observation about the future. … “He who fights the future,” remarked the philosopher, “has a dangerous enemy. The future is not, it borrows its strength from the man himself, and when it has tricked him out of this, then it appears outside of him as the enemy he must meet.”

We in the western world have rushed eagerly to embrace the future—and in so doing we have provided that future with a strength it has derived from us and our endeavors. Now, stunned, puzzled and dismayed, we try to withdraw from the embrace, not of a necessary tomorrow, but of that future which we have invited and of which, at last, we have grown perceptibly afraid. In a sudden horror we discover that the years now rushing upon us have drained our moral resources and have taken shape out of our own impotence. At this moment, if we possess even a modicum of reflective insight, we will give heed to Kierkegaard’s concluding wisdom: “Through the eternal,” he enjoins us, “we can conquer the future.”

The advice is cryptic; the hour late. Moreover, what have we to do with the eternal? Our age, we know, is littered with the wrecks of war, of outworn philosophies, of broken faiths. We profess little but the new and study only change.

—Loren Eiseley, The Firmament of Time, 1960.

ORD Camp 2013

Last year I spent a weekend at ORD Camp, a Chicago unconference populated by hackers of all descriptions.

There was a heady mix of 3d printing enthusiasts, robot-builders, programmers, drinkers, dreamers, proud Chicagoans, and werewolves. Everyone brought a talk, or an activity, or at least a bottle.

I couldn’t make it this year. Here’s what I remember from 2013.

  • Christina Pei brought lockpicking sets and gave everyone a chance to use them. It’s not hard to pick a Master key lock with two simple metal tools! I found out about The Open Organization of Lockpickers (@toool). And I learned that it is legal to own lockpicks in 49 states, the one exception being my own home state of Tennessee. (Note that many cities have their own lockpick possession laws, so the rest of you are not necessarily out of the woods.)

  • Strangers host and producer Lea Thau crammed a two-hour-plus workshop on storytelling into 40 minutes, leaving time for attendees to write—and then for a few to tell—true stories of their own lives. Awesome.

  • Human cannonball Kate McGroarty (@KateMcGroarty) did a mile-a-minute improv workshop. I learned: you can define a character just by choosing a funky shape for your spine. Or the way you walk. Also, the best gift you can give your improv partner is a name. Marvel at the speed with which your mind fills in a character for: “Earl”. “Anastasia”. I think my wife and I are going to host an improv party at our house. When did we stop being shy people? I blame Kate.

  • Third Coast International Audio Festival artistic director Julie Shapiro’s session was called Choose Your Own Audio Adventure. Lights off, bunch of nerds in a room listening to beautiful short scraps of audio and voting on what to play next. One example: Radiolab’s story of what happened on day 86 of Aleksander Gamme’s trek to the South Pole (just the first 5 minutes).

  • Jim Blandy’s session, live-coding the lambda calculus, was as virtuosic as you’d expect, if you know him.

  • Around a table, I asked Louis Wasserman what kind of math he studied before he got into programming, and he said combinatorics. What little I know of combinatorics (I said) is a few counting techniques, and the proofs for those always seem really ugly, with a lot of tricky case analysis. To counter that notion, Louis showed me a surprising proof of a theorem about complete subgraphs. I hope I get around to blogging it here later. It’s dead sexy.

  • And I got to chat with Jennifer Brandel, lead producer of WBEZ’s Curious City and organizer of Dance Dance Party Party. The common thread here seems to be: these are beautiful, beautiful things that could totally happen in your city.

Even with all that, my favorite parts of the trip are not even on the list, because they’d be boring to you. Meeting people I’ve wanted to meet for a long time. Listening to music.

Honestly I spent most of the time at ORD Camp sick or else in introvert people-overload. But the event is still unfolding in my head. It was unique, and I’m grateful for it.

Here, have a list of books

Someone linked me to an image, “Top 10 Books I Want My Kids To Read”. It’s now a dead link, but this isn’t about that particular list anyway.

The books on the list were not children’s books. They were books the author hoped his children would read, eventually. How, then, does such a list differ from “Ten Books I Would Recommend To Anyone”?

  1. You might choose books that act on the mind, hoping they will help fulfill your parental responsibility.
  2. You might choose books that tell your kids who you are, and why.
  3. You might choose books that are special to your family.

I guess in the first category, I’d pick some of these:

  • Silas Marner by George Eliot. It’s not superb, but good enough, and it’s about how what you do changes you morally, even if your motives have nothing in particular to do with morality. Morality tales that resonate with one person often ring hollow to the next person, so this is no slam dunk.
  • A Tale of Two Cities. Amazing.
  • The Gospel of Luke. It’s just good, and the message is about love.
  • The Handbook of Epictetus. (However, I do also recommend this every time anyone asks for book recommendations.)

I’m tempted to put in a pair books about science and how it works. Maybe The Demon-Haunted World by Carl Sagan and the book I’m reading now, The Firmament of Time by Loren Eiseley. But I’m not sure those rise to the level of the others, and it’s not like I’m well read enough in this area to make good picks.

In the second category:

  • Ox-Cart Man. This book tells more about me than anything. All the nerd stuff you see in my life is window dressing; the implicit moral background to this poem is where I’m really coming from. (Sorry to disappoint you!)
  • The Handbook of Epictetus. This again? Yes.
  • The Moon Is a Harsh Mistress by Robert Heinlein. I don’t know if I should recommend this. I haven’t tried to read it lately. I read it at an impressionable age and was impression’d.
  • Mountains Beyond Mountains by Tracy Kidder. If you can square this pick with the Heinlein pick, you understand me better than I do.

This list doesn’t make a very flattering self-portrait. I’m moralistic but I’m not sure what is right.

In the third category:

  • The Phantom Tollbooth by Norton Juster. Rhyme and reason for all ages.
  • The Thirteen Clocks by James Thurber. Rich verbal liquor in a fairy-tale-shaped container, and not a moral in sight.

That is only nine.

I don’t think any book I’ve ever read is indispensable, but books are indispensable.

20 January 2014

Lisp Machines

I’m doing some casual research on Lisp Machines. I find myself wishing for the patience of a reference librarian. Or just a very patient friend to lend moral support.

Dead links everywhere. Decay is a natural thing, and on the whole I am grateful that the Web decays. It just doesn’t suit my purpose at the moment.

As recently as 2007:

A wiki has been set up to capture some notes about using lispm's
and the unlambda emulators.  Contributions are welcome and
encouraged.  Thanks to Dan Moniz for setting it up and all who
have contributed.


Tim Newsham

The link is not exactly broken, but the wiki doesn’t work anymore. Imagine two bits of software, once friends, one still alive, one mysteriously vanished who knows when.

But soon enough, the message itself will vanish from the web too; and this message you’re reading now; and in time, the Blogger service. Gone the way of the Lisp Machine itself, interesting to some, gone over the horizon of what’s worth preserving.