Deadchicken
Deadfish, spelled out in chickens.
None1, 2023 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 3 known programs · Test method
Run it
The idea
None1 crossed Deadfish with Chicken. The only word is chicken, and the number of chickens on a line picks the command. Deadfish can only print numbers, so Deadchicken adds a fifth command that switches to printing characters. That makes a Hello World possible, if long. The version has 262 lines.
The machine
One value, starting at 0.
| Chickens on a line | Does |
|---|---|
| 1 | Add one |
| 2 | Take one away |
| 3 | Square |
| 4 | Print, as a number and a line feed or as a character |
| 5 | Switch between numbers and characters |
As in Deadfish, 256 wraps to 0 and -1 to 255. The Python interpreter does this before each line runs, not after the change, and this implementation does the same.
Example
The first program is the XKCD random number.
The first program is the XKCD random number. The second is how the Hello World starts. It switches to characters, counts to 3, squares to 9, takes one to get 8, squares to 64 and adds 8 to reach 72, the code of H.
Further
Ideas it shows
See also
Also in Jokes
Write your own in Run Convert a program from Deadchicken
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: deadchicken.
Command line
shib run deadchicken -e 'chicken
chicken
chicken
chicken
chicken chicken chicken chicken'shib manual deadchickenSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/deadchicken.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org