INTERCAL
The Compiler Language With No Pronounceable Acronym - a deliberately frustrating parody language that helped launch the esoteric programming movement.
Created by Don Woods and James M. Lyon
INTERCAL (The Compiler Language With No Pronounceable Acronym) is widely considered the first esoteric programming language ever created. Designed as a parody of the programming languages of its time, INTERCAL pioneered the concept of deliberately making programming as confusing and frustrating as possible - for fun.
History & Origins
On the morning of May 26, 1972, two Princeton University students - Donald R. Woods and James M. Lyon - created INTERCAL. Their goal was simple: design a programming language that had nothing in common with any existing language. The result was a masterpiece of deliberate obfuscation.
The original INTERCAL manual is itself a work of satire, written in the style of IBM technical documentation but describing a language designed to be unusable. Woods would later become famous for his contributions to the text adventure game “Colossal Cave Adventure,” while INTERCAL would influence decades of programming language parody.
Why “INTERCAL”?
The name is a self-referential joke. It stands for “Compiler Language With No Pronounceable Acronym” - a name that contradicts itself since “INTERCAL” is quite pronounceable. This kind of self-contradicting absurdity pervades the entire language.
Key Features (Anti-Features)
INTERCAL is designed around several principles that make it intentionally difficult:
The PLEASE Statement
Programs must include the word “PLEASE” an appropriate number of times. Too few PLEASEs and your program is rejected for being insufficiently polite. Too many PLEASEs and it’s rejected for being sycophantic. The exact threshold is not documented.
Unusual Operators
Instead of simple arithmetic operators, INTERCAL uses:
- Interleave (or “mingle”): Written as
$, combines two 16-bit values into a 32-bit value by interleaving their bits - Select: Written as
~, selects bits from one number based on the bit pattern of another - AND, OR, XOR: Available, but work on entire numbers, not individual bits as you’d expect
Variable Types
INTERCAL has only two data types:
- 16-bit integers: Represented with
.(spot) - 32-bit integers: Represented with
:(two-spot)
Arrays use , (tail) for 16-bit and ; (hybrid) for 32-bit.
The COME FROM Statement
Perhaps INTERCAL’s most infamous feature (added in C-INTERCAL), the COME FROM statement is the opposite of GOTO. Instead of jumping to a location, you declare that execution should jump to the current location when it reaches a specified line. This creates invisible control flow that’s nearly impossible to trace.
(10) DO .1 <- #1
(20) PLEASE COME FROM (10)
DO .1 <- #2
Line 20 says “when line 10 completes, come here” - execution flows from 10 to the COME FROM, skipping any code in between.
Statement Modifiers
Statements can be modified in bizarre ways:
- PLEASE: Required for politeness
- DO NOT or DON’T: Marks a statement as disabled (but it can be re-enabled)
- ABSTAIN FROM: Prevents a class of statements from executing
- REINSTATE: Re-enables abstained statements
The Character Set
INTERCAL uses unusual names for characters:
| Character | INTERCAL Name |
|---|---|
. | spot |
: | two-spot |
, | tail |
; | hybrid |
# | mesh |
= | half-mesh |
' | spark |
" | rabbit-ears |
! | wow |
? | what |
@ | whirlpool |
$ | big money |
~ | sqiggle |
^ | shark (or sharkfin) |
I/O: The Turing Tape Method
Input and output in INTERCAL are intentionally obtuse:
Output (READ OUT)
The READ OUT statement outputs values, but the output method uses a “Turing Tape” encoding:
- Take the ASCII code of the previous character printed (0 for the first character)
- Bit-reverse it
- Subtract from the value in the array
- Bit-reverse the result to get the ASCII code to print
This means you can’t just store ASCII codes - you have to calculate these values yourself.
Input (WRITE IN)
Input is read as spelled-out numbers in English (e.g., “ONE TWO THREE” for 123).
Implementations
Several INTERCAL implementations exist:
C-INTERCAL
The most widely used implementation, created by Eric S. Raymond in 1990. It compiles INTERCAL to C, which is then compiled to machine code. Available in Debian/Ubuntu as the intercal package.
CLC-INTERCAL
A Perl-based implementation by Claudio Calvelli that adds even more bizarre features, including quantum computing extensions.
J-INTERCAL
A Java-based interpreter.
File Extensions
INTERCAL source files typically use:
.i- Standard INTERCAL source.3ito.7i- Programs written in bases 3-7
Why INTERCAL Matters
Despite being a joke, INTERCAL made serious contributions:
- First Esoteric Language: INTERCAL pioneered the entire genre of programming languages designed to be unusual, challenging, or humorous
- COME FROM: The COME FROM statement has been discussed in computer science literature as an example of anti-patterns in control flow
- Language Design Satire: By making every choice wrong, INTERCAL highlights that conventional languages make deliberate (and often good) choices
A Word of Warning
INTERCAL is not for the faint of heart. The language is deliberately designed to be:
- Confusing
- Unintuitive
- Poorly documented (intentionally)
- Inconsistent
- Frustrating
This is the entire point. Programming in INTERCAL is an exercise in masochism, enjoyed by those who appreciate the absurdity of it all.
Continue to the Hello World tutorial to experience the “joy” of INTERCAL programming firsthand.
Timeline
Notable Uses & Legacy
Esoteric Language Pioneer
Established the genre of joke/esoteric programming languages that continues to thrive.
Computer Science Education
Used to demonstrate that programming language design involves deliberate choices - by making terrible ones.
Code Golf & Puzzles
Featured in programming challenges for those who enjoy suffering.
Language Design Parody
Satirizes the complexity and arbitrary rules found in FORTRAN, COBOL, and other languages of its era.
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull ubuntu:24.04Example usage:
docker run --rm -v $(pwd):/app -w /app ubuntu:24.04 sh -c 'apt-get update -qq && apt-get install -y -qq intercal >/dev/null 2>&1 && ick -b hello.i && ./hello'