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.
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!
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.