News for hackers. Stuff that matters.
Re:Mise: Dev tools, env vars, task runner by aiono on Sunday December 08, 2024 @02:05PM (#42359421)
This is already a solved problem with Nix shell (except the task runner part). I don't understand why there are any other alternatives still being developed. Nix supports more packages than any other solution, it's battle tested and cross platform (didn't try on Windows but on Mac OS it works fine). And it's more reproducible than any other package manager.
Re:Mise: Dev tools, env vars, task runner by jdxcode on Sunday December 08, 2024 @02:12PM (#42359499)
I started writing mise in a bout of frustration after trying to use nix
Re:Mise: Dev tools, env vars, task runner by yawaramin on Sunday December 08, 2024 @02:23PM (#42359621)
Have you tried devenv? What do you think?
Re:Mise: Dev tools, env vars, task runner by jdxcode on Sunday December 08, 2024 @02:31PM (#42359686)
I think the entire concept of nix is a broken model not fixable by docs and better DX. Precompiled, portable binaries are the way to go which is what mise is built on. Trying to maintain this separate build chain where everything is compiled in a sandbox gives your system a "split-brain" problem where you have the "nix world" and the "macos (or whatever) world". Ultimately, this just causes problems. Of course I'm ignoring NixOS but that's a sledgehammer for this supposed "problem" nix is trying to solve in the first place.

mise is for the 90% of developers that just want things to be fast and work and don't care about the nuts and bolts.

Re:Mise: Dev tools, env vars, task runner by yawaramin on Sunday December 08, 2024 @04:05PM (#42360439)
Don't you kinda need to separate the worlds to avoid borking your system when you update? Eg macOS decides to ship some customizations in its curl,[1] and now you need your own curl because Apple's customization is breaking your project?

[1] https://daniel.haxx.se/blog/2024/03/08/the-apple-curl-securi...

Re:Mise: Dev tools, env vars, task runner by jdxcode on Sunday December 08, 2024 @04:09PM (#42360482)
system updates causing breakages with mise tools would be news to me
Re:Mise: Dev tools, env vars, task runner by max-privatevoid on Sunday December 08, 2024 @03:54PM (#42360337)
If only they were actually portable. As it stands, mise is just another half-solution, and you can't solve the other half of the problem by ignoring it.
Re:Mise: Dev tools, env vars, task runner by Nullabillity on Sunday December 08, 2024 @06:29PM (#42361664)
> Precompiled, portable binaries are the way to go which is what mise is built on.

And where are those mystery meat binaries supposed to come from? What do you do if the provided binaries aren't enough? (Wrong version, wrong build flags, what you want isn't even packaged, don't support your platform, etc, etc, etc.)

Binary package managers have been tried over and over, and never work out well.

> gives your system a "split-brain" problem where you have the "nix world" and the "macos (or whatever) world".

Yeah no, that's inherent as soon as you bring in any kind of secondary package manager. Including pyenv or mise or whatever else.

Re:Mise: Dev tools, env vars, task runner by jdxcode on Sunday December 08, 2024 @06:35PM (#42361713)
> And where are those mystery meat binaries supposed to come from?

the vendor

Re:Mise: Dev tools, env vars, task runner by Nullabillity on Sunday December 08, 2024 @06:39PM (#42361725)
Right, because that never goes wrong.[0,1]

[0]: https://news.ycombinator.com/item?id=42351722

[1]: https://tukaani.org/xz-backdoor/

Re:Mise: Dev tools, env vars, task runner by goku12 on Sunday December 08, 2024 @10:06PM (#42362739)
The xz example does not support your case. Not only was every downstream build infected until it was discovered, it also needed a distro-specific modification (to openssh in Debian and Fedora, IIRC) to work at all.
Re:Mise: Dev tools, env vars, task runner by Nullabillity on Sunday December 08, 2024 @11:41PM (#42363122)
The xz backdoor relied on a discrepancy between the development repository and the released (source) artifact.

While skipping the released tarballs wouldn't have prevented the problem entirely, it would have made it much harder to hide.

Re:Mise: Dev tools, env vars, task runner by nixosbestos on Sunday December 08, 2024 @06:36PM (#42361719)
I don't get it. mise and nix binaries both go somewhere that gets added to PATH.
Re:Mise: Dev tools, env vars, task runner by Quiark on Monday December 09, 2024 @01:51AM (#42363611)
I've been using nixpkgs on macos (and without brew) for 3 years now and not sure what kind of split brain problem you're talking about? I also have no idea about the problems with multiple anaconda and other python builds complain about.
Re:Mise: Dev tools, env vars, task runner by JamesSwift on Monday December 09, 2024 @09:48AM (#42366673)
Nothing in nix says you have to compile something from source. Just that the resulting artifact needs to be reproducible hermetically. You can download any random blob from the internet as a nix derivation, as long as you tell nix what the resulting hash should be after you download it. Sure, it might have unmet runtime dependencies, but thats orthogonal.

What you are really butting up against is that the nix store is a bit of a split-brained runtime environment. Its not easy to e.g. `gem install` to your system while running a nix-managed ruby. This has nothing to do with the binaries (well... sometimes it does because nix will patch paths to point to the readonly store, but again thats orthogonal).

Re:Mise: Dev tools, env vars, task runner by lifty on Sunday December 08, 2024 @02:16PM (#42359550)
thank you!
Re:Mise: Dev tools, env vars, task runner by aiono on Monday December 09, 2024 @11:34AM (#42367706)
Nix UX really sucks I agree with that. But it has a very robust core model and is reproducible from the bottom up. Tools like asdf, renv etc. just provide you some binaries. If you need some system libraries installed they don't help with that for example.

Can one provide reproducible dev environment that uses a tool that is not yet in mise registry? Or does one need to wait it to be added into the registry? Also if I want to provide a python runtime that is compiled slightly differently can I do that? Or does it have to be distributed as a precompiled binary?

Re:Mise: Dev tools, env vars, task runner by syhol on Tuesday December 10, 2024 @04:54AM (#42375358)
> that uses a tool that is not yet in mise registry

Yes, you can directly get tools from npm/pypi/cargo/github-releases/asdf-plugins/vfox-plugins without anyone touching the mise registry. The registry is just a convenient index of short names e.g. "[email protected]" maps to ubi:junegunn/[email protected] which will download the appropriate arch binary from the v0.56.3 junegunn/fzf GitHub release.

> if I want to provide a python runtime that is compiled slightly differently

The default uses precompiled binaries, but with one setting it can use python-build/pyenv under the hood, then all the pyenv env vars can be used to configure the build process.

Re:Mise: Dev tools, env vars, task runner by nextaccountic on Sunday December 08, 2024 @02:14PM (#42359530)
I really want nix to succeed, but it has terrible UX and documentation. It also doesn't help that the community is still fighting over whether flakes should be a thing.
Re:Mise: Dev tools, env vars, task runner by hinkley on Sunday December 08, 2024 @02:43PM (#42359770)
Every time I’ve used a declarative system at work I either eventually become one of the experts and we all have lines outside our door of people who just don’t get it, or I replace it with something imperative so we can all get some fucking peace.

Ant was by far the most stressful. I had to cyberstalk James Duncan Davidson to understand what he was thinking. The mental model for the tool wasn’t in the docs. It was in forum posts spread across three+ different websites. And it was slightly insane. First writer wins broke everyone’s brains across three jobs before someone helped me kill it and replace it with something else.

It’s also a cornerstone of my thesis: never trust software someone says they wrote on an airplane. That’s not enough time to create a good solution, and any decision you make while experiencing altitude sickness is sketchy. (Prior to 2010, airline passengers were experiencing 8000 ft atmosphere on every flight. One of the selling points of the 787 was 5000 ft equivalent pressure)

Re:Mise: Dev tools, env vars, task runner by ericyd on Sunday December 08, 2024 @08:29PM (#42362294)
Is it a frequent experience for you to have to disregard a piece of otherwise appealing software because the developer claims to have written it on a plane?
Re:Mise: Dev tools, env vars, task runner by hinkley on Monday December 09, 2024 @12:55PM (#42368523)
It’s not that common for one to stick. But it is common for people to bitch about using them a lot more than average for tools.
Re:Mise: Dev tools, env vars, task runner by SOLAR_FIELDS on Sunday December 08, 2024 @08:33PM (#42362313)
That… was not the thesis I was expecting
Re:Mise: Dev tools, env vars, task runner by crakhamster01 on Sunday December 08, 2024 @03:03PM (#42359943)
> It also doesn't help that the community is still fighting over whether flakes should be a thing.

Could you elaborate on what the debate is? Haven't heard of this before!

Re:Mise: Dev tools, env vars, task runner by aiono on Monday December 09, 2024 @11:24AM (#42367627)
I agree with that. But that can be attemped to be solved by wrapping Nix with a better UX instead of building something from scratch.
Re:Mise: Dev tools, env vars, task runner by klysm on Sunday December 08, 2024 @02:23PM (#42359617)
Docs are terrible, writing new packages is difficult, etc. It may be the right technical direction but the execution is lackluster
Re:Mise: Dev tools, env vars, task runner by ghthor on Sunday December 08, 2024 @03:42PM (#42360246)
Reading nixpkgs is pretty amazing info, better then any docs. But I actually think the docs are pretty fantastic. The manual is solid, the CLI help text is pretty excellent. I don’t get when people say the docs are bad.
Re:Mise: Dev tools, env vars, task runner by klysm on Sunday December 08, 2024 @07:18PM (#42361943)
I’ve tried to use nixos for my homelab and ran into undocumented errors
Re:Mise: Dev tools, env vars, task runner by pxc on Sunday December 08, 2024 @02:24PM (#42359628)
> This is already a solved problem with Nix shell (except the task runner part).

devenv, a Nix+direnv-based solution, has a pretty cool task runner thing, plus service management.

> I don't understand why there are any other alternatives still being developed.

I love Nix and I believe it's a great choice for many teams, for the same use cases as mise. Nix's paradigm is the future. But Nix's defects are also real and obvious enough if you use it for long. I can understand why someone might see value in trying a fresh new effort, or an approach that asks less commitment.

Re:Mise: Dev tools, env vars, task runner by bloopernova on Sunday December 08, 2024 @02:08PM (#42359455)
Because some people may not want nix. Mise is, in my experience, much easier to get into and start using.
Re:Mise: Dev tools, env vars, task runner by lijok on Sunday December 08, 2024 @02:12PM (#42359510)
Because Nix has dogshit UX and the team seem to be completely oblivious to it regardless of how many times it's brought up.
Re:Mise: Dev tools, env vars, task runner by max-privatevoid on Sunday December 08, 2024 @03:57PM (#42360364)
Well, "dogshit UX" isn't exactly actionable, is it?
Re:Mise: Dev tools, env vars, task runner by lijok on Sunday December 08, 2024 @04:07PM (#42360463)
Oh it absolutely is !
Re:Mise: Dev tools, env vars, task runner by max-privatevoid on Sunday December 08, 2024 @04:10PM (#42360493)
Care to give some examples?
Re:Mise: Dev tools, env vars, task runner by lijok on Sunday December 08, 2024 @04:15PM (#42360542)
Use it as a signal to start an investigation into how many agree with that sentiment, try to measure the resulting adoption dropoff, and use those stats to push for a UX redesign.
Re:Mise: Dev tools, env vars, task runner by Valodim on Sunday December 08, 2024 @04:50PM (#42360913)
This is a pretty ignorant stance. It implies that the issues would somehow be easy to address if they were just acknowledged. Are you aware of the efforts that have been put into this so far? Have you considered that achieving the vague improvements you are asking for, working on a groundbreaking technology while holding together a rapidly growing community, is just really hard?
Re:Mise: Dev tools, env vars, task runner by lijok on Sunday December 08, 2024 @04:58PM (#42360990)
Can you clarify how you arrived at the conclusion that I was implying fixing the UX is easy, or where you saw me asking for "vague improvements"?

While we're on the subject, I can assure you, Nix is far, far from groundbreaking tech.

Re:Mise: Dev tools, env vars, task runner by SOLAR_FIELDS on Sunday December 08, 2024 @08:44PM (#42362359)
Not OP but you don’t have to look far when it comes to Nix. Here’s a couple of the more annoying ones:

Example 1:

updating dependencies that are outside of nixpkgs is not a one command ordeal. Especially if you’re doing something like updating the commit shape of a packaged release you’re targeting. I think there’s no reason they couldn’t have some clean way of writing rules automate update non-nixpkgs (why do I have to do this dumb nix-prefetch-url thing myself to compute some hash?).

If I am selling nix to end users as a system package management solution I’m comparing it to tools like brew. As long as you stay in nixpkgs it’s fine - but as soon as you’re out of that (which almost everyone is going to have at least o e package that is either not in nixpkgs or they can’t use the nixpkgs one for some reason) maintenance is no longer as simple as brew update / nix flake update.

Example 2:

Nix just doesn’t have very good debugging tools. It reminds me a lot of terraform. Yes there is an REPL but the simple task of breakpointing and seeing the value of data structures is not really straightforward in nix. If you want to it language to be approachable you need to make it dead simple to immediately be able to spit out its state in a way that an engineer knows how to work with it. I would not say the process of doing so in Nix is dead simple

Re:Mise: Dev tools, env vars, task runner by sjustinas on Monday December 09, 2024 @07:59AM (#42365883)

    $ nix-shell -p nodejs_20
    [nix-shell:~]$ node --version
    v20.18.1
Oh, the UX horror!
Re:Mise: Dev tools, env vars, task runner by lijok on Monday December 09, 2024 @12:41PM (#42368346)
> and the team seem to be completely oblivious to it regardless of how many times it's brought up.
Re:Mise: Dev tools, env vars, task runner by srid on Sunday December 08, 2024 @05:42PM (#42361373)
> This is already a solved problem with Nix shell (except the task runner part)

The task runner part is also solved in Nix. See

https://github.com/Platonic-Systems/process-compose-flake

and

https://github.com/juspay/services-flake