static/index.html
文言, 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 guaranteed 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 of wenyan is just like that of its namesake, classical Chinese:
| | |
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:
| | |
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.
wenyan currently compiles to JavaScript, Python, or Ruby, 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:
WIKIGITHUBONLINE EDITORLANGUAGE SPECREFERENCE