2 ms·
Yeah, but in the modern era, where almost all the ancient Unixes are for all practical purposes dead (you basically have to be an IBM consultant to use AIX, an
by oblio 5y ago
Yeah, but in the modern era, where almost all the ancient Unixes are for all practical purposes dead (you basically have to be an IBM consultant to use AIX, an HP consultant to use HP-UX, an Oracle consultant to use Solaris, *BSDs probably have 0.01% of Linux' usage rate), we live in a Linux mono culture.
99.99% of everything is internet connected and auto-updates. New distro versions come out every 2 years.
There's no real reason why bash couldn't have been evolved into a sane language with sane parsing and with modern constructs. By sane, I mean... read this:
https://www.oilshell.org/blog/ https://www.oilshell.org/blog/
At least these articles:
https://www.oilshell.org/blog/2021/01/why-a-new-shell.html https://www.oilshell.org/blog/2021/01/why-a-new-shell.html (especially this one)
https://www.oilshell.org/blog/2016/10/20.html https://www.oilshell.org/blog/2016/10/20.html
https://www.oilshell.org/blog/2016/10/28.html https://www.oilshell.org/blog/2016/10/28.html
https://www.oilshell.org/blog/2016/11/06.html https://www.oilshell.org/blog/2016/11/06.html
If freaking Javascript could "use strict;" and turn a page, bash could have definitely have done the same.
It's just that there's no real commercial interest and FSF doesn't have the manpower (or desire) to do this.
- JadeNB 5y ago> There's no real reason why bash couldn't have been evolved into a sane language with sane parsing and with modern constructs. By sane, I mean... read this: > https://www.oilshell.org/blog/ https://www.oilshell.org/blog/ I think the point is that, it did evolve, as your link shows—and there are lots of other sane alternative shells, too. The problem isn't that they don't exist; it's getting people to adopt them in sufficient numbers.
- gnubison 5y ago> *BSDs probably have 0.01% of Linux' usage rate Just wanted to point out that Hacker News runs on FreeBSD[0] :) Some people like the BSDs, and would appreciate it if everybody stopped designing for the Linux monoculture (well, monoculture if you disregard Windows and macOS). [0] https://docs.freebsd.org/en/books/handbook/introduction/ https://docs.freebsd.org/en/books/handbook/introduction/
- oblio 5y agoHacker News runs on FreeBSD and Arc, Arc being a super obscure Lisp dialect that I can't imagine being used in production anywhere else (for sure not in a place with a similar visibility or impact). "What HN uses" doesn't say much about tech trends :-) Edit: You probably want to use Netflix as a better example. I think it's used by their CDN layer.
- chubot 5y agoYes 'use strict;' is a great analogy! I mentioned that here with regard to Perl 5: https://www.oilshell.org/blog/2020/07/blog-roadmap.html#the-unix-shell-should-evolve-like-perl-5 https://www.oilshell.org/blog/2020/07/blog-roadmap.html#the-... It turns out that bash's "shopt" can be co-opted for this, and that's exactly what Oil does. For example, after 'shopt --set parse_paren', you can do this: if (x > 0) { # parens are now Python-like expressions, not subshell! echo "$x is positive" } Yes I agree bash could have done this. But the bash codebase is very fragile and things often break. The maintainers are very concerned about breakage. Oil is written in a way to make breakage less likely: with principled parsing and a detailed code representation using algebraic data types. I'm surprised at how much language evolution this style has enabled. It makes me optimistic about the project's future! Although we still tons of work to do with the C++ translation -- writing a shell is hard either way!
- oblio 5y ago> Yes I agree bash could have done this. But the bash codebase is very fragile and things often break. The maintainers are very concerned about breakage. True, but that's not a good reason for such a used application. It has been around for 40 years, I think it literally has trillions of runtime hours. It's used on billions of systems, most likely. It's exactly the place where you'd create a super comprehensive test suite that covers <<everything>> (see SQLite) and then re-architect it to make it robust. I wonder if it's due to lack or money or due to something else.