How it works

One graph.
Every projection.

A program is a graph — it always was. Text is a one-dimensional, lossy serialization the compiler has to rebuild. flowG keeps the graph as the source of truth, and treats every language as a projection of it.

22 universal primitives 11 wire kinds omni-language materialization metered in picojoules
01 — The shape of a program

Text is one projection of something deeper.

Variables, functions, types — nodes. Calls, owns, borrows, returns, contains — edges. The source file was always a flattened view of this graph. In 1945 the only I/O device was a teletype, so text was all we had; for eighty years that accident of history became an axiom. flowG drops the axiom and makes the graph canonical.

finite substrate — a typed-port graph

Interactive — drag to rotate. The same structure a text file serializes and the compiler rebuilds.

02 — The kernel

22 universal primitives.

A closed, fixed vocabulary for every programming pattern. Not an extensible library — a complete kernel. Every programming pattern in every language composes from this fixed set.

Computation 10
BindApplyMutateBranchIterateMatchSequenceComposeAbstractImport
Resource 3
AcquireReleaseObserve
Error 2
ErrorPropagateCodeBlock
Concurrency 4
SpawnJoinAwaitYieldSuspendListen
Data / State 2
TransactTypeDefine
Temporal 1
FeedbackDelay
03 — Ownership in the wires

11 wire kinds.

Resource semantics carried by the edge itself — ownership, borrowing, channels, streams, errors, laziness, feedback. The things text throws away. Bugs that take hours to find in text — use-after-free, data races, dangling references — become structurally impossible in a well-wired graph.

Move ownership transfers; source consumed
Borrow read-only access; source retained
MutBorrow exclusive mutable access
Copy duplicated value; both sides own a copy
Channel async, typed, bounded message passing
Shared reference-counted shared ownership
Weak non-owning reference; breaks cycles
Stream continuous, backpressure-aware data flow
Error failure propagation path; carries error types
Lazy deferred computation; evaluated on demand
Feedback time-delayed signal; enables reactive loops
04 — Connections are the computation

When the graph runs, it rewrites itself.

This is the oldest rigorous form of "the graph is the program" — interaction nets (Lafont, 1990), where computation is local graph rewriting that is inherently parallel. No central instruction pointer marching down a line: nodes react where they meet. See the fifty-year lineage →

interaction net — reduction as computation

Interactive — nodes annihilate and commute. The same reduction model maps cleanly onto parallel silicon.

05 — Materialize

One graph → any language.

flowG isn't a fixed number of languages — it's the omni-language. Its own surfaces (Lux, JMax, Joule) and any language with a tree-sitter grammar are the same graph wearing different syntax. Materializing source is a deterministic, pure function from graph to text — roundtrip-tested, no model in the loop — so the projections never drift.

Not generate, not transpilematerialize. There is no inference step and no token sampling. The emitter is a pure function from graph to text, so every projection is exact and they never drift from one another.

parallel materialization — one graph, many surfaces

flowG’s own surfaces are languages too — uncounted, because the point isn’t a number. We are all languages.

LuxJMaxJoule RustPythonGoTypeScriptJavaScriptJavaCC++C#KotlinScalaSwiftDartRubyHaskellElixirPHPLuaBashOCamlF#ClojureZigJuliaRFortranPerlErlangAdaDGroovyMoonBitCOBOLVNimAssemblyScriptGrainMojo … and any other with a tree-sitter grammar
06 — Lower

To many silicons.

The same graph lowers to compute backends — native, GPU, and browser — through OpDispatch, routed to the lowest-joule target.

WGSLWASMONNXStableHLOMLIR-linalgTriton.fg
CPUMetalAMXMPSCUDAWebGPUWasm
07 — Meter

Every op, metered in picojoules.

Every operation carries a measured picojoule cost; placement prefers measured calibration over the analytical prior, and you get a joule receipt.

$ flowg run add.fg
total: 8.42 μJ  ·  placement: min-joule  ·  determinism: strict

Horowitz 2014 energy table, operationalized as a per-op placement pass.

Run the graph yourself.

$ flowg make-sample add.fg
$ flowg inspect add.fg
$ flowg run add.fg