The Wayback Machine - https://web.archive.org/web/20191217064320/http://wenyan-lang.lingdong.works/
圖靈機一吾有一術名之曰圖靈機欲行是術必先得一列曰諸律二言曰始態曰終態乃行是術曰圖靈機者抽象計算機之模型也乃西人艾倫圖靈提出通用圖靈機者模擬任意圖靈機之圖靈機也或曰凡世間可算之物藉此皆可得是謂邱奇圖靈論題也吾有一列名之曰帶充帶以白有數一名之曰針吾有二數曰一曰一名之曰左疆曰右疆吾有一言曰始態名之曰態吾有一術名之曰圖靈機畫法是術曰吾有一言名之曰畫帶有數左疆名之曰筆恆為是若筆大於右疆者乃止也夫帶之筆名之曰符若針等於筆者加符於〔加其以〕昔之符者今其是矣若非加符於、加其以、昔之符者今其是矣云云加畫帶以符昔之畫帶者今其是矣加一以筆昔之筆者今其是矣云云吾有四言曰態曰《曰畫帶曰》書之是謂圖靈機畫法之術也施圖靈機畫法噫恆為是凡諸律中之律夫律之一名之曰甲態夫律之二名之曰讀符夫律之三名之曰乙態夫律之四名圖靈機二之曰畫符夫律之五名之曰移若態等於甲態者若帶之針等於讀符者昔之帶之針者今畫符是矣昔之態者今乙態是矣若移等於左者減一於針昔之針者今其是矣云云若移等於右者加一於針昔之針者今其是矣云云乃止云云云云云云若針小於左疆者昔之帶之針者今白是矣昔之左疆者今針是矣云云若針大於右疆者昔之帶之針者今白是矣昔之右疆者今針是矣云云施圖靈機畫法噫若態等於終態者乃止也云云是謂圖靈機之術也吾有一術名之曰製律欲行是術必先得一列曰諸律五言曰甲態曰讀符曰乙態曰畫符曰移乃行是術曰吾有一列名之曰律充律以甲態以讀符以乙態以畫符以移充諸律以律是謂製律之術也
文言 / wenyan‑lang
編程語言 Programming Language for the ancient Chinese
文言, or wenyan, is an esoteric programming language that closely follows the grammar and tone of classical Chinese literature. Moreover, the alphabet of wenyan contains only traditional Chinese characters and 「」 quotes, so it is guarenteed to be readable by ancient Chinese people. You too can try it out on the online editor, download a compiler, or view the source code.

Syntax

Syntax of wenyan is just like that of its namesake, classical Chinese:

天地,好在否!/ HELLO WORLD ▶︎

The code above is editable, go ahead customize the greeting and hit ▶︎! Another slightly more sophisticated example, using the sieve of Erathosthenes to find prime numbers:

埃氏筛 / SIEVE OF ERATOSTHENES ▶︎

You can find many more examples such as a Universal Turing Machine, a Mandelbrot set plotter, a Tower of Hanoi solver, and so on on the online IDE.

Compilation

wenyan currently compiles to JavaScript or Python, and will support more languages (e.g. C) in the future. The Hello World example (or whatever you edited it to be) above translates to:

Get

SOURCE CODE (GITHUB) ONLINE EDITOR REFERENCE