I've been thinking a bit about this lately, with my OS dev hobby. If you look at a project like xv6, and its implementations of the essence of coreutils... compare:
That's not exactly to say these things are _better_, mind you: the tools have grown complexity for a reason. Namely, the simple versions are very much ASCII focused, for example...
But sometimes, I wonder. I barely use any of the more advanced features of most of my tools anyway. Should I be using some distro or OS which mostly keeps it simple?
Seeing this, one realizes there is something fundamentally wrong with how their language or libraries work. ;) Personally, I think these things are perfect examples of where a language providing macros, DSL's, and/or generic interfaces can be much more readable. You could just describe the grammar or whatever with ties to specific, low-level functions for the results. Compiler does the rest. Racket people do that kind of stuff all the time. So, do tools from sklogic, REBOL, RED, Julia, Nim... Inherent limitations of C and their coding approaches combining to create trouble. Plus legacy effects.
grep and regular expressions in general are a great example of something that Unix seems to excel at but that leaves me cold: shitloads of power, but all dependent on learning arbitary syntax by the bucketloads, thus requiring a time investment I just don't have to make.
I marvel at and am impressed by the things that clever shell command chains or carefully constructed regexes can do, but the gap between being able to do those things and when you're awkwardly hunting through man pages and 40 year old docs just to do basic things is huge, and I so rarely need to actually do those things that putting that kind of time in is rarely worth it. Is 3 hours to save 5 minutes really worth my time?
99% of my use of grep is just a simple string search. I don't need an entire esoteric programming language to do that.
https://github.com/mit-pdos/xv6-public/blob/master/cat.c to http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f...
https://github.com/mit-pdos/xv6-public/blob/master/echo.c to http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=blob;f...
Or even something like https://github.com/mit-pdos/xv6-public/blob/master/grep.c
That's not exactly to say these things are _better_, mind you: the tools have grown complexity for a reason. Namely, the simple versions are very much ASCII focused, for example...
But sometimes, I wonder. I barely use any of the more advanced features of most of my tools anyway. Should I be using some distro or OS which mostly keeps it simple?