Earlier quoted context omitted.
Yeah, but C-style "for" loops are nice, right ? Still, they really are a syntactic sugar for a "while". The problem is more with a language having fady bits and people using them when they don't make the code clearer, than with syntactic sugar.
Sure, I agree actually - if you are going to have a language that has lots of nice syntax, _let it be built in from the start_. Or only released at major increments, etc etc.
Bash 5.0 released
221–230 of 306 posts
Re: Bash 5.0 released
#222Earlier quoted context omitted.
> Python REPL is an incredibly poor UI for repeated execution of subprocesses Python REPL, even with recent additions of TAB completion, is a poor REPL, period. IPython, on the other hand, offers a much better programming environment than shell while still allowing easy access to most of the things you mention. Example: In [1]: from pathlib import Path In [2]: file = Path("~/.sbclrc").expanduser().read_text() In [3]:…
> In [3]: !echo "$file" | awk '!/^;;/' That's Bash (or at least sh). Which excels at piping the output of programs into other programs, and pay that cost for everything else.
It's actually the same philosophy that shells use: in bash you frequently invoke sed, awk, grep, etc. because it's easier than writing the same directly in the shell. In IPython, you invoke bash to do piping, because it's easier than connecting a host of subprocesses' stdins/stdouts in Python.
So again, there are some things you expect from your shell, and as long as you get those things (no matter how), you can use any REPL as a shell without problems.
[1] because of syntax or lack of library or something like that
Re: Bash 5.0 released
#223Earlier quoted context omitted.
Can you name them? It's not exactly snark. My experience is that almost everyone with strong GPLv3 opinions turns out not to actually object to the terms themselves when discussed in isolation. To head off: it's not the patent grant. Apache 2 has a very similar patent grant and everyone is fine with it.
Eh, is it 2007 again? Hasn't this been discussed to death already? I have little interest to repeat it again; this discussion has been on-going for ten years already (longer if we count GPL vs. BSD discussions, which are roughly similar). Everyone should be familiar with the arguments by now; I trust you're already familiar with mine. I understand that you're well-intentioned, but I find the suggestion that I'm someh…
"There are restrictions!" "What restrictions?" "Everyone knows. It's patronizing to ask me. I won't say."
Re: Bash 5.0 released
#224Earlier quoted context omitted.
That was kind of the idea of Unix. C was just a nicer from Assembly. You might write a performance-sensitive or low-level routine in C, much like you might drop to C when writing a Python library. But the high-level language of the system was the shell. The `dc` executable wasn't just meant to be a user-facing calculator program, it was also meant to be the system's "bignum" library. That was big-picture Unix. The sy…
This makes me think of PowerShell. Individual Cmdlets can be written in PowerShell itself or in any language that compiles to .Net IL, plus one has dire t access to the entire .Net framework.
Re: Bash 5.0 released
#225Earlier quoted context omitted.
It's not as nice, "cat $today" is easier to type than "cat $(today)" and would give better completion, just declared matching variables instead of matching functions, files and executables. On the plus side, TIL the subshell syntax plays well with eval/expand shortcut (ctrl+alt+e).
* "cat $today" is easier to type than "cat $(today)"* Except you should really be in the habit of typing "cat ${today}" ;)
Re: Bash 5.0 released
#226As a scripting language, I loathe it and really don't understand its purpose. I always write shell scripts in POSIX shell for portability reasons. Most of the time I don't need to use any of Bash's features. In cases where advanced features are needed and portability is not a concern, there are other scripting languages much better suited for this (Python, Ruby, etc).
As an interactive shell, the only features I ever use are command history and tab completion. Bash is way too bloated for my use case (it's only a matter of time before the next Shellshock is discovered). Other lightweight shells are missing the couple of interactive features which I do use.
If anyone knows of a shell which meets my criteria of being lightweight but with command history and tab completion (paths, command names and command arguments), I'd really appreciate any suggestions. Otherwise I may have to look into extending dash or something.
Re: Bash 5.0 released
#227Yet macOS is still on 3.2.
brew install bashRe: Bash 5.0 released
#228I can’t imagine what BASH_ARGV0 is for. Can someone more sage supply an example of what problem it solves?
Yes, 2008.
Re: Bash 5.0 released
#229Seeing this release makes me cringe. I've used Bash as an interactive shell for decades but really I'm sick and tired of it. As a scripting language, I loathe it and really don't understand its purpose. I always write shell scripts in POSIX shell for portability reasons. Most of the time I don't need to use any of Bash's features. In cases where advanced features are needed and portability is not a concern, there are…
Re: Bash 5.0 released
#230Earlier quoted context omitted.
Experimenting is not the only way to quantify risk. You can also e.g. have several highly paid lawyers look over the text of the license, and see what each of them had to say. The big players in the industry did just that, and there appears to be a remarkable consensus on it.
The remarkable consensus behind IBM's purchase of Red Hat, you mean? Seems like their highly paid lawyers were down with it. Again, it's just stunning the extent to which this FUD hasn't changed at all over a quarter century.