|Computational class||Turing complete|
|Major implementations||Original PlaygroundBook|
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.
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.
||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|
||INC: Increments the current memory cell by x|
||DEC: Decrements the current memory cell by x|
||FWD: Moves the pointer forwards by x|
||BCK: Moves the pointer backwards by x|
||IF: Jumps past the matching |
||EIF: Jumps back to the matching |
||END: Terminates the program immediately|
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.
Based on the brainfuck example.
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 ^-^
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.
Interestingly, DubDubMachine does not need the
IN command to be Turing-complete. One could define it's input to be the first cell of the tape and would have to scroll back each time, but it would work!