(no title)
HackerThemAll | 4 days ago
What should be the syntax according to contemporary IT people? JSON? YAML? Or just LLM prompt?
HackerThemAll | 4 days ago
What should be the syntax according to contemporary IT people? JSON? YAML? Or just LLM prompt?
bigstrat2003|4 days ago
murphyslaw|4 days ago
ifh-hn|4 days ago
sigwinch|4 days ago
mjevans|4 days ago
nazgul17|4 days ago
Why is there a 2 on the left, when the numbers are usually on the right. What's the relationship between 2 and 1? Is the 2 for std err? Is that `&` to mean "reference"? The fact you only grok it if you know POSIX sys calls means it's far from self explanatory. And given the proportion of people that know POSIX sys calls among those that use Bash, I think it's a bit of an elitist syntax.
stephenr|4 days ago
If your complaint is "I don't know what this syntax means without reading the manual" I'd like to point you to any contemporary language that has things like arrow functions, or operator overloading, or magic methods, or monkey patching.
marxisttemp|3 days ago
xeonmc|4 days ago
amelius|4 days ago
Normal_gaussian|4 days ago
Python doesn't really have much that makes it a sensible choice for scripting.
Its got some basic data structures and a std-lib, but it comes at a non-trivial performance cost, a massive barrier to getting out of the single thread, and non-trivial overhead when managing downstream processes. It doesn't protect you from any runtime errors (no types, no compile checks). And I wouldn't call python in practice particularly portable...
Laughably, NodeJS is genuinely a better choice - while you don't get multithreading easily, at least you aren't trivially blocked on IO. NodeJS also has pretty great compatibility for portability; and can be easily compiled/transformed to get your types and compile checks if you want. I'd still rather avoid managing downstream processes with it - but at least you know your JSON parsing and manipulation is trivial.
Go is my goto when I'm reaching for more; but (ba)sh is king. You're scripting on the shell because you're mainly gluing other processes together, and this is what (ba)sh is designed to do. There is a learning curve, and there are footguns.