What does HackerNews think of asdf?
Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
You could also use containers pretty easily as well with docker or podman for windows and the official Elixir images[2].
Again, maybe you're already aware of it, but I think it's a nice example of genericising a concern common to many languages which sounds similar to what you're asking for (albeit unfortunately in a slightly different space).
My brew list is intentionally very short and my faffing about desire is limited.
Generally I use brew to pull in asdf (https://github.com/asdf-vm/asdf) to install programming languages/tooling, it works flawlessly.
I use Pipx (https://github.com/pypa/pipx) to install python thingies (such as yt-dlp) as a cli.
Go and Rust handle binaries in their languages beautifully and without issues.
Turns out that it’s a version manager (now there’s another overloading: ‘VM’ to mean ‘version manager’ vice ‘virtual machine’): https://github.com/asdf-vm/asdf
https://github.com/asdf-vm/asdf
asdf plugin add python
asdf install python 3.9.1
asdf global python 3.9.1
asdf local python 3.9.1
It's straightforward enough that the software devs I work with consider it "painless" to use.
asdf describes itself as "asdf is a CLI tool that can manage multiple language runtime versions on a per-project basis. It is like gvm, nvm, rbenv & pyenv (and more) all in one!"
> I am familiar with nvm and pyenv for managing Node and Python versions, respectively, however the tutorial I was following did not mention any Ruby version manager. I took to the internet and found the highly popular, rbenv.
If you want "just" a version manager for ruby, I'd go with rbenv. But if you use, say, node and python too - I'd go with asdf:
https://github.com/asdf-vm/asdf
https://github.com/asdf-vm/asdf-ruby
Keeps the stampede of VMs out of your bashrc.
I came into `nodenv` after being a regular user of `pyenv` for a while. Started with `nvm`, but wished for something more pyenv-like.
There is also `asdf` [2], which seems even more generic. On paper it looks interesting, but I haven't found a solid reason to switch out of `pyenv` and `nodenv`.
Has anyone tried `pyenv` and/or `nodenv` and switched to `asdf`?
[1] https://github.com/pyenv/pyenv [2] https://github.com/asdf-vm/asdf
If you want to use multiple versions of Python and pin them, you should use something like asdf [1] and its Python plugin [2]. It's a version manager with support for many languages and more. I used it for Elixir, Node, PHP, Ruby and even PostgreSQL (I need different database versions in different projects.) I never used it for Python because I'm OK with being on the latest version so far.
With asdf I would expect to do something like this
asdf install python 3.7.5
mkdir my375project
cd my375project
asdf local python 3.7.5 # pick the version to use here
python3 -m venv py375 --python=~/.asdf/installs/python/3.7.5/bin/python
~/.virtualenvs/py375/bin/activate
This virtualenv is going to stay on 3.7.5 forever.replace pyenv with asdf [0]. asdf is like pyenv, but it works for all major programming languages.
https://github.com/asdf-vm/asdf
Now, a few new languages do come with pretty decent "virtual env" thingy-s , but most stumble for a few years.
So far (past year) I've been pretty happy with asdf. Mostly use it for ruby and node - but also rust and golang, lisp, Java and ocaml (mostly as a "consumer" of various cli tools, and/or toy projects.
asdf: https://github.com/asdf-vm/asdf - installs many different programming languages and supports installing different versions concurrently. I use it for go installs since distribution updates aren't usually fast enough.
solaar: https://github.com/pwr/Solaar - handles configuring a logitech unifying receiver in Linux. Not really something you'd use multiple times, but am thankful it exists (also has a GUI too I believe).
I'm not sure if I'd use it for deployment - but for development it's quite versatile.
https://github.com/asdf-vm/asdf
Then, there is something wrong with either brew or MacOS or both because we can install both Python 2 and 3 in parallel on any Linux with the system package manager.
You need to be able to make some assumptions about your environment in order to implement tools like these. All you're doing is specifying the context in which certain commands within your workspace will run.
A common pattern I've seen with some npm packages is to have the globally installed executable delegate to the project-specific version. This is a nice solution, but it's unrealistic to rewrite lots of projects to use this approach.
IMO, text-based interfaces are still too limiting though. I want to interact with GUI apps programmatically as well! On macOS you can achieve a little bit of that with AppleScript (or with JavaScript in newer versions), but it's still not frictionless.
https://news.ycombinator.com/item?id=17019197
It's a bit like a mix of (x)stow and apt for Windows. Or the good parts of arch aur with binary distribution.
Should probably also mention that I'm experimenting with asdf as a version manager - to avoid a long list of setup in bashrc to adjust paths to various interpreters. It follows a lot of best practices that various dedicated version managers seem to pick up eventually:
The real advantage of staying on a LTS has been no big updates and no changes in the GUI. I'm on Gnome Flashback which I tweaked to be as closed as possible to Gnome 2. It seems that Gnome Shell eventually got enough extensions to also make it look like Gnome 2. I'll give it a try again after those memory leaks will go away. I can probably stick to 16.04 for another year before developers start skipping it in their builds.
Edit: I checked and I have git 2.17.0, which is the latest version. I keep it up to date with ppa.launchpad.net/git-core/ppa/ubuntu
You can define a .tools-versions file in the root of your project, which lets you install the correct versions with a simple `asdf install`. We even use this in CI for zero-config language version upgrades.
I'd still reach for nvm for deploying to a server. To the best of my knowledge, the code is portable across all UNIX-y OSs.
On the other hand, asdf supports multiple languages, so I was able to kill off rvm too! It also has considerably better performance (specifically, startup speed).
EDIT: As to the discussion regarding Ayo.js... I've never interacted with Rod personally, but having read a few hundred of his miscellaneous responses on GitHub, he has never struck me as someone unreasonable. His response to the criticisms being raised seem very reasonable as well. If anything, I now feel like I have a bit more trust on node team.
Based on my highly limited outsider's perspective, trying to kick him seems overly harsh. If people believe he's doing things poorly, an avenue should be created through which constructive criticism and feedback can be provided. We're all human, we make mistakes, and we sometimes don't understand each facet of problems we encounter.
Many CLI tools are missing completions, but I think it's slowly getting better over time. The pros outweigh the cons for me.
I've been pretty satisfied with it, and haven't had a single problem with it yet - it just works (™).
I recommend trying it out, relevant links:
At any rate I've been using asdf https://github.com/asdf-vm/asdf to manage my erlang and elixir installs on a per project basis for a while now and it has been working well for me.
If you want an easy way to install both, you can check asdf [1].