News for hackers. Stuff that matters.
Re:The growth of command line options, 1979-Present (2020) by intrepidhero on Wednesday December 15, 2021 @12:06PM (#29568676)
This got linked in another front page story. Uncomfortable Truths in Software Engineering.

> The Unix philosophy of “do one thing well” doesn’t actually work that well. Dan Luu explains this better than I could.

Usually The Unix Philosophy gets nothing but praise in these parts so I was interested to see a counterpoint.

Re:The growth of command line options, 1979-Present (2020) by xxpor on Wednesday December 15, 2021 @12:54PM (#29569287)
I mean the empirical evidence alone seems point at the Unix Philosophy not actually being popular in practice. GNU tools are much more widely used on boxes humans interact with than BSD/busybox. You don't see everyone trying to figure out how to install all of the suckless tools immediately after installing linux, etc. And then of course we get into systemd and that whole ball of wax.

I do think there's a growing split between server like things and desktop like systems that people actually regularly use. For example, Alpine is super popular in containers, not so much on desktops. Same thing with Busybox, but that's more explicitly meant for embedded envs.

Re:The growth of command line options, 1979-Present (2020) by throw10920 on Wednesday December 15, 2021 @02:20PM (#29570411)
> I mean the empirical evidence alone seems point at the Unix Philosophy not actually being popular in practice. GNU tools are much more widely used on boxes humans interact with than BSD/busybox.

I think that I can present an even better piece of empirical evidence (not to diminish the poignancy of your own):

Almost no large or successful piece of software is composed of Unix command-line utilities.

Firefox, Linux, gcc, Visual Studio Code, Windows, Chrome, Google services, Discord, Spotify, Blender, GIMP, Apache, Slack, Office, Steam, Matrix/Element...almost every single non-trivial piece of software in existence is not composed out of Unix shell utility pipelines.

"Do one thing well" allows you to do one thing well, tautologically - but it doesn't allow you to do many things well. The fact that Unix utilities compose at a very superficial level is irrelevant, because the use of text as an interchange format is such a heart-stoppingly bad idea (consider a programming language where the only type is a string - you wanna write a web server in that?) that it renders Unix tools near-useless for building larger tools (as evidenced by the fact that nothing is made with them), and only useful for immediate interactive use, and building small scripts with (that would already be better served by a real programming language).

The Unix Philosophy is self-contradictory. "Do one thing well" is meant to enable composition, for building larger programs - but "Text is the universal interface" is in direct opposition to building larger programs. But, because tools are only supposed to do one thing well, they're feature-impoverished and not very useful on their own, so you have to compose them. You're screwed either way.

Re:The growth of command line options, 1979-Present (2020) by rustyminnow on Wednesday December 15, 2021 @03:14PM (#29571036)
Different tools serve different purposes. Just because you wouldn't write a web browser/server/IDE/OS in a shell scripting language doesn't mean they don't have value or are failed paradigms.

I've written tons of shell scripts for one-off jobs or simple work that would've taken 2, 3, maybe 4 times the amount the time to write in a "real" programming language. (E.g. throwaway code to generate 10,000 test files that are slightly different would take me 5-10 minutes in bash, but maybe half an hour in node or python.)

Passing around strings isn't the BEST paradigm but it's extremely flexible when you need flexibility. There are times when you need something more solid and that's fine too.

And fwiw I'd bet a majority of the software you listed uses bash somewhere in either their build process or SAAS stack.

Re:The growth of command line options, 1979-Present (2020) by shatteredgate on Thursday December 16, 2021 @09:14AM (#29578286)
On the projects I've hacked on, a lot of time has been spent trying to replace bash and autotools in the build process and reduce its usage. They are brittle and nobody really likes to maintain giant shell scripts filled with fragile regular expressions and other unreadable awk invocations. Plus I've lost count of the number of build scripts I've seen that do strange things like failing to handle spaces in paths because something is not escaped correctly. They are really not a good solution. This can be caught with CI, but if you use any kind of CI then you have even more incentive to get rid of it because bash and makefiles (which fork an additional shell on every command) are very slow.
Re:The growth of command line options, 1979-Present (2020) by throw10920 on Thursday December 16, 2021 @06:01PM (#29585213)
Different tools serve different purposes, yes. However, some tools have much narrower uses than others. For instance, most developers agree that writing programs in assembly language is a very bad idea for about 99.9% of programs (1 out of 1000 - which is generous). And, from both empirical evidence, and reasoning from first principles (stringly-typed, quoting and escaping issues, lack of tooling, low performance, implementation-defined behaviors, poor ecosystem, try-to-continue instead of fail-quick design), we can see that shell is entirely unsuited for everything except interactive use.

Moreover, "time to write script" by itself is a bad metric, for several reasons: (1) the cost of understanding and maintaining the script is ignored (and obviously higher for bash than Python) (2) you're not including the higher likelihood of bugs in your bash programs (and all it takes is a single bug that requires 20 minutes to find and fix...) (3) if you had more experience with Python (or with specific libraries useful for writing shell-script-like things - this often goes overlooked) then your development time would probably be shorter and (4) the pool of Python devs is far greater than the pool of bash devs.

> Passing around strings...[is] extremely flexible when you need flexibility

This isn't accurate. Passing around typed data is just as flexible as strings - except that it adds a bunch of extra safety and type-checks. All data in "string" format, with the singular exception of actual English text that is being passed to an NLP system or something, is actually in a structured text format (the operations that you perform on which are merely isomorphic to existing operations on structured data)...that is very likely under-specified relative and more brittle than actual typed data. All that using a string representation does is make errors easier to make and harder to find.

> And fwiw I'd bet a majority of the software you listed uses bash somewhere in either their build process or SAAS stack.

Yes, because bash is a (bad) habit for tooling devs, not because it scales well or adds safety/performance/maintainability - as evidenced by the fact that there aren't any large pieces of software written in it.

That is - bash is used "somewhere" and not "everywhere" because you can only get away with it at small scales - at large scales, it just falls apart.

Re:The growth of command line options, 1979-Present (2020) by PaulDavisThe1st on Wednesday December 15, 2021 @04:10PM (#29571692)
> Firefox, Linux, gcc, Visual Studio Code, Windows, Chrome, Google services, Discord, Spotify, Blender, GIMP, Apache, Slack, Office, Steam, Matrix/Element...almost every single non-trivial piece of software in existence is not composed out of Unix shell utility pipelines.

All true.

However, the development environment (and frequently the build systems) used for all of the above are likely substantially composed out of Unix shell utilities and pipelines, aided by very unix-y tools such as Perl or awk.

That says something, I think. Just not sure what.

Re:The growth of command line options, 1979-Present (2020) by throw10920 on Thursday December 16, 2021 @06:19PM (#29585387)
Very insightful. I've been thinking about this myself.

One of the possibilities is "just legacy code, bad habits, and bandwagoning", but that's a bit of a cop-out.

Another is "Unix utilities have a much better API to the filesystem and invoking other programs than most languages available today" - which is a (somewhat more-) concrete issue that we can address in other languages!

A third possibility is that the Unix tools transition very well from interactive use to batch use in a larger program - again, something that we can work on improving in other languages. Emacs seems to also do this - functions that are usable in both interactive mode (either invoking with M-x or through a keybinding) and as pieces in larger scripts/functions are pervasive. Breck Yunits calls these "user methods"[1] and I think that it's a good idea for a great pattern.

[1] https://breckyunits.com/user-methods.html

Re:The growth of command line options, 1979-Present (2020) by Maursault on Wednesday December 15, 2021 @11:06PM (#29574687)
Nice point. Pretty sure GP's observation, while correct, is wrong-headed, and something akin to saying, "Honda, Toyota, Volkswagen, Audi, Porsche, Chevrolet, Ford and even Tesla... every single non-trivial transportation vehicle in existence is not composed out of garage tools."
Re:The growth of command line options, 1979-Present (2020) by throw10920 on Thursday December 16, 2021 @06:14PM (#29585333)
"Wrong-headed" is a dismissal, not a counter-argument. Do you have a specific point that you want to argue against?
Re:The growth of command line options, 1979-Present (2020) by Maursault on Friday December 17, 2021 @10:53PM (#29601457)
Point is clearly made for all to see, but I will give it another attempt to help you understand. Your criticism of UNIX commands is not valid in the same way that it not a valid criticism of garage tools that major vehicle manufacturers do not build cars out of garage tools. My understanding is major applications aren't made using UNIX commands because they are ordinarily developed using programing language. So your observation, while incidentally true, as a criticism it is invalid, wrong-headed, misguided, or barking up the wrong tree, which ever way strikes you with the last amount of grief and personal discomfort. I believe your observation is, in fact, a straw man fallacy in the precise way it is fallacious if I observe as a criticism of UNIX tools that no major coffee manufacturers make their product with UNIX tools. While this is probably true, as an argument or criticism of UNIX tools it is simply not valid and not a cogent criticism.
Re:The growth of command line options, 1979-Present (2020) by throw10920 on Thursday December 23, 2021 @09:21AM (#29662037)
> Point is clearly made for all to see

No, it is not. You said "wrong-headed" and then made a very vague analogy. Your point is the opposite of "clear" - in fact, it's unclear whether it exists at all.

> Your criticism of UNIX commands is not valid in the same way that it not a valid criticism of garage tools that major vehicle manufacturers do not build cars out of garage tools.

That's not a valid argument, either. That's a flawed, leaky, vague analogy that does nothing to actually describe, concretely, what your point is. To summarize: you made a non-argument, called it "clear", and then made the same non-argument again.

Here are my points, concretely: the fact that no major application has ever been built even mostly out of Unix shell very strongly indicates that it's unsuitable as a programming language, in addition to indicating its unpopularity. The fact that the most popular variants of Unix shell do not adhere well to the Unix philosophy also indicate that the Unix philosophy isn't a very good one for interactive use, either. The fact that all of the Unix shells (whether Unix-y or not) aren't used at all for building large applications also indicates that the Unix philosophy isn't suitable for building large programs.

> My understanding is major applications aren't made using UNIX commands because they are ordinarily developed using programing language.

The Unix shells are programming languages that implement the Unix philosophy. The fact that they aren't used to build any large or particularly useful piece of software means that the Unix philosophy itself isn't useful for those things.

> a straw man fallacy in the precise way it is fallacious if I observe as a criticism of UNIX tools that no major coffee manufacturers make their product with UNIX tools.

You used a lot of fancy words here to conceal the fact that your point is completely invalid. There's no relationship between coffee and Unix tools, but there's a very strong relationship between the Unix philosophy and the Unix tools. Therefore, the Unix tools not being used to make large and useful systems directly implies that the Unix philosophy is bad at the same.

Moreover, one of the selling points of the Unix tools is that you can use them as a programming language and compose them to make larger programs - so, the fact that people do not do that is, indeed, a valid and cogent criticism of them.

Re:The growth of command line options, 1979-Present (2020) by citrin_ru on Wednesday December 15, 2021 @05:13PM (#29572259)
> use of text as an interchange format is such a heart-stoppingly bad idea ... consider a programming language where the only type is a string

Posix shell is a programming language where the only type is a string. Text as an interchange format works reasonably well in practice for a wide range of tasks.

To me shell, easy to combine unix commands and text as interchange is a clear example of New Jersey style from "Worse is better" [1] and their critique comes mostly from followers of MIT/Stanford style.

In my carrier I wrote hundreds of small shell scripts which use unix commands and text as an an interchange format. Yes, I see that some bugs can be prevented/detected by using something more strongly typed than shell, but all my scripts worked reliably enough and didn't suffer from any significant bugs so why bother? (disclaimer: I'm old fashioned and like to read man pages; I imagine shell can be full of traps if you ignore documentation and use only trail and error approach or practice stackoverflow driven development).

Of course for large projects and even some small ones other tools/languages fit better than shell but shell have its niche.

[1] https://en.wikipedia.org/wiki/Worse_is_better

Re:The growth of command line options, 1979-Present (2020) by throw10920 on Thursday December 16, 2021 @06:42PM (#29585613)
> Posix shell is a programming language where the only type is a string.

You got it!

> Text as an interchange format works reasonably well in practice for a wide range of tasks.

Solutions using real programming languages score better on almost every conceivable metric (robustness, tooling, debuggability, maintainability, extensibility, performance, library ecosystem, developer pool, language pitfalls) other than initial time-to-develop, where they only win by a small margin (e.g. 10 minutes to develop a script instead of 2) - so, unless you're developing software purely for your own enjoyment, it's somewhat irresponsible to use shell instead of Python (or some other real, but script-amenable, programming language).

> To me shell, easy to combine unix commands and text as interchange is a clear example of New Jersey style from "Worse is better" [1] and their critique comes mostly from followers of MIT/Stanford style.

The New Jersey style is not only flawed on a theoretical level (just go look at any of those characteristics - tell me that it's more important for your bank or X-ray machine software, or your compiler or firewall to be simple than correct - and it's pretty clear that software that prioritizes simplicity above all else doesn't actually usefully serve humans, which is the point of software in the first place) but also unpopular on a practical level for actually building useful pieces of software.

The New Jersey style is a style guide that is only useful for making art projects (where the value is in beauty, not utility) that aren't required to be performant, maintainable, feature-complete, or have correct behavior.

> all my scripts worked reliably enough and didn't suffer from any significant bugs so why bother

Because of the above list of metrics that real languages score better than shell on - the only thing that shell wins on is initial time-to-development! It's going to be harder for others to maintain, debug, optimize, understand, and extend your scripts after you leave, harder to diagnose bugs, harder to find people who can write bash...

> shell have its niche

Yes - but it's an extremely narrow one where time-to-development is the most important metric and you're only working with small problems (as above a relatively low problem complexity, shell scripting is slower than using real languages anyway) - and these conditions are very rarely true at the same time (e.g. in infrastructure you might have a small problem, but correctness is far more important than TTS - while in a startup you want low TTS, but your problems are non-trivial).

Re:The growth of command line options, 1979-Present (2020) by akitzmiller on Wednesday December 15, 2021 @07:34PM (#29573401)
I think the whole value of the Unix tool ecosystem is that you don't need to build large pieces of software. If you look at all the GUI tools that Microsoft had to build for Windows administration in the earlier days and how they eventually came out with PowerShell because of the inadequacy of those tools, you can see how successful Unix tools have been by the --lack-- of big software that does their job.
Re:The growth of command line options, 1979-Present (2020) by nyanpasu64 on Wednesday December 15, 2021 @11:50PM (#29575024)
True, Linux is easier to automate. Though I still find Process Monitor's GUI more intuitive than trying to learn strace.
Re:The growth of command line options, 1979-Present (2020) by pjmlp on Thursday December 16, 2021 @07:18AM (#29577431)
Windows automation did not require Powershell, we were doing all of that with VBScript and JScript before alongside Technet Resource Kit.

Also Powershell doesn't get much love from UNIX heads.

Re:The growth of command line options, 1979-Present (2020) by bodhiandpysics1 on Wednesday December 15, 2021 @07:36PM (#29573414)
Git is probably the most notable example of a complex software program that is composed of a series of independant tools, though gcc is actually also architecturally a pipeline. Visual studio code might also not be a great example. It's an ide, whose ide features are based on seperate process servers which communicate over a textual protocol... it's very plan 9 esque.
Re:The growth of command line options, 1979-Present (2020) by jmfldn on Wednesday December 15, 2021 @03:03PM (#29570891)
Shell programming through small cli tools was never meant to scale into massive complex software so you're comparing apples and bananas.

Do one thing well and text as the universal interface works well in the small for parsing files, doing sys admin tasks, gluing a few things together. That's what it's intended for. It's obviously the wrong tool to build a system in. Used in the right context they compose beautifully.

Re:The growth of command line options, 1979-Present (2020) by bch on Wednesday December 15, 2021 @03:28PM (#29571208)
> GNU tools are much more widely used on boxes humans interact with than BSD/busybox. You don't see everyone trying to figure out how to install all of the suckless tools immediately after installing linux, etc.

Or perhaps those BSDers, suckless tool users, etc get setup and quietly just get to work. I feel that’s plausible.

I think you’re right re: server/desktop split, which decades ago might have been hard to tell apart. Is desktop-computing and some loud but ignorant (of Unix) majority directing the future of Unix down the garden path or are the traditionalists out of touch and just yelling at clouds and kids to stay off their lawn?

I fall into the traditionalist camp - I think the Unix that got us here is Good and to know it is to love it.

I think pushing back against complexity is (and has been for a long time) an additional challenge for BSD/Linux, besides it’s primary role of being a great compute environment. The BSDs have done marvellously here.

> I mean the empirical evidence alone seems point at the Unix Philosophy not actually being popular in practice.

I’m worried this is polling 100 people off the street about how they care for their kitchen knives and trying to tie that back to Michelin Star restaurant kitchens. I don’t know…

Re:The growth of command line options, 1979-Present (2020) by wyager on Wednesday December 15, 2021 @01:10PM (#29569493)
Software popularity is almost always a historical accident rather than a reflection of users' preferences.
Re:The growth of command line options, 1979-Present (2020) by ReleaseCandidat on Wednesday December 15, 2021 @01:15PM (#29569572)
Almost nobody used the original Unix-tools on any Unix (like Irix, Solaris, AIX, HP-UX and Tru64). Everybody installed the GNU tools, that's why after some time every vendor shipped them with their Unix as add-on disks.
Re:The growth of command line options, 1979-Present (2020) by pjmlp on Thursday December 16, 2021 @11:07AM (#29579626)
Not really, because devs would have to put up with what the likes of people like myself actually made available on the servers they had to telnet into for development.

The only big UNIX where I actually did install GNU stuff was on Solaris 2.6 via the GNU packages repository, because I was requested to do so.

All our HP-UX and Aix boxes used the vendor tooling (including the C compilers).

Re:The growth of command line options, 1979-Present (2020) by ReleaseCandidat on Thursday December 16, 2021 @11:53AM (#29580335)
> Not really, because devs would have to put up with what the likes of people like myself actually made available on the servers they had to telnet into for development.

Fortunately that didn't work when you needed 3D graphics hardware. But I guess you worked in a 'server' company, not a graphics (3D or engineering) one?

> All our HP-UX and Aix boxes used the vendor tooling (including the C compilers).

Of course, GCC was only needed for most of the later (early 2000s) OSS like Mozilla that didn't work with the native compilers because of missing GNU extensions. That's one thing I don't miss - the prices of compilers. SGI took more than 10,000 € for their MipsPro C, C++ and Fortran compilers but without 'advanced' optimization options like auto parallelization and their 'IDE' tools, Developer Workshop. That reminded my of Totalview (a debugger from ???): now Perforce bought them https://totalview.io/

Re:The growth of command line options, 1979-Present (2020) by pjmlp on Thursday December 16, 2021 @01:06PM (#29581523)
Of course it did, ever heard of OpenGL and X Windows on AIX or SGI

Or SGI Onyx, for another example.

In fact the whole cloud streaming hype is basically a bunch of people rediscovering graphics programming with timesharing on UNIX.

Re:The growth of command line options, 1979-Present (2020) by ReleaseCandidat on Thursday December 16, 2021 @02:06PM (#29582382)
Sorry, I badly phrased that. I was talking about a company that used Unix on their servers, instead of workstations (usually for 3D Work). Although many used Indys and later O2s and Octanes as terminals for their Crimson or Onyx (2) (but not via telnet). That's what _I_ did and in these environments (usually Irix, some Solaris, AIX and HP-UX) the GNU tools were usually installed (except on single purpose computers that only ran one program, like F/F/I, Softimage or Maya or some 3D CAD). Maybe in the big automotive companies (using 3D CAD/CAM) the admins were, well 'enterprisey', but normally you were root on your workstation as developer.
Re:The growth of command line options, 1979-Present (2020) by pjmlp on Thursday December 16, 2021 @02:33PM (#29582718)
Sure, I didn't want to make it there was only one way to do it, I just happened to be more used to such enterprise style configurations.

Actually one way to mix both, while controlling what people were allowed to do on their workstations was to boot via tftp and have $HOME mapped noexec over NFS.

A solution used in some labs at the university campus.

Re:The growth of command line options, 1979-Present (2020) by xxpor on Wednesday December 15, 2021 @01:16PM (#29569581)
Kind of hard to separate cause and effect there. Why does my dad prefer Windows? He's used it for 30 years and he's used to it. If he switched to Ubuntu, would he prefer that? Perhaps, but there's a lot of stuff to learn. So he prefers Windows, in some sense.
Re:The growth of command line options, 1979-Present (2020) by johnisgood on Wednesday December 15, 2021 @02:53PM (#29570776)
I think for a large number of people it would make no difference as they are in the browser at all times, or the software they use on the daily is available for Linux, too.
Re:The growth of command line options, 1979-Present (2020) by traviscj on Wednesday December 15, 2021 @02:05PM (#29570244)
I have the same problem with textmate :-(
Re:The growth of command line options, 1979-Present (2020) by the_af on Wednesday December 15, 2021 @02:58PM (#29570840)
> The Unix philosophy of “do one thing well” doesn’t actually work that well. Dan Luu explains this better than I could.

That quote from the Uncomfortable Truths article is strange because Dan Luu doesn't explain that "it doesn't actually work well". He just explains that the philosophy is not consistently followed, but he is not unhappy with it.

Re:The growth of command line options, 1979-Present (2020) by MisterTea on Wednesday December 15, 2021 @04:06PM (#29571639)
> He just explains that the philosophy is not consistently followed, but he is not unhappy with it.

Which is exactly the reason for the glut of command line options.

A great example of following Unix philosophy using a more recent example is the ssh client on plan 9. It is split into three separate programs each with their own man page: ssh(1) for terminal access, sshfs(4) for mounting a remote file tree, and sshnet(4) which imports a remote machines tcp stack. Keep it simple, stupid.

Re:The growth of command line options, 1979-Present (2020) by avgcorrection on Wednesday December 15, 2021 @02:26PM (#29570467)
Usually both the Unix Philosophy gets uncritical praise and many people complain about how unstructured shell application data is. The great thing about this essay is that it connects the two dots and finally concludes that “do one thing well” and “text is the universal interface” go together like oil and water.
Re:The growth of command line options, 1979-Present (2020) by ReleaseCandidat on Wednesday December 15, 2021 @12:11PM (#29568736)
The 'Unix Haters Book' has some too:

https://web.mit.edu/~simsong/www/ugh.pdf

Re:The growth of command line options, 1979-Present (2020) by marcodiego on Wednesday December 15, 2021 @02:00PM (#29570198)
The UHHB has very few points that are still valid. It is a humorous piece and was written about 3 decades ago. We shouldn't continue citing it as valid criticism.
Re:The growth of command line options, 1979-Present (2020) by ReleaseCandidat on Wednesday December 15, 2021 @02:41PM (#29570652)
> The UHHB has very few points that are still valid.

I disagree. Yes, nobody uses sendmail anymore, filesystems vastly improved and X isn't a resource hog any more. I've reread it some months ago and the main points still hold.

For example the part about `kill`:

    Most operating systems have a “kill” command. So does Unix. In
    most operating systems, the kill command kills a process. The Unix
    implementation is much more general: the “kill” command sends a
    process a message. This illustrates the first Unix design principle:
    • Give the user power by making operations fully general.
    The kill command is very powerful; it lets you send all sorts of messages to 
    processes. For example, one message you can send to a process tells it to 
    kill itself. This message is -9. -9 is, of course, the
    largest single-digit message, which illustrates another important
    Unix design principle:
    • Choose simple names that reflect function.
Re:The growth of command line options, 1979-Present (2020) by Athas on Wednesday December 15, 2021 @04:18PM (#29571756)
While I agree that there's much of the UHHB that is still valid (and what's not valid is still funny), I don't think that's a good example. Modern kill allows you to provide the signal name if you wish. I don't think it's a particularly good criticism of kill that it also allows you to use a numeric shorthand if you wish (even if that shorthand is very popular).

I think the UUHB is mostly worth reading to understand the absolutely dismal state of proprietary Unix in the 90s. It explains why technical reasons contributed to the growth of both Windows NT and GNU.

Re:The growth of command line options, 1979-Present (2020) by monroeclinton on Wednesday December 15, 2021 @04:03PM (#29571601)
I don't find the argument about kill convincing. You can use `kill pid` and it will send a SIGTERM signal to the process. The -9 option is only necessary when you want to send a SIGKILL signal. I don't think it is a bad thing that kill gives users the option to choose which signal to send. I only use the -9 option when I want to terminate a process without it being handled.
Re:The growth of command line options, 1979-Present (2020) by AceJohnny2 on Wednesday December 15, 2021 @04:36PM (#29571923)
Rob Pike, one of Unix's co-creators, and owner of quite a sharp tongue, put it best in a Slashdot interview:

"Those days [of the Unix Philosophy] are dead and gone, and the eulogy was delivered by Perl."

https://interviews.slashdot.org/story/04/10/18/1153211/rob-p...

Re:The growth of command line options, 1979-Present (2020) by fsckboy on Wednesday December 15, 2021 @05:35PM (#29572464)
ok sure, but unix is still here and perl died

there's a subtle thing about perl that's not mentioned often, which is how it borrowed ideas from many other tools and that made perl "intuitive" to learn for people who knew the other tools. But once you're embedded in just perl for awhile, you forget the other tools and then perl's grab-bag of borrowed ideas becomes sort of burdensome, it loses "intuitiveness".

Re:The growth of command line options, 1979-Present (2020) by oblio on Friday December 17, 2021 @03:19AM (#29589376)
Perl itself died. But Perl's philosophy of batteries included and do almost everything in a single language won.

If anything, Perl killed classic Unix and much of the Unix philosophy.

Every major modern design looks more like Perl than like Unix: Python, Ruby, PHP, JavaScript, Java, C#, Swift, Go, Rust, etc.

They're all "batteries included".

Re:The growth of command line options, 1979-Present (2020) by AceJohnny2 on Thursday December 16, 2021 @03:14AM (#29576167)
Only after I had to do some non-trival Bash scripting did I stop hating Perl's syntax. For one thing, at least Perl wasn't as bad as Bash. For another, I now understood where Perl came from!

Perl's syntax is a relic of its time, and it blazed a trail for what to do (and what to avoid!) in later scripting languages.

Re:The growth of command line options, 1979-Present (2020) by anthk on Wednesday December 15, 2021 @09:40PM (#29574194)
Perl didn't die. Perl superseded awk.
Re:The growth of command line options, 1979-Present (2020) by linguae on Wednesday December 15, 2021 @06:25PM (#29572849)
An interesting alternative approach to Unix pipes are systems where everything is an object and where objects can be composed, similar to the idea of function composition in mathematics (e.g., f(g(x)). This can not only be used for command-line applications (for example, PowerShell), but this approach can be taken in graphical-user interfaces. The Smalltalk-80 environment is the ideal substrate for creating such an ecosystem, and Windows has support for implementing such component-based technology, namely (1) Microsoft's OLE (https://docs.microsoft.com/en-us/cpp/mfc/ole-background?view...), (2) the Component Object Model (https://docs.microsoft.com/en-us/windows/win32/com/the-compo...), and (3) the .NET Common Language Infrastructure (https://en.wikipedia.org/wiki/Common_Language_Infrastructure).

Back in the mid-1990's Apple once promoted OpenDoc (https://en.wikipedia.org/wiki/OpenDoc), a standard that was envisioned to support an ecosystem of component-based software, where users could mix and match components to create modular solutions instead of depending on large, monolithic software applications. Here is a nice short video promo from roughly 1994 describing OpenDoc: https://www.youtube.com/watch?v=oFJdjk2rq4E.

OpenDoc was nixed when Steve Jobs returned to Apple; my opinion for this nixing is because (1) Apple at the time needed to focus on one technical direction (OpenDoc was one of many competing software visions at Apple before Steve Jobs united Apple toward a software vision built on top of OpenStep/Cocoa), and (2) it's hard to promote a component-based software ecosystem when the Mac was on life support and needed support from popular vendors of large, monolithic applications (I'm talking mainly about Adobe and Microsoft) in order for Mac users of these applications to stay on the Mac. I believe this is the same reason why we haven't seen much of a component-based software ecosystem on Windows outside of Microsoft Office's interoperability among its applications: it's easier for software vendors to sell integrated solutions than to sell components that users will have to integrate themselves.

I wish the FOSS desktop ecosystem, which doesn't have the same commercial concerns as the world of proprietary software, embraced component-based software beyond Unix pipes. However, the FOSS desktop ecosystem rallied behind KDE and GNOME in the latter half of the 1990's, and thus many of us still rely on large applications like LibreOffice, Firefox, and the GIMP instead of component-based alternatives.

Re:The growth of command line options, 1979-Present (2020) by LargoLasskhyfv on Thursday December 16, 2021 @02:47AM (#29576041)
Old KDE(3) had DCOP (which worked well within KDE3 in my experience), which is now superseeded by DBUS, which is (mostly) desktop agnostic.

[0] https://en.wikipedia.org/wiki/Desktop_communication_protocol

There is also Vala from Gnome:

[1] https://wiki.gnome.org/Projects/Vala/About

[2] https://gitlab.gnome.org/GNOME/vala

Re:The growth of command line options, 1979-Present (2020) by pjmlp on Thursday December 16, 2021 @11:11AM (#29579689)
Components are used quite a lot on Windows, specially on devtooling, have a look at DevExpress, Telerik and so on.

The biggest pain with COM is that Microsoft (except for C++/CX) never put much effort like Borland did, or VB 6, on making it a pleasant experience.

.NET was supposed to replace it, but WinDev rebeled against it, so now we have both, with COM still having the tooling stuck in 2000 (C++/WinRT is a regression to those days).

On UNIX side, there are a couple of possibilities gRPC, D-BUS, DCOP, KParts, Android Binder/Intents,...

macOS builds on the NeXT Tooling and also offers XPC in addition to them.

However where BSD and Linux clones fail is having a full stack approach to the platform, thus turning such approaches in mini-silos, e.g. you can enjoy D-BUS alongside KParts as long as you stay with KDE and KDE specific apps.

Re:The growth of command line options, 1979-Present (2020) by BrazzVuvuzela on Wednesday December 15, 2021 @03:11PM (#29571003)
In years past, some Unix utilities used to do things like silently truncating long lines that were too long for the static buffers used by those tools. The GNU Coding Standards document (originally written in the early 90s I believe) specifically says not to do things like this (GNU's Not Unix, after all..)

> For example, Unix programs often have static tables or fixed-size strings, which make for arbitrary limits; use dynamic allocation instead.

> Avoid arbitrary limits on the length or number of any data structure, including file names, lines, files, and symbols, by allocating all data structures dynamically. In most Unix utilities, “long lines are silently truncated”. This is not acceptable in a GNU utility.

https://www.gnu.org/prep/standards/standards.html