News for hackers. Stuff that matters.
Re:Ask HN: Let's build Checkstyle for Bash? by amelius on Sunday February 20, 2022 @08:15AM (#30405424)
The niche is installer scripts. Because there is one certainty: Bash is available everywhere.
Re:Ask HN: Let's build Checkstyle for Bash? by fjorde on Sunday February 20, 2022 @08:54AM (#30405679)
zinekeller's point notwithstanding, i agree that "installer scripts" is really the last necessary domain of the bash script. If you need a (semi)portable script to get `python` to run your python script, you can't use python, obviously.

Things like docker images and nix builds are sold as huge improvements on this chicken-egg problem, at least from a "keep it all in one language" perspective, but only if you consider a docker script (mostly bash) or a nix config truly not the same thing as a shell script that more or less initiates the same environment.

docker/nix abstraction layers have advantages but aren't always as portable as a shell script. If you need a docker engine, I think you'll still need a bash script to install that...

Nix is possibly even more "single command", often just a curl if i'm not mistaken, but still requires config and shipping a build somewhere, and you still need to run the `curl` command in a shell somehow. i don't see how "just use python" will ever fix the init chicken-egg problem.

Re:Ask HN: Let's build Checkstyle for Bash? by zinekeller on Sunday February 20, 2022 @08:22AM (#30405472)
> Bash is available everywhere

POSIX mistake number 1: Bash isn't available everywhere, even when restricted to Linux. Even Debian avoids bash for a good reason (Bash is slower than most POSIX shell implementations), although it's installed by default for convenience.

Re:Ask HN: Let's build Checkstyle for Bash? by drran on Sunday February 20, 2022 @09:01AM (#30405732)
> Even [on] Debian ... it's installed by default for convenience.

:-/