INTERCAL programming language
INTERCAL is a programming language parody, the canonical esoteric programming language. It is said by the original authors to stand for "Compiler Language With No Pronounceable Acronym". 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 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:
- It is a well-known and oft-demonstrated fact that a person whose work is incomprehensible is held in high esteem. For example, if one were to state that the simplest way to store a value of 65536 in a 32-bit INTERCAL variable is:
- DO :1 <- #0$#256
- DO :1 <- #0$#256
- any sensible programmer would say that that was absurd. Since this is indeed the simplest method, the programmer would be made to look foolish in front of his boss, who would of course have happened to turn up, as bosses are wont to do. The effect would be no less devastating for the programmer having been correct.
- Caution! Under no circumstances confuse the mesh with the interleave operator, except under confusing circumstances!
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 alt.lang.intercal Usenet newsgroup devoted to the study and appreciation of INTERCAL and other esoteric languages.
The traditional "Hello, world!" program, written in C as:
#includeint main(void) {printf("Hello, world!\");return 0;}
appears in INTERCAL as:
DO ,1 <- #13PLEASE DO ,1SUB#1 <- #234DO ,1SUB#2 <- #112DO ,1SUB#3 <- #112DO ,1SUB#4 <- #0DO ,1SUB#5 <- #64DO ,1SUB#6 <- #194DO ,1SUB#7 <- #48PLEASE DO ,1SUB#8 <- #22DO ,1SUB#9 <- #248DO ,1SUB#10 <- #168DO ,1SUB#11 <- #24DO ,1SUB#12 <- #16DO ,1SUB#13 <- #214PLEASE READ OUT ,1PLEASE GIVE UP
Despite the fact that the language is (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)
See also
External links
Part of an earlier version of this article contains text from The Jargon File 4.2.3 Mar 2001.