The Babel Engine

One function. Five languages. Three of them running, right now, at once.

Write one function in Coherence Language below. It is shown compiled to a GPU shader, JavaScript, WebAssembly, Python, and Luau. Three of them are not just shown, they are running live in this tab: on your CPU as JavaScript and WebAssembly, and on your GPU as a shader, over a whole range of inputs at once. The bar below proves they computed the identical result. The Python and Luau are real output of the compiler, and it also compiles to native machine code and a bytecode VM. One source, a lot of places.

shape it · drag a slider, no code needed
your .cl function

Running live, on your CPU and your GPU at once

It also compiles, from the same source, to WebAssembly (a portable binary for any CPU), native machine code (via LLVM), and its own bytecode VM. Those run on servers, native hardware, and embedded targets rather than in a browser tab, so they are listed here rather than executed.

Why this matters

The same rule often has to run in several places: on the website, on the server, in a phone app, in a game, on the graphics card. Today each one is written by hand in a different language, so you end up with four or five copies of one idea. Over time they drift. A fix made in one copy is still broken in the others, and the version on your phone can quietly disagree with the version on the server.

Here you write the rule once. It compiles to all of those targets from that single source, and the bar above proves the results agree exactly. One rule, one source of truth, nothing to keep in sync by hand.

For example: a price shown on the website and charged by the server should always be the same number. A game's damage formula should give the same result on your screen and on the server, so they never disagree about whether a hit landed. Write it once here, and the versions cannot drift apart.

in-browser compilers: .cl → WGSL via cl2wgsl.wasm (sha256 e62c141d94…) and .cl → JavaScript via cl2js.wasm (sha256 5330885279…), both themselves written in Coherence Language and compiled to WebAssembly. Python and Luau panels are produced by clc, the Coherence compiler, at build time.
Coherence Energy Labs™
Get in touch →