Settings

Theme

Ruby 3.3.0-Preview3 Released

ruby-lang.org

68 points by yoelo 2 years ago · 9 comments

Reader

ksec 2 years ago

This is an exciting release. Prism, Lrama and Ruby 3.3 YJIT, is now 2x faster than Ruby 2.5 in RailsBench.

Still unsure about M:N thread scheduler and Ractor.

thowaway91234 2 years ago

Another christmas approaching, another depressing realization that I'll probably be stuck on ruby 2.6.9 and Rails 5 until I change companies.

  • sparker72678 2 years ago

    There are lots of great companies out there running modern Ruby stacks! Throw your name in the hat, see if you get any hits!

  • pjmlp 2 years ago

    Given the Java, .NET, nodejs and C++ versions I get to use at work, I can relate to.

meisel 2 years ago

What benefits does Prism offer over the other parser?

  • norman784 2 years ago

    I'm not too invested in ruby but AFAIK they built a new parser from scratch, that was portable, that means that all the other projects like rubocop, solargraph (or how the ruby lsp is called) and all other ruby implementations can use it, so it will be easier from now on to maintain those projects up to date with the official ruby parser.

    You can read more about the parser I mentioned here (but it seems that is has/hat a different name before?) https://railsatscale.com/2023-06-12-rewriting-the-ruby-parse...

  • wfleming 2 years ago

    It’s disappointing there doesn’t seem to be an easily available blog post or announcement (maybe I just didn’t find it), but the design doc lists a few motivations: https://github.com/ruby/prism/blob/main/docs/design.md

    It looks like there was also a podcast interview last year that touches on the origins of the project: https://topenddevs.com/podcasts/ruby-rogues/episodes/the-new...

    Reading between the lines it looks to me like this is motivated by ripper (the old parser) not being a great fit for tooling around ruby like IDE LSP integrations and such. Ripper isn’t fault tolerant (if the script has a a syntax error you don’t get a partial tree, just an exception); being implemented in ruby enough itself that it kind of depends on ruby which isn’t always convenient for integration (IDEs like vscode make plugins in JS easy, prism comes with node bindings), and maybe being enough of a crufty old code base that maintaining it and fixing those design issues was deemed impracticable.

    Also worth noting if it wasn’t clear I’m pretty sure this parser is not being used or intended to be used for a ruby runtime to actually execute scripts, and that’s not what ripper was for either. This is for tooling that operates on ruby files for other purposes: syntax highlighting, linting, stuff like that.

  • leipert 2 years ago

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection