Live data from Hacker News

Bash 5.0 released

lists.gnu.org

261–270 of 306 posts

Re: Bash 5.0 released

#261

It's sad that lists.gnu.org is running obsolete TLS 1.0 crypto with weak 1024-bit DH. Either upgrade to TLS 1.2 with reasonable cipher suites, or just go back to plain HTTP.

Since I'm clueless on the subject, can I ask how you determined that information and what resource I could use to become better informed?

You can find that information on the security tab of your browser's developer tools. You can also find a lot more info about any site's HTTPS configuration at ssllabs.com. Here's the report for lists.gnu.org: https://www.ssllabs.com/ssltest/analyze.html?d=lists.gnu.org

Re: Bash 5.0 released

#262

It's sad that lists.gnu.org is running obsolete TLS 1.0 crypto with weak 1024-bit DH. Either upgrade to TLS 1.2 with reasonable cipher suites, or just go back to plain HTTP.

Since I'm clueless on the subject, can I ask how you determined that information and what resource I could use to become better informed?

this video might help you [1].

[1]: https://www.youtube.com/watch?v=xA_IBcoQTD4

Re: Bash 5.0 released

#263
post #226

Seeing 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…

Thanks for all the suggestions.

Unfortunately zsh and fish are more bloated than bash, and dash and ksh are missing the features I use.

I've just found "yash" which looks like a nice compromise. I'm going to give that a try.

Re: Bash 5.0 released

#264
post #226

Seeing 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…

Okay... no one is making you use Bash. I use it a lot, depend on its features, and I'm glad they are still improving it. I agree it has lots of warts from retaining so much backwards compatibility, but for certain use cases it's still much easier to write (and read) than any "real" programming language, including stuff like Python and Ruby. Since you don't need to deal with those use cases, that's cool. Not sure why you came here to trash it, though.

Re: Bash 5.0 released

#265
post #226

Seeing 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…

"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."

I would also love to know the answer to this question. I am a big fan of shells and shell programming in general and POSIX shell in particular.

Only suggestion I currently have is ksh, of which there are a few implementations, ksh93 still developed (https://github.com/att/ast), pdksh from OpenBSD (of which there is a portable version here: https://github.com/ibara/oksh) and MirBSD ksh (https://www.mirbsd.org/mksh.htm).

Otherwise of interest is mrsh: https://github.com/emersion/mrsh which was recently mentioned by Drew DeVault in a blog post linked here: https://news.ycombinator.com/item?id=18777909.

EDIT: And by mentioning mrsh, I meant it as a better/easier base to extend to get what you are asking for.

Re: Bash 5.0 released

#266
post #226

Seeing 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…

Don’t hate me for saying this but try powershell or pwsh

Re: Bash 5.0 released

#267
post #143
post #84

With this release, bash now has three built-in variables (um, I mean "parameters") whose values are updated every time they're read: $RANDOM yields a random integer in the range 0..32767. (This feature was already there.) $EPOCHSECONDS yields the whole number of seconds since the epoch. $EPOCHREALTIME yields the number of seconds since the epoch with microsecond precision. I'm thinking of a new shell feature that wou…

You can already do this interactively with PROMPT_COMMAND, e.g. PROMPT_COMMAND='date=$(date +%D);time=$(date +%T)'

Not quite - that is run before your prompt is displayed.

  $ PROMPT_COMMAND='time=$(date +%T)'
  $ echo $time;date +%T
  12:19:07
  12:20:19
Thus it will show the time after your last command returned rather than the current time.

Re: Bash 5.0 released

#268
post #263
post #226

Seeing 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…

Thanks for all the suggestions. Unfortunately zsh and fish are more bloated than bash, and dash and ksh are missing the features I use. I've just found "yash" which looks like a nice compromise. I'm going to give that a try.

If I may humbly ask, what is your definition of bloated? Bloated in technical sense that the software does not operate within your determined hardware constraints (valid!) or the philosophical sense that it has more features than your needs (also valid of course)?

Re: Bash 5.0 released

#269
post #41

Earlier quoted context omitted.

A more syntactically friendly Haskell-like language

How would you deal with mutable state like, say, the current directory?

I think that if we use purish FP as our system language it doesn't make sense to just emulate imperative/mutable system.

But mm... why you would want to mutable state like current directory in first place? Or even mutable filesystem? Why aren't those just immutable parameters of your program?

Re: Bash 5.0 released

#270
post #201

Earlier quoted context omitted.

It seems like this would eliminate the need to read a file from disk and fork a new process, both of which take time. If you're just removing a single file, this is probably negligible, but if you have a script iterating over 10k files, i.e., this speed-up may be more welcome.

True, but if you are iterating over 10k files and removing them, then a find|xargs pipe with xargs feeding rm the maximum number of parameters the kernel allows per fork will likely be faster than a bash interpreter loop, even with a bash builtin rm.

You think find|xargs would be faster than (gnu) find -delete?
Post reply on HN