5 KiB
Esoteric Programming Language
So called esoteric programming languages (esolangs) are highly experimental and fun programming languages that employ bizarre and/or unconventional ideas. Popular languages of this kind include Brainfuck, Chef or Omgrofl.
There is a great wiki for esolangs, the Esolang Wiki (https://esolangs.org). If you want to behold esolangs in all their beauty, see https://esolangs.org/wiki/Hello_world_program_in_esoteric_languages_(nonalphabetic_and_A-M). The Wiki is published under CC0!
Some notable ideas employed by esolangs are:
- Using images instead of text as source code (e.g. Piet).
- Doing nothing (e.g. Nothing).
- Being two or more dimensional (e.g. Befunge or Hexagony).
- Source code resembling cooking recipes (e.g. Chef).
- Trying to be as hard to use as possible.
- Trying to be as hard to compile as possible (e.g. Befunge).
- Adding randomness to program execution (e.g. Entropy).
- Having no input/output (e.g. Compute).
- Obligation to beg the compiler to do its job (e.g. INTERCAL).
- Using only white characters in source code (e.g. Whitespace).
- Using only a single letter in source code (e.g. Unary).
- Using git repository structure as source code (e.g. legit).
- Source code resembling dramatic plays (e.g. Shakespeare, actual real-life plays were performed).
- Solely focus on golfing, i.e. writing the shortest possible programs (e.g. GoldScript)
- Using unicode characters (e.g. UniCode).
- Being infinitely many languages (e.g. MetaGolfScript, each one solves a specific program in 0 bytes).
- ...
Esolangs are great because:
- They are fun and have a cool community around them.
- They are actually useful research in language design and food for thought, even if most of the ideas aren't useful directly, esolangs really teach us about the borders and definitions of what languages are. And sometimes, by mistake, actual discoveries are made.
- They are great exercise in programming and design. Simple languages that are allowed to not be useful are potentially good for education as they let the programmer fully focus on a specific idea and its implementation.
- They blend technology with art, train creativity and thinking "outside the box".
- They are a breath of fresh air in the sometimes too serious area of technology. Hobbyist and non-commercial programming communities are always great to have.
- ...
History
INTERCAL, made in 1972 by Donald Woods and James Lyon, is considered the first esolang in history: its goal was specifically intended to be different from traditional languages and so for example a level of politeness was introduced -- if there weren't enough PLEASE labels in the source code, the compiler wouldn't compile the program.
In 2005 esolang wiki was started.
Specific Languages
The following is a list of some notable esoteric languages.
!@$%^&*()+
: Source code looks like gibberish.- Brainfuck: Extremely simple but hard to program in, arguably the most famous esolang with many forks.
- Brainfork: Brainfuck with added multithreading.
- Befunge: Two dimensional language that's extremely hard to compile.
- Chef: Source codes look like cooking recipes.
- Entropy: Adds randomness to programs, data in variables decay.
- FALSE: Aims for as small compiler as possible, inspired creation of Brainfuck and other esolangs.
- Gravity: Executing programs involves solving differential equations related to gravity, which is uncomputable.
- INTERCAL: Maybe the first esolang, includes such statements as
PLEASE DO
which have to be present in order for the compilation to be successful. - Nothing: Does nothing, guarantees zero bugs.
- Compute: Can compute any existing problem in arbitrarily short time, but has no output so the result cannot be printed.
- Omgrofl: Source code is composed of internet acronyms such as lol, wtf, lmao etc.
- Pi: Source code looks like the number pi, errors encode the program.
- Piet: Source codes are images.
- Text: Language that always prints its source code (it is not Turing complete). All ASCII files are programs in Text.
- Polynomial: Programs are polynomials whose zeros determine the commands.
- Unary: Source code uses only 1 character:
0
. Each program is just a sequence of zeros of different length. - Velato: Source codes are MIDI files.
- Whitespace: Source code uses only white characters (spaces, tabs and newlines) so it looks seemingly empty.
- XENBLN: Golfing language, hello world is just
š
.