re: My First 12 hours with Ruby VIEW POST

FULL DISCUSSION
 

Ruby 2.6 lags behind PHP 7.4.3 in all but the binary Tree test

These benchmarks make zero sense at all (unless the difference is orders of magnitude.) The bottleneck is always our code, not the language/framework.

Rails / Sinatra are very opinionated

Try Hanami.

have you used Ruby for an extensive amount of time?

I am a Ruby professional, listed in the hall of fame on Stack Overflow and I could not be happier when I migrated from Ruby to Erlang and then to Elixir. Although I still sorta like Ruby.

 
 

Which three languages? Elixir is definitely [opinionated] better than Ruby by all means.

Elixir, Erlang, and Ruby. I assumed based on your comment that you enjoyed some aspect of each one. If that’s the case, I’m just curious what those aspects might be.

The main are:

Ruby: DSL, metaprogramming abilities in general, method chaining and how enumerables are designed.
Erlang: simplicity, how VM and OTP are designed, ease of concurrency, hot code reload, messages as the process intercommunication.
Elixir: better metaprogramming abilities than in Ruby, more concise syntax than Erlang, plus all the above—the best from both languages.

 

It often takes tens or hundreds of hours to produce code. Ruby's big advantage is that you can write less code and get more done, it's very programmer friendly. Even if the resulting code wasn't as "fast" as alternatives, you get it working sooner and can start optimizing as necessary.

The power of Ruby's data manipulation methods like Enumerable is considerable and you can often solve difficult problems by chaining together a few of those methods with a tiny bit of glue.

Since computers are stupid fast today it's rarely necessary to get too aggressive with optimization. You can throw hardware at the problem until hardware itself becomes expensive. It's not worth spending a month shaving 5% off your runtime if you're running it on a $5/mo. server. You gain nothing. It might make sense if you can run on 25 servers instead of 40.

 

Thank you for the perspective Aleksei, I will give Hanami a look.

 

Ah, Hanami! I knew there was a non-opinionated framework for Ruby, but the name just won't come to me. :-)

code of conduct - report abuse