♊️ GemiNews 🗞️
🏡
📰 Articles
🏷️ Tags
🧠 Queries
📈 Graphs
☁️ Stats
💁🏻 Assistant
Demo 1: Embeddings + Recommendation
Demo 2: Bella RAGa
Demo 3: NewRetriever
Demo 4: Assistant function calling
Editing article
Title
Summary
<p>We are pleased to announce the release of Ruby 3.3.0-rc1. Ruby 3.3 adds a new parser named Prism, uses Lrama as a parser generator, adds a new pure-Ruby JIT compiler named RJIT, and many performance improvements especially YJIT.</p> <p>After the release of RC1, we will avoid introducing ABI incompatibilities wherever possible. If we need to do, we’ll announce it in the release note.</p> <h2>Prism</h2> <ul> <li>Introduced <a href="https://github.com/ruby/prism">the Prism parser</a> as a default gem <ul> <li>Prism is a portable, error tolerant, and maintainable recursive descent parser for the Ruby language</li> </ul> </li> <li>Prism is production ready and actively maintained, you can use it in place of Ripper <ul> <li>There is <a href="https://ruby.github.io/prism/">extensive documentation</a> on how to use Prism</li> <li>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</li> <li>Notable methods in the Prism API are: <ul> <li><code class="language-plaintext highlighter-rouge">Prism.parse(source)</code> which returns the AST as part of a ParseResult</li> <li><code class="language-plaintext highlighter-rouge">Prism.dump(source)</code> which returns the serialized AST as a String</li> <li><code class="language-plaintext highlighter-rouge">Prism.parse_comments(source)</code> which returns the comments</li> </ul> </li> </ul> </li> <li>You can make pull requests or issues directly on <a href="https://github.com/ruby/prism">the Prism repository</a> if you are interested in contributing</li> </ul> <h2>Use Lrama instead of Bison</h2> <ul> <li>Replace Bison with <a href="https://github.com/ruby/lrama">Lrama LALR parser generator</a> <a href="https://bugs.ruby-lang.org/issues/19637">Feature #19637</a> <ul> <li>If you have interest, please see <a href="https://rubykaigi.org/2023/presentations/spikeolaf.html">The future vision of Ruby Parser</a></li> <li>Lrama internal parser is replaced with LR parser generated by Racc for maintainability</li> <li>Parameterizing Rules <code class="language-plaintext highlighter-rouge">(?, *, +)</code> are supported, it will be used in Ruby parse.y</li> </ul> </li> </ul> <h2>RJIT</h2> <ul> <li>Introduced a pure-Ruby JIT compiler RJIT and replaced MJIT. <ul> <li>RJIT supports only x86-64 architecture on Unix platforms.</li> <li>Unlike MJIT, it doesn’t require a C compiler at runtime.</li> </ul> </li> <li>RJIT exists only for experimental purposes. <ul> <li>You should keep using YJIT in production.</li> </ul> </li> <li>If you are interested in developing JIT for Ruby, please check out <a href="https://rubykaigi.org/2023/presentations/k0kubun.html#day3">k0kubun’s presentation on Day 3 of RubyKaigi</a>.</li> </ul> <h2>YJIT</h2> <ul> <li>Major performance improvements over 3.2 <ul> <li>Support for splat and rest arguments has been improved.</li> <li>Registers are allocated for stack operations of the virtual machine.</li> <li>More calls with optional arguments are compiled.</li> <li>Exception handlers are also compiled.</li> <li>Instance variables no longer exit to the interpreter with megamorphic object shapes.</li> <li>Unsupported call types no longer exit to the interpreter.</li> <li><code class="language-plaintext highlighter-rouge">Integer#!=</code>, <code class="language-plaintext highlighter-rouge">String#!=</code>, <code class="language-plaintext highlighter-rouge">Kernel#block_given?</code>, <code class="language-plaintext highlighter-rouge">Kernel#is_a?</code>, <code class="language-plaintext highlighter-rouge">Kernel#instance_of?</code>, <code class="language-plaintext highlighter-rouge">Module#===</code> are specially optimized.</li> <li>Now more than 3x faster than the interpreter on optcarrot!</li> </ul> </li> <li>Significantly improved memory usage over 3.2 <ul> <li>Metadata for compiled code uses a lot less memory.</li> <li>Generate more compact code on ARM64</li> </ul> </li> <li>Compilation speed is now slightly faster than 3.2.</li> <li>Add <code class="language-plaintext highlighter-rouge">RubyVM::YJIT.enable</code> that can enable YJIT at run-time <ul> <li>You can start YJIT without modifying command-line arguments or environment variables.</li> <li>This can also be used to enable YJIT only once your application is done booting. <code class="language-plaintext highlighter-rouge">--yjit-disable</code> can be used if you want to use other YJIT options while disabling YJIT at boot.</li> </ul> </li> <li>Code GC is now disabled by default, and <code class="language-plaintext highlighter-rouge">--yjit-exec-mem-size</code> is treated as a hard limit where compilation of new code stops. <ul> <li>Better copy-on-write behavior on servers using unicorn and forking</li> <li>No sudden drops in performance due to code GC.</li> <li>You can still enable code GC if desired with <code class="language-plaintext highlighter-rouge">--yjit-code-gc</code></li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">ratio_in_yjit</code> stat produced by <code class="language-plaintext highlighter-rouge">--yjit-stats</code> is now available in release builds, a special stats or dev build is no longer required to access most stats.</li> <li>Exit tracing option now supports sampling <ul> <li><code class="language-plaintext highlighter-rouge">--trace-exits-sample-rate=N</code></li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">--yjit-perf</code> is added to facilitate profiling with Linux perf.</li> <li>More thorough testing and multiple bug fixes</li> </ul> <h3>M:N thread scheduler</h3> <ul> <li>M:N thread scheduler was introduced. <a href="https://bugs.ruby-lang.org/issues/19842">[Feature #19842]</a> <ul> <li>M Ruby threads are managed by N native threads (OS threads) so the thread creation and management cost are reduced.</li> <li>It can break C-extension compatibility so that M:N thread scheduler is disabled on the main Ractor by default. <ul> <li><code class="language-plaintext highlighter-rouge">RUBY_MN_THREADS=1</code> environment variable enables M:N threads on the main Ractor.</li> <li>M:N threads are enabled on non-main Ractors.</li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">RUBY_MAX_CPU=n</code> environment variable sets maximum number of <code class="language-plaintext highlighter-rouge">N</code> (maximum number of native threads). The default value is 8. <ul> <li>Since only one Ruby thread per Ractor can run at the same time, the number of native threads will be used, which is the smaller of the number specified in <code class="language-plaintext highlighter-rouge">RUBY_MAX_CPU</code> and the number of running Ractors. So that single Ractor applications (most of applications) will use 1 native thread.</li> <li>To support blocking operations, more than <code class="language-plaintext highlighter-rouge">N</code> native threads can be used.</li> </ul> </li> </ul> </li> </ul> <h2>Other Notable New Features</h2> <h3>Language</h3> <h2>Performance improvements</h2> <ul> <li><code class="language-plaintext highlighter-rouge">defined?(@ivar)</code> is optimized with Object Shapes.</li> <li>Name resolution such as <code class="language-plaintext highlighter-rouge">Socket.getaddrinfo</code> can now be interrupted (in environments where pthreads are available). <a href="https://bugs.ruby-lang.org/issues/19965">Feature #19965</a> <ul> <li>For this purpose, a pthread is now created whenever calling getaddrinfo or getnameinfo. This incurs some overhead in name resolution (about 2.5x in our experiments). We do not expect the name resolution overhead to be a problem for most applications, but if you observe such, or if you see unexpected affects that you believe are due to this change, please report them.</li> </ul> </li> <li>Several performance improvements to the Garbage Collector <ul> <li>Young objects referenced by old objects are no longer immediately promoted to the old generation. This significantly reduces the frequency of major GC collections. <a href="https://bugs.ruby-lang.org/issues/19678">[Feature #19678]</a></li> <li>A new <code class="language-plaintext highlighter-rouge">REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO</code> tuning variable was introduced to control the number of unprotected objects cause a major GC collection to trigger. The default is set to <code class="language-plaintext highlighter-rouge">0.01</code> (1%). This significantly reduces the frequency of major GC collection. <a href="https://bugs.ruby-lang.org/issues/19571">[Feature #19571]</a></li> <li>Write Barriers were implemented for many core types that were missing them, notably <code class="language-plaintext highlighter-rouge">Time</code>, <code class="language-plaintext highlighter-rouge">Enumerator</code>, <code class="language-plaintext highlighter-rouge">MatchData</code>, <code class="language-plaintext highlighter-rouge">Method</code>, <code class="language-plaintext highlighter-rouge">File::Stat</code>, <code class="language-plaintext highlighter-rouge">BigDecimal</code> and several others. This significantly reduces minor GC collection time and major GC collection frequency.</li> <li>Most core classes are now using Variable Width Allocation, notably <code class="language-plaintext highlighter-rouge">Hash</code>, <code class="language-plaintext highlighter-rouge">Time</code>, <code class="language-plaintext highlighter-rouge">Thread::Backtrace</code>, <code class="language-plaintext highlighter-rouge">Thread::Backtrace::Location</code>, <code class="language-plaintext highlighter-rouge">File::Stat</code>, <code class="language-plaintext highlighter-rouge">Method</code>. This makes these classes faster to allocate and free, use less memory and reduce heap fragmentation.</li> <li>Support for weak references has been added to the garbage collector. <a href="https://bugs.ruby-lang.org/issues/19783">[Feature #19783]</a></li> </ul> </li> </ul> <h2>Other notable changes since 3.2</h2> <h3>IRB</h3> <p>IRB has received several enhancements, including but not limited to:</p> <ul> <li>Advanced <code class="language-plaintext highlighter-rouge">irb:rdbg</code> integration that provides an equivalent debugging experience to <code class="language-plaintext highlighter-rouge">pry-byebug</code> (<a href="https://github.com/ruby/irb#debugging-with-irb">doc</a>).</li> <li>Pager support for <code class="language-plaintext highlighter-rouge">ls</code>, <code class="language-plaintext highlighter-rouge">show_source</code> and <code class="language-plaintext highlighter-rouge">show_cmds</code> commands.</li> <li>More accurate and helpful information provided by the <code class="language-plaintext highlighter-rouge">ls</code> and <code class="language-plaintext highlighter-rouge">show_source</code> commands.</li> <li>Experimental autocompletion using type analysis (<a href="https://github.com/ruby/irb#type-based-completion">doc</a>).</li> <li>It is now possible to change the font color and font style in the completion dialog by a newly introduced class Reline::Face (<a href="https://github.com/ruby/ruby/blob/master/doc/reline/face.md">doc</a>)</li> </ul> <p>In addition, IRB has also undergone extensive refactoring and received dozens of bug fixes to facilitate easier future enhancements.</p> <h2>Compatibility issues</h2> <p>Note: Excluding feature bug fixes.</p> <ul> <li><code class="language-plaintext highlighter-rouge">it</code> calls without arguments in a block with no ordinary parameters are deprecated. <code class="language-plaintext highlighter-rouge">it</code> will be a reference to the first block parameter in Ruby 3.4. <a href="https://bugs.ruby-lang.org/issues/18980">Feature #18980</a></li> </ul> <h3>Removed constants</h3> <p>The following deprecated constants are removed.</p> <h3>Removed methods</h3> <p>The following deprecated methods are removed.</p> <h3>Removed environment variables</h3> <p>The following deprecated environment variables are removed.</p> <ul> <li>Environment variable <code class="language-plaintext highlighter-rouge">RUBY_GC_HEAP_INIT_SLOTS</code> has been deprecated and is a no-op. Please use environment variables <code class="language-plaintext highlighter-rouge">RUBY_GC_HEAP_{0,1,2,3,4}_INIT_SLOTS</code> instead. <a href="https://bugs.ruby-lang.org/issues/19785">Feature #19785</a></li> </ul> <h2>Stdlib compatibility issues</h2> <h3><code class="language-plaintext highlighter-rouge">ext/readline</code> is retired</h3> <ul> <li>We have <code class="language-plaintext highlighter-rouge">reline</code> that is pure Ruby implementation compatible with <code class="language-plaintext highlighter-rouge">ext/readline</code> API. We rely on <code class="language-plaintext highlighter-rouge">reline</code> in the future. If you need to use <code class="language-plaintext highlighter-rouge">ext/readline</code>, you can install <code class="language-plaintext highlighter-rouge">ext/readline</code> via rubygems.org with <code class="language-plaintext highlighter-rouge">gem install readline-ext</code>.</li> <li>We no longer need to install libraries like <code class="language-plaintext highlighter-rouge">libreadline</code> or <code class="language-plaintext highlighter-rouge">libedit</code>.</li> </ul> <h2>C API updates</h2> <h3>Updated C APIs</h3> <p>The following APIs are updated.</p> <h3>Removed C APIs</h3> <p>The following deprecated APIs are removed.</p> <h2>Standard library updates</h2> <p>RubyGems and Bundler warn if users require gem that is scheduled to become the bundled gems in the future version of Ruby.</p> <p>Targeted libraries are:</p> <ul> <li>abbrev</li> <li>base64</li> <li>bigdecimal</li> <li>csv</li> <li>drb</li> <li>getoptlong</li> <li>mutex_m</li> <li>nkf</li> <li>observer</li> <li>racc</li> <li>resolv-replace</li> <li>rinda</li> <li>syslog</li> </ul> <p>The following default gem is added.</p> <ul> <li>prism 0.15.1</li> </ul> <p>The following default gems are updated.</p> <ul> <li>RubyGems 3.5.0.dev</li> <li>base64 0.2.0</li> <li>benchmark 0.3.0</li> <li>bigdecimal 3.1.5</li> <li>bundler 2.5.0.dev</li> <li>cgi 0.4.0</li> <li>csv 3.2.8</li> <li>date 3.3.4</li> <li>delegate 0.3.1</li> <li>drb 2.2.0</li> <li>english 0.8.0</li> <li>erb 4.0.3</li> <li>etc 1.4.3.dev.1</li> <li>fcntl 1.1.0</li> <li>fiddle 1.1.2</li> <li>fileutils 1.7.2</li> <li>find 0.2.0</li> <li>getoptlong 0.2.1</li> <li>io-console 0.6.1.dev</li> <li>irb 1.8.3</li> <li>logger 1.6.0</li> <li>mutex_m 0.2.0</li> <li>net-http 0.4.0</li> <li>net-protocol 0.2.2</li> <li>nkf 0.1.3</li> <li>observer 0.1.2</li> <li>open-uri 0.4.0</li> <li>open3 0.2.0</li> <li>openssl 3.2.0</li> <li>optparse 0.4.0</li> <li>ostruct 0.6.0</li> <li>pathname 0.3.0</li> <li>pp 0.5.0</li> <li>prettyprint 0.2.0</li> <li>pstore 0.1.3</li> <li>psych 5.1.1.1</li> <li>rdoc 6.6.0</li> <li>reline 0.3.9</li> <li>rinda 0.2.0</li> <li>securerandom 0.3.0</li> <li>shellwords 0.2.0</li> <li>singleton 0.2.0</li> <li>stringio 3.0.9</li> <li>strscan 3.0.7</li> <li>syntax_suggest 1.1.0</li> <li>tempfile 0.2.0</li> <li>time 0.3.0</li> <li>timeout 0.4.1</li> <li>tmpdir 0.2.0</li> <li>tsort 0.2.0</li> <li>un 0.3.0</li> <li>uri 0.13.0</li> <li>weakref 0.1.3</li> <li>win32ole 1.8.10</li> <li>yaml 0.3.0</li> <li>zlib 3.1.0</li> </ul> <p>The following bundled gem is promoted from default gems.</p> <ul> <li>racc 1.7.3</li> </ul> <p>The following bundled gems are updated.</p> <ul> <li>minitest 5.20.0</li> <li>rake 13.1.0</li> <li>test-unit 3.6.1</li> <li>rexml 3.2.6</li> <li>rss 0.3.0</li> <li>net-imap 0.4.4</li> <li>net-smtp 0.4.0</li> <li>rbs 3.2.2</li> <li>typeprof 0.21.8</li> <li>debug 1.8.0</li> </ul> <p>See GitHub releases like <a href="https://github.com/ruby/logger/releases">Logger</a> or changelog for details of the default gems or bundled gems.</p> <p>See <a href="https://github.com/ruby/ruby/blob/v3_3_0_rc1/NEWS.md">NEWS</a> or <a href="https://github.com/ruby/ruby/compare/v3_2_0...v3_3_0_rc1">commit logs</a> for more details.</p> <p>With those changes, <a href="https://github.com/ruby/ruby/compare/v3_2_0...v3_3_0_rc1#file_bucket">5414 files changed, 306141 insertions(+), 183575 deletions(-)</a> since Ruby 3.2.0!</p> <h2>Download</h2> <ul> <li> <p><a href="https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.gz">https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.gz</a></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SIZE: 21783575 SHA1: c75a860e06f27b7f69b874757417277c21d1d3f4 SHA256: c4ff82395a90ef76c7f906b7687026e0ab96b094dcf3a532d9ab97784a073222 SHA512: 265fb2ffe55af47d8349edffcebe749cc170291227cef55529fe4e67363e4e84b88daa34ffb5364a99c8a0e32110266a34c9a11d62f3bd6f6d47fa76eca641f4 </code></pre></div> </div> </li> <li> <p><a href="https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.xz">https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.xz</a></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SIZE: 16163884 SHA1: 26503f9bdc7d0a05aaa9836f54d3aa9e74a9ead9 SHA256: 051815637f1fa75a1edf2c54b66d5d5b69563daad777da8dc39543b7754b5290 SHA512: 82f4acfaad1dc47db27ee3eb952481a95b3474a98059e9e9f5ceb035b690d1faabe99f2ec52371c4089ed1615eb10c395f029088418fec4d26399b65b4f259b9 </code></pre></div> </div> </li> <li> <p><a href="https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.zip">https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.zip</a></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SIZE: 26735443 SHA1: 35583453a7734216b08829ef0ec9ea1bc0d4ae7f SHA256: 56dd82e1dd714f2889ca975ae7befbe005675de08839c2cc4a484de2ae65201c SHA512: 7fbe414c230aedc9f364512bcbc213038f8f6e4268929a559d2527e2f3e32a140b394e37098ab7e59161236eca8b89cc9e52d73a3be8d7bd44faa91681483f5d </code></pre></div> </div> </li> </ul> <h2>What is Ruby</h2> <p>Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, and is now developed as Open Source. It runs on multiple platforms and is used all over the world especially for web development.</p> <p>Posted by naruse on 11 Dec 2023</p>
Content
Author
Link
Published date
Image url
Feed url
Guid
Hidden blurb
--- !ruby/object:Feedjira::Parser::RSSEntry published: 2023-12-11 00:00:00.000000000 Z carlessian_info: news_filer_version: 2 newspaper: Ruby (EN RSS) macro_region: Technology entry_id: !ruby/object:Feedjira::Parser::GloballyUniqueIdentifier guid: https://www.ruby-lang.org/en/news/2023/12/11/ruby-3-3-0-rc1-released/ title: Ruby 3.3.0-rc1 Released categories: [] summary: |2- <p>We are pleased to announce the release of Ruby 3.3.0-rc1. Ruby 3.3 adds a new parser named Prism, uses Lrama as a parser generator, adds a new pure-Ruby JIT compiler named RJIT, and many performance improvements especially YJIT.</p> <p>After the release of RC1, we will avoid introducing ABI incompatibilities wherever possible. If we need to do, we’ll announce it in the release note.</p> <h2>Prism</h2> <ul> <li>Introduced <a href="https://github.com/ruby/prism">the Prism parser</a> as a default gem <ul> <li>Prism is a portable, error tolerant, and maintainable recursive descent parser for the Ruby language</li> </ul> </li> <li>Prism is production ready and actively maintained, you can use it in place of Ripper <ul> <li>There is <a href="https://ruby.github.io/prism/">extensive documentation</a> on how to use Prism</li> <li>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</li> <li>Notable methods in the Prism API are: <ul> <li><code class="language-plaintext highlighter-rouge">Prism.parse(source)</code> which returns the AST as part of a ParseResult</li> <li><code class="language-plaintext highlighter-rouge">Prism.dump(source)</code> which returns the serialized AST as a String</li> <li><code class="language-plaintext highlighter-rouge">Prism.parse_comments(source)</code> which returns the comments</li> </ul> </li> </ul> </li> <li>You can make pull requests or issues directly on <a href="https://github.com/ruby/prism">the Prism repository</a> if you are interested in contributing</li> </ul> <h2>Use Lrama instead of Bison</h2> <ul> <li>Replace Bison with <a href="https://github.com/ruby/lrama">Lrama LALR parser generator</a> <a href="https://bugs.ruby-lang.org/issues/19637">Feature #19637</a> <ul> <li>If you have interest, please see <a href="https://rubykaigi.org/2023/presentations/spikeolaf.html">The future vision of Ruby Parser</a></li> <li>Lrama internal parser is replaced with LR parser generated by Racc for maintainability</li> <li>Parameterizing Rules <code class="language-plaintext highlighter-rouge">(?, *, +)</code> are supported, it will be used in Ruby parse.y</li> </ul> </li> </ul> <h2>RJIT</h2> <ul> <li>Introduced a pure-Ruby JIT compiler RJIT and replaced MJIT. <ul> <li>RJIT supports only x86-64 architecture on Unix platforms.</li> <li>Unlike MJIT, it doesn’t require a C compiler at runtime.</li> </ul> </li> <li>RJIT exists only for experimental purposes. <ul> <li>You should keep using YJIT in production.</li> </ul> </li> <li>If you are interested in developing JIT for Ruby, please check out <a href="https://rubykaigi.org/2023/presentations/k0kubun.html#day3">k0kubun’s presentation on Day 3 of RubyKaigi</a>.</li> </ul> <h2>YJIT</h2> <ul> <li>Major performance improvements over 3.2 <ul> <li>Support for splat and rest arguments has been improved.</li> <li>Registers are allocated for stack operations of the virtual machine.</li> <li>More calls with optional arguments are compiled.</li> <li>Exception handlers are also compiled.</li> <li>Instance variables no longer exit to the interpreter with megamorphic object shapes.</li> <li>Unsupported call types no longer exit to the interpreter.</li> <li><code class="language-plaintext highlighter-rouge">Integer#!=</code>, <code class="language-plaintext highlighter-rouge">String#!=</code>, <code class="language-plaintext highlighter-rouge">Kernel#block_given?</code>, <code class="language-plaintext highlighter-rouge">Kernel#is_a?</code>, <code class="language-plaintext highlighter-rouge">Kernel#instance_of?</code>, <code class="language-plaintext highlighter-rouge">Module#===</code> are specially optimized.</li> <li>Now more than 3x faster than the interpreter on optcarrot!</li> </ul> </li> <li>Significantly improved memory usage over 3.2 <ul> <li>Metadata for compiled code uses a lot less memory.</li> <li>Generate more compact code on ARM64</li> </ul> </li> <li>Compilation speed is now slightly faster than 3.2.</li> <li>Add <code class="language-plaintext highlighter-rouge">RubyVM::YJIT.enable</code> that can enable YJIT at run-time <ul> <li>You can start YJIT without modifying command-line arguments or environment variables.</li> <li>This can also be used to enable YJIT only once your application is done booting. <code class="language-plaintext highlighter-rouge">--yjit-disable</code> can be used if you want to use other YJIT options while disabling YJIT at boot.</li> </ul> </li> <li>Code GC is now disabled by default, and <code class="language-plaintext highlighter-rouge">--yjit-exec-mem-size</code> is treated as a hard limit where compilation of new code stops. <ul> <li>Better copy-on-write behavior on servers using unicorn and forking</li> <li>No sudden drops in performance due to code GC.</li> <li>You can still enable code GC if desired with <code class="language-plaintext highlighter-rouge">--yjit-code-gc</code></li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">ratio_in_yjit</code> stat produced by <code class="language-plaintext highlighter-rouge">--yjit-stats</code> is now available in release builds, a special stats or dev build is no longer required to access most stats.</li> <li>Exit tracing option now supports sampling <ul> <li><code class="language-plaintext highlighter-rouge">--trace-exits-sample-rate=N</code></li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">--yjit-perf</code> is added to facilitate profiling with Linux perf.</li> <li>More thorough testing and multiple bug fixes</li> </ul> <h3>M:N thread scheduler</h3> <ul> <li>M:N thread scheduler was introduced. <a href="https://bugs.ruby-lang.org/issues/19842">[Feature #19842]</a> <ul> <li>M Ruby threads are managed by N native threads (OS threads) so the thread creation and management cost are reduced.</li> <li>It can break C-extension compatibility so that M:N thread scheduler is disabled on the main Ractor by default. <ul> <li><code class="language-plaintext highlighter-rouge">RUBY_MN_THREADS=1</code> environment variable enables M:N threads on the main Ractor.</li> <li>M:N threads are enabled on non-main Ractors.</li> </ul> </li> <li><code class="language-plaintext highlighter-rouge">RUBY_MAX_CPU=n</code> environment variable sets maximum number of <code class="language-plaintext highlighter-rouge">N</code> (maximum number of native threads). The default value is 8. <ul> <li>Since only one Ruby thread per Ractor can run at the same time, the number of native threads will be used, which is the smaller of the number specified in <code class="language-plaintext highlighter-rouge">RUBY_MAX_CPU</code> and the number of running Ractors. So that single Ractor applications (most of applications) will use 1 native thread.</li> <li>To support blocking operations, more than <code class="language-plaintext highlighter-rouge">N</code> native threads can be used.</li> </ul> </li> </ul> </li> </ul> <h2>Other Notable New Features</h2> <h3>Language</h3> <h2>Performance improvements</h2> <ul> <li><code class="language-plaintext highlighter-rouge">defined?(@ivar)</code> is optimized with Object Shapes.</li> <li>Name resolution such as <code class="language-plaintext highlighter-rouge">Socket.getaddrinfo</code> can now be interrupted (in environments where pthreads are available). <a href="https://bugs.ruby-lang.org/issues/19965">Feature #19965</a> <ul> <li>For this purpose, a pthread is now created whenever calling getaddrinfo or getnameinfo. This incurs some overhead in name resolution (about 2.5x in our experiments). We do not expect the name resolution overhead to be a problem for most applications, but if you observe such, or if you see unexpected affects that you believe are due to this change, please report them.</li> </ul> </li> <li>Several performance improvements to the Garbage Collector <ul> <li>Young objects referenced by old objects are no longer immediately promoted to the old generation. This significantly reduces the frequency of major GC collections. <a href="https://bugs.ruby-lang.org/issues/19678">[Feature #19678]</a></li> <li>A new <code class="language-plaintext highlighter-rouge">REMEMBERED_WB_UNPROTECTED_OBJECTS_LIMIT_RATIO</code> tuning variable was introduced to control the number of unprotected objects cause a major GC collection to trigger. The default is set to <code class="language-plaintext highlighter-rouge">0.01</code> (1%). This significantly reduces the frequency of major GC collection. <a href="https://bugs.ruby-lang.org/issues/19571">[Feature #19571]</a></li> <li>Write Barriers were implemented for many core types that were missing them, notably <code class="language-plaintext highlighter-rouge">Time</code>, <code class="language-plaintext highlighter-rouge">Enumerator</code>, <code class="language-plaintext highlighter-rouge">MatchData</code>, <code class="language-plaintext highlighter-rouge">Method</code>, <code class="language-plaintext highlighter-rouge">File::Stat</code>, <code class="language-plaintext highlighter-rouge">BigDecimal</code> and several others. This significantly reduces minor GC collection time and major GC collection frequency.</li> <li>Most core classes are now using Variable Width Allocation, notably <code class="language-plaintext highlighter-rouge">Hash</code>, <code class="language-plaintext highlighter-rouge">Time</code>, <code class="language-plaintext highlighter-rouge">Thread::Backtrace</code>, <code class="language-plaintext highlighter-rouge">Thread::Backtrace::Location</code>, <code class="language-plaintext highlighter-rouge">File::Stat</code>, <code class="language-plaintext highlighter-rouge">Method</code>. This makes these classes faster to allocate and free, use less memory and reduce heap fragmentation.</li> <li>Support for weak references has been added to the garbage collector. <a href="https://bugs.ruby-lang.org/issues/19783">[Feature #19783]</a></li> </ul> </li> </ul> <h2>Other notable changes since 3.2</h2> <h3>IRB</h3> <p>IRB has received several enhancements, including but not limited to:</p> <ul> <li>Advanced <code class="language-plaintext highlighter-rouge">irb:rdbg</code> integration that provides an equivalent debugging experience to <code class="language-plaintext highlighter-rouge">pry-byebug</code> (<a href="https://github.com/ruby/irb#debugging-with-irb">doc</a>).</li> <li>Pager support for <code class="language-plaintext highlighter-rouge">ls</code>, <code class="language-plaintext highlighter-rouge">show_source</code> and <code class="language-plaintext highlighter-rouge">show_cmds</code> commands.</li> <li>More accurate and helpful information provided by the <code class="language-plaintext highlighter-rouge">ls</code> and <code class="language-plaintext highlighter-rouge">show_source</code> commands.</li> <li>Experimental autocompletion using type analysis (<a href="https://github.com/ruby/irb#type-based-completion">doc</a>).</li> <li>It is now possible to change the font color and font style in the completion dialog by a newly introduced class Reline::Face (<a href="https://github.com/ruby/ruby/blob/master/doc/reline/face.md">doc</a>)</li> </ul> <p>In addition, IRB has also undergone extensive refactoring and received dozens of bug fixes to facilitate easier future enhancements.</p> <h2>Compatibility issues</h2> <p>Note: Excluding feature bug fixes.</p> <ul> <li><code class="language-plaintext highlighter-rouge">it</code> calls without arguments in a block with no ordinary parameters are deprecated. <code class="language-plaintext highlighter-rouge">it</code> will be a reference to the first block parameter in Ruby 3.4. <a href="https://bugs.ruby-lang.org/issues/18980">Feature #18980</a></li> </ul> <h3>Removed constants</h3> <p>The following deprecated constants are removed.</p> <h3>Removed methods</h3> <p>The following deprecated methods are removed.</p> <h3>Removed environment variables</h3> <p>The following deprecated environment variables are removed.</p> <ul> <li>Environment variable <code class="language-plaintext highlighter-rouge">RUBY_GC_HEAP_INIT_SLOTS</code> has been deprecated and is a no-op. Please use environment variables <code class="language-plaintext highlighter-rouge">RUBY_GC_HEAP_{0,1,2,3,4}_INIT_SLOTS</code> instead. <a href="https://bugs.ruby-lang.org/issues/19785">Feature #19785</a></li> </ul> <h2>Stdlib compatibility issues</h2> <h3><code class="language-plaintext highlighter-rouge">ext/readline</code> is retired</h3> <ul> <li>We have <code class="language-plaintext highlighter-rouge">reline</code> that is pure Ruby implementation compatible with <code class="language-plaintext highlighter-rouge">ext/readline</code> API. We rely on <code class="language-plaintext highlighter-rouge">reline</code> in the future. If you need to use <code class="language-plaintext highlighter-rouge">ext/readline</code>, you can install <code class="language-plaintext highlighter-rouge">ext/readline</code> via rubygems.org with <code class="language-plaintext highlighter-rouge">gem install readline-ext</code>.</li> <li>We no longer need to install libraries like <code class="language-plaintext highlighter-rouge">libreadline</code> or <code class="language-plaintext highlighter-rouge">libedit</code>.</li> </ul> <h2>C API updates</h2> <h3>Updated C APIs</h3> <p>The following APIs are updated.</p> <h3>Removed C APIs</h3> <p>The following deprecated APIs are removed.</p> <h2>Standard library updates</h2> <p>RubyGems and Bundler warn if users require gem that is scheduled to become the bundled gems in the future version of Ruby.</p> <p>Targeted libraries are:</p> <ul> <li>abbrev</li> <li>base64</li> <li>bigdecimal</li> <li>csv</li> <li>drb</li> <li>getoptlong</li> <li>mutex_m</li> <li>nkf</li> <li>observer</li> <li>racc</li> <li>resolv-replace</li> <li>rinda</li> <li>syslog</li> </ul> <p>The following default gem is added.</p> <ul> <li>prism 0.15.1</li> </ul> <p>The following default gems are updated.</p> <ul> <li>RubyGems 3.5.0.dev</li> <li>base64 0.2.0</li> <li>benchmark 0.3.0</li> <li>bigdecimal 3.1.5</li> <li>bundler 2.5.0.dev</li> <li>cgi 0.4.0</li> <li>csv 3.2.8</li> <li>date 3.3.4</li> <li>delegate 0.3.1</li> <li>drb 2.2.0</li> <li>english 0.8.0</li> <li>erb 4.0.3</li> <li>etc 1.4.3.dev.1</li> <li>fcntl 1.1.0</li> <li>fiddle 1.1.2</li> <li>fileutils 1.7.2</li> <li>find 0.2.0</li> <li>getoptlong 0.2.1</li> <li>io-console 0.6.1.dev</li> <li>irb 1.8.3</li> <li>logger 1.6.0</li> <li>mutex_m 0.2.0</li> <li>net-http 0.4.0</li> <li>net-protocol 0.2.2</li> <li>nkf 0.1.3</li> <li>observer 0.1.2</li> <li>open-uri 0.4.0</li> <li>open3 0.2.0</li> <li>openssl 3.2.0</li> <li>optparse 0.4.0</li> <li>ostruct 0.6.0</li> <li>pathname 0.3.0</li> <li>pp 0.5.0</li> <li>prettyprint 0.2.0</li> <li>pstore 0.1.3</li> <li>psych 5.1.1.1</li> <li>rdoc 6.6.0</li> <li>reline 0.3.9</li> <li>rinda 0.2.0</li> <li>securerandom 0.3.0</li> <li>shellwords 0.2.0</li> <li>singleton 0.2.0</li> <li>stringio 3.0.9</li> <li>strscan 3.0.7</li> <li>syntax_suggest 1.1.0</li> <li>tempfile 0.2.0</li> <li>time 0.3.0</li> <li>timeout 0.4.1</li> <li>tmpdir 0.2.0</li> <li>tsort 0.2.0</li> <li>un 0.3.0</li> <li>uri 0.13.0</li> <li>weakref 0.1.3</li> <li>win32ole 1.8.10</li> <li>yaml 0.3.0</li> <li>zlib 3.1.0</li> </ul> <p>The following bundled gem is promoted from default gems.</p> <ul> <li>racc 1.7.3</li> </ul> <p>The following bundled gems are updated.</p> <ul> <li>minitest 5.20.0</li> <li>rake 13.1.0</li> <li>test-unit 3.6.1</li> <li>rexml 3.2.6</li> <li>rss 0.3.0</li> <li>net-imap 0.4.4</li> <li>net-smtp 0.4.0</li> <li>rbs 3.2.2</li> <li>typeprof 0.21.8</li> <li>debug 1.8.0</li> </ul> <p>See GitHub releases like <a href="https://github.com/ruby/logger/releases">Logger</a> or changelog for details of the default gems or bundled gems.</p> <p>See <a href="https://github.com/ruby/ruby/blob/v3_3_0_rc1/NEWS.md">NEWS</a> or <a href="https://github.com/ruby/ruby/compare/v3_2_0...v3_3_0_rc1">commit logs</a> for more details.</p> <p>With those changes, <a href="https://github.com/ruby/ruby/compare/v3_2_0...v3_3_0_rc1#file_bucket">5414 files changed, 306141 insertions(+), 183575 deletions(-)</a> since Ruby 3.2.0!</p> <h2>Download</h2> <ul> <li> <p><a href="https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.gz">https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.gz</a></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SIZE: 21783575 SHA1: c75a860e06f27b7f69b874757417277c21d1d3f4 SHA256: c4ff82395a90ef76c7f906b7687026e0ab96b094dcf3a532d9ab97784a073222 SHA512: 265fb2ffe55af47d8349edffcebe749cc170291227cef55529fe4e67363e4e84b88daa34ffb5364a99c8a0e32110266a34c9a11d62f3bd6f6d47fa76eca641f4 </code></pre></div> </div> </li> <li> <p><a href="https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.xz">https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.tar.xz</a></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SIZE: 16163884 SHA1: 26503f9bdc7d0a05aaa9836f54d3aa9e74a9ead9 SHA256: 051815637f1fa75a1edf2c54b66d5d5b69563daad777da8dc39543b7754b5290 SHA512: 82f4acfaad1dc47db27ee3eb952481a95b3474a98059e9e9f5ceb035b690d1faabe99f2ec52371c4089ed1615eb10c395f029088418fec4d26399b65b4f259b9 </code></pre></div> </div> </li> <li> <p><a href="https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.zip">https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.0-rc1.zip</a></p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>SIZE: 26735443 SHA1: 35583453a7734216b08829ef0ec9ea1bc0d4ae7f SHA256: 56dd82e1dd714f2889ca975ae7befbe005675de08839c2cc4a484de2ae65201c SHA512: 7fbe414c230aedc9f364512bcbc213038f8f6e4268929a559d2527e2f3e32a140b394e37098ab7e59161236eca8b89cc9e52d73a3be8d7bd44faa91681483f5d </code></pre></div> </div> </li> </ul> <h2>What is Ruby</h2> <p>Ruby was first developed by Matz (Yukihiro Matsumoto) in 1993, and is now developed as Open Source. It runs on multiple platforms and is used all over the world especially for web development.</p> <p>Posted by naruse on 11 Dec 2023</p> rss_fields: - title - url - summary - published - entry_id url: https://www.ruby-lang.org/en/news/2023/12/11/ruby-3-3-0-rc1-released/
Language
Active
Ricc internal notes
Imported via /Users/ricc/git/gemini-news-crawler/webapp/db/seeds.d/import-feedjira.rb on 2024-04-03 16:31:18 +0200. Content is EMPTY here. Entried: title,url,summary,published,entry_id. TODO add Newspaper: filename = /Users/ricc/git/gemini-news-crawler/webapp/db/seeds.d/../../../crawler/out/feedjira/Technology/Ruby (EN RSS)/2023-12-11-Ruby_3.3.0-rc1_Released-v2.yaml
Ricc source
Show this article
Back to articles