Hacker News new | ask | show | jobs
by chris12321 487 days ago
Between Rails At Scale and byroot's blogs, it's currently a fantastic time to be interested in in-depth discussions around Ruby internals and performance! And with all the recent improvements in Ruby and Rails, it's a great time to be a Rubyist in general!
1 comments

Is it? To me it seems like Ruby is declining [1]. It's still popular for a specific niche of applications, but to me it seems like it's well past its days of glory. Recent improvements are nice, but is a JIT really that exciting technologically in 2025?

[1]: https://www.tiobe.com/tiobe-index/ruby/

Ruby will probably never again be the most popular language in the world, and it doesn't need to be for the people who enjoy it to be excited about the recent improvements in performance, documentation, tooling, ecosystem, and community.
I think ruby can get popular again with the sort of contrarian things Rails is doing like helping developers exit Cloud.

There isn’t really a much more productive web dev setup than Rails + your favorite LLM tool. Will take time to earn Gen Z back to Rails though and away from Python/TS or Go/Rust.

My impression is that a Rails app is an unmaintainable dynamically-typed ball of mud that might give you the fast upfront development to get to a market or get funded but will quickly fall apart at scale, e.g. Twitter fail whale. And Ruby is too full of "magic" that quickly makes it too hard to tell what's going on or accidentally make something grossly inefficient if you don't understand the magic, which defeats the point of the convenience. Is this perception outdated, and if so what changed?
If the the Twitter fail whale is your concern, then your perception is outdated. Twitter started moving off Ruby in 2009. Both the CRuby VM and Rails have seen extensive development during that decade and a half.

I never worked at Twitter, but based on the timeline it seems very likely they were running on the old Ruby 1.8.x line, which was a pure AST interpreter. The VM is now a bytecode interpreter that has been optimized over the intervening years. The GC is considerably more robust. There's a very fast JIT compiler included. Many libraries have been optimized and bugs squashed.

If your concern is Rails, please note that also has seen ongoing development and is more performant, more robust, and I'd say better architected. I'm not even sure it was thread-safe when Twitter was running on it.

You don't have to like Ruby or Rails, but you're really working off old data. I'm sure there's a breaking point in there somewhere, but I very much doubt most apps will hit in before going bust.

The CRuby VM, or the CRuby interpreter alone is at least 2-3x faster since Fail Whale time. And JIT doubles that to 4 - 6x. Rails itself also gotten 1.5x to 2x faster.

And then you have CPU that is 20 - 30x faster compared to 2009. SSD that is 100x - 1000x faster, Database that is much more battle tested and far easier to scale.

Sometimes I wonder, may be we could remake twitter with Rails again to see how well it goes.

Rails can become a ball of mud as much as any other framework can.

It's not the fastest language, but it's faster than a lot of dynamic languages. Other than the lack of native types, you can manage pretty large rails apps easily. Chime, Stripe, and Shopify all use RoR and they all have very complex, high-scale financial systems.

The strength of your tool is limited to the person who uses the tool.

The unrefactorable ball of mud problem is real, which is why both Stripe and Shopify have highly statically typed code bases (via Sorbet).

Btw Stripe uses Ruby, but not Rails.

it's faster than python in some tests that i've seen.
> Rails can become a ball of mud as much as any other framework can.

...but rails can fit this dysfunction on a single slide ;)

> It's not the fastest language, but it's faster than a lot of dynamic languages.

Such as?

IME Ruby consistently fall behind, often way behind, nearly all popular languages in "benchmark battles".

Twitter fail whale was more skill issue that Rails shortcomings. If you read the book Hatching Twitter, you'll know quickly they weren't great at code
This is actually pretty accurate, except ruby is just slower, not randomly fragile at scale.
It never was "the most popular language in the world".

Rails maybe was popular in the US at some point but it was always niche in the rest of the world.

Was it ever
There was a cycle in 2012 or so. I reckon PHP has more lines of code deployed.

But C?

Rails is experiencing something of a renaissance in recent years. It’s easily one of the most pleasant programming experiences I’ve had in years.

All my new projects will be Rails. (What about projects that don’t lend themselves to Rails? I don’t take on such projects ;)

Hmm I thought Crystal was suppose to be faster Ruby? No?
No one uses Ruby because it is fast. They use it because it is an ergonomic language with a battle-tested package for every webserver based activity you can code up.
> No one uses Ruby because it is fast.

Well, because it isn't.

Crystal is an ergonomic language, too, looking a lot like Ruby even beyond a cursory glance. What Ruby has, like any longstanding language, is a large number of packages to help development along, so languages like Crystal have to do a lot of catching up. Looking at the large number of abandoned gems though, I'm not sure it's that big a difference, the most important ones could be targeted.

I'm not sure that has any relevance when compared with Python or JS or Go though, they seem to have thriving ecosystems too - is Rails really that much better than the alternatives? I wouldn't know but I highly doubt it.

> is Rails really that much better than the alternatives?

I really think so. I've _looked_. I've tried all sorts of other web frameworks. And, admittedly, I am most familiar with Rails, so I'm maybe a bit biased. But it's hard to find anything that comes particularly close to the productivity of using Rails. The tooling's great, the ecosystem is great, it's organized well, the documentation is good. It's just... really a pleasant experience to use.

Elixir's Phoenix comes pretty close, as does PHP's Laravel, imo. Special shout out for Rust's Loco, too, which is relatively new, but looking potentially promising.

I recommend giving Rails an open-minded tire kicking. I think you'll be surprised by how quickly you can get going.

I am still hoping once Crystal stabilise on Windows ( Currently it still feels very much beta ). They could work on making compiling speed faster and incremental compiling.
> Crystal was suppose to be faster Ruby

No, it never intended to be a replacement to Ruby. They share similarities in syntax, the same way Elixirs syntax reminds you of Ruby.

If you want faster Ruby, check out MRuby (not always an drop-in replacement though).

Stable mature technology trumps glory.
That’s why the JVM has been using JITs since 1993 while it’s a renaissance inspiring marvel for Ruby in 2025.
Unfortunately it is, because too many folks still reach out to pure interpreted languages for full blown applications, instead of plain OS and application scripting tasks.