|
|
|
|
|
by willghatch
2728 days ago
|
|
> it's pretty damn presumptuous to make someone install some random shell on my machine to build your code, imo Is it more presumptuous to make people install a language you used than to make them install a library you used? Either way people need to get your dependencies if they want to run your code. > The standard exists to define the environment. Standards are great, but not all environments need to be standard. Most shell scripts don't need to be ported to dozens of different platforms, and most shell script authors would be much better served by a language with fewer weird gotchas, saner semantics, and the benefit of a lot of language research that's happened in the past few decades. For instance, as I've been porting my personal shell scripts to Rash (my shell in Racket), I've been able to use all the patterns I use in posix shells but with benefits of better readability, easier reasoning, better means of abstraction, etc. It's been a solid win that I would recommend to anybody. Sure, if someone else wants to run my scripts they need to install Rash. But few people (in practice: nobody) are really interested in running my personal shell scripts besides myself. If somebody does want to run them, installing the dependencies is not very hard. There is a small set of scripts that needs to be portable and be written in a shell-like language. Until standards catch up, posix is perhaps the best thing we have. But most of the time when people write shell scripts they could be writing in any language but choose shell because they want to automate something they do manually or they really want a processes-and-files DSL. Choosing a better shell that fits the processes-and-files domain and allows easy interactive use with better features and less insanity in these situations is a slam dunk. |
|
A C compiler is also required by POSIX.
>There is a small set of scripts that needs to be portable and be written in a shell-like language
I reject the assumption that the smaller of the two sets is the set which should be portable.
Your Racket-based shell requires a supported Racket platform, which is honestly a pathetic group: Linux, macOS, and Windows, on x86_64, i686, and ARM(?). Maybe if your software is written in Racket in the first place this makes sense, but otherwise it doesn't. It's not about you: it's about everyone. I have a RISC-V machine on my desk and if I wanted to get your stuff working on it I'd have to start by writing a new JIT for Racket. On the other hand POSIX & C runs just about everywhere. You mentioned using these for your personal scripts - fine, whatever floats your boat. You'll regret it if you ever think about playing with BSD, POWER9, or the platform of tomorrow (spoiler: I guarantee you that platform will support POSIX and C).
It's funny that everyone in this thread who's come out against POSIX shell in one breath is pushing their own shell in the next ;) maybe when those shells start to number their users in the double digits, we can talk.
>easy interactive use
A comfortable interactive shell experience is a good thing, and has nothing to do with POSIX.