We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
禅
Yet another programming language inspired from 高尔夫 and XENBLN designed by PSTF.
Since there are way more Chinese characters than Latin letters, Greek letters, Bengali numbers, and a bunch of other special symbols combined, we decided to base this programming language on Chinese characters. Of course, we can't guarantee pure Chinese-character programming; sometimes it involves Kana, Hangul, or maybe full-width symbols.
Program Structure
Every line of the program is a function (you can freely give it a name, or not), and the last line is the main function. This is the tradition of Jelly. We use a mix of prefix and infix expressions (infix expressions are usually used for some dyadic atoms).
Data Storage
This language has a variable system (for example, 赋甲一〇〇 sets 甲 to 100). We usually use the ten Heavenly Stems (甲乙丙丁戊己庚辛壬癸) and some obscure characters (like 馕, 瘸, 龘, 撅, 搋) to represent variables. Although some other currently undefined characters can also be used as variables, this might cause forward compatibility issues, especially with commonly used Chinese characters.
This language also has a built-in array (similar to a stack, but operations aren't limited to the top of the stack; they can be used at any position, and it's called 厝), just like XENBLN. In my local dialect, which is Minnan, 厝 means house. The author is from Xiamen.
Data Type
Numbers
Two Number Systems
This language normally uses the decimal system by default and actually has two sets of numeral systems. One set is lowercase numbers (〇, 一, 二, 三, 四, 五, 六, 七, 八, 九), and the other is uppercase numbers (零, 壹, 贰, 叁, 肆, 伍, 陆, 柒, 捌, 玖). The formal use of uppercase numbers started during the Ming Dynasty. Zhu Yuanzhang issued a decree because of the Guo Huan case, requiring that accounting numbers use uppercase numerals to make it harder to alter records. Later on, the symbols in uppercase numbers for ×10² and ×10³, which were originally written as 陌 and 阡, were changed to 佰 and 仟, and they've been used that way ever since.
Number System Extension
When interpreting a program in the command line, if the EXT-NUMERAL switch is turned on, the following numbering systems will also be enabled: Suzhou numerals (〇〡〢〣〤〥〦〧〨〩), full-width numbers (0123456789), and enclosed numbers (⓿❶❷❸❹❺❻❼❽❾).
Integers (整)
An integer is just a string of number characters put together. Numbers in the same set are considered the same group, and different character sets are used to distinguish two or more numbers. Hexadecimal is allowed, but it has to be enclosed in single angle brackets (〈〉), and the first charset is extended by 子丑寅卯辰巳, and the second one is extended by 午未申酉戌亥. For example, 一一四五一四 is a valid integer.
Float (浮)
A floating-point number is made up of two sequences of digits separated by the atom for the decimal point, '点'. For example, '一二三四五点六七' is a valid floating-point number.
If the MONEY switch is enabled, '点' becomes undefined, the floating-point precision will be fixed to two decimal places ("厘" doesn't circulate in physical currency in China, but 1 厘 equals 0.1 Chinese Cent or 0.001 CNY), and the above floating-point number would be represented as '一二三四五元六角七分'.
If one side of the 点 has nothing there then that part is considered as 0.
Big Number
We have an atom called "向", where a向b means a×10b, where 1 ≤ a < 10.
Complex Number (虚)
We make a complex number by connecting two real numbers with 复, where the first one is the real part and the other is the imaginary part.
Boolean value (爻)
Boolean value can only have 阴 or 阳 as its value and literal, which corresponds to false and true respectively.
Strings (文)
There are many types of strings.
Normal Strings
Normal strings are enclosed in double quotation marks, and use \ to escape.
Multiline Strings
Multiline strings are enclosed in 『』 and supports multi-line instead of escape sequence.
Base-256 Numbers
Base-256 numbers are written in double angle brackets(《》). This is the base-256 number charset, credit to User: I am islptng:
+0+1+2+3+4+5+6+7+8+9+a+b+c+d+e+f 00〇一二三四五六七八九十百千万亿兆 10京垓秭穰沟涧正载极零壹贰叁肆伍陆 20柒捌玖横竖撇捺折钩提甲乙丙丁戊己 30庚辛壬癸子丑寅卯辰巳午未申酉戌亥 40鼠牛虎兔龙蛇马羊猴鸡狗猪忐忑乾坤 50屯蒙需讼师笔履泰匹同有谦豫随蛊临 60观噬贲剥复妄颐坎离咸恒遁壮晋夷家 70睽蹇解损益夬姤萃升困井革鼎震艮渐 80妹丰旅巽兑涣节孚既未氢氦锂铍硼碳 90氮氧氟氖钠镁铝硅磷硫氯氩钾钙钪钛 a0钒铬锰铁钴镍铜锌镓锗砷硒溴氪铷锶 b0钇锆铌钼锝钌铑钯银镉铟锡锑碲碘氙 c0铯钡镧铈镨钕钷钐铕钆铽镝钬铒铥镱 d0镥铪钽钨铼锇铱铂金汞铊铅铋钋砹氡 e0钫镭锕钍镤铀镎钚镅锔锫锎锿镄钔锘 f0铹𬬻𬭊𬭳𬭛𬭶鿏𫟼𬬭鿔鿭𫓧镆𫟷鿬鿫
Characters
Characters are one-char string literals, a character followed by 字, and escape allowed.
Array (列)
An array is just simply a list of things with nothing but built-in seperation method to seperate and enclosed in brackets. For example, 【一二三阳“你好”四五六阴点五】 is equivalent to [123t"你好"456f.5] in XENBLN.
NULL (空)
Just null, nothing else.
Undefined (锟)
Undefined behaviour.
Invalid Type (碴)
Just invalid type. Behaves similar to undefined values.
Built-in Constants
丌 for π. 㠪 for e (natural base). 卬 for (√5 + 1) / 2. 茬 for NaN. 齉 for Infinity. 龘 for Absolute Infinity. 龤 for "问天地好在".
Type Conversion
Same as what in XENBLN but somewhat Sinicized.
Infinity returns 与君九十九杯酒 when string-ized, NaN returns lyric of 《当那一天来临》, and NULL returns “”.
I/O Capabilities
Input Methods
This language has six input methods. '入' inputs directly and returns a string. '听' inputs and returns an integer. '求' inputs and returns a decimal. The versions of these three instructions with prompts are '进', '读', and '载', respectively.
Output Methods
This language also has four ways to output. '出' means to directly output a parameter (with a newline), while '说' outputs a parameter without a newline. If you want to return the parameter after outputting it, you can use '传' instead of '出' and '写' instead of '说'.
Automatic Output
When the AUTOMATIC-OUTPUT switch is turned on, any non-undefined value calculated outside a function that isn't returned or used in another function or assigned to a variable will be output directly. The language also has a history system, and 佢 (which means "it" in Cantonese) represents the result of the most recent calculation in the history.
Full Command Table
This will be completed later. Anyway, here is the link: 禅/Command Table
Examples with All Switches Disabled
0~9
Hello, World!
出龤
99 bottles of beers by cheating
出一除〇
Cat Program
出入
10~19
Truth Machine
若入等阳做循出阳止否出阴止
20~29
30~39
Average Number
赋甲〇点〇赋丙〇做赋乙入赋甲甲加乙赋丙丙加一倘乙非“”止出甲除丙