Ned: Cyclic Functional Reactive Programming for Nix

Comparing wont work since ned and nfx are different kind of fruits, and the comparision function does not type-check. However, here’s a bit of context on the motivation behind it:
Ned uses nix-effects as its stream library, my streams implementation (originally a simple stack-safe loop on rust fx-rs and later ported to) nfx was not stack-safe in nix due not having another way to loop than recursive functions and no tail optimization. The story changed when nix-effects implemented those very same streams nfx had but now on a stack-safe trampoline. My den project since v0.9 had its own modules-independent dependency-injection subsystem, which I later realized was a manual/rigid reader-monad/effect-system, many bugs back then were due to forgetting to do some manual context-threading, so in trying to solve that I wanted to use proper effects, and since I’ve been contributing to nix-effects, Den is using that. Ned was born to explore a way to simplify many of the state handling and simplification to the effects-protocol that Den uses, since streams operations are simple to understand and cycle-like components compose beautifully I tried to explore that kind of architecture to reduce Den inter-components communication. And that is how Ned was born and will later be used to simplify Den internals.

6 Likes