彳亍

From Esolang
Jump to navigation Jump to search

彳亍 is an esolang invented by User:None1 that uses Chinese characters, what a Chinese character does depends on the radical of it.

It has a stack that stores unbounded signed integers, two stacks when using extensions.

Commands

Radical Meaning Example of Chinese characters
Increment stack top 你 他
Decrement stack top 吃 吵
Swap top stack values 行 衡
Output stack top as Unicode character 猫 猪
Output stack top as integer 惊 怕
Push a 0 into stack 河 海
Pop stack top 烧 烟
⻖(at the left) While stack top is nonzero 阳 阴
⻖(at the right) Matches ⻖(at the left) 邵 郴
Halt 桂 林
Clear the stack 打 操
Push a random number from 0 to 1 onto the stack 铅 铁
Input a number and push it onto the stack 热 烈
Input a Unicode character and push its Unicode value onto the stack 草 花
Square the stack top 辉 耀
(Extensional) Dig up the stack bottom 冰 冽
(Extensional) Compare the first two of stack, returns 1 if the top is greater, 0 is equal, -1 is less 等 答
(Extensional) Switch between the first stack and the second one 墙 坑
(2.0)Works like + in befunge 宝 宗
(2.0)Works like - in befunge 饥 饱
日(At left) (2.0)Works like * in befunge 时 明
月(At left or at bottom) (2.0)Works like / in befunge 臂 膀
Other radicals NOP 斌 逊

Reading the top of an empty stack results in 0.

Examples

XKCD Random Number

河你你你你猫

Truth Machine

热惊阳惊郴

Cat program

蒹阳狗葭邓

Hello, world!

河俄俄俄辉吃辉俄俄俄俄俄俄俄俄猫俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄俄猫俄俄俄俄俄俄俄猫猫俄俄俄猫吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃猫吃吃吃吃吃吃吃吃吃吃吃吃猫吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃辉吃吃猫吃吃吃吃吃吃吃吃猫俄俄俄猫吃吃吃吃吃吃猫吃吃吃吃吃吃吃吃猫吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃吃猫

Prints "114514"

他们说,辉赫永远不会洒在你身上。
惆怅着,循环着,
以至忘了怎么去恨仇,
怎么不忧虑自己的得失。
习惯了这不合常理的规律,
想诉说这所有的离奇,
最后却连吐字也怕起来了。

Interpreters