News for hackers. Stuff that matters.
Re:Nix-Powered Development with OCaml by kaba0 on Monday March 06, 2023 @07:28AM (#35040199)
> For example, if you Ctrl-C while its downloading an update, you get in a weird state where nothing works

Heh? Oh you mean like during installing it for the very first time? Like, what do you expect from a bash script? Is bash not ready for production? That’s quite a strong statement when you didn’t even manage to install the thing… like, at least give it an honest try before you reach such a conclusion.

Re:Nix-Powered Development with OCaml by thfuran on Monday March 06, 2023 @07:54AM (#35040393)
>Is bash not ready for production?

Almost all bash scripts aren't

Re:Nix-Powered Development with OCaml by kaba0 on Monday March 06, 2023 @07:56AM (#35040410)
(Actually I agree with you, but I used it more as a rhetoric :D)
Re:Nix-Powered Development with OCaml by pdimitar on Monday March 06, 2023 @08:58AM (#35041028)
To be fair, I don't think it's such a huge sacrifice from the maintainers to put a check for leftover artifacts at the start of the installation script and nuke those from orbit before proceeding.

It can be put behind a confirmation Y/N terminal line as well.

But yeah, usually bash install scripts are almost never idempotent. I feel the maintainers of those scripts just give up and IMO they really shouldn't.

Re:Nix-Powered Development with OCaml by mikepurvis on Monday March 06, 2023 @09:52AM (#35041674)
I don't know if this is what the GP experienced, but you can definitely get some inconsistency if you ctrl-C out of Nix while it's in single-user/daemonless mode. My sense is that single-user is really only meant as a toy and for use in unprivileged containers— in basically every other situation you want to be talking to the nix-daemon, which maintains proper state and won't get interrupted.