DubDubMachine
Paradigm(s) | imperative |
---|---|
Designed by | thisIsTheFoxe |
Appeared in | 2019 |
Memory system | tape-based |
Dimensions | one-dimensional |
Computational class | Turing complete |
Major implementations | Original PlaygroundBook |
Influenced by | l33t |
File extension(s) | .dubdubm |
DubDubMachine is a esoteric programming language created in 2019 by ThisIsTheFoxe for a WWDC Scholarship application, hence it's name. It's goal is to show how much fun end exitement esolangs can bring - especially to newcomers.
Language overview
DubDubMachine operates on an array of (normally 8) memory cells, also referred to as the tape. Each cell is initially set to zero. There is a pointer, initially pointing to the first memory cell. There are 20 (originally 19) Emoji which are interpreted as commands. Every other character is ignored and treated like a comment.
Commands
Command | Description |
---|---|
0οΈβ£-π
|
Those 11 Emoji are used to represent numbers in DubDubMachine. |
π
|
IN: (not part of the original implementation) Reads a character from an input and writes is ASCII code into the current cell |
π
|
OUT: Prints out the value of the current cell as ASCII character |
π(followed by a number x)
|
INC: Increments the current memory cell by x |
π(followed by a number x)
|
DEC: Decrements the current memory cell by x |
π(followed by a number x)
|
FWD: Moves the pointer forwards by x |
π(followed by a number x)
|
BCK: Moves the pointer backwards by x |
π€
|
IF: Jumps past the matching π€ if the current cell is 0
|
π€
|
EIF: Jumps back to the matching π€ if the cell under the pointer is NONzero
|
π€―
|
END: Terminates the program immediately |
Related
According to the author the commands where influenced by the language l33t. However, many esoteric programming languages use similar commands.
The related Emoji also where chosen to represent their actions, which is also common in esolangs (e.g. brainfuck: +
= π)
The Emoji for IF / EIF
and END
where influenced by the theme of WWDC19.
Examples
Cat program
ππ€πππ€π€―
Truth-machine
Based on the brainfuck example.
π3οΈβ£ππππ€π€π1οΈβ£π1οΈβ£π1οΈβ£π2οΈβ£ππ1οΈβ£π€π1οΈβ£π1οΈβ£π€π3οΈβ£π€π2οΈβ£π€π1οΈβ£π€ππ€π€―
WWDC
Probably the first program to ever been written in this language by the author. It prints the string "WWDC".
πππ7οΈβ£ init cell 1 with 17 π€ loop start π1οΈβ£ decrement x π1οΈβ£ π5οΈβ£ add 5 to cell 2 π1οΈβ£ π4οΈβ£ add 4 to cell 3 π1οΈβ£ π4οΈβ£ add 4 to cell 4 π3οΈβ£ back to cell 1 π€ π1οΈβ£ π2οΈβ£ add 5 to cell 2 ππ print cell 2 two time π1οΈβ£π print cell 3 π1οΈβ£ π1οΈβ£π subtract 1 form cell 4 and print it π€― The End ^-^
Computational class
DubDubMachine would be Turing-complete with an infinite amount of memory. However, since it's defined by it's small memory of eight 8bit cells it is not entirely.