I like to stay up to date on my tools. A rolling release distribution would cover that, at the cost of stability. Not like for day to day stuff, but stuff I absolutely need stable for work. So I use a stable widely known distribution. Pop OS is my current default, and Ubuntu when on WSL. Version managers sit on top of that for fresher tools and libraries.
Homebrew used to be my default version manager, but over the years there have been too many situations where casually updating its packages broke something I needed. Rather than learn how to pin versions or whatever, I looked at alternate managers that pin by default. You’ll update what I tell you to update, when I tell you to update it!
I know NixOS is an option for managed environments. Playing with that is on my task list. Meanwhile, I have version managers.
ASDF for version management
asdf can be pretty useful as your main Maintainer of Versions. It doesn’t hold everything, but it covers my core needs. And then yes when needed I’ll use other version managers for more specific contexts.
The core dependencies of
git come preinstalled on most systems I use, but you may need to check on your own system.
Once that’s out of the way, check out a copy of the asdf source repo with a recent tag —
v0.8.1 when I wrote this.
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.1
Then, load asdf functionality and completions to your
. $HOME/.asdf/asdf.sh . $HOME/.asdf/completions/asdf.bash
Maybe eventually I’ll use my org config to drive what gets installed. For now it’s more than enough to list what I had for next time I wipe a system.
crystal 1.2.1 golang 1.17.3 hugo extended_0.89.2 neovim 0.5.1 perl 5.34.0 python 3.9.8 ruby 3.0.2 rust 1.56.1 starship 0.58.0
Volta for the Node stuff
Volta turns out to be way more convenient than juggling
npm install -g for Node versions and globally available Node packages.
Volta installation helpfully makes the necessary changes to your environment files. But if you don’t need those changes — say, you’ve already got them as part of your org config — you can always skip it.
curl https://get.volta.sh | bash -s -- --skip-setup
But if I skip the setup, I best make sure my shell environment knows about Volta.
export VOLTA_HOME="$HOME/.volta" export PATH="$VOLTA_HOME/bin:$PATH"
Fresh system, so I haven’t installed much yet.
volta list --format human
⚡️ Currently active tools: Node: v16.13.0 (default) Tool binaries available: css-beautify, html-beautify, js-beautify (default) stylelint (default) tldr (default) See options for more detailed reports by running `volta list --help`.
Cargo (via ASDF for now)
The asdf plugins aren’t quite working right for me in some cases. And all of them had to do with Rust, interestingly enough.
cargo install CRATE && asdf reshim gets me there though.
Let’s find out what crates I installed so far.
cargo install --list
bat v0.18.3: bat just v0.10.3: just lsd v0.20.1: lsd
“Core” Python packages
I’m using one core Python version these days, only digging into virtual environments for the projects that need them.
But that means I need to track my favorite libraries all over the place.
BTW don’t forget to install those Python dependencies!
There are others and I’ll add them when I remember what they were.
pip install pip-tools && asdf reshim pip-compile ~/requirements.in > ~/requirements.txt pip install -r requirements.txt && asdf reshim
And what does my home
requirements.in look like? I’m glad you asked!
Mind you these aren’t all exactly core. I just lumped a few requirements files from projects and tasks I access frequently. The intent is to weed out the requirements I don’t use outside of those projects.
Mastodon.py Pillow arrow beautifulsoup4 black colorama docutils fs invoke ipython myst-parser lxml markdown_it_py[linkify,plugins] mdgen more-itertools pip-tools pyexiftool pygments pylint pynvim pyperclip pytest pytest-faker pytest-mock python-frontmatter python-lsp-black python-lsp-server python-slugify pyyaml requests rich ruamel.yaml ruruki six sphinx sqlite-utils tasklib tinydb toml typer
When I am managing requirements for a specific project, I tend to use Poetry.
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
Needs to be visible to my shell, of course.