Who would expect, while reading High Literature, to see a piece of BASIC code actually included in the text? Not me, that’s for sure. But if you read Umerto Eco’s novel Foucault’s Pendulum, it can happen to you too!
For those of you not familiar with this excellent novel: Foucault’s Pendulum is basically a thinking man’s Da Vinci Code. One that doesn’t suck. At all. Or, as Eco himself put it:
The author, Dan Brown, is a character from Foucault’s Pendulum! I invented him. He shares my characters’ fascinations–the world conspiracy of Rosicrucians, Masons, and Jesuits. The role of the Knights Templar. The hermetic secret. The principle that everything is connected. I suspect Dan Brown might not even exist.
But I digress.
The main characters are trying to uncover some ancient secret by generating all permutations of God’s name: JHVH (of which, incidentally, there are 24). Jacopo Belbo has just bought a computer which he loves as if it was his first-born child, even though it’s not an Apple product. He actually gives it a name: Abulafia. So, obviously, Abulafia is called upon to generate the permutations, using the following program:
Quite the clever algorithm, I might add, although Eco doesn’t address the duplicates this program will produce when given God’s name as input.
Has anybody else ever encountered real, actual code in a novel/movie/billboard?