Assemble software, not write it.

Systems today are written line by line. We think they should be assembled, from primitives that compose cleanly and hold up under real load. The model is called the interaction model, the implementation in Python is Nu, apps compose from it.

We build on the interaction model.

A tiny theory of computation: Refs address values, Interactions change them, Fabrics are the worlds those addresses resolve inside. Everything else at nustack is a faithful implementation of it.

Nu, the interaction model made real.

Nu ships the model in pure Python and grows it into a small stack of fabrics (shapes · mem · nudle · apps · lens), everything else we make stands on this.

basic.py
python · 20 loc
"""Basic Nu bracket-tree app: mem preset + tiny compute."""
 
from __future__ import annotations
 
import nu
 
 
class Counter(nu.Shape):
value: nu.v.IntRef
 
 
tree = nu.With(
nu.v.presets.memory_navigator(),
body=nu.v.Transaction(Counter.value.store(0) >> Counter.value.store(Counter.value + 42))
>> nu.v.Snapshot(nu.print(Counter.value)),
)
 
 
if __name__ == '__main__':
nu.run(tree)