The Ruby on Rails Podcast Episode 508: YJIT with Maxime Chevalier-Boisvert
therubyonrailspodcast.com
therubyonrailspodcast.com
It's the basis for YJIT, which has landed big speedups for the C Ruby implementation over the past few years.
Disclosure: I used to work in a team adjacent to Maxime's.
Even if it's for legacy reasons, it seems like podcasts of all things would be the easiest to 301 redirect (the longer url to the shorter).
It might be a bit rough around the edges, since I didn't do any manual editing.
edit: https://railsatscale.com/2023-12-04-ruby-3-3-s-yjit-faster-w...
edit 2: YJIT or truffle these days?
YJIT or TruffleRuby: I'm biased being that I work on YJIT. The nice thing about YJIT is that it's likely to work out of the box, and just be a matter of calling `ruby --yjit` to turn it on. It will probably use a lot less memory than TR, and it's probably more likely to deliver the result you're looking for at this time (speed boost, no hassle).
That being said, for some small or specialized applications, TruffleRuby could deliver much higher peak performance. If you don't restart your server often and you have a lot of memory available, then maybe you don't care about warm-up time or memory usage, and TruffleRuby could be the right tool for you. Feel free to run your own benchmarks and also to blog about the results (though if you do, please share as much details about your setup as possible).
Sometimes I wish I was programming during the RoR hay days. It just seems like a damn fine framework and it's got a real cult (in a good way) following.
Who cares if you can save 10 minutes coding a page if it takes you an hour to figure out what's happening on with that code.
I don't miss it one bit. Yes, you can build things quickly, "rails g scaffold" was quite a tool.
But the level of discipline required to keep a large Rails codebase from turning into spaghetti is not to be underestimated. Plus, because of Ruby's flexibility, a bunch of functionality is sort of "magic pudding" and happens via extension and meta-method sort of things.
This makes things like Ctrl+Click being the source of truth and being able to generate some sort of ERD-diagram in your IDE of everything that touches another thing difficult to implement.
I also don't miss dynamic types in the slightest.
Nowadays, I would rather look at Laravel with Livewire and Alpine.js if you want something Rails-esque. PHP is godawful though.
ctrl+click works great
can write simple Python code and not do anything crazy, works alright. up to around 30k lines I'd probably consider past the "prototype" phase though and would prefer a compiled language.
I have a rant about it: https://bower.sh/on-autoloading
And don't get me started on the footgun that is ActiveRecord callbacks: https://guides.rubyonrails.org/active_record_callbacks.html
Why wouldn't you look at Phoenix LiveView, which inspired Laravel's Livewire, then? Elixir also gives you some other advantages you likely haven't encountered before if you haven't worked with Erlang or Akka.
On the other hand, I'd say Elixir/Phoenix gives you exactly what you want these days and especially with the gradual type system, non-magic database ecto layer etc.
It was a whole new world for me. I had done BASIC, HyperCard, and C up to that point, and the whole idea of a web framework opened up my eyes. JavaScript, with prototype.js, was fascinating.
We didn’t even have database migrations yet, you just wrote your schema as a SQL file.
I moved to Sinatra a few years later, because at the time the “rails way” was really slow for a lot of things. I still use Sinatra to this day. Ruby is by far my favorite language, and sometimes I think it might be a time to get back into rails and see how far things have come.