Better HN
topnewbestaskshowjobs
Log inSign up

jdxcode

1,380 karma · joined Mar 19, 2020 (6y ago) · 457 submissions

https://github.com/jdx
Submissions

comment 1y ago · link · parent

I wonder if you misunderstood what mise is based on your mention of "packaging challenges". mise deals with language runtimes and dev tools—it doesn't manage dependencies or package anything.

I often hear suspicion about mise for this reason from people that haven't used it. I suppose it's not surprising. That said, I have spent over a decade in the developer productivity space as well as hundreds if not thousands of hours working on mise in the last 2 years—if there is someone that can build this I'm probably the right guy for the job.

Particularly with dev tools, it's long been the case that mise has solved this problem. Improvements are continuing to be made with things like improving supply chain security and ergonomics with python—though it's not like the python community itself has its DX figured out.

Of course I'm still fixing bugs pretty regularly and that probably won't ever change but there are hundreds of thousands of developers out there using mise (kind of a guess, but I'm pretty sure) and it's working great for them. It's in the top #100 tools in homebrew now: https://formulae.brew.sh/analytics/install-on-request/30d/

This definitely isn't some scrappy project—I've devoted much of my life to this problem and I think all evidence points it it being a resounding success.

comment 1y ago · link · parent

if you use asdf you can drop mise right in and it'll work the same but faster and with better supply-chain security. people have been doing this for almost 2 years and mise fits that use-case perfectly.

You don't have to touch the env vars and tasks stuff.

comment 1y ago · link · parent

node is used in a lot of the examples (because it's popular) but mise is written in rust and certainly doesn't require node

comment 1y ago · link · parent

there's a list with common commands you might want to run: https://mise.jdx.dev/walkthrough.html

if you post an issue/discussion about the python thing I'd love to investigate it a bit

comment 1y ago · link · parent

there is a `mise generate github-action` command which uses https://github.com/jdx/mise-action

not sure I understand what you mean by "mise steps (having to rewrite / unable to use dependencies etc)."

comment 1y ago · link · parent

I wrote a detailed comment yesterday about this: https://news.ycombinator.com/item?id=42353634

tl;dr: mise has more functionality like parallel tasks, watching for changes, and comprehensive argument parsing support (including custom autocomplete)

the biggest difference is the syntax. just is more concise and you really need to learn the syntax in order to use it. In mise things are more verbose but I feel easier to read for someone unfamiliar with it.

comment 1y ago · link · parent

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.

comment 1y ago · link · parent

lmk if there might be a way I can help with that, I don't think anyone's posted an issue about jetbrains issues—not for a long time at least

comment 1y ago · link · parent

I started writing mise in a bout of frustration after trying to use nix

comment 1y ago · link · parent

there isn't a hook for executing shell source, but it would be possible to add I think. The current hooks already execute inside of a shell function so there would just need to be a way to declare that you want a hook to run inside the shell, maybe like this:

    [hooks.enter]
    shell = true
    run = ". completions/mycli.sh"
I made an issue if you'd like to track: https://github.com/jdx/mise/issues/3412

comment 1y ago · link · parent

in mise you wouldn't need that preamble. `set positional-arguments` is just how it behaves normally and `mise run` doesn't just show available commands—it's also a selector UI

comment 1y ago · link · parent

I think you'd like what I've done with mise. You can have tasks in your global config (~/.config/mise/config.toml) which by default are shown no matter where you are. `mise run` will show a selector by default of all tasks available, so no need to manually setup fzf. Shebangs work the same. Commonly, mise users would also put "uv" into their config so other users don't need to set that up separately from mise itself.

Interactive inputs are something I'm planning on shipping relatively soon. It would not be hard to do—I've got the ui components to do it and the data model supports it.

comment 1y ago · link · parent

you can do that too: https://mise.jdx.dev/environments.html#env-file

but sometimes you don't want to make it an env var—just supports this too through the `export` keyword

comment 1y ago · link · parent

no flags, no parallel tasks, no skipping tasks unless files change, no watching for changes

come see a modern task manager: https://mise.jdx.dev/tasks/

comment 1y ago · link · parent

I'd be surprised if you weren't correct. Perhaps I could improve this a bit with the docs, but ultimately mise is complex and that will put people off no matter how good it is.

I think this is all fine though. I'm hard at work improving mise and will continue to do so for the foreseeable future. If someone is hesitant, I'd rather they wait a year until more kinks have been worked out, docs have been improved, feature gaps are closed, etc. I think this is especially true for tasks which only came out of experimental a few weeks ago.

Or people can just not use it. It's not like this is a business where I make more money when I have more DAU or anything. I just want to build a good tool for building sake after all.

comment 1y ago · link · parent

most people just put simple tasks into toml (like `npm run test` or something), for anything complex, file tasks are much better: https://mise.jdx.dev/tasks/file-tasks.html

file tasks are basically just a directory of bash (or whatever shebang) scripts, but special comments give them extra functionality like dependencies or defining flags/options.

comment 1y ago · link · parent

(author of mise)

The biggest advantage just has is that it's been around longer, in mise tasks only came out of experimental like a month ago. mise tasks themselves are stable, but there are still experimental things and some portions that need to be used more—like windows. That said, most of the stuff that needs polish are features just doesn't even have.

I had a look at the top issues for just and pretty much all of them I've handled in mise: https://github.com/casey/just/issues?q=is%3Aissue+is%3Aopen+...

here's my unashamedly biased thoughts on why I like mise tasks compared to just:

* tool integration - this is the obvious benefit. If you run `mise run test` on CI or wherever it'll setup your toolchains and wire them up automatically

* parallel tasks - I saw this as table-stakes so it's been there since the very beginning

* flags+options - mise tasks are integrated with usage (https://usage.jdx.dev) which provides _very_ comprehensive CLI argument support. We're talking way more than things like flags and default options, as an example, you can even have mise tasks give you custom completion support so you can complete `mise run server --app=<tab><tab>`

* toml syntax - it's more verbose, but I think it's more obvious and easier to learn

* file sources/outputs - I suspect just doesn't want to implement this because it would make it more of a "build tool" and less of a "task runner". I chose to despite having the same position that mise tasks is also not a "build tool". Still, I think even in the world of running tasks you want to only run things if certain files changed often.

* `mise watch` - this is mostly just a simple wrapper around `watchexec -- mise run ...` for now, but it's an area of the codebase I plan to focus on sometime in the next few months. Still, even as a simple wrapper it's a nice convenience.

* "file tasks" - in mise you can define tasks just by being executable and in a directory like "./tasks". This is great for complex scripts since you don't also need to add them to mise.toml.

I have not used just very much, but I did go through the docs and there are a handful of things I like that it definitely does better:

* help customization - it looks like you can split tasks into separate sections which is nice, I don't have that

* invoking multiple recipes - I don't love how this is done in mise with `mise run task1 ::: task2` but I _also_ wanted to make it easy to pass arguments. At least for now, the ":::" won out in the design—but I don't like it. Probably too late to change it anyhow.

* [no-cd] flag - both just and mise run tasks in the directory they're defined, but I prefer how this is overridden in just vs mise.

* expression/substitutions - mise uses tera for templating, which is very flexible, but it requires a bit more verbosity. I like that in just you can just use backticks or reference vars with minimal syntax. Same thing with things like joining paths and coalescing. I have all of this, but the syntax is definitely more verbose in mise. Arguably though, mise's verbosity might be easier to read since it's more obvious what you're saying.

* confirmation - I love that in just you can just add `[confirm]` to get a confirmation dialog for the task. I'm sure we'll get around to this at some point, mise already has confirmation dialogs so it shouldn't be hard to add. The tricky part will be getting it to work right when running a bunch of stuff in parallel.

* task output - I haven't used just that much so I can't actually say that it's "better", but having more control over how tasks are output is definitely a weak part of mise right now and is in need of more functionality like in just how you can add/remove "@" to echo out the command that's running

I want to call out one very silly thing that from reading these github issues sounds crazy. It sounds like both just and taskfile have the same behavior with `.env` files. In just and taskfile, variables defined in .env are ignored if they're already defined. I don't think anyone would want that—nobody has asked for mise to behave that way—and it doesn't appear either tool even allows you to change it!

comment 1y ago · link · parent

mise should get precompiled erlang on macos today too

comment 2y ago · link · parent

at the risk of sounding dumb, does that article even actually answer why Tux? I know it asks it at the top but I didn't see an answer. I read it 3x and couldn't figure it out.

comment 2y ago · link · parent

You pretty much nailed it here. Env vars and tasks were kind of a happy accident—I implemented both inside of a day. (different days of course) Just because I realized I had all the building blocks to make them possible already, just needed to arrange them in a different way and they just appeared.

In the future though I see tasks as being the headline for mise over tools. That's a ways out, certainly more than a year, but the thing about tasks is they don't suffer from the drawbacks that both PATH and shims have for putting your tools in the right place. In my personal use of mise I don't actually like using `mise activate` whatsoever. The problem is just that I can't yet do everything with tasks easily enough. Tasks need to get to a point where they're so easy you won't want to bother with having tools in your shell.

Though who knows. I may be off my rocker on that one. I certainly get things wrong as much, if not more, than I get them right.

comment 2y ago · link · parent

Mise does a lot of things and I don't buy into the unix philosophy so you may not like it (which is totally fine btw, my goal is not at all for everyone to love it).

That said, I think if you thought about _why_ you like minimalistic and predictable tools you may find that mise solves the underlying reasons for that. My whole thing is about augmenting your environment and not replacing it. This is generally where I contrast mise with tools like nix and docker but I thought it was worth calling out.

I think people like mise because they can use it for just setting some env vars, installing a few npm packages globally, having an easy way to synchronize tool versions between local dev and CI/CD. You can use it for any one of those things and it slots right in wherever you are—whether that's inside VSCode, ssh'ed into a remote machine, in a github action, or inside a docker container in a k8s fleet.

Yeah mise is capable of a lot of different things, but the important thing is that it doesn't force you to change anything _else_ about your setup.

comment 2y ago · link · parent

I made some progress on windows last week! I'm working on making it so vfox plugins can be used as the "default" backend instead of asdf which will be a prerequisite for windows support. Step 1 is being able to run vfox plugins inside of rust which I got pretty far on: https://github.com/jdx/vfox.rs

It'll be a long road ahead and I could certainly use some help if anyone out there is interested in moving it forward. That said, vfox is a really great project and they are targeting windows specifically. Windows will probably always be second in the mise ecosystem (because I don't use it) but my hope is I can get at least a baseline of support which would help teams that have occasional windows contributors.

comment 2y ago · link · parent

> offline users

this is a use-case I should be more thoughtful around. I do try to never ever block on HTTP for anything where you aren't explicitly calling mise—so like `mise ls-remote` obviously is going to block, but if mise is just running to update PATH behind the scenes it should never, ever cause any significant delay. If you ever see this happen try to let me know—though I understand that by its nature that can be a very difficult thing to reproduce.

> conceptually becomes a distribution package manager

I talk about this a lot in private but I don't think it's in any docs but this is expressly not something I would ever do. Mise stops at your system. I'll never try to install openssl or something to patch your system or get libraries in place. Nix is the tool for people that want that sort of thing.

IMO the biggest competitor to mise isn't asdf, it's nix and docker and mise is the polar opposite of both. That's not to say those tools don't have their place but at their core: docker and nix try to _bypass_ your environment by building their own. Mise augments your environment which means you don't need to figure out how to get stuff into or out of the environment. You environment is what it was before, just with tools, env vars, and tasks to make working in that environment easier.

However yes, this does mean you may be missing a shared object from time to time. Or need to install libxml. But at least you don't need to setup rsync.

comment 2y ago · link · parent

I was actually thinking today that shims and PATH at the same time might be the best of both worlds... though that's just a funny thought exercise I'm having right now. If some brave soul is out there and wants to experiment, please let me know how it works out :)

comment 2y ago · link · parent

If you use asdf, I would encourage you to try my tool. A lot of the work I've done is around things that you probably won't ever think about but in mise it just works the way you want it to so you can get to getting your work done.

The reason people like mise is hard to put in a post because its really the care and countless hours I've put into working through workflow after workflow over and over. Testing things out. Going back on decisions I felt like weren't as good as they could've been. Reading and re-reading code in both my own codebase and asdf's. My niche is building CLIs and I am grateful to be able to work on something people are finding so much value in. Understand mise didn't start last year, I've been planning this project for over a decade while working on other CLIs and dev tools.

Here's an example of one: in mise the shims will fall back to system versions. So if you have a shim for `ruby` but you only use ruby in 1 project without a global set then calling ~/.local/share/mise/shims/ruby will go to the next thing on PATH, so maybe /opt/homebrew/bin/ruby. In asdf, the shim will fail outright unless you explicitly set "system" as the version in your global config.

At the end of the day though, I know not everyone will like mise. I certainly have a particular style of building tools and managing the project that works for some and doesn't for others. Ultimately I think this allows me to build tools that while they may never be universally adopted will be more enjoyed by those that it rings true for. Of course if you don't like it I'd be particularly interested to hear what is is you don't enjoy.

comment 2y ago · link · parent

I bet you half of the codebase is dedicated to support python's bizarre idiosyncrasies.

comment 2y ago · link · parent

That issue is a real bear right now, probably our top problem. Feedback on precompiled pythons has been super positive and in fact the top feature request I've had several duplicates for is the ability to _force_ mise to use the precompiled binaries. If anyone thinks they can crack our portable pythons running poetry I'll buy them a steak.

It is funny to me something can so well liked while also causing a lot of problems. Maybe not too dissimilar from the whole rtx -> mise debacle :p

comment 2y ago · link · parent

it's a bit strange since you can remove these from iOS. I assume this is a SIP thing.

comment 2y ago · link · parent

Personally, I know a lot of people that were waiting specifically for USB-C. Not sure if that's the reason here but I wouldn't be surprised.
1
456
16