Esoteric programming language
Encyclopedia
An esoteric programming language (sometimes shortened to esolang) is a programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke. There is usually no intention of the language being adopted for mainstream programming, although some esoteric features such as visuospatial syntax have inspired practical applications in the arts. Such languages are often popular among hackers and hobbyists. This use of esoteric is meant to distinguish these languages from more popular programming languages.

Usability is rarely a high priority for such languages; often quite the opposite. The usual aim is to remove or replace conventional language features while still maintaining a language that is Turing-complete, or even one for which the computational class
Computability theory (computer science)
Computability is the ability to solve a problem in an effective manner. It is a key topic of the field of computability theory within mathematical logic and the theory of computation within computer science...

 is unknown.

History

The earliest, and still the canonical
Canonical
Canonical is an adjective derived from canon. Canon comes from the greek word κανών kanon, "rule" or "measuring stick" , and is used in various meanings....

 example of an esoteric language was INTERCAL
INTERCAL
INTERCAL, a programming language parody, is an esoteric programming language that was created by Don Woods and James M. Lyon, two Princeton University students, in 1972. It satirizes aspects of the various programming languages at the time, as well as the proliferation of proposed language...

, designed in 1972 by Don Woods and James M. Lyon
James M. Lyon
James M. Lyon is an American perennial hacker and computer programmer. Jim teamed with Don Woods while both were attending Princeton in 1972 to produce the unprecedented, excursive INTERCAL programming language...

, with the stated intention of being unlike any other programming language the authors were familiar with. It parodies
Parody
A parody , in current usage, is an imitative work created to mock, comment on, or trivialise an original work, its subject, author, style, or some other target, by means of humorous, satiric or ironic imitation...

 elements of established programming languages of the day, such as Fortran
Fortran
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing...

, COBOL
COBOL
COBOL is one of the oldest programming languages. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments....

, and assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

.

Early implementations of INTERCAL were tied to the IBM System/360 and an unidentified Atari computer (probably the Atari 2600
Atari 2600
The Atari 2600 is a video game console released in October 1977 by Atari, Inc. It is credited with popularizing the use of microprocessor-based hardware and cartridges containing game code, instead of having non-microprocessor dedicated hardware with all games built in...

) and have not survived. For many years INTERCAL was represented only by paper copies of the INTERCAL manual. The language's revival in 1990 as an implementation in C under Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...

 stimulated a wave of interest in the intentional design of esoteric computer languages.

In 1992, Wouter van Oortmerssen
Wouter van Oortmerssen
Wouter van Oortmerssen, also known as Aardappel , is a Dutch computer programmer notable for his work in game programming as well as having designed several programming languages...

 created FALSE
FALSE
FALSE is an esoteric programming language designed by Wouter van Oortmerssen in 1993, named after his favorite Boolean value. It is a small Forth-like stack-oriented language, with syntax designed to make the code inherently obfuscated, confusing, and unreadable. It is also noteworthy for having a...

, a small stack-oriented programming language
Stack-oriented programming language
A stack-oriented programming language is one that relies on a stack machine model for passing parameters. Several programming languages fit this description, notably Forth, RPL, PostScript, and also many Assembly languages ....

, with syntax designed to make the code inherently obfuscated, confusing, and unreadable. It is also noteworthy for having a compiler of only 1024 bytes. This inspired Urban Müller to create an even smaller language, the now-famous brainfuck
Brainfuck
The brainfuck programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use...

, which consists of only eight recognized characters. Along with Chris Pressey's Befunge
Befunge
Befunge is a stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid...

 (like FALSE, but with a two-dimensional instruction pointer), brainfuck is now one of the most well-supported esoteric programming languages. These are canonical examples of minimal Turing tarpit
Turing tarpit
A Turing tarpit is any programming language or computer interface that allows for a great deal of flexibility in function but is difficult to learn and use because it offers little or no support for common tasks...

s and needlessly obfuscated language features; brainfuck's minimality borders on elegant and pure language design; in fact it is related to the P′′ family of Turing machine
Turing machine
A Turing machine is a theoretical device that manipulates symbols on a strip of tape according to a table of rules. Despite its simplicity, a Turing machine can be adapted to simulate the logic of any computer algorithm, and is particularly useful in explaining the functions of a CPU inside a...

s.

Turing tarpit

A Turing tarpit
Turing tarpit
A Turing tarpit is any programming language or computer interface that allows for a great deal of flexibility in function but is difficult to learn and use because it offers little or no support for common tasks...

 is a Turing-complete programming language whose number of commands, operators, or equivalent objects is very small. These include brainfuck
Brainfuck
The brainfuck programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use...

 (8 commands, all with 0 operands), OISC
One instruction set computer
A one instruction set computer , sometimes called an ultimate reduced instruction set computer , is an abstract machine that uses only one instruction – obviating the need for a machine language opcode...

 (1 command, 3 operands), and Thue
Thue (programming language)
Thue is an esoteric programming language invented by John Colagioia in early 2000. It is a meta-language that can be used to define or recognize Type-0 languages from the Chomsky hierarchy. Because it is able to define languages of such complexity, it is also Turing-complete itself...

 (1 command, 2 operands).

Stateful encoding

A method of encoding programs, such that each substring of the encoding is an instruction to both:
  1. Locate the next instruction in a list, and
  2. Apply it to transform the current program state.


Note that a single instruction always includes two sequential phases: choosing an operation, and executing it. The list of operations may either be static – as in reMorse or THRAT - or dynamic - as in reMorse4ever.

Here is an example based on reMorse or THRAT:
Select Next Operation in list
Perform Operation

Turning tarpit

A turning tarpit is a Turing tarpit with a stateful encoding, i.e. a language in which commands are used to select from a finite range of operations and apply these operations to the current state of the program. Examples include reMorse, Whirl and, arguably, INTERCAL.

Language paradigm

The paradigm of a language
Programming paradigm
A programming paradigm is a fundamental style of computer programming. Paradigms differ in the concepts and abstractions used to represent the elements of a program and the steps that compose a computation A programming paradigm is a fundamental style of computer programming. (Compare with a...

 can fall into a number of categories, and these categories are used to get a general understanding of the way that a specific language operates. These include imperative/despotic languages such as brainfuck
Brainfuck
The brainfuck programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use...

, in which instructions describe how to change data; functional languages such as Unlambda, in which data and code are more or less interchangeable and execution is the repeated application of functions to the results of other functions; and rewriting languages such as Thue
Thue (programming language)
Thue is an esoteric programming language invented by John Colagioia in early 2000. It is a meta-language that can be used to define or recognize Type-0 languages from the Chomsky hierarchy. Because it is able to define languages of such complexity, it is also Turing-complete itself...

, in which transformation functions are applied to an initial state.

Funges

A funge is an esoteric programming language which models its programs as metric space
Metric space
In mathematics, a metric space is a set where a notion of distance between elements of the set is defined.The metric space which most closely corresponds to our intuitive understanding of space is the 3-dimensional Euclidean space...

s with coordinate systems (often, but not necessarily, Cartesian
Cartesian coordinate system
A Cartesian coordinate system specifies each point uniquely in a plane by a pair of numerical coordinates, which are the signed distances from the point to two fixed perpendicular directed lines, measured in the same unit of length...

) and which execute instructions located at points in their program space by moving an instruction pointer (a position vector which indicates the currently executing instruction) through that space. Different instructions determine the direction in which the instruction pointer moves, and consequently, the sequence of instructions that is executed.

The current official standard for the behaviour of these programming languages is the Funge-98 specification. This specification is a generalisation of the semantics of the Befunge
Befunge
Befunge is a stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid...

 programming language, which has a two-dimension
Dimension
In physics and mathematics, the dimension of a space or object is informally defined as the minimum number of coordinates needed to specify any point within it. Thus a line has a dimension of one because only one coordinate is needed to specify a point on it...

al toroidal
Torus
In geometry, a torus is a surface of revolution generated by revolving a circle in three dimensional space about an axis coplanar with the circle...

 topology. Languages which adhere closely to this standard, such as Unefunge (one-dimensional) and Trefunge (three-dimensional), are sometimes called funges, while more "distant relatives" which differ in significant respects, such as Wierd, are referred to as fungeoids.

Nondeterministic language

For a deterministic language, if one is given the current state of a program, the next state can always be predicted. This is not true for a nondeterministic language. Most languages are deterministic, but some languages, such as Befunge, supply a built-in randomization instruction. Moreover, languages such as Java2K have only randomized instructions. Thus, getting even trivial programs to have a reliable output is often a monumental task.

Nondeterministic languages can be used to explore large search spaces, such as grammars, where exhaustive search is impractical. Random text generators such as the Dada Engine and rmutt are examples of this kind of nondeterminstic language.

More esoterically, nondeterministic algorithms have been employed in the theoretical investigation of hypercomputation
Hypercomputation
Hypercomputation or super-Turing computation refers to models of computation that are more powerful than, or are incomparable with, Turing computability. This includes various hypothetical methods for the computation of non-Turing-computable functions, following super-recursive algorithms...

.

Internet community

There is a small but thriving community on the Internet of hobbyists who program in and design esoteric programming languages.

The esolang community is active sporadically, and topics of discussion range from debate as to whether a language is Turing-complete to how one would go about representing abstract and hard to visualise mathematical concepts in a programming environment. There is a mailing list, but it is nearly abandoned and most discussion happens on the wiki
Wiki
A wiki is a website that allows the creation and editing of any number of interlinked web pages via a web browser using a simplified markup language or a WYSIWYG text editor. Wikis are typically powered by wiki software and are often used collaboratively by multiple users. Examples include...

 (see below) or on IRC.

Turing completeness is a favorite topic of discussion, since it is not immediately obvious whether or not a language is Turing complete, and it often takes rather large intuitive leaps to come to a solution. New languages with new features are always being created, so proof of Turing completeness is always a challenge.

A related pursuit among programming language enthusiasts is the writing of obfuscated code
Obfuscated code
Obfuscated code is source or machine code that has been made difficult to understand for humans. Programmers may deliberately obfuscate code to conceal its purpose or its logic to prevent tampering, deter reverse engineering, or as a puzzle or recreational challenge for someone reading the source...

.

Examples

Below are some characteristic examples of esoteric programming languages:
  • LOLCODE
    LOLCODE
    LOLCODE is an esoteric programming language inspired by the language expressed in examples of the lolcat Internet meme. The language was created in 2007 by Adam Lindsay, researcher at the Computing Department of Lancaster University....

     is designed to resemble the speech of lolcat
    Lolcat
    A lolcat is an image combining a photograph of a cat with text intended to contribute humour. The text is often idiosyncratic and grammatically incorrect, and its use in this way is known as "lolspeak" or "kitty pidgin"....

    s. The following is the "hello world" example:

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE
  • Befunge
    Befunge
    Befunge is a stack-based, reflective, esoteric programming language. It differs from conventional languages in that programs are arranged on a two-dimensional grid...

     and its ilk allow the instruction pointer to roam in multiple dimensions through the code. For example the following program displays "Hello World" by pushing the characters in reverse order onto the stack, then printing the characters in a loop which circulates clockwise through the instructions [>], [:], [v], [_], [,], and [^].

"dlroW olleH">:v
^,_@
  • Brainfuck
    Brainfuck
    The brainfuck programming language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use...

     is designed for extreme minimalism and leads to obfuscated code, with programs containing only 8 distinct characters. e.g. the following program outputs "Hello World":

++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++
..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
  • Chef
    Chef (programming language)
    Chef is an esoteric programming language designed by David Morgan-Mar. It is based on the manipulation of data values in a number of stacks; the same idea is used in assembly programming languages...

     is designed to make programs look like cooking recipes. e.g. the following statement pushes an item onto a stack:

Put cinnamon into 2nd mixing bowl
  • FALSE
    FALSE
    FALSE is an esoteric programming language designed by Wouter van Oortmerssen in 1993, named after his favorite Boolean value. It is a small Forth-like stack-oriented language, with syntax designed to make the code inherently obfuscated, confusing, and unreadable. It is also noteworthy for having a...

     is a stack-based language with single-character commands and variables. For example, 3 + 1 can be calculated by evaluating (λ x → x + 1)(3): 3[1+]!
  • One instruction set computer
    One instruction set computer
    A one instruction set computer , sometimes called an ultimate reduced instruction set computer , is an abstract machine that uses only one instruction – obviating the need for a machine language opcode...

     is a machine language with only one operation. This is actually a class of languages because one can define such a language for any given operation.
  • Piet
    Piet (programming language)
    Piet is an esoteric programming language designed by David Morgan-Mar, whose programs are bitmaps that look like abstract art. The compilation is guided by a "pointer" that moves around the image, from one continuous coloured region to the next...

     is a visual language whose programs are bitmaps that resemble paintings by Piet Mondrian
    Piet Mondrian
    Pieter Cornelis "Piet" Mondriaan, after 1906 Mondrian , was a Dutch painter.He was an important contributor to the De Stijl art movement and group, which was founded by Theo van Doesburg. He evolved a non-representational form which he termed Neo-Plasticism...

    .
  • Shakespeare
    Shakespeare (programming language)
    The Shakespeare Programming Language is an esoteric programming language designed by Jon Åslund and Karl Hasselström. Like the Chef programming language, it is designed to make programs appear to be something other than programs; in this case, Shakespearean plays.A character list in the beginning...

     is designed to make programs look like Shakespearean plays. e.g. the following statement declares a point in the program which can be reached via a GOTO-type statement: Act I: Hamlet's insults and flattery..
  • Whitespace
    Whitespace (programming language)
    Whitespace is an esoteric programming language developed by Edwin Brady and Chris Morris at the University of Durham . It was released on 1 April 2003 . Its name is a reference to whitespace characters...

     only considers the layout of whitespace and ignores all non-whitespace characters.
  • INTERCAL
    INTERCAL
    INTERCAL, a programming language parody, is an esoteric programming language that was created by Don Woods and James M. Lyon, two Princeton University students, in 1972. It satirizes aspects of the various programming languages at the time, as well as the proliferation of proposed language...

    , short for "Compiler Language With No Pronounceable Acronym".
  • Malbolge
    Malbolge
    Malbolge is a public domain esoteric programming language invented by Ben Olmstead in 1998, named after the eighth circle of hell in Dante's Inferno, the Malebolge....

     (the 8th circle of Hell) was designed to be the most difficult and esoteric programming language.

External links

  • C2 WikiWeb
  • Esolang wiki — A Wiki dedicated to esoteric programming languages. (Canonical URL: http://esoteric.voxelperfect.net/wiki/Main_Page)

Lists


Authors


Funges

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK