6 ms·
I am in love with this trend of replacing old school unix utilities with new rust projects that stay just as fast or faster, but increase the usability or featu
by shreve 4y ago
I am in love with this trend of replacing old school unix utilities with new rust projects that stay just as fast or faster, but increase the usability or feature set tenfold. rg, fd, exa, bat, and now tuc.
- lillecarl 4y agoI use rg, exa, bat, and zellij as my "rust replaced old stuff". Zellij isn't yet as polished as I'd like it, but it's way more intuitive than tmux.
- hultner 4y agoOh god, is tmux considered “old stuff” now? I barely finished replacing my screens.
- tomjakubowski 4y agoIt happens to all of us. Did you know Interstellar came out eight years ago?
- lillecarl 4y agoI actually started with screen, but I only used it for daemonising some foreground processes, I work in Zellij daily.
- tomjakubowski 4y agoUsually you have to install tmux on a remote machine anyway, so Zellij seems like a good one of these to try.
- krylon 4y agoOpenBSD ships tmux in the base system. I would be very pleased if more systems did this.
- apgwoz 4y agoThe names of these utilities are bad. I have literally no idea what any of them do. The same could be said for standard unix utilities, true, but they have 50+ years (in some cases) of brain bake in, and have the advantage of names that have _some_ relation to their function (ls : list files :: exa : “extract the list of files from a dirent?”)
- lillecarl 4y agoDoes it really matter though? You can just alias them over the originals or something close-by.
- apgwoz 4y agoYes, you can do that. But that exasperates the system portability problem. The real solution is for some distro to, gasp, decide that POSIX compatibility can be done with utilities in /opt/posix (or something) and do widespread replacement by default. But that’ll never happen…
- lillecarl 4y agoIn your scripts you can use "/usr/bin/env cat" to get whichever version of cat is first in your PATH. NixOS abuses this to an almost silly level :)
- mcronce 4y agoAt some point you have to accept that if you want to know something, you have to learn it. At one point, you didn't know grep, awk, sed, etc... And then you learned them. Or you can just stick with the old tools if you prefer not learning a new thing - that's a perfectly valid option.
- layer8 4y agoThe problem I see is that I don’t see those consolidating anytime soon into a new set of ubiquitous “core” utilities that can be expected to be available everywhere.
- humanwhosits 4y agoI guess it's just up to someone to set up the package on debian that contains all of these
- michaelmior 4y agoThat doesn't solve the "available everywhere" problem. It potentially would make the tools easier to install on Debian-based systems, if you have root access. I'm not sure any new set of tools will ever be available with the ubiquity of coreutils in the next handful of years, if ever.
- sitkack 4y agoInstall rustup from https://rustup.rs/ https://rustup.rs/ cargo install broot exa miniserve ripgrep tuc xh xsv zellij Cargo is the package manager you are looking for.
- michaelmior 4y agoI use Cargo regularly and rustup it does make it easy to install. That's not the point. I'm not looking for a package manger. I want to be able to write scripts that make use of tools I can pretty much guarantee are already installed.
- sitkack 4y agoSo we aren't talking past each other, how do you delineate between cargo and a package manager? Does anaconda, pip (pypi) or homebrew also qualify? Your scripts could have a prolog that installs rustup and calls cargo. There is also https://github.com/ryankurte/cargo-binstall https://github.com/ryankurte/cargo-binstall Even after 20 years of bashing, my bash skills still suck. So many corner cases! But if you include this, and call install_utils at the head of your scripts. It should install the tools on demand. #!/bin/bash RUST_PACKAGE_LIST='rg xsv tuc broot du-dust dutree' RUST_UTIL_LIST='rg xsv tuc broot dust dutree' function is_cargo { cargo > /dev/null } function is_utils { eval "which $RUST_UTIL_LIST" > /dev/null } function install_utils { if ! is_utils ; then if ! is_cargo; then curl https://sh.rustup.rs -sSf | sh -s -- -y fi eval "cargo install --locked $RUST_PACKAGE_LIST" > /dev/null fi } I don't recommend using this, it is just illustrative.
- deleted 4y ago[deleted]
- smartmic 4y agoIt's easy to fall in love with someone who is young, hip and all that. When it comes done to work on my loved UNIX systems though, I still prefer to stay with the old-school tools given by coreutils et. al. They are a quasi-standard, I can rely on them and I always know what to expect. Better yet, I will find them on every system and can reduce my mental load to learn and internalize something new. Sure, they're not perfect, but these advantages trump the disadvantages, and it's all worked out pretty well for decades. Here, I don't have to chase the next bride.
- hinkley 4y agoAnd yet, bash eventually replaced bourne shell (by having an sh-compatibility mode), and vim has replaced vi. If you get anywhere in the neighborhood of a proper superset of the old application, we do occasionally retire the old ones.
- tambourine_man 4y ago>It's easy to fall in love with someone who is young, hip and all that >Here, I don't have to chase the next bride. Who hurt you? :)
- pdimitar 4y agoI can say exactly the opposite and I have the collection of shell scripts to prove it -- the newish tools work better for me when doing a ton of scripting tasks. So maybe don't project about "hip" or "young" because it does your otherwise decent argument a disservice.
- jeppesen-io 4y agoYou can say that again. After using rg for a few years now, I can't imagine not having this tool, that I use weekly, if not daily
- memorable 4y agoSame here with `exa` and `bat`