Rewriting the Bible in Code: thoughts on Language, Richness and Metadata

A week ago, a new friend (and a bit of a kindred spirit) and I turned this question over in our minds. Rewriting the Bible in programming code seemed like a very cool idea (especially if you’re a few glasses of wine into the evening).

Not only would it be a fantastic intellectual exercise (init_light() print “Let there be light” Sun = create.lightsource) but also, he felt, the stricter, more constrained nature of code would allow for a more rigid version of the Message, less open to arbitrary interpretation.

As I thought about it, I realized that this hypothetical idea had a snag. Casting the Bible — or any piece of literature, really, we lose the richness of the language. To which my friend asked: what use is richness? What is the utility?

Hmm.

I realized is that to answer his question, we have to define richness.

Let me try. I’m no expert in this, so I let me know what you think of this approach.

I see the richness of a text as two things: a) formatting and b) metadata

Formatting is the arrangement of words on paper — things like paragraphs, meter, rhyme, rythmn. Depending on the reader, formatting can arouse different levels of pleasure or displeasure as they read the text. Okay.

Metadata is more complex. I think of it as the subtext and the context around a piece of writing.

Every piece of literature is influenced by the times that produce it. Every piece carries with it a complex cultural corpus of events, situations and references to a whole body of knowledge.

This knowledge often isn’t encoded in the piece itself and sometimes needs to be absorbed from a third party to fully comprehend it in light of its original intent. Consider Dante’s Inferno (which I’ve been re-reading lately). It requires an incredible amount of Renaissance history and Christian theology to understand the poem. And as we read it in light of this knowledge, we begin to understand Dante, the man himself; why he placed his political opponents in such and such a circle, what his allegiances were, his hatred of Pope Boniface VIII — the list goes on and on.

It doesn’t even need to be history. Metadata carries all kinds of information.

From Shakespeare’s English we know the language and sensibilities of those times. From the Old Testament we know that the number 7 was really, really important back then. All literature has this kind of metadata attached to it — a beautiful corpus of knowledge woven into and around it that help us build a rich picture of not just the piece, but the world in which it was written.

Often this is even hardcoded into the language. The word angelic in English requires knowledge of what an angel is supposed to be. More specialized languages (like Japanese) have a lot more hardcoding. Look up Yugen, Ukiyo and Otaku if you don’t believe me.

It occurs to me that the more efficient you make the language of expression, like, say, a programming language, the more of this metadata you lose. This is where I can tie in with the thoughts of someone else: Dulitha Wijewantha (colleague | friend | codeslinger | fellow traveller ) and I have been discussing this for a while, and in his Medium.com response to my post, he states the following:

Meta is a distraction, meta is unnecessary, meta is chaos, meta is blasphemy! Good code is concise, good code is readable and good code is efficient.

Let us set our sights lower, then. Dulitha presented Rudyard Kipling’s If, a poem that seems almost perfectly suited to code — it’s literally a bunch of if-then statements.

Examine the first part of the poem:

If you can keep your head when all about you

Are losing theirs and blaming it on you,

If you can trust yourself when all men doubt you,

But make allowance for their doubting too;

If you can wait and not be tired by waiting,

Or being lied about, don’t deal in lies,

Or being hated, don’t give way to hating,

And yet don’t look too good, nor talk too wise

Dulitha’s variant goes as follows:

var you = {};
var others = [];
// If you can keep your head when all about you
// Are losing theirs and blaming it on you,
if (keepYourHead(you)){
looseTheirHead(others);
blame(you);
}
// If you can trust yourself when all men doubt you,
// But make allowance for their doubting too;
if (trustSelf(you) && doubt(you, others)){
you = doubt(you)
}
// If you can wait and not be tired by waiting,
// Or being lied about, don’t deal in lies,
if (wait(you) && tired(you, others)){
var lie = lie(others)
lie.entertain(you)
}
// Or being hated, don’t give way to hating,
// And yet don’t look too good, nor talk too wise:
else if (hate(you, others)){
you.lookGood = false;
you.talkLess = false;
}

Despite the poem reading like a logical if-then structure, with very minimal references to an outside corpus of knowledge, it’s surprisingly hard to cast into code. Make allowance for their doubting? Losing heads? How does one convey the tacit knowledge that ‘losing your head’ means not to actually have your head roll, but to lose your composure? How does one define composure without resorting to another page mapping human responses? Devoid of the standard corpus of reference, this becomes a battle fought at the level of language itself. We must define each and every expression, and in doing so we might end up defining a whole language in itself.

I give up. Let us not rewrite anything in code. Let code be code, let language be language and if ever the twain do meet, let it be in the future and let the burden be on a more capable mind than mine.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.