Live data from Hacker News

Ruby 3.0.0 RC1

ruby-lang.org

131–133 of 133 posts

Re: Ruby 3.0.0 RC1

#131
post #101

Anecdotally, since I got away from Ruby, working on software became way more productive and tolerable. Maybe it was something with the corner of the Ruby world I fell into, but the syntax sugar options and “cleverness” that enabled was maddening to deal with, and permeated that crowd. Code bases with mixed styles are a thing in any language, but the Ruby-ists around me found a way to make one project look like half a…

> Anecdotally, since I got away from Ruby, working on software became way more productive and tolerable. Oddly enough I found myself becoming less productive when I tried Elixir and Phoenix for a bit (compared to Ruby). You could look at code written by 10 people and end up with 10 drastically different looking code bases. Not just the organization of files but the logic behind the functions. It makes it very hard to…

[deleted]

Re: Ruby 3.0.0 RC1

#132
post #130
post #63

Earlier quoted context omitted.

When implementing a JIT I would hope for a much higher speed up than 15%. In comparison: LuaJIT with the JIT switched on runs about five times faster than the most recent PUC Lua interpreter, see http://software.rochus-keller.ch/are-we-fast-yet_lua_results... . Compared to that 15% is nothing.

The JIT efforts for Elixir/Erlang apparently offer 30% speed up, worst case, and while I'm way out of my depth here, apparently it's a relatively 'naive' implementation. I'm very curious why there isn't as much of an improvement for Ruby. Is it something to do with the extreme dynamic nature of the language?

> Is it something to do with the extreme dynamic nature of the language?

Smalltalk/SOM, JavaScript and Lua share the "extreme dynamic nature" but still have much faster JIT implementations. From my reports you can see that V8 (Node) is about ten times and LuaJIT about five times faster than MRI Ruby 3 JIT. Here are some other performance results using the same benchmark suite: https://github.com/smarr/are-we-fast-yet/blob/master/docs/pe.... Also TruffleRuby is reported to perform much better than MRI Ruby JIT (see e.g. https://pragtob.wordpress.com/2020/08/24/the-great-rubykon-b...).

Re: Ruby 3.0.0 RC1

#133
post #129

Earlier quoted context omitted.

I see a lot of Elixir lovers but I just can't wrap my head around a lot of the idioms. Is it bad I much prefer loops to reduce? Also modelling complex domains things just flow better in my brain with OOP, whenever I go to draw things I put them in boxes with as little state as I can. I would love love love to see two people approach the same exact problem with OOP and FP and see the rewards of both. However I really…

FWIW I'm balls-deep into Elixir, pardon my language, and I almost never write recursive functions.

Do you have any tips for people coming from Ruby land on how to model things with a more functional approach? For example I've been watching some of 'On Writing Software Well' series https://www.youtube.com/watch?v=D7zUOtlpUPw by DHH and found it really useful for OOP land.

Also any idea on how StimulusReflex / new Hotwire compares to Phoenix LiveView if you have had a chance to look at it yet?

Post reply on HN