explaingit

wenyan-lang/wenyan

20,257TypeScriptAudience · vibe coderComplexity · 2/5DormantLicenseSetup · easy

TLDR

An esoteric programming language where code reads like Classical Chinese prose. It's Turing complete and compiles to JavaScript, Python, or Ruby.

Mindmap

mindmap
  root((repo))
    What it does
      Classical Chinese syntax
      Turing complete
      Compiles to JS/Python/Ruby
    How to use
      Online IDE
      npm compiler
      Editor plugins
    Examples
      Quicksort
      Sieve of Eratosthenes
      Tower of Hanoi
    Audience
      Esoteric language fans
      Chinese literature lovers
      Curious programmers

Things people build with this

USE CASE 1

Write a sorting algorithm or mathematical computation in Classical Chinese syntax for fun or artistic expression.

USE CASE 2

Learn how esoteric languages work by studying a Turing-complete language with unconventional syntax.

USE CASE 3

Explore the intersection of programming and Classical Chinese literature through executable code.

Tech stack

TypeScriptJavaScriptPythonRuby

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Wenyan is an esoteric programming language, a language created more as an experiment or artistic statement than as a practical tool, whose syntax is modelled on Classical Chinese, the formal written language used in Chinese literature and official documents for over two thousand years. Programming in Wenyan means writing code that looks like ancient Chinese prose rather than conventional source code. The language is Turing complete, meaning it can theoretically compute anything any other programming language can. The README demonstrates this with a "hello world" example: a short snippet of Classical Chinese characters that declares a number, uses it to control a loop, and prints a phrase three times, functionally equivalent to a simple JavaScript for-loop. Punctuation and line breaks are entirely optional, matching the style of Classical Chinese texts where spacing is absent. Wenyan compiles to JavaScript, Python, or Ruby, so the programs it produces can actually run. There is an online IDE where you can try it in a browser without installing anything. For local use, the compiler is installed via npm. Editor plugins exist for VS Code, Vim, and Sublime Text. The project includes examples of classic algorithms, quicksort, the Sieve of Eratosthenes, Mandelbrot set, Tower of Hanoi, all written in Classical Chinese syntax. The intended audience is primarily people who find the concept amusing or intellectually interesting, programmers curious about esoteric languages, fans of Classical Chinese literature, or anyone who enjoys the absurdity of describing a sorting algorithm in the style of ancient Chinese scholarship.

Copy-paste prompts

Prompt 1
Show me how to write a simple loop in Wenyan that prints a message multiple times, and explain what each Classical Chinese character does.
Prompt 2
I want to implement the Sieve of Eratosthenes in Wenyan. What does the syntax look like and how do I compile it to JavaScript?
Prompt 3
How do I set up Wenyan in VS Code and write my first program? Walk me through the installation and a basic example.
Prompt 4
Translate this JavaScript for-loop into Wenyan syntax: for(let i=0; i<5; i++) { console.log(i); }
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.