Esoteric Programming Languages Are Fun—Until They Kill the Joke

esoteric-programming-languages-are-fun—until-they-kill-the-joke

Some programming languages helped send humans to the moon, some are cooking up new leukemia drugs, and some exist just to fuck with you. Brainfuck is a minimalist “esoteric language,” or “esolang,” made up of just eight non-alphabetic characters. Esolangs are experimental, jokey, and intentionally hard-to-use languages created to push the boundaries of code (and your buttons). In Brainfuck, part of the basic “Hello, World” program looks like .<-.<.+++.------.---, which makes any normal person want to say “Goodbye, World.”

Most esolangs don’t even look like computer code at all. Here’s one way to print “HI” in the Shakespeare Programming Language:

All the World’s a Program.

Hamlet, a melancholy prince.
Ophelia, the voice of the machine.

Act: 1.
Scene: 1.

[Enter Hamlet and Ophelia]

Ophelia: You are as sweet as the sum of a beautiful honest handsome brave peaceful noble Lord and a happy gentle golden King. Speak your mind!

Hamlet: You are as beautiful as the sum of blossoming lovely fine cute pretty sunny summer’s day and a delicious sweet delicious rose. You are as beautiful as the sum of thyself and a flower. Speak your mind!

[Exeunt]

Basically, Hamlet and Ophelia are “variables” to which numerical values get assigned. The nouns “Lord” and “King” each have a value of +1, and adjectives such as “sweet” and “beautiful” act as multipliers, producing numbers that correspond to ASCII characters—“H” for Hamlet and “I” for Ophelia. “Speak your mind!” prints them.

Esolangs can get even more unhinged than that. On the Esolang Wiki, you’ll find a list of at least 6,000 of these screwball languages and counting. As a Korean, I’m amused by !, an esolang that requires programs to be written in grammatically correct Korean. Then there’s Whitespace, an invisible language made up of things like spaces and tabs. If you’re craving more color, there’s Piet (as in Mondrian), whose “code” is composed of 20 colors arranged on a grid, producing programs that look like abstract paintings. Some esolangs are even “Turing-complete,” meaning they can theoretically do everything that more responsible languages like C++ or Python can (much like how you could, in theory, use a letter opener instead of a sushi knife to prepare a 12-course omakase).

But taken together, you start to wonder what all these brainfucks are good for. Playing around with them is at once amusing and irritating, inundated as you are with countless clones, minor rule variations on existing languages (like Whitespace but with parentheses), and languages created just for the profane hell of it. In her book Theory of the Gimmick, the literary critic Sianne Ngai says that gimmicks—everything from Duchamp’s Fountain to Google Glass—are “working too little but also working too hard.” They put in minimal effort but beg to be noticed. All in all, gimmicks can be “labor-saving” cheats that skip the hard work needed to create something with real substance.

So: Are esolangs gimmicks?

We programmers have always been sickos, so it’s not surprising that esolangs emerged early in our history. In 1972, two Princeton students, Donald Woods and James Lyon, created the Compiler Language With No Pronounceable Acronym, or INTERCAL (naturally). It remains one of the most fully fleshed-out eso-langs around, with a 20-page reference manual—a parody of IBM documentation—laced with comedy and sadism. INTERCAL complains if you don’t include enough instances of the keyword PLEASE, but it also rejects programs if you use the word too much. You terminate a program with PLEASE GIVE UP.

When prodded over the years by interviewers intent on teasing out some grand vision or high-concept inspiration behind INTERCAL’s creation, Woods has always insisted: There wasn’t one. He and Lyon did it for the lulz. But some programmers still succumb to the impulse to cast their work in elevated terms. They’re given to producing sentences like one found in The Journal of Objectless Art, where an eso-lang designer, after declaring esolangs an “art form,” describes them as “programming lanauges [sic] which ‘shift attention from command and control toward cultural expression and refusal.’” He cites Brainfuck as an example that “destabilizes the authority of the machine by making computer logic available to the programmer in a very straightforward way, but refusing to ease the boundary between human expression and assembly code and thereby taking us on a ludicrous journey of logic.”

This is just theory babble—not even of the memorable kind. Phrases like “algorithmic unconscious” and “haunting patterns of alien logic,” which appear in the same essay, are pomospeak posing as insight. I’m a little skeptical of those who overtheorize the aesthetics of code or self-anoint as programmer-artists—not because I reject the concept, but because the bar is so achingly low. Frivolous works abound in this marketplace of digital 1em0ns.

To me, esolangs seem born of a kind of monomania. This peculiar malady, in controlled settings, might beget Finnegans Wake or the zany experiments of the Oulipo group of writers and mathematicians. But misapplied, monomania becomes what the philosopher Daniel Dennett called “chmess”—a game identical to chess, except the king moves two squares in any direction instead of one. Like chess, chmess can generate endless dissertations and academic papers. It has all the trappings of intellectual depth, but at some point, you must ask: Why am I thinking about a game that no one actually plays? Is there any genuine invention here, or just a predictable variation on a theme?

Riding the coattails of the inventive weirdness of INTERCAL or Piet, many newer esolangs try to achieve esotericism by imitation—and end up producing nothing more than aimless technical obfuscation. One of Oulipo’s most prominent achievements is Georges Perec’s La Disparition, a novel composed entirely without the letter e—a formal constraint that, in lesser hands, could have resulted in gimmicky nonsense but instead yielded an oddly moving masterpiece. Esolangs that feel like limp facsimiles are not unlike knockoff lipogrammatic novels that choose to drop some other letter.

Still, once in a while, you stumble on an esolang that reminds you that not every experimental enterprise traffics in mere cleverness. Among the recent standouts is Martin Ender’s Alice, where the direction of execution changes based on slashes—/ and —which behave like mirrors, refracting the flow of logic like beams of light and sending the program’s execution ricocheting in different directions. Weirdly elegant, it works when it shouldn’t.

Another imaginative offering is Ender’s Hexagony, a 2D esolang where the code runs on a hexagonal grid. Inspired by an earlier classic called Befunge (the first 2D esolang with a rectangular grid), Hexagony isn’t just a variation with cosmetic tweaks but pulls off a tricky technical challenge in getting control flow and memory to behave coherently within a hexagonally structured source code.

As I was playing with the mesmerizing Hexagony online playground, I was reminded of what Roger Ebert—who wasn’t a fan of David Lynch’s earlier films—said of Mulholland Drive: “At last his experiment doesn’t shatter the test tubes.” Every now and then, amid the wreckage of broken flasks in the eso-lang lab, a hacker channels their monomania into finding novel ways to contort the compiler. A gimmick? Probably. But the kind I’ll gladly surrender to, if only for that sick pleasure of watching a genius-pervert at work in the joyful abuse of the computer.

Related Posts

Leave a Reply