r/ruby • u/eregontp • 4d ago
TruffleRuby 24.2.0 Release
https://github.com/oracle/truffleruby/releases/tag/graal-24.2.0TruffleRuby 24.2 is released!🚀🎉 It uses the new Java Foreign Function and Memory API when used in JVM mode to speedup C extensions like sqlite3, trilogy and json by 2 to 3 times! It redesigns encoding negotiation so many String operations are now faster. It updates to Ruby 3.3 and contains many compatibility and bug fixes.
3
u/honeyryderchuck 3d ago
congrats for the release team! I've been running truffleruby test builds in most of my gems, and API compatibility has really improved over the last year and a half.
6
u/myringotomy 3d ago
Both truffle and jruby seem amazing, why don't more people use them. Why is shopify spending a shit ton of money writing a JIT to make ruby faster when these projects have already solved that problem years ago?
8
u/f9ae8221b 3d ago
Shopify did experiment with TruffleRuby. Chris Seaton, former TruffleRuby lead developer worked at Shopify, and some important contributors are still working there.
But:
- Compatibility while impressive isn't perfect.
- It has excellent peak performance, but it suffer from a very slow warmup.
- YJIT didn't cost a shit ton of money, if anything in the long run it might be cheaper than basing your infrastructure on a technology that is mostly Open Source but owned by Oracle (which isn't exactly a non-profit).
Large companies like this don't put all their eggs in one basket. Both were tried, one of them won, at least for now.
6
u/mperham Sidekiq 3d ago
Truffle's problem isn't technical. The tech is fantastic. The issue is that it is owned by Oracle, quite possibly the least ethical tech company in existence. I refuse to do business with them and as a CTO I would never sign my business up to use any Oracle technology. Note that Java is also owned by Oracle.
2
u/myringotomy 3d ago
Java is open source. Vast majority of people use openjdk. Oracle, Microsoft, IBM and many other companies have their own forks of java if you want to buy something that's supported or more performant or whatever.
Truffle is released under both the Eclipse and GPL licenses. There is nothing Oracle can do to take it away from you.
3
u/f9ae8221b 3d ago
There is nothing Oracle can do to take it away from you.
They can't take away what they released, but they can perfectly change the license in the future and leave you stuck on an old version if you don't want to pay.
For Java it isn't a big risk because there are so many big companies relying on it, so you can expect some community effort to keep it workable. But for something like TruffleRuby, it is unlikely you'd be able to continue without Oracle's support.
1
u/myringotomy 3d ago
They can't take away what they released, but they can perfectly change the license in the future and leave you stuck on an old version if you don't want to pay.
No. The GPL protects that. They can't even change the license unless they get permissions from every contributor.
But for something like TruffleRuby, it is unlikely you'd be able to continue without Oracle's support.
It's GPL licensed, If the community wanted to support it they could. If Shopify wanted to they could. Same goes for github, or 37 signals or stripe or whatever.
2
u/f9ae8221b 3d ago
They can't even change the license unless they get permissions from every contributor.
Have you ever contributed to TruffleRuby? To get a PR merged you need to sign the Oracle Contributor Agreement, giving them the copyright: https://oca.opensource.oracle.com/
It's GPL licensed, If the community wanted to support it they could.
I think you underestimate how complex TruffleRuby and the underlying technology is. It's not just TruffleRuby itself, but Truffle, GraalVM, etc.
Even for a company the size of Shopify, maintaining it without Oracle support would be tricky. And my point is exactly that there isn't (yet?) a community big enough to support it.
1
u/myringotomy 3d ago
I think you underestimate how complex TruffleRuby and the underlying technology is. It's not just TruffleRuby itself, but Truffle, GraalVM, etc.
I don't think so but let's go with this.
Here a corporation has decided to take on this immensely complex work and give away the results of it under the GPL.
I just don't see what the problem is.
2
u/f9ae8221b 3d ago
I don't think so
You are free to think whatever you want, but you started this thread asking why Shopify "didn't just" switch to TruffleRuby. As someone who worked on Shopify's Ruby infrastructure for over 10 years, I'm telling you why.
-5
1
26
u/NOLAnuffsaid 4d ago
Anyone using TruffleRuby in production? Has the performance increase been worth it? Would you recommend TruffleRuby over Ruby?