Earlier quoted context omitted.
Nix solves the same problem we used to solve back in the day (before Docker taught us to run everything as root and disable firewalls, #yolo) ad-hoc with random poorly maintained scripts. If you never had to solve this problem then it probably isn't for you. If you did, then being able to finally replace the old contraptions with something properly engineered is a breath of fresh air.
>before Docker taught us to run everything as root Windows called, it wants its Administrators back.
Show HN: Brioche – A new Nix-like package manager
51–60 of 90 posts
Re: Show HN: Brioche – A new Nix-like package manager
#52Earlier quoted context omitted.
Nix solves the same problem we used to solve back in the day (before Docker taught us to run everything as root and disable firewalls, #yolo) ad-hoc with random poorly maintained scripts. If you never had to solve this problem then it probably isn't for you. If you did, then being able to finally replace the old contraptions with something properly engineered is a breath of fresh air.
The thing is, old ways didn't have to be contraptions at all. If we had to run many services on a system, we instead ran BSD with jails, or if we have to run Linux, with chroots. These solutions, abstracted the convoluted solutions away. Who didn't want to form these solutions themselves (which is fair, because it needs intricate knowledge about close-to-OS stuff) built "contraptions" instead. The core solutions to c…
It's like the difference between building a single building and building an entire city, in terms of scale and total effort. That's why it's taken Nix nearly 20 years to get where it is.
> We sometimes use the more modern approaches, because we feel lazy sometimes.
No, we often use them because they are actually materially better. And Nix is vastly better than all the prior attempts at this problem. If you didn't have those problems or don't think you did, that's fine. But it's got nothing to do with "laziness" whatever that means. It's got everything to do with the results. And the results are ultimately quite good.
Re: Show HN: Brioche – A new Nix-like package manager
#53Earlier quoted context omitted.
I'd definitely like to have good performance even for large build graphs! I'm hoping the laziness exists "where it counts". To walk through an example, if you build your backend, and your backend calls the function `postgres()`, and that calls `openssl()`, and THAT calls `gcc()`, etc., etc., each function is basically building an object to represent its chunk of the build graph (each function returns a "recipe"). Not…
I think it really depends on your definition of "large". I don't think strict eval + full build graph can scale to something the size of nixpkgs, for example. I mentioned in another comment that this is why Bazel uses simple strings to form dependencies on other targets. That way Bazel can manage the laziness and only evaluate what is needed without needing to use or invent a language with lazy evaluation. But that i…
Also, no matter how much I might not like it as a language nerd, I think Starlark is simply far more "familiar" for your-average-bear than the Nix language is, which matters quite a bit? It might be more complex in some dimension, but the problem space is fundamentally complex I think. So other factors like how approachable the language is matters. (And at least in Buck2, you can use MyPy style typing annotations, thank God.)
Re: Show HN: Brioche – A new Nix-like package manager
#54Re: Show HN: Brioche – A new Nix-like package manager
#55I actually haven't tried Nix (or other nix-alternatives) yet. I've seen a lot of complaints about the language, but a lot of praise and love of the idea. I though Guix was the "main" competitor to nix, using a more mainstream language (Scheme). Is that still the case? How would Brioche compare against Guix if you are OK with both Scheme and Typescript as languages?
I think when people say they like the idea of nix, they're referring to how it builds packages from programmatic package formulae into an isolated store (so e.g. you can easily have different programs running against different versions of dependencies), and the use cases this allows for. -- With an expressive language for describing packaging, you get stuff like declarative developer environments, or even declared Linux configuration with quick/easy rollback.
I think complaints about the language are partly from Nix being unusual enough that it takes time to get an intuition for the basics of how to write anything in it, but largely from the Nixpkgs (the large package repository the Nix package manager uses) being a large codebase, which grew organically with many contributors, with many similar-but-different solutions to problems, and sometimes the codebase is a bit too clever.
Re: Show HN: Brioche – A new Nix-like package manager
#56Earlier quoted context omitted.
Cue is fun, but already the unification example ( https://cuelang.org/docs/tour/basics/duplicate-fields/ ) shouts "footguns" to me :( TS is certainly excessively powerful though.
What foot guns are you seeing specifically?
It may seem that any definition is final, but none is. Since the last definition of a struct field overwrites a previous one, the order in which e.g. files are interpreted matters. It's like writing a config by using Python dicts, with the added complication that creation of a new one and updating of an existing one are indistinguishable.
This may be okay in practice, given some discipline.
Re: Show HN: Brioche – A new Nix-like package manager
#57Reading the comments makes me think I'm turning into my dad. He was a simple man in terms of education and career. He was a fire man on a stream train in 1950, a farmer, barman, handyman. Out in the sticks, he was everyone's go-to guy when a vet couldn't be found, because he kept a "livestock first aid kit" including penicillin & syringes. He talked to vets and read books and knew about the most common ailments and h…
I've come up with a set of rules that describe our reactions to technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you're thirty-five is against the natural order of things.
It's been used to criticize anyone who rejects new technology, but it's just a funny quote that has some truth to it.Re: Show HN: Brioche – A new Nix-like package manager
#58I’ve generally found the most interesting things are the ones that don’t feel intuitive at first. Familiarity bias can really hold you back. The language semantics of Nix are basically Haskell’s which.. is probably the One True Way to write correct code if we’re honest with ourselves.
Re: Show HN: Brioche – A new Nix-like package manager
#59Reading the comments makes me think I'm turning into my dad. He was a simple man in terms of education and career. He was a fire man on a stream train in 1950, a farmer, barman, handyman. Out in the sticks, he was everyone's go-to guy when a vet couldn't be found, because he kept a "livestock first aid kit" including penicillin & syringes. He talked to vets and read books and knew about the most common ailments and h…
Absolutely separate -- in your mind -- NixOS from Nix.
The latter I've seen be a very useful tool that does what people here talk about: cleans up dependency and build and installation management in a reasonably nice way.
The former is a religion/world-view that requires a complete mindset change, accepting a whole dogma, and differs entirely from how you're used to using Linux. I gave up and switched back to Debian after I couldn't get a decent answer on how to set it up easily with my github keys to easily, y'know, check projects out. The mental gymnastics required wer silly.
Nix the language seems obscure at first but it's not so bad after a while. It's sort of got a bit of syntax tossed in from the ML-ish programming languages so there's some familiarity there, for me, maybe.
Where it falls down is like anything else like this: it basically requires that all the things you dep on also adhere to this philosophy and have nix setups already or you'll be in a world of pain rolling your own. I gave up on converting our $work stuff when it became clear that the versions of flatbuffers and a few other deps we depend on just weren't out there in the nix ecosystem and I wasn't going to volunteer to make them.
Anyways, I've seen it be very useful. A former employer used it to set up their whole Julia environment such that custom patches and configuration would all be nicely applied. And this was for both developer workstations and CI and production environments. It's a nice step below docker for doing that kind of thing, and is far less intrusive than docker in many ways.
Re: Show HN: Brioche – A new Nix-like package manager
#60I actually haven't tried Nix (or other nix-alternatives) yet. I've seen a lot of complaints about the language, but a lot of praise and love of the idea. I though Guix was the "main" competitor to nix, using a more mainstream language (Scheme). Is that still the case? How would Brioche compare against Guix if you are OK with both Scheme and Typescript as languages?