logoalt Hacker News

mike_hearn • today at 6:26 PM • 2 replies • view on HN

Well, for people who love Ruby and prefer reading it to Rust (which is, let's face it, not a hard preference to have) then that seems a good enough reason to want to continue using it.

The performance issues here seem kind of a distraction. There is TruffleRuby and JRuby, which has been able to run Rails for a long time. If you want something faster than plain old Rails+MRI you don't need to rewrite everything in Rust to get it. You can get something nearly as good, while sticking with the Ruby you learned and understand well. And the code will be more token efficient and easier to review, as it'll be higher level.

It's always surprised me that language communities around Ruby and Python were never more concerned about their vulnerability on the performance front. So much great work has been done on alternative JVM based implementations, they were mostly ignored, and now well known advocates of those languages are openly arguing to rewrite everything in Rust just to get better performance - despite the large downsides of doing so. That was a huge missed opportunity and strategic misstep, IMO.


Replies

julik • today at 6:48 PM

True, and there is also Crystal which is - in a few aspects - better than Go even, and has way more pleasant aesthetics.

The way the JVM didn't take off doesn't surprise me because Sun and Oracle have bodged it so bad, and because there were legitimate issues using the JVM when your project was small. I can't shake the feeling that to this day, even the coveted JetBrains products still fill like Swing. Indents are ugly, widgets are ugly, window refresh takes 3-4 refresh frames instead of 0, font rendering is just-not-quite-good-enough... and that does stick.

Also, the Java community was not necessarily receptive to progress - mostly because so much stuff depends on it (including very highly paid, senior carreers). They mostly went "The JVM is great for developing your own toy language, go have at it" but it would always be the-actual-Java interop. For example, my adventures with Clojure ended very abruptly because I simply do not know Java well enough to feel comfortable when I get a NullPointerException.

Which I obviously did get on my second line of REPL input.

sanderjd • today at 6:49 PM

Yeah I think the strongest argument is definitely "to each their own"! I was more exploring my own personal thoughts about the readability thing. I think I don't care enough or see a big enough win for ruby for me personally. But I think it's very reasonable for other people to feel the opposite, for sure.

On the jvm for performance thing... My big frustration with rails was always more about memory usage than compute performance (web app backends don't tend to do much compute!), and at least back when I was looking into it (a long time ago now!), the jvm implementations didn't help or actually actively hindered the effort to rein in memory usage. Also, and I think somewhat related (it takes time to write all that memory), I felt like long startup times made it so that we had to over-provision servers instead of being able to spin things up more on demand. This also isn't fixed by the jvm.

In general, rust and go feel like a breath of fresh air to me, operationally, because of much tighter memory overhead and fast startup. Maybe I could use the amazing ai tools we have now to solve those problems in ruby (or more likely for me personally at this point, python), but it feels like a very tall order when we already have languages that have taken this side of the various tradeoffs, from the start.

But again, I do recognize that this is totally my own personal analysis and others can very reasonably differ!