i implemented a nix evaluator in Rust.
-
i implemented a nix evaluator in Rust. https://github.com/sodiboo/six
it doesn't connect to nix-store yet so it's not very useful for most Nix code. and most builtins aren't present. but the language itself is basically feature complete minus some deprecated syntax and also paths (see: no nix-store; so path literals are entirely useless anyways)
this is why i've been posting about attrsets btw. like half the time is just painful thinking about how the fuck do i implement attrsets here. recursive scope is a bitch to implement. but i did it! and now i can do fancy stuff like MonadicFix over list flatmap (this example) and it Just Works. i mean, i could already do that with the offical nixexpr implementation. but now i can do it In Rust.
-
replied to Mallory sympathizer :pride_heart: last edited by
also btw the upstream implementation of
==
fucking sucks. mine can handle infinitely recursive data structures and theirs can't. checkmate, bitch.
crashes with a stack overflow on official Nix. evaluates torec { x.x = x; } == rec { x.x.x = x; }
true
in mine.
the only way to cause a stack overflow in mine is with a genuinely infinite data structure. -
replied to Mallory sympathizer :pride_heart: last edited by
@sodiboo i wonder if the lix team would find this useful