Learnable math. A small language where math reads the way you read โ left to right, no tables to memorize. Learn the whole thing in five minutes, right in a browser tab.
Take the tour โ fifteen interactive rooms, from 1 + 2 to a value that finds โ42 on its own. Or just open the playground and type.
Fluent is the working end of New Kind of Paper, an essay series about what math could feel like if pen, paper, and calculator were one instrument (part two, three, four, five).
Example gallery
| demo | ||
|---|---|---|
| ๐ | Mandelbrot โ the Mandelbrot set over the whole plane, sharper as you drag the depth | โถ run |
| ๐ฆ | Game of Life โ Conway's Game of Life on a large grid | โถ run |
| ๐ฎ | The Name Dreamer โ a small transformer that invents new names from a word list | โถ run |
| ๐ฆ | Combinators โ combine functions without naming their arguments | โถ run |
| ๐ท | Live edge detection โ your webcam, edge-detected in real time | โถ run |
| ๐ต | Live spectrum โ your microphone's frequency spectrum, live | โถ run |
| ๐ธ | Pitch detector โ the pitch of a note you hum | โถ run |
| ๐ | Linear regression โ a line fit to points by gradient descent | โถ run |
| ๐ | Touch the loss landscape โ a ball you roll downhill on a loss surface | โถ run |
| โ๏ธ | adam vs sgd โ two optimizers descending the same surface from the same start | โถ run |
| ๐ธ | Reactionโdiffusion โ two reacting chemicals that settle into spots and stripes | โถ run |
| ๐ฌ | Lenia โ smooth, continuous cellular automata | โถ run |
| ๐งฒ | Spinning magnets โ an animated vector field | โถ run |
More in the playground: press Ctrl+O for the full gallery.
the names, at a glance
| glyph | word | full name |
|---|---|---|
โ |
grad |
TensorGradient |
ฮฃ |
sum |
TensorSum |
ฮ |
prod |
TensorProduct |
ฮผ |
mean |
TensorMean |
โ |
ceil |
TensorCeil |
โ |
floor |
TensorFloor |
| โ | max |
TensorMax |
| โ | min |
TensorMin |
# |
length |
TensorLength |
_ |
gather |
TensorGather |
โด |
reshape |
TensorReshape |
..< |
range |
TensorRange |
... |
โ | TensorRangeInclusive |
โ |
outer |
TensorOuter |
^ |
pow |
TensorPower |
โ |
root |
TensorRoot |
% |
mod |
TensorRemainder |
รท |
div |
TensorDivide |
ร |
mul |
TensorMultiply |
~ |
var |
TensorVariable |
:= |
โ | TensorAssign |
โณ |
iter |
FunctionIterate |
โฃ |
โ | FunctionPower |
. |
apply |
FunctionApply |
@ |
eval |
FunctionEvaluate |
$ |
โ | Reactive |
| โ | watch |
TensorWatch |
| โ | conv |
TensorConvolution |
| โ | once |
SignalOnce |
Some cells are still empty โ the language is young, and names are earned.
IDE
Live evaluation on every keystroke, hover docs, unicode completion (type alpha, get ฮฑ), syntax trees for quoted code, camera and microphone as tensor sources, and LLM code generation โ write ;;a bouncing ball;; and it appears (bring your own Anthropic API key, set via the command palette). Hover any built-in for its doc card, or open the built-in Documentation for the reference.
Ctrl+O examples ยท Ctrl+S share as URL ยท Ctrl+P commands ยท Ctrl+Space complete โ Safari reserves โO, use โงโO there
Run locally
git clone https://github.com/mlajtos/fluent.git cd fluent && bun install bun dev # โ http://localhost:3000
The whole thing fits in a handful of files โ read it, change it:
| file | what |
|---|---|
language.ts |
the language โ grammar (Ohm), evaluator, prelude; tensors via jax-js, reactivity via preact signals |
client.tsx |
the IDE โ components, visualizers, Monaco editor, playground |
tour.ts |
the tour โ fifteen rooms, written in Fluent itself |
tests.ts |
language tests (bun test ./tests.ts) |
tests.browser.ts |
IDE tests in real Chromium (bun run test:browser) |