I’ve been a big fan of both spaced repetition in general and the Anki spaced repetition system in particular for a long time now. So today, after a fresh new install and blinging out of Ubuntu 23.10, I decided to take the next step, as I often do with programs I use a lot, and try to build and compile it myself.

This turned out to be pretty easy! The docs warn that ./run is slower than the non-optimized build, but I don’t notice much of a difference on my machine. It did however leave me with the question: Where should I put the anki symlink to ./run?

The options which were in my $PATH at the time of writing:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
~ 
❯ echo $PATH | tr ' ' '\n'
~/.cargo/bin
~/.local/bin
~/.fzf/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin

(One of the nice things about the fish shell is that adding things to your path is super easy. Just run fish_add_path -U where/ever and it’s there for life! Even better, it adds to the front of the path, so you get this natural gradient of more-specific to less-specific to your needs. You can tell this project is my first time working with rustup! because the ~/.cargo/bin is so new!)

GPT-4 was kind enough to give me a rundown of what each of these is used for, which looks quite sensible:

DirectoryDescription
~/.cargo/binContains executables related to Rust programming, managed by Cargo.
~/.local/binCommon place for user-installed software, specific to your user account.
~/.fzf/binLikely contains the executable for fzf, a command-line fuzzy finder.
/usr/local/sbinFor system administration programs installed locally, not part of the system-wide installation.
/usr/local/binContains user programs installed system-wide, not part of the system distribution.
/usr/sbinFor software that is part of the standard system distribution, used for system administration.
/usr/binContains binary executables for software that comes with the operating system and additional packages.
/sbinContains system management and administration programs.
/binContains essential binary executables required for the system to boot and run.
/usr/gamesFor game executables.
/usr/local/gamesSimilar to /usr/games, but for games installed locally.
/snap/binContains executables for applications installed through Snap.

Looks like ~/.local/bin/ is the place to put it!