5 ms·
I'm mostly in concordance, but one thing I think every scripting language got wrong is how painful it is to run external binaries. Sure it can be done but it co
by riddley 3y ago
I'm mostly in concordance, but one thing I think every scripting language got wrong is how painful it is to run external binaries. Sure it can be done but it could be as easy as a shell script.
- forrestthewoods 3y agoAgreed. That said, stdout/stderr is such a bloody, inconsistent nightmare. I’m not totally convinced that “chain small binary programs together” is better than “one language with useful libraries”. Bash is admittedly nice for small things. But it always spirals out of control. And rarely gets ported. Also my life is primarily Windows and if you want everything to “just work” across mac/linux/win it’s easier to just use Python or sometimes even Rust. I often wish I could easily write and run single-file rust scripts.
- wazbug 3y agoRuby is nice in this regard though :-) x = `git --version` puts(x) #=> "git version 2.43.0"
- KerrAvon 3y agoRuby is really nice in this regard, in fact — you’re not limited to backticks; you can use any quote delimiters you want.
- riddley 3y agoRuby is nice in every regard :) Most languages have some form of backticks to run an external binary. When I left my original comment I got a phone call in the middle of it and rushed it, sorry about that. What I really meant was having the versatility of the big 3 file descriptors along with return codes, etc. You can use Open3 (in the ruby case) but it's unwieldy compared to, say bash.