YZITE / nix2js

[not yet usable] transpile Nix to Javascript using Rust
GNU Lesser General Public License v2.1
1 stars 0 forks source link

lazy-recursive-merge #1

Open wmertens opened 2 years ago

wmertens commented 2 years ago

Cool project! I made https://www.npmjs.com/package/lazy-recursive-merge based in part on how Nix is lazy.

I wonder if it could be used here? The trick it uses is getters that evaluate given functions at get time. As long as there's no cycles it works.

fogti commented 2 years ago

Well, currently this project (nix2js) pretty much stalled because I haven't yet found any reliable way to work-around some mutual-recursive with+import exprs in nixpkgs/lib... see also: https://gist.github.com/zseri/bb8ed4f47123960f4231d6fa928599ac for normal lazy recursive definitions I use a async functions + p-lazy, which works reasonably well.