3 ms·
I'd also expand it to "languages/frameworks that I'll never properly learn". I'm not great at remembering specific quirks/pitfalls about secondary languages li
by hobofan 2y ago
I'd also expand it to "languages/frameworks that I'll never properly learn".
I'm not great at remembering specific quirks/pitfalls about secondary languages like e.g. what the specific quoting incantations are to write conditionals in Bash, so I rarely wrote bash scripts for automation in the past. Basically only if that was a common enough task to be worth the effort. Same for processing JSON with jq, or parsing with AWK.
Now with LLMs, I'm creating a lot more bash scripts, and it has gotten so easy that I'll do it for process-documentation more often. E.g. what previously was a more static step-by-step README with instructions is now accompanied with an interactive bash script that takes user input.
- sgarland 2y agoWhile I’ll grant you that LLMs are in fact shockingly good with shell scripts, I also highly recommend shellcheck [0]. You can get it as a treesitter plugin for nvim, and I assume others, so it lints as you write. [0]: https://www.shellcheck.net/ https://www.shellcheck.net/
- jcgrillo 2y agoI was just about to recommend the same, as well as shfmt and shunit, or even all 3 + a build system: https://www.pantsbuild.org/stable/docs/shell https://www.pantsbuild.org/stable/docs/shell
- danielvaughn 2y agoOh god yes, LLM for bash scripting is fantastic. Bash is one of those languages that I simply don't want to learn. Reading it makes my eyes hurt.
- a_wild_dandan 2y agoYou could try zx[1]! I prefer it to Bash scripting. [1] https://github.com/google/zx https://github.com/google/zx
- einpoklum 2y agoYou could, but then your script won't run anywhere except your own system, as opposed to running basically everywhere...
- iwontberude 2y agoBash is a terrible language in so so many ways and I concur that I have no interest in learning its new features going forward. I remember how painfully inadequate it was for actual computation and its data types are non existent. Gross.
- SoftTalker 2y agoYou have to understand the domain in which its intended to be used. Bash scripts are essentially automating what you could do at the command line with utility programs, pipes, redirects, filters, and conditionals. If you're getting very far outside of that scope, bash is probably the wrong tool (though it can be bent to do just about anything if one is determined enough).
- danielvaughn 2y agoI don't know too much about the history, but wasn't this one of the original motivations for Python? Like it was meant to be basically "bash scripting but with better ergonomics", or something like that.
- okwhateverdude 2y agoYou might thinking of Perl. Affectionately known as the swiss army chainsaw of programming languages, it incorporated elements from bash, awk, sed, etc and smushed them together into a language that carried the early Web.
- collyw 2y agoSounds more like Perl. I do miss Perl. It was far nicer than Python as a bash replacement. Python is better for larger projects in my opinion, as Perl is too flexible and expressive.