Live data from Hacker News

Pkgx – “Run anything” from the creator of brew

pkgx.sh

41–50 of 71 posts

Re: Pkgx – “Run anything” from the creator of brew

#42
post #37
post #33

Earlier quoted context omitted.

There's been some discussion around this, where tools like Nix and Bazel do a bunch of work figuring out how to get various packages working in their ecosystem, but often fail to actually get that work upstreamed in a reasonable way. For example, if you have a JS project with a package.json, Nix offers node2nix as a way to transform that package.json into Nix-like expressions. But in an alternate universe npm and loc…

Instead of relying on npm and maven and other language specific tooling, maybe we could rely on Nix to do the package management instead? NPM, Cargo, maven, whatever Python people think is good this Thursday, Go's reluctant dependency manager are all solving the same problems. And every single one of them could do a better job.

Most language package managers have some notion of dependency resolution, since various deps declare bounds for their dependencies instead of pinned versions (since otherwise frameworks would be impossible to upgrade).

Nix the language doesn't have such a thing (would be a bit of a category error), and nixpkgs the ecosystem is so far away from that kind of thing...

Language ecosystems around sharing source code cannot exist as they do today if every dependency pinned its dependencies to specific versions. Source distribution like that has different requirements than binaries.

Re: Pkgx – “Run anything” from the creator of brew

#43
post #32

I have no idea who this appeals to, or why. If I want something, I want it to be installed and available, not mysteriously cached. If I want multiple versions of something, there are tools like asdf and rtx. This feels like a solution for a problem that doesn’t exist.

I can see its appeal. As a former developer turned manager, I often want to solve certain problems quick, or test things. I very much don't want to install these kinds of experiments permanently as I don't have the time to maintain them. Now it often happens that I do an upgrade of something I haven't used a long time and it breaks, which wastes my time debugging. For me something that just works the couple of times…

Tbf I’m an SRE/DBRE who codes in Python, but if I need to test something, I spin up a venv, install what I need, and then am done. I also made a shell function to make temporary venvs that also launch a Jupyter Notebook with whatever packages you want, and deletes itself when done. It works well for me.

To each their own. If your workflow works for you, have at it.

Re: Pkgx – “Run anything” from the creator of brew

#44
post #38

Earlier quoted context omitted.

Me, too, and also I already have a bunch of brew packages which I know are well maintained. So, switch to using both? Uninstall brew packages and install nix versions, verifying they are all maintained over there? Sorry, no.

Ah, yes, I love it when I need to wait minutes to install a package because brew needs to do some other thing.

“Minutes” seems an awfully small rebuttal to be quite honest. I’ve never had to install a brew package under duress.

Re: Pkgx – “Run anything” from the creator of brew

#45
post #32

Earlier quoted context omitted.

I can see its appeal. As a former developer turned manager, I often want to solve certain problems quick, or test things. I very much don't want to install these kinds of experiments permanently as I don't have the time to maintain them. Now it often happens that I do an upgrade of something I haven't used a long time and it breaks, which wastes my time debugging. For me something that just works the couple of times…

Tbf I’m an SRE/DBRE who codes in Python, but if I need to test something, I spin up a venv, install what I need, and then am done. I also made a shell function to make temporary venvs that also launch a Jupyter Notebook with whatever packages you want, and deletes itself when done. It works well for me. To each their own. If your workflow works for you, have at it.

GP wasn't explicit, but I think his assumption was that "experiments" are things outside of your wheelhouse - e.g. you want to try out a some node code, or compile a golang app. You've already budgeted to have python on your machine and up-to-date.

Re: Pkgx – “Run anything” from the creator of brew

#46

>"blazingly fast" > written by homebrew author (brew is notoriously slow) > written in typescript hmmm... I have my doubts on that claim, especially when there is no evidence to support it.

"written in typescript" does not mean it's slow. V8 and JavaScriptCore are insanely fast, and typescript is a proven language.

Re: Pkgx – “Run anything” from the creator of brew

#47

I have no idea who this appeals to, or why. If I want something, I want it to be installed and available, not mysteriously cached. If I want multiple versions of something, there are tools like asdf and rtx. This feels like a solution for a problem that doesn’t exist.

And yet npx is used constantly in the dev world. Theres a use case.

Re: Pkgx – “Run anything” from the creator of brew

#48
post #46

>"blazingly fast" > written by homebrew author (brew is notoriously slow) > written in typescript hmmm... I have my doubts on that claim, especially when there is no evidence to support it.

"written in typescript" does not mean it's slow. V8 and JavaScriptCore are insanely fast, and typescript is a proven language.

JavaScript (typescript) is interpreted, hence will be slower than a compiled language

Re: Pkgx – “Run anything” from the creator of brew

#49
post #42
post #37

Earlier quoted context omitted.

Instead of relying on npm and maven and other language specific tooling, maybe we could rely on Nix to do the package management instead? NPM, Cargo, maven, whatever Python people think is good this Thursday, Go's reluctant dependency manager are all solving the same problems. And every single one of them could do a better job.

Most language package managers have some notion of dependency resolution, since various deps declare bounds for their dependencies instead of pinned versions (since otherwise frameworks would be impossible to upgrade). Nix the language doesn't have such a thing (would be a bit of a category error), and nixpkgs the ecosystem is so far away from that kind of thing... Language ecosystems around sharing source code canno…

Yet we still have lock files. The version constraints can just be another piece of metadata that a given derivation carries with itself. You have to distinguish between declaring a dependency and using one in the compilation of a thing.

Re: Pkgx – “Run anything” from the creator of brew

#50
post #38

Earlier quoted context omitted.

Ah, yes, I love it when I need to wait minutes to install a package because brew needs to do some other thing.

“Minutes” seems an awfully small rebuttal to be quite honest. I’ve never had to install a brew package under duress.

When I issue a `brew install package` command, I expect it to either install the package or fail installing the package, and not do something else entirely. Sometimes I need to do something quick, nix-shell has never given me any issues with that. Brew has taken 10 minutes before getting to the install process. It's severely annoying.
Post reply on HN