Skip to content

Esoteric Programming Languages

Abstract

In 1972 two Princeton students wrote a compiler manual for a language designed to resemble no language its authors knew, and a genre was born. Esoteric programming languages (“esolangs”) are built as jokes, puzzles, provocations, or art rather than tools: INTERCAL demands politeness from its programmers, brainfuck offers eight commands and a 240-byte compiler, Shakespeare programs are stage plays, Piet programs are abstract paintings, and Malbolge was so hostile that the first working program had to be found by a search algorithm. A community wiki now catalogs more than 7,000 of them.

Piet Hello World
A “Hello World” program in the Piet language; the colored blocks are the source code. Image: Eliran t, CC BY-SA 4.0, via Wikimedia Commons.

The Founding Parody

In 1972, Princeton students Don Woods and James M. Lyon designed a language whose full name is “Compiler Language With No Pronounceable Acronym,” abbreviated, naturally, to INTERCAL. It was a parody of the era’s language landscape, written up in a deadpan reference manual whose appendix is labeled a “tonsil” (since all other manuals have appendices, this one should contain some other removable organ) and whose operator documentation warns: “Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!”

The joke runs deeper than the manual. INTERCAL has no ordinary arithmetic operators; values are combined with “mingle” (interleaving the bits of two numbers) and “select” (extracting bits under a mask), which makes adding two numbers a research project. Control flow uses NEXT, RESUME, and FORGET; statements can be switched off and on at runtime with ABSTAIN and REINSTATE. Statements may be prefixed with PLEASE, and the original compiler contained an undocumented check on manners: programs with too few PLEASEs are rejected as insufficiently polite, programs with too many as excessively polite. Woods went on to a different sort of fame five years later as co-author of Colossal Cave Adventure.

INTERCAL lay dormant until 1990, when Eric S. Raymond reimplemented it as C-INTERCAL and put it on the internet. C-INTERCAL also finally implemented COME FROM, a statement proposed by R. Lawrence Clark in a 1973 Datamation satire responding to Edsger Dijkstra’s 1968 letter “Go To Statement Considered Harmful.” COME FROM inverts GOTO: control jumps to the statement after it whenever execution reaches the named line, so nothing at the jump point itself reveals that a jump will happen. As a critique of unstructured control flow it makes the point better than most textbooks.

Turing Tarpits

Alan Perlis supplied the genre’s theoretical vocabulary in his 1982 “Epigrams on Programming”: “Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy.” A Turing tarpit is a language that is Turing-complete, and therefore can compute anything computable, while being nearly unusable for anything in particular. Corrado Böhm had described such a minimal language, P′′, as a theoretical object in 1964. The esolang movement turned the tarpit into a sport.

In 1993 the Dutch programmer Wouter van Oortmerssen wrote FALSE, a stack language whose compiler fit in 1,024 bytes. That figure provoked the Swiss student Urban Müller, who designed a language with exactly eight single-character commands (>, <, +, -, ., ,, [, ]) operating on a tape of memory cells, with the goal of the smallest possible compiler. His original compiler, written in Motorola 68000 assembly on the Amiga, compiled to 296 bytes; a second version needed 240. He named the language brainfuck and uploaded it to the Aminet archive in 1993 with the challenge “Who can program anything useful with it? :)”. It became the genre’s lingua franca: the standard proof that a new esolang is Turing-complete is to implement a brainfuck interpreter in it.

The same year, Chris Pressey designed Befunge with a different perverse goal: a language as hard to compile as possible. Befunge source code is a two-dimensional grid; the instruction pointer starts in the top-left corner moving right, and arrow commands redirect it in any of four directions, so the same character can be executed in different directions at different times. A p command writes new instructions into the grid, making programs self-modifying. Compiler writers took the design as the challenge it was, and compilers such as bf2c and the dynamically recompiling Betty eventually existed anyway.

Programs as Plays, Recipes, and Paintings

A second branch of the genre optimizes for how source code reads, or looks, rather than how small its interpreter is.

The Shakespeare Programming Language (2001) came out of a lab assignment in a syntax-analysis course at KTH in Stockholm, by students Karl Hasselström and Jon Åslund. An SPL program is a stage play: the characters (Romeo, Juliet, and colleagues) are stacks, dialogue manipulates the values held by whoever else is on stage, compliments and insults encode numbers (nouns are worth 1 or −1, each adjective doubles the value), and acts and scenes serve as jump labels.

David Morgan-Mar, an Australian physicist, contributed two of the genre’s best-known designs. In Chef (2002), programs are cooking recipes: ingredients are variables, mixing bowls are stacks, and the design principles demand that “program recipes should not only generate valid output, but be easy to prepare and delicious.” His own “Hello World Souffle” fails the delicious test; in response, Mike Worth wrote a “Hello World Cake with Chocolate Sauce” that both prints the greeting and bakes into an actual cake. Morgan-Mar’s Piet (2001), named after Piet Mondrian, encodes programs as bitmap images: blocks of color form the instructions, and commands are read from the changes in hue and lightness as the interpreter moves from one block to the next. Piet is Turing-complete (there is, of course, a brainfuck interpreter in it), and its programs double as abstract art.

Whitespace, by Edwin Brady and Chris Morris of the University of Durham, uses only spaces, tabs, and linefeeds; every visible character is ignored. Since conventional languages ignore whitespace, a Whitespace program can hide inside the whitespace of a working program in another language. Slashdot reviewed it on 1 April 2003, a release date that left readers unsure whether the language existed at all. It does, and Brady’s later career adds a punchline: he is also the creator of Idris, an entirely serious dependently-typed research language.

LOLCODE (2007), by Adam Lindsay at Lancaster University, transcribes the dialect of the lolcat internet meme into a grammar: programs open with HAI and close with KTHXBYE, declare variables with I HAS A, and comment with BTW. Despite the loose specification, interpreters exist and one interpretation of the language has been shown Turing-complete, again via a brainfuck interpreter.

The Community

What began as scattered jokes on FTP servers consolidated into a culture. The Esolang wiki at esolangs.org, founded in April 2005, catalogs the field; by mid-2026 it held over 8,000 articles covering more than 7,000 languages, most of them created for the pleasure of the design problem itself. The neighboring sport of code golf (writing the shortest possible program for a given task) shares members and aesthetics, as does the demoscene with its size-limited intro categories: all three treat arbitrary constraint as the raw material of craft.

The genre’s older sibling works from inside a real language. The International Obfuscated C Code Contest, founded in 1984 by Landon Curt Noll and Larry Bassel at National Semiconductor, was born of maintenance pain: the two had spent time untangling the Bourne shell source, which used macros to make C look like ALGOL 68, and a buggy BSD finger. The contest celebrates the “syntactical opaqueness” of C in an ironic register, teaching style by counterexample, and its winning entries are studied like puzzle boxes: Brian Westley’s 1988 program is laid out as a circle and computes π by measuring its own area, and Carl Banks’s 1998 best-of-show entry is a wireframe flight simulator in 1,536 bytes of code. Esolangs make the same point by construction: every language design is a set of choices about what to make easy, and nothing exposes those choices like a language that makes everything hard. That is why brainfuck interpreters remain a staple exercise in compiler courses, and why the genre keeps a modest place in debates about what programming languages are for.

Dead End: The Language Built to Be Unprogrammable

In 1998 Ben Olmstead designed Malbolge, named after the eighth circle of Dante’s hell, with the stated aim of being nearly impossible to use. It is the machine language of a ternary virtual machine with 59,049 memory locations holding ten-trit words. Arithmetic runs through a “crazy operation” chosen for having no useful algebraic properties, valid opcodes depend on an instruction’s memory address, and every instruction encrypts itself after executing, so the program rewrites itself into gibberish as it runs.

It worked. Olmstead never wrote a working Malbolge program, and neither did anyone else for two years. The first one, in 2000, was not written by a human at all: Andrew Cooke generated it with a beam-search algorithm implemented in Lisp. Lou Scheffer then treated the language as a cryptanalysis target, published an analysis of exploitable weaknesses, and produced a program that copies input to output. Programming Malbolge, in other words, is possible only by attacking it. Hisashi Iizawa’s group produced the first correct “99 Bottles of Beer” in 2005, seven years after the language appeared, and specialists have since pushed to feats like a Lisp interpreter (2020, by Kamila Szewczyk) in the extended variant Malbolge Unshackled.

Malbolge failed its users by design, and the design held for two years against every human who tried. What it demonstrated is real: usability is a property of the language, not of programmer skill, and it can be engineered away so thoroughly that the only users left are search algorithms.

📚 Sources