11 ms·
Wait, shell scripts are "arcane"?
by tarxvf 2y ago
Wait, shell scripts are "arcane"?
- Sharlin 2y agoThey definitely are.
- klysm 2y agoAbsolutely. Anything like bash is not a good language IMO.
- dooglius 2y ago"arcane" is not at all the same thing as "not good", anyone who uses a command line is writing bash
- kelnos 2y ago"Arcane" means "requiring secret or mysterious knowledge". I think there are quite a few features of bash that qualify as arcane. I've been writing shell scripts for decades and I still have to look up how to do certain things often enough. And if you want to write in portable shell, remembering all the rules and things you can and cannot do feels somewhat arcane to me.
- klysm 2y agoSure, but they aren't really writing what I would consider a script/program under typical usage. Obviously that's a fuzzy definition if you start piping things together, but I'm talking more about control flow / parsing argument / etc. Doing that in bash correctly does require arcane knowledge and skills. It is immensely difficult to not shoot yourself in the foot.
- nesarkvechnep 2y agoEverything besides YAML is arcane these days.
- npteljes 2y agoFor sure. It's decades of legacy, many different versions, footguns and caveats everywhere. I personally like to tinker with it, but I also have to look up basic things like "how to write a for loop" or "how to compare numbers" constantly.
- deleted 2y ago[deleted]
- DEADMINCE 2y agoThat doesn't mean shell scripts are arcane, it just means you don't write shell scripts often enough.
- npteljes 2y agoI think it's both.
- DEADMINCE 2y agoIt's not. Shell scripts are still very much actively used and developed.
- klysm 2y agoThat doesn’t make them not arcane
- DEADMINCE 2y agoYes, it does. By definition.
- npteljes 2y agoHere is the usage of arcane that I think is apt when talking about shell scripting: https://www.dictionary.com/browse/arcane https://www.dictionary.com/browse/arcane " known or understood by very few; mysterious; secret; obscure; esoteric " And as an example for something arcane, the Sanskrit language is brought up. I think this is a perfect example to compare with shell scripting. Sanskrit is from an era where it was more common, but nowadays it's usage is more of a specialty. The rules are understood and public, easily accessible technically, but it's hard work to get good at it. Since it has a long history, it has many variants, both over time, and depending on locality. There is a kind of common form of it that people can use for everyday matters, that is much easier than knowing all of the rules and cases. I think it's a good argument that shell scripting is arcane, even by investigating the definition of it. Not to mention that in the original post, it was just postulated that shell scripting is a bit weird, and maybe not the best tool for the job, a kind of a lighthearted jab at the language, and at the practices people sometimes do.