Live data from Hacker News

Ruby 3.4.0

ruby-lang.org

71–80 of 282 posts

Re: Ruby 3.4.0

#71
post #43
post #35

I am liking all the performance improvement goodies on JIT and GC level.

1. Wondering 3.4 JIT performance vs 3.3 JIT on production rails. 2. Also wondering what upside could Ruby / Rails gain on a hypothetical Java Generational ZGC like GC? Or if current GC is even a bottleneck anywhere in most Rails applications.

I would expect some measurable improvement given how object-happy rails programming is. It's not uncommon to see 3 layers of models just wrapping a single variable - "objects that could've been functions". Some kind of tiers like generations or per-request pools would be amazing.

Re: Ruby 3.4.0

#72

What does ruby do well that other languages don't? What is the niche it's trying to fill?

Rails has some very, very good features that make standing up a CRUD app with an administrative backend _very easy_. It's also got a bunch of semi-functional-programming paradigms throughout that make life quite a bit easier when you get used to using them. Honestly, if it had types by default and across all / most of its packages easily (no. Sorbet + Rails is pain, or at least was last I tried), I'd probably recomme…

If you're happy to trade the ecosystem and a bit of compilation speed for types, then Crystal is a perfectly cromulent choice.

Re: Ruby 3.4.0

#73
post #4

Ruby is getting more and more awesome these last few years, especially when it comes to performance. Since 3.3 I've been running all my apps with --yjit, it makes a tremendous difference!

Wait until you hear about TruffleRuby

Re: Ruby 3.4.0

#74

What does ruby do well that other languages don't? What is the niche it's trying to fill?

Being concise and pleasant to work with.

I wouldn't have had this much control of my own environment with another language, so that all of these are pure Ruby:

- My window manager - My shell - My terminal, including the font renderer. - My editor - My desktop manager

That's less than 10k lines of code. I've taken it a bit to the extreme, but I wouldn't have had the time to if I had to fight a more verbose language.

Re: Ruby 3.4.0

#76

Earlier quoted context omitted.

Do you have any evidence that it's been used less and less?

https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...

Trend is not equivalent to usage.

The amount of pushes seem to be steady if you look at Ruby, https://madnight.github.io/githut/#/pushes/2024/1

Just because something is not hyped up or talked about constantly doesn't mean it's dying.

Re: Ruby 3.4.0

#77
post #39
post #10

Shopify strategy aka the story of YJIT If I cannot refactor my services, I shall refactor Ruby instead.

That has been the story of every dynamic language since forever, thankfully the whole AI focus has made JITs finally matter in CPython world as well. Personally I have learnt this lesson back in 2000's, in the age of AOLServer, Vignette, and our own Safelayer product. All based on Apache, IIS and Tcl. We were early adopters of .NET, when it was only available to MSFT Partners and never again, using scripting language…

Hey, I have worked on the Outsystems platform. Developed some applications. Do you work at Outsystems?

Re: Ruby 3.4.0

#78

Earlier quoted context omitted.

Okay: https://octoverse.github.com/2022/top-programming-languages Ruby took a nosedive from 5th "top used" programming language in 2016 to 10th in 2022

Those are relative positions. We can't talk about a "nosedive" from that. It may be the case, but also maybe Ruby was just the slowest growing out of a number of languages growing in popularity. We don't have enough data from there.

> since ruby is a language that is less and less used by many programmers

But this statement from thread starter is about Ruby's relative position.

If Ruby's rank in top-used language ranking drops, then we can say that the language is less used by programmers in the survey pool.

Re: Ruby 3.4.0

#79

Why did NodeJS take off on the backend while Rails was still popular? I'll never understand it.

People say frontend/backend parity, and that’s true, but I also remember there was a time in 2011 or so where single thread/async was this new hot thing.

Nginx was starting to get popular and overtake Apache on installs, and people were enamored with its performance and idea of “no blocking, ever” and “callbacks for everything”, which the nginx codebase sorta takes to the extreme. The c10k problem and all that.

When JavaScript got a good engine in v8, Node was lauded as this way to do what nginx was doing, but automatically and by default: you simply couldn’t write blocking code so waiting on I/O will never bottleneck your incoming connections. Maximum concurrency because your web server could go right back to serving the next request concurrently while any I/O was happening. But no “real” multithreading so you didn’t have to worry about mutexes or anything. I remember being slightly jealous of that as a Rails developer, because webrick/unicorn/etc had a worker pool and every worker could only handle one request at a time, and fixing that could only happen if everything was async, which it basically wasn’t.

JavaScript becoming a popular language in its own right due to frontend was certainly the most important factor, but it wasn’t the only one.

Re: Ruby 3.4.0

#80
post #58

Earlier quoted context omitted.

Google hired all the best JIT engineers and set them to work on v8. If you want better performance you'd have to choose an AOT compiled language.

That seems like a meme from 10 years ago. I don’t think that’s really true anymore is it? I mean Truffle Ruby is as fast as V8 already and MRI yJIT and jRuby are catching up fast. It could also be argued that JVM is the gold standard JIT. I think that shows that Google doesn’t have a monopoly on great JIT engineers.

> Truffle Ruby is as fast as V8 already and MRI yJIT and jRuby are catching up fast

According to which benchmark? At my hand [1], node is ~60% faster than TruffleRuby and over an order of magnitude faster than yjit v3.3.0.

[1] https://github.com/attractivechaos/plb2?tab=readme-ov-file#a...

Post reply on HN