Shinda Sakana
Deadfish in five kanji, one of which prints a character.
TheCanon2, 2024 · Turing complete: no · ●○○ easy · esolangs.org
Tested with 2 known programs · Test method
Run it
The idea
Shinda Sakana (死んだ魚) means dead fish in Japanese. TheCanon2 made it in 2024 as a variant of Deadfish, and Sakana later succeeded it. It keeps the single accumulator and the Deadfish rule that -1 and 256 turn into 0. The letters became kanji, and a fifth command prints the accumulator as a character, so a program can say hello.
Read the story
The Python interpreter is sixteen lines long, and this implementation follows it. Both kinds of output go through Python's print, so every number and every character lands on its own line. Any other character prints Unrecognised command. There are no loops or conditions, so every program runs straight through once.
The machine
| Kanji | Reading | Does |
|---|---|---|
増 | zouka | Add 1 |
減 | genshou | Subtract 1 |
乗 | nijou | Square |
出 | shutsuryoku | Print the number |
書 | kaku | Print the character with that code |
x starts at 0 and has no upper bound, as in Python. After every command an x of -1 or 256 becomes 0. The interpreter reads its program with input(), so a program is one line; this implementation passes over line breaks.
Example
The xkcd random number, and an A made of 8 squared plus 1.
The xkcd random number, and an A made of 8 squared plus 1.
The Hello, World! reaches 72 as 3 squared, minus 1, squared, plus 8. For the w it walks down from the space to 11, squares to 121 and takes 2 off. Each character comes out on its own line.
Patterns it teaches
- Every text runs: a character that is not a command prints a complaint and the run goes on.
Further
- esolangs.org/wiki/Shinda_Sakana
- Deadfish, the language it renames.
See also
Shinda Sakana builds on Deadfish~.
Accumulator-based
Deadfish derivatives
Write your own in Run Convert a program from Shinda Sakana
Implementation
JavaScript interpreter, source and command line
A JavaScript interpreter, used in the browser and on the command line. Id: shinda-sakana.
Command line
shib run shinda-sakana -e '増増増増出'shib manual shinda-sakanaSource
- Module
langs/wiki/ports.js- Interpreter
langs/wiki/shinda-sakana.js
Docs: Kernel instructions · The .shib format · Command line · Adding a language
Source esolangs.org (CC0) · Edit on esolangs.org