| You may not use Nix, but some pretty cool Nix tools use your work. :) Just today I was working on some integrations with a runtime dependency resolver for shell programs that uses OSH for parsing on the job. We use Nix to manage our development environments, and we use it to make some small wrappers and tools written in Bash into something portable and reproducible that we can include in development environments that run both on Linux and macOS. Historically we've just included them inline in our Nix files, but thanks to resholve, we're switching to a nicer system so that they live in separate files that are more pleasant to edit. The "source code" of the scripts lives in the repo as normal bash scripts, but when they get built into the development environment, all command invocations get automatically replaced with hard-coded references to the paths of the relevant executables in the Nix store, the shebang gets pinned to a specific bash version in the same way, and they also get run through ShellCheck. Now we have not only a really nice and quick way to define portable wrappers in our Nix code, but a sane way to manage longer scripts without any portability issues. So thanks for your cool shell and associated tools and libs! > Or maybe it's just a harder problem Fwiw, I think this is true. > Some people do not like git, but I get the feeling that most people just use it, and get on with their day. I think one of the other devs on my team probably feels this way. He thinks it's conceptually cool but is somewhat horrified by the complexity and UI. He makes simple uses of it in ways that have precedent on our team, but never really dives in. > Why the difference with Nix? Nix didn't have a celebrity author to spur adoption early on, in some ways it can be slow, and I think maybe it isn't as much better than entrenched alternative stacks than Git was as opposed to SVN. The pain of SVN was very acute for the average developer. I'm not sure that any of the pains of dependency hell, stateful configuration management, distribution of portable executables, etc., are quite as acute for the average operator or developer as that. People who feel Nix makes their professional lives easier tend to have come to it after their career has inflicted more specialized pain upon them. Using Git also doesn't generally (ever?) involve writing code in a Turing-complete language, but to make the best use of Nix, you do have to do that. The paradigm of that language is not very mainstream, either, and although it's generally suited to its domain imo, it certainly has some warts. |
Now that Oils has been completely translated to native code (as of last year), we should probably find a way to officially support that functionality.
It is basically built on 'osh --tool syntax-tree foo.sh' ( https://oils.pub/release/0.28.0/doc/ref/chap-front-end.html )
I've also gotten a request for "tree-shaking", which is very related
Thanks for letting me know it's useful!
---
And on reflection I do think Nix has a harder problem, in part because it has to deal with the "outside messy world", where as git just stores files. For example, I noticed that on Debian the set of root packages is actually pretty coupled to apt-get. So any package manager has to have some hacks. Also OS X and libc make that even harder, etc. Some decisions are at the mercy of the OS itself