How it works

One graph.
Every projection.

A program is a graph. It always was. Text is one lovely view of it. flowG keeps the graph itself as the source of truth and treats every language as a projection, so the same program serves people, every language, and every chip, and you port and edit it without re-debugging.

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

Text is one projection of something richer.

Variables, functions, and types are nodes. Calls, owns, borrows, returns, and contains are edges. A source file is one beautiful view of this graph, and it stays. flowG keeps the graph itself as the shared source of truth, so the same program can be read as text, emitted in any language, and run on any chip, without going out of sync.

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. It is a complete kernel, not an extensible library. 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, and feedback. They are made explicit, so the system understands them and whole classes of errors cannot be expressed. Whole classes of errors, such as use-after-free, data races, and dangling references, simply cannot be expressed in a well-wired graph, so far less time goes into testing and debugging on first build, port, and edit.

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 is the omni-language, not a fixed number of languages. 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. It is roundtrip-tested, with no model in the loop, so the projections never drift.

Not generate, not transpile. Materialize. 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 is not 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