Eng 0.4 · English that compiles to seven languages
Each clause is one step, applied to the result of the one before. Fixed rules, no model: a clause it can't read is an error that names it. One sentence becomes Python, JavaScript, C, Rust, Go, x86-64 machine code and WebAssembly.
Three rules, applied in order. Everything else is vocabulary.
Take a list and a value…
The first clause can name the inputs. They become the parameters, and the first one becomes "it".
…square each element, find the mean…
Each later clause is one operation on "it". Its result becomes the new "it". "Each" applies an operation to every element.
…and take the square root of that.
Whatever the last clause produces is returned. Writing a file or opening a window returns nothing.
100 functions, each written three ways. Every sentence was compiled and run against a hand-written Python reference on the same inputs. Where a sentence also compiles to other languages, that code was built and run too: C with gcc, the assembly with the GNU assembler, Rust with rustc, Go with go build, and JavaScript and WebAssembly in Node. Open a row to see which languages passed.
Precision comes from each phrase meaning exactly one thing. Where a word could mean two things, it gets one, and the other meaning gets its own phrase.