Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ruby is fantastic for scripting. It has quite a few of the same conveniences that made Perl great for scripting and it's a lot easier (for me at least) to maintain and understand when seeing it months or years later.


Yes, yes yes. I started Ruby because I got a job at a Rails shop. I didn't like it all that much for a while, but then I decided to write a CLI program in Ruby and break out of rails.

I quickly realized nearly everything I didn't like about "ruby" was actually rails. After a couple of years I moved on and don't do rails anymore, but I ruby is still my go to for any script that requires arrays or maps (the point where bash begins to be really painful).

Ruby is the best scripting language ever IMHO*. Ruby one-liners (inherited from Perl tradition) make it plug nicely into a bash script also.

* I haven't tried Julia yet but plan to.


Yep, I agree. Only used it twice years ago for that and as another sibling comment mentions, it is pleasant to use.

How is the startup time though? That's important.


It's about the same as JavaScript:

  > time ruby hello.rb
  Hello, world!
  ruby hello.rb  0.11s user 0.13s system 81% cpu 0.297 total
  > time node hello.js
  Hello, world!
  node hello.js  0.10s user 0.16s system 84% cpu 0.307 total


Yeah, 100-200ms are quite fine in fact.

Maybe I got spoiled by Rust and OCaml that start in the matter of 3-8ms. :D But these Ruby and Node startup times are good.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: