(no title)
NullInvictus | 1 year ago
The moment you start asking the user to install things, you’ve opened up the possibility for writing a program rather than a shell script. The lifecycle of a piece of software is almost always one of growing responsibility. This cycle is devastating when it happens to shell scripts. What was once a simple script slowly becomes creaking mass of untestable, poorly understood code playing in the traffic of swimming environments (which grep you got, buddy?).
I guess I’m saying that once you open up the possibility of writing a program, you generally take that option and are usually happier for it. In the “write a program” world, ruby is still good, but it becomes a far harder question to answer whether ruby is still the right choice. There are a lot of languages with a lot of features engineers like.
kqr|1 year ago
pmontra|1 year ago
My scripting language is bash in at least 99% of cases. I used to program in Perl when I need some complex logic. I stopped using it some 10 or 15 years ago when I switched to Ruby for two reasons: I became more familiar with it than with Perl and it's easier to manage data structures whenever I need something complex or classes. That doesn't happen often in scripts but as I wrote, I use bash for all the normal stuff.
I use Python for the scripts that start an HTTP server because it has the http.server module in the standard lib and it's very simple to write handlers for GET, POST and all the other HTTP verbs. The last example was a script to test callbacks from an API. I just implemented two POST and PUT methods that print the request data and return 200 and a {} JSON. I think that to do the same in Ruby I would need to install the webrick gem.
brightball|1 year ago
MaxBarraclough|1 year ago
noisy_boy|1 year ago
petre|1 year ago
pdimitar|1 year ago
True, not true for Ruby, but with Golang and Rust you have an almost-no-dependencies final binary so the argument there does not apply.
> which grep you got, buddy?
For dev machines it's not such a tall order to require `rg` be installed these days.
cozzyd|1 year ago
oopsallmagic|1 year ago
vault|1 year ago
shlant|1 year ago
speleding|1 year ago