News for hackers. Stuff that matters.
Re:C Package Manager by wocram on Tuesday March 08, 2022 @02:59AM (#30597592)
Nix is nice as a catch-all, and especially good when languages like C and C++ don't have popular package managers. It's definitely not better than cargo or pip when dealing with just Rust or Python, but it's definitely relevant when you're building multiple languages.

I would love to see an evolution of nixpkgs with more of a starlark-style for package declarations.

Re:C Package Manager by jonringer117 on Tuesday March 08, 2022 @10:34AM (#30600975)
This likely wouldn't work on practice. Nix is aggressively lazy, so if you just want a single package, you don't have to evaluate the builds of all 60k+ packages, just the package you wanted and its dependencies.

This just might be me as a functional-programming-maximalist, but I do not like imperative languages for configuration management. You implicitly have to hold the execution state of all actions to know what is going on.

Re:C Package Manager by wocram on Tuesday March 08, 2022 @11:23AM (#30601691)
BUILD file evaluation is very similar to nix expression evaluation. I think the bazel 'analysis' phase is equivalent to the nix derivation expansion step

Maybe nix is more lazy, but I would be surprised if nix ends up doing substantially less work than bazel when a single target in a large graph is built.

Re:C Package Manager by smilliken on Tuesday March 08, 2022 @11:07AM (#30601458)
For managing python dependencies, nix avoids all the headaches of pip, poetry, etc. Builds always work, and one has confidence that they have exactly the same bits as everyone else. nix-shell gives you a virtualenv that also has all your non-python dependencies as well. Instead of dealing with 10 different package managers across a codebase, there's just one.
Re:C Package Manager by wocram on Tuesday March 08, 2022 @11:13AM (#30601545)
The trade-off is that it's much harder to select a set of versions with nix, and requires some knowledge of nix lang.

If you can just take all of your packages from a tag of nixpkgs, then that experience is very nice. On the other hand, if you end up wanting a package that is but up to date or missing entirely, that can be a bit more daunting.

Re:C Package Manager by heavenlyhash on Tuesday March 08, 2022 @02:25PM (#30605087)
Hey good news -- you might be interested in Warpforge: https://github.com/warpfork/warpforge

It's heading in exactly that direction. In fact we specifically want to start using Starlark for module declaration (mind -- optionally. It's still all declarative JSON API at the bottom! APIs FTW!).

We're also going full hermetic and aiming for reproducible-by-default. Those should be "duh" things in modern world. The comparisons with the good parts of Nix should be obvious.

The starlark-adjacent parts are still (very) early, but you'll find some notes about the intention in our Notion already: https://www.notion.so/warpforge/Data-Execution-and-Formulas-...

Get in touch if you'd like to collaborate, we'd be thrilled to have more company working on it, or starting to package things!

Re:C Package Manager by wocram on Friday March 18, 2022 @08:05PM (#30729294)
I have to say, if it weren't for this comment, reading through the links doesn't make me thing of 'nixpkgs with starlark instead of bash at all'.
Re:C Package Manager by johnisgood on Tuesday March 08, 2022 @10:42AM (#30601095)
Does cargo re-use the same packages between projects? I am asking because cargo is the only build system capable of making me run out of space.
Re:C Package Manager by wocram on Tuesday March 08, 2022 @11:10AM (#30601510)
It can if you use a cargo workspace to build all of your projects.