| |||||||||
programming language parody, the canonical esoteric programming language. It satirizes aspects of the FORTRAN and COBOL programming languages, as well as the proliferation of proposed language constructs and notations in the 1960s. Consequently, the humour may appear rather dated to modern readers brought up with C or Java.
INTERCAL was created by Don Woods and James Lyons, two Princeton University students, in 1972. The current version, C-INTERCAL, is maintained by Eric S. Raymond. INTERCAL is said by the original authors to stand for "Compiler Language With No Pronounceable Acronym".
INTERCAL is purposely different from all other computer languages in all ways but one; it is purely a written language. An excerpt from the INTERCAL Reference Manual will make the style of the language clear:
The INTERCAL manual also contains such gems as:
INTERCAL has many other features designed to make it even more aesthetically unpleasing to the programmer: it uses statements such as "COME FROM", "FORGET", and "PLEASE" and calls single and double quotes "sparks" and "rabbit ears" respectively. The equivalent of a "half mesh" or equals sign in most programming languages is a "<-", referred to as "gets" and made up of an "angle" and a "worm".
The Woods-Lyons implementation was actually used by several people at Princeton. The C-INTERCAL reimplementation, being available on the Internet, has made the language more popular with devotees of esoteric programming languages; there is even an Usenet newsgroup devoted to the study and appreciation of INTERCAL and other esoteric languages.
The traditional "Hello, world!" program, written in C as:
appears in INTERCAL as:
Despite the language's being (intentionally) obtuse and wordy, INTERCAL is nevertheless Turing-complete: given enough memory, INTERCAL can solve any problem that a universal Turing machine can solve. Note that this says nothing about the time required to do so — a Sieve of Eratosthenes benchmark, computing all prime numbers less than 65536, was tested on a Sun SPARCStation-1. In C, it took less than 0.5 seconds; the same program in INTERCAL took over seventeen hours. (Stross, 1992)
It should be noted that almost any language allows notational horrors as great or greater than INTERCAL's, as witnessed by The International Obfuscated C Code Contest.