esolang

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

Expected: Hello, world!

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

CharDoes
i dAdd 1, subtract 1
sSquare
o cPrint the number; print it as a character
gRead a character
nMove to the next of the four accumulators, the fourth back to the first
zSet to 0
fSkip 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.

Expected: 0

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

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 deadbird

Source

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