Charles Babbage left a computer program in Turin in 1840. Here it is.

Babbage1.jpg

Babbage2.jpg

Babbage3.jpg

Babbage4.jpg

Babbage5.jpg

In autumn of 1840, Charles Babbage arrived in Turin for a meeting of Italian scientists, where he gave the only public explanation of the workings of his “Analytical Engine.” This machine was the mostly-imaginary upgrade of Babbage’s failed “Difference Engine.”

At the Accademia della Scienze di Torino (which was once run by Babbage’s host in Turin, Prof. Giovanni Plana), they still have all the paperwork that Babbage brought with him to Turin, which Babbage left behind as a gift for Plana and his associates.

These documents includes charts, engineering plans, lecture notes, a bunch of pencil-scribbled calculations on what seems to be leaves neatly sliced out of Babbage’s own notebooks, and, well, also these punch-cards.

As you can see from my photos of them here, these cards came from a kind of manila folder, where they were stuffed higgledy-piggledy. The cards come in different gauges, are made of different materials, and are in different colors. Most have what seem to be staple-marks, some don’t… They have many little idiosyncrasies.

Some are obviously meant for public demonstration, because they have Babbage’s own handwriting on them. Other cards look more workaday.

I can’t believe that these merely happen to be random cards that Babbage somehow swept off his desk and then hauled all over Europe. Charles Babbage was an extremely methodical guy.

The cards are not numbered, the have no apparent sequence, and they are of different sizes and materials. It may also be that some have gone missing with time. Still, I think they are a meaningful and deliberate set of closely-related cards, and that they all have one purpose. I am very much wondering what that was.

I can offer a few hints.

First, the long card with the smaller punch-holes is a “number card,” while the many smaller and squarer cards are “operations cards.”

The number card has “Pi” on it, and you’ll note that the numbers of Pi correspond to the pattern of punch-holes in the columns beneath them on the card. That card is not a way to calculate Pi, it’s actually the number, Pi, used as a constant, which is readable by a difference engine.

This particular card is described in the famous essay written by Menabrea in Turin and much-expanded by Ada Lovelace in London.

https://www.fourmilab.ch/babbage/sketch.html

The Menabrea/Lovelace article also describe a few formulas that the Engine might plausibly grind out, so these cards may be a demonstration of one of those. Since Plana was an astronomer, it may be an astronomical application. Or the cards may have something to do with with “the function f (x + i ) by means of Taylor’s theorem.” Babbage particularly mentions this formula in his Turinese lecture notes.

The cards don’t show much sign of use-wear. The pi-card still has hanging chads.

Two of the cards, the yellow ones, are entirely blank, but still included in the set. Beginning and end of the deck, maybe?

These cards seem to be hand-punched with a sharp metal hole-maker, and rather inaccurately. Babbage might even have made the cards *in Turin* out of cardboard that he found in the town. Babbage states that the cards are “placed in six-sided prisms that revolve.”

Even if the Analytical Engine never worked, or even existed — and those cards don’t look like they were ever rotated through any actual metal prisms with reader-pins — yes, even if it’s just cardboard vaporware for a mostly design-fictional Analytical Engine — this may be the oldest existent computer program in the world.

As a final note, it’s hard to believe that one would carry an opaque and arcane set of cards around Europe without any kind of card-reader, but there is no trace of one. There’s nothing left of Babbage’s visit but paper and cardboard.

Grateful for any cogent insights here. bruces@well.com

More on the Flickr set.

https://www.flickr.com/photos/brucesterling/albums/72157683709284026

Charles Babbage in Turin 1840: the data hoard