Ruby 3.3 Makes Prism Parser Default
Written by Kay Ewbank   
Thursday, 28 December 2023

Ruby 3.3 is now at release candidate stage, with improvements including a new parser named Prism, the use of Lrama as a parser generator, and a new pure-Ruby JIT compiler named RJIT.

Ruby is a high-level language drawing on elements of Perl, Smalltalk, Eiffel, Ada, and Lisp and supporting multiple programming concepts to balance functional, dynamic and object oriented programming. Fans say it is fun to use as well as useful.

rubylogo2a

The first main change to this version is the introduction of the Prism parser as a default gem. Prism is a portable, error tolerant, and maintainable recursive descent parser for the Ruby language. It is production ready and actively maintained, and can be used in place of Ripper. Prism is both a C library that will be used internally by CRuby and a Ruby gem that can be used by any tooling which needs to parse Ruby code.

The second change involves the use of Lrama instead of Bison. Lrama is an LALR (look-ahead, left-to-right, rightmost derivation) parser generator written by Ruby. It has been introduced with the goal of providing an error-tolerant parser for CRuby with minimal changes on the CRuby parse.y file.

This version also introduces a pure-Ruby JIT compiler, RJIT, which replaces MJIT. RJIT supports only x86-64 architecture on Unix platforms, and unlike MJIT, it doesn't require a C compiler at runtime. At the moment, RJIT is purely experimental and developers should continue using YJIT in production.

Meanwhile, YJIT has been revamped with major performance improvements and better memory use compared to the version included in 3.2.

Ruby 3.3 release candidate is available now.

rubylogo2a

More Information

Ruby Official Site

Related Articles

Ruby 3.2 Adds WebAssembly Support

Ruby 3.1 Adds In-Process JIT Compiler

Ruby 3 Released Offering Three Times Better Performance

Ruby On Rails 7 Moves To No-Node Default

Fukuoka Ruby Award 2021 Prestigious Ruby Prize

Ruby 2.6 Adds JIT Compiler

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


GitHub Announces Open Source Security Fund
03/12/2024

A new security-focused program, the GitHub Secure Open Source Fund, will invest $1.25M across 125 open source projects. The project is backed by the support of organizations including American Express [ ... ]



Meta Releases OpenSource Podcast Generating Tool
28/11/2024

Meta has released an open source project that can be used to automatically convert a PDF file into a podcast. Meta says Notebook Llama can be considered an open-source version of Google's NotebookLM.

 [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info