The Mysterious Visit of Mr Babbage, by Bruce Sterling (2017)

Bruce Sterling
17 min readFeb 9, 2024


First published in “Archivio #1,” Turin Italy, 2017.

The Mysterious Visit of Mr. Babbage

by Bruce Sterling

It seems fantastic that scholars in Torino in 1840 discussed computers, punch cards, programs, data, and memory storage. But the archives prove that they did.

Our story is well-known among historians of computing. Mr Charles Babbage and Lady Ada Lovelace are world-famous nowadays. But despite the archives of Torino, much remains unexplained, and much may never be known.

I once wrote a uchronian novel called The Difference Engine, along with my co-author, William Gibson. This book was named after Babbage’s failed invention, and the novel imagines how our world might have differed if Babbage had been successful. In Italy this book’s translation is known as La macchina della realtà— a machine that creates another reality.

Uchronias are works of fiction that speculate about different paths history might have taken. In September 1840, the Turinese knew more about computing than anyone else in the world. A strange premise for unusual developments. Something might have come of that.

What happened in Torino, 1840? How did Torino play a role in this sad and troubling story of so many lost opportunities? Why did Charles Babbage choose Torino, capital of the Kingdom of Sardegna, for the only public revelation of his Analytical Engine?

The Analytical Engine was grander than any mere calculator. It was a programmable computer. According to Babbage, it would bring the entirety of mathematics within the grasp of machinery. He even boldly claimed that his Analytical Engine, once successfully built, would guide all future mathematical research.

Lady Ada Lovelace, who was the daughter of the poet Byron and one of Babbage’s proteges, was even more ambitious about Babbage’s Analytical Engine. Ada surmised that the computer could probably find symbolic methods for generating music or even pictures. Ada’s essay on computing — based on a report written in Torino — would suffer a century and a half of deep obscurity. Today it is world-famous as her prophesy of computation.

So, Torino was the capital of computing in 1840, but why and how?

Well, the standard narrative goes as follows. Charles Babbage came to Torino to repair his damaged public image. Back in 1822, young Mr. Babbage had agreed with the British government to build a specialized military calculator, the Difference Engine. This machine would calculate and print navigation tables for the Royal Navy, and Babbage had rashly claimed that he could build one in two years for a mere three thousand pounds.

Babbage made some progress until his wife died suddenly. Then he suffered a nervous breakdown. As a widower, he couldn’t seem to concentrate, picked unnecessary quarrels, and abandoned and sabotaged his own Difference Engine project.

Later, somewhat recovered, Babbage tried to enter Parliament, to increase political support for his ambitious, but collapsed, calculator agenda. But he lost two elections. Opponents claimed that he had embezzled government money to finance his useless and unbuilt machine. Babbage always refused to admit his own faults. Instead, he tried to gather political support and money for a newer, bigger Analytical Engine, an even more complex, sophisticated and expensive machine.

Babbage went to Torino to refresh his spoiled reputation, and to get independent validation of his plans from Italian scholars.

His best ally, and his host in Torino, was the famous and esteeemed Giovanni Plana. Plana was a mathematician much like Babbage, but held the post of Royal Astronomer, was an active professor in the military academy, and was destined to become a Baron and Senator. Giovanni Plana in Sardegna was everything that Charles Babbage wanted to be in Britain, but could never become.

In 1840, Italy was severely divided among many states, but Giovanni Plana was so prestigious that he could convene a meeting of his fellow scientists from all over the peninsula. Therefore, when Plana invited Charles Babbage to join his congress of Italian experimental philosophers, Babbage gathered up his charts and papers, and journeyed to Torino.

Once in town, he held a series of seminars where he described his ideas for the new machine. He left his charts, drawings, lecture notes, and even some pencil-scratched mathematics with Plana, who placed them in the Accademia delle Scienza archives, where they remain to this day.

The results of these small Turinese meetings were written up and published by Plana’s best student, Luigi Menabrea. Babbage was also granted a personal audience with the King of Sardegna, Carlo Alberto, who officially honored the visiting scholar by making him a Commander of the Order of St Maurice and St Lazarus.

So — we might reasonably conclude — Charles Babbage’s trip to Torino was a success. His credibility and honor had been restored by Italian scientists and Sardinian royalty, and he could return to London with his head held high. We could end this story there: because it seems simple.

When you visit an archive, though, the details multiply. A curiosity is aroused that a short, brisk summary often fails to satisfy. The past is just as complex as the present day is. What did Babbage actually do in Torino? What did he want? What happened to him?

There is no question that Babbage did describe computing in Torino in 1840. In the archive of the Accademia delle Scienze, I’ve seen proof. The document is a hand-written sheet of paper, hastily composed by Babbage himself, and dated “Turin 15 Sep 1840”.

Its title is “Calculating Engine”. The paper is brown with age and Babbage had to cross out some hasty words. Yet, he’s obviously making a determined effort to state why the Analytical Engine is far more advanced than any mechanical calculator. The Analytical Engine has software. It can run programs that have feedback and recursion. But Babbage lacks these modern terms, so he has to improvise as he explains, in English, in Torino.

“Those who are acquainted with the loom are aware that by means of cards having certain holes punched in them it is possible to weave with the SAME loom ANY design however complicated. The design is translated into cards and these direct the motions of the threads. By similar means the motions of the Calculating Engine are directed. Any formula however complicated is translated into cards and these being placed in the Engine it works out that particular formula and gives its numerical value”.

“In one respect however it advances beyond the cards of Jacard. For in the case of the development of functions it backs the cards more or less so as to repeat the operation according to any assigned laws thus enabling a small number of cards to supply the place of a great many and rendering it unnecessary to effect the algebraic redevelopment of a function in order to make the cards the LAWS of that development only being communicated by the cards”.

That last, long, clumsy sentence is a breathless, painful description of the unique ability of software to operate on itself. Babbage is sitting in his hotel room in a strange country, writing in English for an audience that speaks French, Italian and possibly Piemontese. But Babbage simply had to write down that sentence, because it expresses such a profoundly original idea. He left that document in Torino because he wrote it in the city and intended for it to stay there. He didn’t want that idea to be lost. This document may well be the oldest written description of software in the whole world. He deposited it in Torino like some unlit intellectual bonfire.

Babbage’s Turinese paper was never published in his own lifetime. It simply sat silently in the archive of the Accademia delle Scienze along with many other curios from Babbage’s own hand, his gifts to Torino as a visiting guest. I was deeply moved by these artifacts. These papers, charts and cards are full of minor puzzles. The strange set of punchcards that Babbage left is especially troubling to me.

These cards may be the oldest existent computer program in the world. They were brought to Torino as a part of some lucid, compelling explanation, but now, they are more obscure than the Egyptian hieroglyphs in the museum next door. There is something terrible about them.

Babbage described the idea of software to the Turinese in September 1840. The Turinese understood his idea and sympathized. They honored Babbage for his efforts. Those are facts.

The largest mystery is the presence of the secret police.

Babbage did not arrive alone in Torino. He brought two other men with him. The first companion was an Irish mathematics professor named James MacCullagh. MacCullagh was an intimate friend of Babbage’s, and could have explained the Analytical Engine almost as well as Babbage did.

In his autobiography, Passages in the Life of a Philosopher, Babbage explains that MacCullagh was planning to go on vacation to the Tyrolean Alps, but he decided, on a whim, to go to Torino with Babbage instead.

I don’t like to say that a British gentleman like Babbage would disgracefully lie, but I frankly doubt that story. There were two different British experts on the Analytical Engine in Torino in 1840. One of them, MacCullagh, was doing things in Torino we know almost nothing about.

Babbage’s other companion in Torino was his interpreter, room-mate and general guide, the Piedmontese radical exile, Fortunato Prandi. Prandi was of serious interest to the Turinese police, so they had him secretly followed and wrote reports about his suspicious activities.

Fortunato Prandi was a former Sardinian military officer and royal bodyguard who had gotten involved in the failed coup of 1821. He had to flee Torino under a death sentence. He fought for a while in Spain, and, like many Italian political exiles, ended up in London in Mazzini’s revolutionary circles.

Once he’d learned English, Prandi became a propagandist, translating Italian books into English for the many Italian-nationalist sympathizers of that era. This included Babbage, who was politically active and very of the Left.

Thanks to his father and brother, Prandi managed to obtain a legal pardon in Sardegna. When he arrived in Torino together with Babbage, he hadn’t been on Italian soil in nineteen years. The Turinese police were quite aware of Prandi and Babbage. Somehow, the police obtained a printed picture of Babbage’s Engine, and kept it in their files. One can map much of Babbage’s journey in Turin through the secret police reports about Prandi. These activities seem rather odd for a science visit.

On Thursday, September 10, 1840, Babbage and Prandi (for some strange reason, the police never notice the Irishman, MacCullagh) arrive from Lyon for a night at the Pensione Svizzera.

On September 11, Prandi, who is clearly operating with the money of the wealthy Babbage, hires two fine rooms on the second floor of “number 22” on “the Arcade of the River Po”, probably a posh apartment that overlooks today’s Piazza Vittorio Veneto. It’s a logical place for a rich travelling Englishman to stay, and to entertain prestigious local guests.

Guests then arrive at Babbage’s private apartment for a series of morning seminars about the Analytical Engine. Prandi discreetly vanishes and never participates with the scientists. The police notice all this. A hundred and seventy-seven years later, I also wonder about it.

After all, Prandi was an intelligent, multilingual journalist who was living and travelling with Babbage. Prandi must have known quite a lot about the Analytical Engine. He was Babbage’s Italian translator; so why didn’t he translate for Babbage for the sake of the scientists? Why was Prandi hiding from the scientists?

On September 16, a Wednesday, Prandi takes Babbage on a walking tour of his old home town. They stroll together under the porticoes, cross Napoleon’s bridge across the Po, enjoy a nice lunch together on the eastern side of the river. Then they cross the ferry into Valentino Park, have a good look at Porta Nuova, and then crown this day of relaxation by attending the Carignano Theater together. The police are watching carefully.

On September 18, Prandi visits a local printer named Giuseppe Pomba and buys a lot of books. He then gets on the ferry across the Po and the police lose track of him. Later that same evening, Prandi, Prandi’s brother, a local priest and Babbage all travel together by carriage for a society dinner with “Count Balbo” in his estate in the hills. It’s unclear why Babbage is involving Prandi’s brother and a Catholic prelate in his social rounds with a Turinese aristocrat. The police note that it is a gathering of eighteen highly educated people and that everyone speaks English.

On September 27, a Sunday, Babbage is still enjoying Torino, but along with Prandi, he is meeting two Sardinian state officials and a lawyer. Babbage never mentions these government officials in his biography.

On September 28, Babbage and Prandi have a joint meeting with a businessman named Gianolio, who seems to be a shipping merchant. There is no clue about what they are trying to import or export.

Finally, on October 5, Prandi and Babbage depart Torino together for Genoa, but Prandi rashly tells a police informant that he intends to return to Torino, without Babbage, in ten days. There the police reports stop.

I’m a novelist rather than a historian. I naturally have an urge to make events seem more dramatic than they might actually be. But I think you’ll agree with me that these secret police reports — (they were first revealed in 1968) — cast quite a strange light on Babbage’s Turinese activities.

If Babbage is really in Torino to meet important scientists, then why is he spending so much time with a political agitator, lawyers, government officials and businessmen?

King Carlo Alberto and Giovanni Plana have convened a great Italian scientific congress. However, Babbage never seems to attend it. Babbage shows no interest in the activities of any of the Italian scientists. That seems odd, because in Britain, Babbage was a well-known public champion of French scientists, German scientists, and even Americans. It seems rude and arrogant for Babbage to neglect Italian science while in Italy. He’s always talking; he never listens.

This story makes more sense to me if Babbage is deliberately hiding something. He is not being rude, but discreet. He has come to Torino to reveal his Analytical Engine — but not to the crowds. He wants it shown mostly to Giovanni Plana and possibly to King Carlo Alberto.

Babbage, and Fortunato Prandi, and possibly Professor MacCullagh, have a mission in Torino. They want to persuade the Turinese to build an Analytical Engine. The three men are naturally quiet about this proposal, because they see themselves as military contractors. They are in Torino on business, they’re not there for science. They probably know this bold venture is not very likely to succeed, but they also know that it is one genuinely possible way that Babbage’s dream of the Analytical Engine might become true.

Historians have noticed that Babbage seemed markedly furtive and nervous about his Analytical Engine. He often implied that most people were too stupid or prejudiced to ever understand or appreciate his work. This implies that Babbage chose Torino because he wanted make entirely sure that his arcane high-tech machine would be applauded by intelligent people, and not ridiculed.

But maybe Babbage chose Torino for another reason — because Sardegna was a disciplined military-scientific regime that might create an Analytical Engine by a simple royal command. There would be no angry British Parliament, no bad publicity, no endless lawsuits, and the many other bureaucratic troubles that had ruined the Difference Engine project for Babbage. He would have a fresh start.

Babbage was personally proud and sensitive, constantly complaining that he was misunderstood and badly treated by lesser intellects. His computer project failed terribly, but according to Babbage, that was never Babbage’s own fault. He always felt that his exalted, high-tech, magnificent concepts were beyond people’s grasp. He was always excusing himself in this way, and posterity has tended to believe him.

But that is not actually so. The historical truth is that, whenever Babbage explained his Analytical Engine to people, they always seemed to understand it readily.

Luigi-Federico Menabrea, for instance, was a Sardinian artillery officer who had never heard of the Analytical Engine. After just a few mornings with Babbage, even though Menabrea didn’t speak English, he was able to write an article, “Notions sur la Machine Analytique de M. Charles Babbage,” which describes the machine well. Menabrea’s article was the basis of Ada Lovelace’s larger, world-famous article “Sketch of the Analytical Engine”. The poet’s daughter also understands the Analytical Engine very well — in fact Ada Lovelace, in some ways, understands the machine better than Babbage himself does.

It’s hard to find any evidence of any contemporary witness who was genuinely baffled by Babbage’s calculating machine. They might not understand Babbage’s quadratic equations, or the “method of differences,” but people of that epoch admired the idea of a steam-driven industrial machine that could do mathematics. Steam computing was never a futuristic, alien, anachronistic idea. It was an intellectually sexy, intriguing, charismatic idea. It had popular appeal.

People in all walks of life encountered Babbage’s machinery. He was constantly hiring and firing highly skilled technicians and draftsmen. Babbage left large technical charts for his Analytical Engine in Torino, and we can see, from the archives, that those plans were printed in Paris.

This proves that people in France had an intimate understanding of Babbage’s machine. So: why not Torino? Sardegna had railways, artillery and steamships. Why not a computer?

Fortunato Prandi probably understood the Analytical Engine particularly well. He was also a Turinese military officer, just like Menabrea. Prandi was a political journalist, but Prandi had many technical interests. In later life, he started a railway company in Italy.

I think that Prandi and Babbage had a confidential business arrangement. If the Kingdom of Sardegna had somehow agreed to build a computer, then Prandi would have become Babbage’s liaison and business manager.

It seems plausible that King Carlo Alberto also understood the idea. Babbage and Prandi had arrived directly from Lyon, where Babbage had bought the best Jacquard-printed silk, created with punch-cards. Babbage gave some punch-card silk to the King of Sardegna, as a gift to the Queen.

The Turinese court was shocked that a foreign commoner like Babbage was allowed to bestow a personal gift to the Queen of Sardegna. King Carlo Alberto had never before allowed such a breach of etiquette. But he was somehow willing to make an exception for Mr. Charles Babbage.

This exception makes sense if Carlo Alberto knew that he was getting a covert business proposal from an offshored computational condottiere. Babbage was not simply offering silk to the Queen. He was offering a high-tech British military program to the King.

But what did Babbage and Carlo Alberto actually say to one another, when they really met? Did Babbage really want nothing more from Sardegna than a few kind words and a medal?

I don’t like to engage in conspiracy theories; they are seductive, but without good evidence at hand, they are rubbish. Maybe the things that cause me grave doubt can be explained in simple ways.

Prandi is a radical exile and a troublemaker, but Babbage is entirely innocent about that. Babbage has no idea that Prandi is so suspicious to the police.

Professor MacCullagh has no role in the story because he is in Torino on vacation, happily drinking Barolo and bicerin.

Babbage ignores the Italian science congress because he is an arrogant snob. Plana forgives this rudeness because he knows that British people are often like that.

Also, Plana knows and cares nothing about Prandi, even though Prandi is a dangerous radical living in Babbage’s rooms. Whenever scientists arrive, Prandi is discreetly gone, so that’s all right.

The King knows nothing about the police security’s many concerns about Prandi, a former royal bodyguard. The King is quite happy to meet Charles Babbage. The King and the scientist cordially chat in French about Jacquard silk looms; Babbage gets his medal, the Queen gets some pretty French silk, everyone is pleased. It’s simple.

I can believe all that, but there is one issue where I draw the line. Nobody in Torino ever asks Babbage about his horrible, epic failure with the Difference Engine. Not a whisper.

I’ve been in Torino long enough to know that the Turinese are polite and considerate people. But the Turinese must have asked Babbage about the Difference Engine. How could they possibly not ask? Sardegna was a military society. Piemonte was the Mediterranean Prussia. Plana and Menabrea were state-supported mathematicians, and the British government had spent thousands of pounds on a naval mathematics machine. Surely these Sardegnan military intellectuals were highly interested in the specific nuts-and-bolts of that famous project. It would be foolish, even a dereliction of duty, if these Turinese military professionals failed to ask Babbage some of these obvious questions:

How is your Difference Engine project going? When can we expect to see one working? What are your machine’s military and security implications? What can an Analytical Engine do that might give us a military advantage over unfriendly powers such as, for instance, Austria? How could we, in the Kingdom of Sardegna, acquire one of these machines? Could we build or assemble such a machine ourselves, here in Torino? Is there a bill of materials? What are the precise costs, what are the alleged benefits? How many other military powers, besides Britain and Sardegna, know about the potential of this device?

Mr Babbage, how did you ever persuade the British government to give you so much money for military mathematics?

There is no record, not a hint, of any of these questions ever being spoken to Babbage.

I think it’s entirely likely that those questions were in fact asked, and answered in detail, but that the questions and answers were, more or less, classified. I think that the mysterious voyage of Mr Babbage is mysterious because it is part of a larger, quieter story. Basically, it’s the discreet story of a covert international arms deal that didn’t work out.

It was never in the interests of any of the principles to talk about this risky proposal — a proposal to finance and build an Analytical Engine in Torino. So, the participants simply hushed it all up. It vanished like Alan Turing’s Colossus Project vanished, and for many of the same reasons of state.

I will finish with another mystery, which is this: when people, in the 1990s, finally tried to build a Difference Engine from Babbage’s paper plans, his machine, in fact, worked. It cost eleven million dollars and ten years to do it, but the Difference Engine was practical. It was never a fraud. The project was well-designed and it was technically possible to build.

Today there is a Difference Engine in the Science Museum of London, and another one in Nathan Myhrvold’s living room in Seattle. Both of them work well, and just as Babbage said they would.

No one has ever built the larger and more sophisticated Analytical Engine, which is a functional, general purpose computer with software code placed on punch-cards, and not just a military calculation device. However, Doron Swade, the scholar who built the two Difference Engines, has stated that he could probably build an Analytical Engine for twenty million dollars.

So the Analytical Engine is not a mere dream machine, either. It’s technically possible that the Kingdom of Sardegna could have really had one. It was not an impossible dream, but a path not taken.

It may have been realized somewhere. It’s strange that a paper plan with thousands of moving parts would become a genuine, functional machine without some break or dysfunction in the plans. Normally, complicated machine systems are assemblies of smaller components that have been physically proven to work.

It’s weird to imagine a vast, intricate machine the size of a railway carriage — the Analytical Engine — that was created only on paper. And yet the plans worked. They are coherent and practical plans.

Either Babbage was supremely good at creating elaborate machine diagrams — that is possible — or maybe, somebody actually really did build Difference Engines. Or, maybe, pieces of Analytical Engines, or even an entire one. Or more. Maybe these machines existed, but were covert, in the way that the machines of the NSA do exist, but are covert.

Maybe they were colossally huge, very expensive, yet secret machines. Maybe they really existed somewhere, and were even useful in their way, but no dissident or leaker ever revealed them to the public, who simply did not deserve to know.

This would be an incredible, outrageous allegation, if it hadn’t historically happened to us, in our own time.