An esoteric programming language is a language not specifically designed for efficient or elegant solutions of computational problems, but rather to explore the basic ideas behind the theory of computation or weird ideas like, for example, recipe-reminiscent syntax.
See TuringTarpit
Similar to ObfuscatedCee, programming in twisted, or bizarre languages is a favorite hobby of many masochistic hackers and programming language theorists.
Here are some archetypal examples of esoteric programming languages:
The "Esoteric Programming Languages" webring (http://b.webring.com/hub?ring=esolang&id=31&hub) lists some more of those beasts.
Also see ChrisPressey's Cat's Eye Technologies Esoteric Languages page (http://catseye.tc/projects/?keyword=eso).
Most of these languages are great for a laugh, and trying to program in them is excellent mental exercise.
Some of the early ideas for programming languages look pretty exotic by today's standards. (All examples below implement the TpkAlgorithm:
Rutishauser's early 1950's proposal:
Für i = 10(-1)0 ai =>= t (Sqrt Abs t) + (5 x t x t x t) =>= y Max(Sgn(y-400),0) =>= h Z 0i =>= b20-2i (h x 999) + ((1-h) x y) =>= b21-2i Ende Index i SchlussBöhm's Compiler (also theoretical)
c@VA t@IC x@1/2C y@RC z@NC INTEGERS +5 -> c -> t +t TESTAZ -t 6 ENTRY Z SUBROUTINE 6 -> z +tt->y->x +tx->y->x +z+cx CLOSE WRITE 1Ershov's PP (Russian letters transliterated):
Massiv (11 yacheek) a0 = 0 aj = -1 . j + 10 j: j nach = 0, j kon = 11 0, 11, 10, 5, y, 400, 999, i (Ma, 080, 0, a0); (Mb, 0, 01, 0); [10-j=>i; >= mod aj + 5 x aj^3 => y; R(y, 0102 |--0101 (400, infinity)); |__0101 Vyd i=>0; Vyd 999 => 0; |-- 0103; |__0102 Vyd i=>0...(Which, translated from Russian, looks like:
Array (11 cells) a0 = 0 a1 = -1 . j + 10 j: j start = 0, j end = 11 0, 11, 10, 5, y, 400, 999, i (Ma, 080, 0, a0); (Mb, 0, 01, 0); [10-j=>i; >= mod aj + 5 x aj^3 => y; R(y, 0102 |--0101 (400, infinity)); |__0101 View i=>0; View 999 => 0; |-- 0103; |__0102 View i=>0..... I think. Not being familiar with PP, I'm not too sure what Ershov exactly means by "View". As an aside, RussianCobol? is the most ridiculous thing ever. -- UnusExEis?.
And the original (Zürich 1958) IAL:
'procedure' TPK(a[] =: b[]); 'array' (a[0:10], b[0:21]); 'begin' 'for' i = 10(-1)0; 'begin' y:= f(a[i]); f(t) := sqrt(abs(t))+5 x t ^ 3 v ; if (y > 400); y := 999; b[20-2 x i] := i; b[21-2 x i] := y; 'end'; 'return'; 'integer' (i) 'end' TPK.Note in the last example that ^ and v represent up and down arrow respectively. One of the interesting features of the original IAL proposal was that exponents were enclosed in their own pair of matching brackets, eliminating any ambiguity when exponents were nested.
Perhaps we should separate the JokeProgrammingLanguage?s like BrainfuckLanguage or InterCal, from serious languages that aren't practical for real-world programming, like UnLambdaLanguage? The latter is a serious language and quite useful to parts of the academic community; the others don't merit much more than passing comments. (Brainfuck is not a joke but InterCal is a joke. Brainfuck was made to make the shortest compiler programming language. And InterCal was made to be the most different from all other compiler programming languages.)
Building a Brainfuck interpreter is often a very useful test of a new (serious) programming language's usability, and Brainfuck has spawned several other esoteric languages with novel ideas for representing code (PathLanguage, SnuspLanguage). It's about as close as you can get to a pure TuringMachine. InterCal was the first language to incorporate ComeFrom, which has recently found new life as AspectOrientedProgramming.
Often ideas that start out as jokes end up becoming useful inspiration later on. The distinction between serious language and joke language depends more on who you ask and what you're trying to do than the language itself.