home.social

#truffleruby — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #truffleruby, aggregated by home.social.

fetched live
  1. 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? 😏
    chrisseaton.com/truffleruby/ #eCommerce #JRuby #HackerNews #ngated

  2. @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.

    github.com/rails/marcel/action

    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. 😉

  3. @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.

    github.com/rails/marcel/action

    #TruffleRuby is affected too.

  4. 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?!
    github.com/ronin-rb/ronin/acti

    #truffleruby

  5. @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!

    github.com/postmodern/ruby-ins

  6. @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.

  7. 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.

    stackoverflow.com/a/78263220/1

  8. @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.

  9. @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!

  10. Ugh, somehow getting "already activated stringio" errors in the bundler-audit CLI tests under truffleruby *in* GitHub Actions.
    github.com/rubysec/bundler-aud
    #truffleruby

  11. @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.

  12. @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.

  13. 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.

  14. @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!

  15. Released ruby-install 0.9.1, which adds support for installing TruffleRuby 23.0.0 and other various bug fixes.
    github.com/postmodern/ruby-ins
    #rubyinstall #truffleruby #ruby

  16. Hey #mastodon - reading github.com/mastodon/mastodon/i has me intrigued (running Mastodon on #TruffleRuby and the #jvm

    Does anyone have any more details on that?

  17. CW: Java and The Mastodon

    Just spotted #TruffleRuby out in the wild mentioned - and it's here within Mastodon! github.com/mastodon/mastodon/i - I'd almost forgotten about #Truffle but would be cool seeing #Java and the JVM offering up optimized instances.

  18. 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.

  19. @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?

  20. 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

  21. @postmodern CRuby copies because it wants to keep it \0-terminated. #TruffleRuby doesn't copy :)