What are your opinions on "replacement" programs for core utilities - Printable Version
+- nixers (https://nixers.net)
+-- Forum: Development & Graphics (https://nixers.net/forumdisplay.php?fid=7)
+--- Forum: General Shell Scripting (https://nixers.net/forumdisplay.php?fid=20)
+--- Thread: What are your opinions on "replacement" programs for core utilities (/showthread.php?tid=2250)
What are your opinions on "replacement" programs for core utilities - gmk - 13-03-2019
Recently I've been seeing a lot of programs on GitHub that are rewritten versions of common UNIX command-line programs. These programs usually claim to be faster, and feature lots of colors. Some I've stumbled upon have been fd, sd, exa, and lsd. Funnily they are all written in rust. fd, and sd seem interesting, and quite useful, on the other hand, I have some negative opinions on exa and lsd. Exa offers a ton of features that I feel would be useful in something like a vifm, ranger, etc, but not in a "ls" style program. Also, if you want a super colorful ls output, use a LS_COLORS generator. lsd adds Font Awesome icons and more coloring options, but these don't seem necessary when most people just use ls to quickly view a directory's contents, as intended.
RE: What are your opinions on "replacement" programs for core utilities - venam - 14-03-2019
We've had a sort of similar discussion here.
There are multiple aspects to this question.
Are those fun helpers? I bet they are, they're colorful, usually more intuitive than anything else. The authors had fun writing them, maybe learned something along the way (isn't it usually like that that those tools appear).
Is it necessary to rewrite some core utilities? Well, in a certain way because it teaches the author about the ins and outs of what is necessary to achieve a similar tool to a core one it may introduce them to why the utility is currently the way it is, or how they could help in fixing it.
Are those tools the must have for everyone? For each their own. I'd rather stick with core utilities for the simple reason that they are available everywhere but I don't have an issue testing something novel written in a fancy language.
NB: Your thread was moved from the community section to the shell scripting one.
RE: What are your opinions on "replacement" programs for core utilities - zge - 14-03-2019
It's worth remembering that the GNU coreutils were replacement utilities once too, and still can often be used as such. So IMO it's hard to say anything about them in general, if anything it's a plus that they can exist, and most of the time don't have to be exchanged all at once.
RE: What are your opinions on "replacement" programs for core utilities - jkl - 14-03-2019
There are two sides of that. I like to extend the core utilities (never GNU - avoid GNU like hell!) by useful tools like better text editors and file managers, but I would never replace them. I need the basic POSIX commands as standards-compliant as possible. Shell scripts which are tailored to my personal desktop are not shell scripts which are written well.
RE: What are your opinions on "replacement" programs for core utilities - mrnd - 14-03-2019
I think reinventing the wheel can be very beneficial in these cases.
While the original coreutils are very powerful and have certainly advanced over the years, they have mostly just added new features and flags. Writing new, incompatible tools has a very important advantage: they can rethink the user experience and interface.
Even if we completely disregard the performance, using something like fd over find is simply much nicer. You can mostly do the same things, though find can probably do more things and is more versatile in scripting. But if I just want to find a file with "foo" in the name, `fd foo` is easier to use, even if I at this point know automatically that `find -iname '*foo*'` would do the same thing. And usually I'm only interested in source files, so fd automatically filters eg. .gitignored files away. Same with rg.
Someone could point out that this could be achieved with shell aliases, and for a long time I did that. But if you're okay with config management for all machines you use, you can practically with the same effort just install the new fancy tool, and get the other benefits as well. Thought, if I do require something more complex (usually with scripts), I usually fall back to coreutils, even if the fancy ones had the same features with different syntax. For complex things learned habits are more important to me. But not every search needs to be complex.
Interface design matters, even with CLI tools.