7 ms·
I mean anything new that I'm experiencing for the first time is magic because I don't understand how it works. Perl was magic until I learned what the weird syn
by dqv 3y ago
I mean anything new that I'm experiencing for the first time is magic because I don't understand how it works. Perl was magic until I learned what the weird syntax meant. I've learned a little about Java over the years and so it seems less magical, but there still seems to be a lot of magic I can't comprehend.
I think the issue is that Nix is "too much new", not too much magic. Because I have familiarity with Nix, I can go to e.g. the PostgreSQL build file [0] and mostly make sense of what's going on, just like any other language I'm familiar with. Now if you give me something like a debian package, I have no idea WTF is going on. If anything goes wrong with a package installation, there isn't much I can do, except try to build outside the package manager. With Nix, I have a few options, from simply overriding the upstream repository to forking the broken module to fix whatever problems I'm having. It's also really nice to be able to be confident that what is in the Nix file is what's in my environment. As the syntax and libraries became more familiar, so did my confidence using Nix. That's pretty much how it works with most things, I think.
[0]: https://github.com/NixOS/nixpkgs/blob/203ecda835bcf69633df7183459283543dd4a874/pkgs/servers/sql/postgresql/default.nix https://github.com/NixOS/nixpkgs/blob/203ecda835bcf69633df71...
- _8j50 3y agoYou make a good point! I don't know exactly how the internals of debian's package management work but I do know that it downloads packages from mirrors, probably unpacks the archive, verifies gpg signatures, parses metadata and starts resolving deps, extractice archives, launching scripts/triggers. Maybe if I have a better understanding of Nix internals like you it won't feel like a black box.