#truffleruby — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #truffleruby, aggregated by home.social.
-
Ah, #TruffleRuby, the lovechild of an #Oracle internship and a decade-long #PhD ✨. Because nothing screams "cutting-edge" like languishing in academic obscurity until the almighty #Shopify swoops in to sprinkle some e-commerce magic dust 💸. But hey, at least it can outrun JRuby—because that's what we were all waiting for, right? 😏
https://chrisseaton.com/truffleruby/ #eCommerce #JRuby #HackerNews #ngated -
@eregon
EDIT: nevermind. I converted the references but I'm still open to feedback if you have any.do you have any advice for me?
I'm surely doing something wrong.https://github.com/rails/marcel/actions/runs/18431879625/job/52520253962?pr=132
Also I kinda wouldn't have expected a `Polyglot::ForeignException` here but rather something that could be catched easier (maybe a descendent from Ruby's RegexpError).
But I guess there are technical reasons in #TruffleRuby for this. 😉
-
@headius it has been ages that I stumbled over a different handling between #MRI and #JRuby but today it has happened. 😉
EDIT: nevermind. I converted the references but I'm still open to feedback if you have any.
I'm surely doing something wrong, so I'm open in case you have any advice for me.
https://github.com/rails/marcel/actions/runs/18431055272/job/52518425738?pr=132
#TruffleRuby is affected too.
-
OK what the heck am I doing wrong here? RSpec on TruffleRuby is claiming a .to raise_error isn't catching an exception, but it appears that the exception class and message are identical?!
https://github.com/ronin-rb/ronin/actions/runs/11964732630/job/33357548812 -
@postmodern Oops. I just responsed to an issue on ruby-install thinking the OP was talking about #TruffleRuby 24.1.0 when it was actually about 23.1.0. I think my reply may still add some value, as the recent removal of #OpenSSL v1.1 from #Homebrew prevents building ruby-install's notion of the "current" TruffleRuby (reported as 24.1.0) against openssl@3 even when passed build arguments.
Sorry for the misread OP. Hope this helps someone else anyway!
https://github.com/postmodern/ruby-install/issues/469#issuecomment-2455276011
-
@lepidotos I personally have no interest in learning #RustLang, but I think it's a well designed language and is already being relied on by #TruffleRuby on other system tools. While it shouldn't drive your decision, I think there's a bigger community and ecosystem around it, and it won't leave you in a low-eyeball ghetto the way more niche languages often do. YMMV.
-
Ah, nothing like posting on #StackOverflow to toughen up one's sense of self! I typically only answer the tricky questions there, so dealing with criticism of minor oversights, off-by-ones, and conversion errors are part of the fun. Ever try converting µs to femtoseconds when #benchmarking iterations on large data sets? Less fun than you think!
On the other hand, #TruffleRuby for the performance win. 900% faster for this use case than #CRuby, even with #YJIT.
-
@super @truffleruby @eregon That's a really good question! My guess is most pure #RubyLang #RubyGems will work out of the box, but anything with #FFI native extensions might still have issues because it's fundamentally a different #RUBY_ENGINE. #JRuby and others have the same problem, so I don't think that's specific to #TruffleRuby, but maybe there's a plan to solve for that.
-
@truffleruby I've been pretty impressed with the performance of #TruffleRuby. 100% support of core #RubyLang specs makes it even more compelling.
I need to re-read the license, though. I've avoided it for certain projects because I was under the impression it was under an Oracle license, but would love to be wrong so I can use it more broadly!
-
Ugh, somehow getting "already activated stringio" errors in the bundler-audit CLI tests under truffleruby *in* GitHub Actions.
https://github.com/rubysec/bundler-audit/actions/runs/7344864330/job/19997235253
#truffleruby -
@ervan Without changing your actual #RSpec or #CI setup, you can create multiple #Rake tasks to run specific tags or spec files. Then use #gnuparallel (or `parallel` from #moreutils) to run the tasks on multiple CPUs or cores. For GNU, see the `-j`, `--use-cores-instead-of-threads`, and `--use-sockets-instead-of-threads` flags.
You can also use subshells or background tasks for OS allocation in #bash, #zsh, or #fish. Also, consider threading without a GIL on #TruffleRuby.
-
Released ruby-install 0.9.2, primarily for TruffleRuby 23.1.0 support.
https://github.com/postmodern/ruby-install/releases/tag/v0.9.2
https://github.com/postmodern/ruby-install#readme
#ruby #ruby_install #truffleruby -
@ruby_discussions As much as I dislike promoting anything #Java or Oracle related, I have to say that a lot of my #RubyLang code (so long as it doesn't require forking) runs ~1 gazillion times faster on #TruffleRuby than #CRuby even with #YJIT enabled. It's now my default for certain types of performance-oriented code, especially for threading.
-
If you're trying to update the #OpenSSL gem on #macOS for #TruffleRuby, you may need this to link with OpenSSLv3's #libssl library:
```bash
OPENSSL_PREFIX="$(brew --prefix openssl@3)" gem update openssl
```Just replace "@3" with "@1.1" if you prefer OpenSSLv1.1 for whatever reason. Meanwhile, #CRuby still doesn't compile against v3 for me, but YMMV.
-
@rahoulb I like #CrystalLang a lot, but periodically find things that just inexplicably don't work. I was answering a silly SO question and couldn't get it to even do 5 billion loops without an IntegerOverflow exception even with BigInt, but managed to increment a value 5B times in 49 seconds with #TruffleRuby without issues.
Crystal is a great language, but there are areas where its "Crystal Isn't Ruby" motto is on full display. I still prefer it to #GoLang, though!
-
Released ruby-install 0.9.1, which adds support for installing TruffleRuby 23.0.0 and other various bug fixes.
https://github.com/postmodern/ruby-install/releases/tag/v0.9.1
#rubyinstall #truffleruby #ruby -
Hey #mastodon - reading https://github.com/mastodon/mastodon/issues/20467 has me intrigued (running Mastodon on #TruffleRuby and the #jvm
Does anyone have any more details on that?
-
CW: Java and The Mastodon
Just spotted #TruffleRuby out in the wild mentioned - and it's here within Mastodon! https://github.com/mastodon/mastodon/issues/20467#issuecomment-1312316065 - I'd almost forgotten about #Truffle but would be cool seeing #Java and the JVM offering up optimized instances.
-
Question for people with experience with #TruffleRuby: can you compile a program (a gem basically) to a standalone executable that includes all the dependencies for easier distribution? Before I continue rewriting my #kubernetes installer to #crystal I want to know if this could be a quicker option for me since I would stay with #ruby. All I want is to offer standalone executables so users don’t need to set up a Ruby environment or use #Docker, which is currently the only alternative.
-
@eregon @graalvm Nice! I've never come across #TruffleRuby before. I've been messing around with deep learning stuff, and thinking through how I can deploy models in Python (once the model is trained you can kinda treat it as a regular method).
I was thinking of calling out to a Python webserver from an Rails app.
Maybe with #TruffleRuby I could bundle it in one app?
-
Today I tried to run #Mastodon on #TruffleRuby and it just worked as a drop-in replacement! 🚀
No Gemfile/app changes needed.
I only had to fix one small bug in rb_thread_fd_select() used by hiredis and a one-line change in the Puma config! cc @graalvm -
@postmodern CRuby copies because it wants to keep it \0-terminated. #TruffleRuby doesn't copy :)