dnzl
What it does
Section titled “What it does”dnzl turns ned’s reactive streams into a message passing actor model in pure Nix. Actors are plain functions. Wiring is lazy stream composition.
What it enables
Section titled “What it enables”- Stateful stream processing, each actor keeps state across messages through closures; state threads through
scanl, with no mutable or global state - Behaviour switching, an actor can replace itself with a new behaviour after each message, so state machines are just functions calling functions
- Either routing, tag replies
right(success) orleft(failure).outbox.right/outbox.leftare sub streams of bare values - Lazy pipelines, wire one actor’s outbox as another’s inbox; Nix laziness resolves evaluation order
- Capability refs, a
cycle-cis a Nix value. Returning it as a reply grants the receiver permission to invoke that actor - Fan out and scatter gather, spawn N actors with
builtins.map, collect withmerge, deterministically - Content-based routing,
when-cfilters a shared stream into per-actor slices
Role in the ecosystem
Section titled “Role in the ecosystem”dnzl is the concurrency and messaging layer of the streams stack, sitting directly on ned. It demonstrates how far pure-Nix stream composition can be pushed, actors, supervision, and routing without any imperative machinery.
Source Code Documentation Support this project