Deadbird
Deadfish with four accumulators, a skip and functions of one character, enough to loop by recursion.
ChuckEsoteric08, 2024 · Turing complete: yes · ●●○ moderate · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
ChuckEsoteric08 made Deadbird in 2024 from Deadfish. Deadfish has one accumulator and no way to branch or loop. Deadbird keeps its four letters and the rule that -1 and 256 turn into 0, and adds six commands. f skips the next command when the accumulator is 0, and (x/y) gives a body the name of one character. A function may call itself, and that is the only loop there is.
The machine
| Char | Does |
|---|---|
i d | Add 1, subtract 1 |
s | Square |
o c | Print the number; print it as a character |
g | Read a character |
n | Move to the next of the four accumulators, the fourth back to the first |
z | Set to 0 |
f | Skip the next command if the accumulator is 0 |
(x/y) | Define the function x as y; the character x then calls it |
After every command an accumulator of -1 or 256 becomes 0. A number ends with a line feed, as in Deadfish.
Example
The Hello, world! reaches 72 as 3 squared, minus 1, squared, plus 8, and from there walks up and down to…
The Hello, world! reaches 72 as 3 squared, minus 1, squared, plus 8, and from there walks up and down to each next letter. Only w takes one more square, 11 times 11 is 121, and 2 down is 119.
The truth machine defines 0 to print, and 1 to print and call itself. It reads a character and takes 48 off, so on 0 the f skips the call to 1 and only 0 runs.
The counter, (U/foiU)U, prints 1 to 255 and starts again, forever. At 256 the accumulator turns into 0, and f skips the print of that 0.
Patterns it teaches
- Turing tarpit: one skip and recursion are all the control there is.
Further
- esolangs.org/wiki/Deadbird
- Deadfish, the language it extends.
See also
Also in Turing tarpits
Write your own in Run Convert a program from Deadbird
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: deadbird.
Command line
shib run deadbird -e '(0/o)(1/o1)gddddddddddddddddddddddddddddddddddddddddddddddddf10' --input '0'shib manual deadbirdSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/deadbird.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org