INTERCAL

From ArticleWorld


INTERCAL is the first esoteric programming language, designed by Don Woods and James Lyon as a parody. When it was originally written, INTERCAL was a satire of FORTRAN, COBOL and other programming trends in the 1960s. It is currently maintained by Eric S. Raymond. The authors describe its acronym as standing for "Compiler Language With No Pronounceable Acronym".

Its very purpose was to be as cryptic as possible, and be unlike any other programming language at that moment. The original INTERCAL Reference Manual explained that 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

any sensible programmer would say that that was absurd. (The INTERCAL Reference Manual). The reference manual itself is filled with many humorous instructions, warning about some weird aspects: ...[do not] confuse the mesh with the interleave operator, except under confusing circumstances!

Satire

INTERCAL introduces several instructions that are nothing but a satire to the trends of the time. The verbosity of COBOL was laughed at with the statement PLEASE, while BASIC's excessive usage of GOTO was the parent of INTERCAL's more recent COME FROM statement.

C-INTERCAL

C-INTERCAL is the most popular dialect of INTERCAL. Compared to the original model, it introduces better text I/O (the original version only accepted Roman numerals), as well as Turing Text Model I/O. Threaded INTERCAL is a derived dialect that supports multithreading.

Example

The canonical Hello, World is written like this:

	DO ,1 <- #13
        PLEASE DO ,1 SUB #1 <- #234
        DO ,1 SUB #2 <- #112
        DO ,1 SUB #3 <- #112
        DO ,1 SUB #4 <- #0
        DO ,1 SUB #5 <- #64
        DO ,1 SUB #6 <- #194
        DO ,1 SUB #7 <- #48
        PLEASE DO ,1 SUB #8 <- #22
        DO ,1 SUB #9 <- #248
        DO ,1 SUB #10 <- #168
        DO ,1 SUB #11 <- #24
        DO ,1 SUB #12 <- #16
        DO ,1 SUB #13 <- #214
        PLEASE READ OUT ,1
        PLEASE GIVE UP

Several quines have been written in INTERCAL, but they are far too large to include here.