Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

denful/dnzl

Repository files navigation

dnzl

Dnzl is an Actor System for Nix based on Ned stream-cycles. Write behaviours as plain functions, automatic behaviour replacement, state keeping and error handling. Compose them into pipelines, fan-outs, and feedback loops using lazy let and stream wiring.

Full documentation, patterns, and reference at https://dnzl.denful.dev

What it enables

Stateful stream processing. Each actor maintains state across messages via function closures. State threads through scanl — no mutable variables, no global state.

Behaviour switching. An actor can replace itself with a new behaviour after each message. State machines are just functions calling functions.

Either routing. Tag replies as right (success) or left (failure). outbox.right and outbox.left are sub-streams of bare values — no unwrapping needed.

Lazy pipelines. Wire one actor's outbox as another's inbox. Nix laziness resolves evaluation order — no explicit sequencing.

Capability refs. A cycle-c is a Nix value. Return it as a reply; the receiver gains the ability to invoke that actor. Holding the ref is the permission.

Fan-out and scatter-gather. Spawn N independent actors with builtins.map, collect results with merge. Order is deterministic.

Content-based routing. when-c filters a shared stream to per-actor slices. Multiple actors share one inbox without coupling.

About

Actor System for Pure Nix. Based on Ned effectful stream-cycles.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /