Siyu

From Esolang
Jump to navigation Jump to search

Siyu (Pinyin of Chinese word 死鱼 meaning dead fish) is an esolang invented by User:None1. It is a deadfish derivative.

Commands

Command Corresponding Chinese word Meaning
z zeng jia 增加 (increase) Increment the accumulator
j jian shao 减少 (decrease) Decrement the accumulator
p ping fang 平方 (square) Square the accumulator
s shu chu 输出 (output) Output the accumulator
t ting zhi 停止 (stop) Halt

Examples

XKCD Random Number

zzps

Number Hello World!

zzzpjpzzzzzzzzszzzzzzzzzzzzzzzzzzzzzzzzzzzzzszzzzzzzsszzzs
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjsjjjjjjjjjjjjs
jjjjjjjjjjjjjjjjjjjjjpjjsjjjjjjjjszzzsjjjjjjsjjjjjjjjs
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjs

NOP

N

or:

t

Interpreter

Python

exec('x=0\n'+'\n'.join([{'z':'x+=1','j':'x-=1','p':'x*=x','s':'print(x)','t':'exit()'}[i]+'\nif x in [-1,256]:\n x=0' for i in input()]))