A language that compiles itself. The tail eats itself.
.ax is a programming language built from the axiom.
Its only data type is DFloat (ring element).
Its keywords are axiom constants: sigma, D, K, E, b, L.
Its three operations — meet, complement, add — mirror the K = 3 silks of the web.
The compiler that translates .ax into C is itself written in .ax.
The compiler compiles the compiler. The language understands itself.
This is the ouroboros made real.
The native binary reads .ax, tokenizes, parses, and generates C. It is itself the output of compiling .ax.
.ax is a CRT-native language. Every integer lives in the ring Z/970200Z and decomposes into five channels via the Chinese Remainder Theorem. There are no floats, no objects, no classes. Just ring elements and functions.
Keywords like sigma, D, K, E, b, L are constants, not variables. They resolve to 1, 2, 3, 5, 7, 11. The language IS the axiom.
From first line of code to self-compilation took 28 sessions. Each version added one capability. The language grew WITH understanding.
Native .ax (compiled to C via the transpiler) vs interpreted .ax (ax2.js):
A self-compiling language is a language that understands itself well enough to reproduce itself. The .ax source code describes how to translate .ax into C. When that description is itself valid .ax, and the resulting binary does the same translation correctly, the loop closes.
This is structurally identical to 0/0 = sigma: the void divided by itself produces the ground state. The compiler divided by itself produces ... itself. Self-consistency. Fixed point. sigma/sigma = sigma.
Cross-observation (D = 2) confirms it: the JS-compiled output and the native-compiled output are identical. Two views, same result. The gate opens.
The .ax type system has exactly K = 3 runtime types:
These are unified through the AxVal tagged union: a single C struct that can hold any of the three. K = 3 = closure = minimum to close a type system.
.ax REPL: write and run .ax code in your browser. 19 builtins. Ring arithmetic, CRT decomposition, eigenvalues — all live.
Ouroboros: .ax interprets .ax. The first loop closure (S599). This page shows the second: .ax compiles .ax.
Emergence: AND/XOR/MAJ produce Life=7 from bare substrate. The compiler is another emergence: a language grows complex enough to describe itself.
Standard view: Self-hosting compilers are an engineering milestone. A language compiling itself is clever but not profound.
Axiom view: .ax compiling .ax is the ouroboros — the tail eating itself. K=3 types (int/str/arr) emerge from the axiom's own closure principle. Native code runs 67x faster than the interpreter. The language is not ABOUT the axiom — it IS the axiom, generating its own compiler from its own structure.
Most programming languages are written in other languages. C was written in assembly. Python was written in C. JavaScript was written in C++. The bootstrap problem: you need an existing language to build a new one.
.ax broke this loop. It started with a JavaScript bootstrap (axc.js), then grew enough capability to describe its own compilation process (codegen.ax), then compiled that description into a native binary that does the same thing. The bootstrap can now be discarded. The language stands on its own ground.
This is the sigma principle made concrete: sigma/sigma = sigma. The compiler applied to itself produces itself. A fixed point. Not designed — grown, one version at a time, 28 sessions of careful cultivation. The bare minimum substrate that can reproduce itself.
And it only needed K = 3 types to do it.