The mruby 3.0 interpreter is available.

The release of mruby 3.0 has taken place, an embedded interpreter for the dynamic object-oriented programming language Ruby. Mruby maintains syntax compatibility with Ruby 1.9, while also supporting some features from newer versions. The interpreter is characterized by low memory consumption and the capability to be embedded within other applications. Additionally, it supports compiling Ruby programs into bytecode using the compiler "mrbc" developed by the project. The mruby code is distributed under the MIT license.

In this new release, memory consumption in the mruby VM has been significantly reduced. Previous versions required several hundred KB of RAM, while mruby 3.0 consumes about 100 KB of RAM. Key improvements include:

  • Reduced memory consumption due to optimized memory allocation for objects of the Symbols class. Memory usage by Hash class objects has been decreased. Method call optimization has been implemented.
  • Support has been added for single-line method definitions without using the "end" keyword: def square(x) = x * x
  • The operator "=>" (value => variable) has been added, which is used for right-side assignment of values. 0 => a p a #=> 0 {b: 0, c: 1} => {b:} p b #=> 0
  • Support for heredoc syntax has been added.
  • The interpreter's build files have been updated. Compilation with gprof has been added. GCC can now compile in 32-bit mode on 64-bit platforms. Address Sanitizer support has been introduced in clang.
  • Breaking change: the constant RITE_VM_VER now has the value 0300, and RITE_BINARY_FORMAT_VER is 0200, which excludes the possibility of executing bytecode from previous versions.
  • The Fixnum class has become part of Integer, just like in Ruby 3.0. The Integral class has been removed.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster