Trivial substitution
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
A trivial substitution is an esoteric programming language which encodes another esoteric programming language's functions in a different format. These are most common for brainfuck, like with Ook!, but there are other programming languages with trivial substitutions, like English with Engwish.
Characteristics
In particular, a trivial substitution can be rigidly defined as an esoteric programming language that has a "bijective mapping" of its operations onto another esoteric programming language, excluding any operations that explicitly do nothing ("no-ops"). This means both languages have the same amount of basic operations, and they each do the same thing.
For example, Ook! and brainfuck both have 8 operations that do something. Ook! does have an explicit no-op while brainfuck doesn't, but as stated above, Ook!'s no-op is excluded. Each operation of one has a counterpart in the other that does the same thing.
But why?
Generally, trivial substitutions are created in order to take an existing esolang and change its theme or change its difficulty. Ook!, for example, takes brainfuck and asks, "but what if orangutans made it?"
Caveats
There are also languages that may look like trivial substitutions, but are not. Generally, these come in two types: interpreters and extensions.
Interpreters
An interpreter is a way of translating the functions of one programming language to another, and are generally required to use esoteric programming languages in the first place. (There are some assembly esolangs, like Subleq, but they still are usually interpreted into other varieties of assembly.)
Esoteric programming languages which are Turing-complete can encode the functions of another esoteric programming language. However, this is not the same as a trivial substitution, as there most likely is not a bijective mapping of one's functions to the other.
Additionally, esoteric programming languages which are not Turing-complete, but are still computable, like (probably) original Malbolge, can be interpreted by any Turing-complete language. Even if such an interpreter does encode every function exactly, the best it can be is an extension, not a trivial substitution.
Extensions
- Main article: Extensions
Extensions are esoteric programming languages which encode all the functions of another esoteric programming language, and add some new functions on top of that. This means the bijective mapping fails, because some functions in the extension are not present in the base.
One example is BFducenquinquagintripleplus, which implements the original eight brainfuck operations, plus 57 more, including (as of its latest version) the entirety of HQ9F+.