Shinda Sakana
Jump to navigation
Jump to search
Shinda Sakana (死んだ魚) means 'dead fish' in Japanese. It is an esoteric programming language created by User:TheCanon2. Shinda Sakana is a Deadfish variant. Shinda Sakana was succeeded by Sakana.
Commands
Like Deadfish, and like its successor Sakana, Shinda Sakana has a single accumulator, x. Shinda Sakana has five commands.
| Kanji | Term | Action |
|---|---|---|
| 増 | 増加 (zouka) | Increment x |
| 減 | 減少 (genshou) | Decrement x |
| 乗 | 二乗 (nijou) | Square x |
| 出 | 出力 (shutsuryoku) | Output x as number |
| 書 | 書く (kaku) | Output x as Unicode |
Like in Deadfish, x is set to 0 if x == -1 or x == 256.
Examples
Hello, World!
増増増乗減乗増増増増増増増増書増増増増増増増増増増増増増増増増増増増増増増増増増増増増増書増増増増増増増書書 増増増書減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減 減減減減減減減減減減減減減減減減減書減減減減減減減減減減減減書減減減減減減減減減減減減減減減減減減減減減乗減 減書減減減減減減減減書増増増書減減減減減減書減減減減減減減減書減減減減減減減減減減減減減減減減減減減減減減減 減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減減書
XKCD Random Number
増増増増出
Implementations
The following Python script is an interpreter.
prgm = input('>死んだ魚 ')
accumulator = 0
for inst in range(0, len(prgm)):
if prgm[inst] == "増":
accumulator += 1
elif prgm[inst] == "減":
accumulator -= 1
elif prgm[inst] == "乗":
accumulator **= 2
elif prgm[inst] == "出":
print(accumulator)
elif prgm[inst] == "書":
print(chr(accumulator))
else: print("Unrecognised command.")
if accumulator == -1 or accumulator == 256:
accumulator = 0
The following Python script converts a program from Deadfish to Shinda Sakana.
deadfish = input('>deadfish ')
shinda = [""]
for inst in range(0, len(deadfish)):
if deadfish[inst] == "i":
shinda.append("増")
elif deadfish[inst] == "d":
shinda.append("減")
elif deadfish[inst] == "s":
shinda.append("乗")
elif deadfish[inst] == "o":
shinda.append("出")
else: print("Unrecognised command.")
shinda = ''.join(shinda)
print(shinda)