Better Ruby
NaCl
OSS Vision
Ruby Association

Yukihiro "Matz" Matsumoto@yukihiro_matz

Powered by Rabbit 3.0.1

The Closing Keynote

Powered by Rabbit 3.0.1

WARNING
This is not atechnical talk

Powered by Rabbit 3.0.1

Ruby is GoodPowered by Rabbit 3.0.1

自画自賛
Tooting one's own horn

Powered by Rabbit 3.0.1

Fun to CodePowered by Rabbit 3.0.1

A Programmers’ Best Friend

Powered by Rabbit 3.0.1

Rich Set of Standard Features

Powered by Rabbit 3.0.1

Features Organized in Classes

Powered by Rabbit 3.0.1

Less Restriction

Powered by Rabbit 3.0.1

Integer Size
Built-in / User DefinedPowered by Rabbit 3.0.1

Gems / Tools

Powered by Rabbit 3.0.1

Community

Powered by Rabbit 3.0.1

Productive

Powered by Rabbit 3.0.1

Happiness Leads to Productivity

Powered by Rabbit 3.0.1

Ruby on Rails

Powered by Rabbit 3.0.1

Rails first Released in 2004

Powered by Rabbit 3.0.1

Happy 20th Anniversary, Rails!

Powered by Rabbit 3.0.1

Still Being State-of-the-art FrameworkPowered by Rabbit 3.0.1

So Many People/Companies use Rails

Powered by Rabbit 3.0.1

Ruby/Rails Drives the Society

Powered by Rabbit 3.0.1

TOP RUBY COMPANIES

https://toprubycompanies.info/

Powered by Rabbit 3.0.1

Fast Growing Startups in Japan

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

EfficientPowered by Rabbit 3.0.1

Ruby was Slow

Powered by Rabbit 3.0.1

Ruby is Fast (Enough)Powered by Rabbit 3.0.1

GitHub
Shopify
Square (Block)...

Powered by Rabbit 3.0.1

Ruby is GoodPowered by Rabbit 3.0.1

Ruby is GreatPowered by Rabbit 3.0.1

We are Greedy

Powered by Rabbit 3.0.1

Can we Make Ruby Better?

Powered by Rabbit 3.0.1

Is it Possible?

Powered by Rabbit 3.0.1

YesPowered by Rabbit 3.0.1

But How?

Powered by Rabbit 3.0.1

4 Aspects

Powered by Rabbit 3.0.1

1. Performance

Powered by Rabbit 3.0.1

Performance is Important

Powered by Rabbit 3.0.1

Everyone Loves Faster Languages

Powered by Rabbit 3.0.1

Everyone Loves Benchmarks

Powered by Rabbit 3.0.1

YARV
MJIT
YJIT

Powered by Rabbit 3.0.1

YARV (2007)

Powered by Rabbit 3.0.1

Bytecode VM
Faster than Tree-Walking Interpreter
5-50 times Faster

Powered by Rabbit 3.0.1

MJIT (2018)

Powered by Rabbit 3.0.1

Ruby3x3 (2014)
3 times Faster than Ruby2.0
With some benchmarks (OptCarrot)
Not with Rails apps

Powered by Rabbit 3.0.1

YJIT (2022)

Powered by Rabbit 3.0.1

Faster JIT
Basic Block Versioning
Written in Rust
Rails apps run 1.8x FasterThanks to Shopify

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Further Performance Improvement Planned

Powered by Rabbit 3.0.1

Performance Heals Every Issue

Powered by Rabbit 3.0.1

Make Ruby VM Faster

Powered by Rabbit 3.0.1

Make Ruby Greater

Powered by Rabbit 3.0.1

2. Performance

Powered by Rabbit 3.0.1

Performance Heals Every Issue

Powered by Rabbit 3.0.1

VM is not the only bottleneck

Powered by Rabbit 3.0.1

Memory Management

Powered by Rabbit 3.0.1

Object Heap Compaction
Variable Width Allocation
Object Shapes
GC Improvements

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Memory is Expensive

Powered by Rabbit 3.0.1

We Need More Memory

Powered by Rabbit 3.0.1

We Should Reduce Memory (for VM)

Powered by Rabbit 3.0.1

If Ruby use Less Memory

Powered by Rabbit 3.0.1

We can Save tons of Money

Powered by Rabbit 3.0.1

Make Ruby use Less Memory

Powered by Rabbit 3.0.1

Make Ruby Greater

Powered by Rabbit 3.0.1

3. Performance

Powered by Rabbit 3.0.1

I could not predict Multi-Core AgePowered by Rabbit 3.0.1

Concurrency for System Architecture

Powered by Rabbit 3.0.1

Concurrency for Performance

Powered by Rabbit 3.0.1

Threads
GVL
ProcessesFiber (for I/O)
Ractors (for CPU)Powered by Rabbit 3.0.1

NxM Threads
Lightweight Ractors
Ractor local GC
Async Fibers

Powered by Rabbit 3.0.1

Make Ruby use More Concurrency

Powered by Rabbit 3.0.1

Make Ruby Greater

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

4. Performance

Powered by Rabbit 3.0.1

Software Performance is Important

Powered by Rabbit 3.0.1

Developer Performance is More Important

Powered by Rabbit 3.0.1

Ruby Programming is FunPowered by Rabbit 3.0.1

Better Experience by Tools SupportPowered by Rabbit 3.0.1

Ruby-LSP
Rubocop
SteepCopilot...

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

Need Better Parser

Powered by Rabbit 3.0.1

parser gem
ripper...

Powered by Rabbit 3.0.1

We need the Universal Parser

Powered by Rabbit 3.0.1

PrismPowered by Rabbit 3.0.1

Prism (kddnewton)
Parser by Lrama (yui-knk)

Powered by Rabbit 3.0.1

Sound Competition

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

API will be based on Prism

Powered by Rabbit 3.0.1

Including AST (fundamental)

Powered by Rabbit 3.0.1

Prism will be Prism foreverPowered by Rabbit 3.0.1

The Core might be based on Lrama

Powered by Rabbit 3.0.1

Hand-written Parser
Parser from Parser Generator

Powered by Rabbit 3.0.1

Syntax Moratorium

Powered by Rabbit 3.0.1

We will Keep the current syntax

Powered by Rabbit 3.0.1

for at least a year

Powered by Rabbit 3.0.1

or probably 2,3 years

Powered by Rabbit 3.0.1

Except for Bug fixes & Clarification

Powered by Rabbit 3.0.1

To Give Both Parsers Equal Chance

Powered by Rabbit 3.0.1

Better Tooling Improves Productivity

Powered by Rabbit 3.0.1

Tools are out of Core Team's Scope

Powered by Rabbit 3.0.1

We need Community

Powered by Rabbit 3.0.1

We need to Lengthen our Stride

Powered by Rabbit 3.0.1

Ruby Association Grant
Google Summer of Code
Independent Community Effort
Conferences

Powered by Rabbit 3.0.1

Ruby Community

Powered by Rabbit 3.0.1

Together, We can be Stronger

Powered by Rabbit 3.0.1

Together, We can make Ruby Greater

Powered by Rabbit 3.0.1

The Power of Ruby Community

Powered by Rabbit 3.0.1

In Addition:

Powered by Rabbit 3.0.1

The Future of Ruby

Powered by Rabbit 3.0.1

Ruby4.0

Powered by Rabbit 3.0.1

“Namespace, What and Why”

Powered by Rabbit 3.0.1

The Missing Piece

Powered by Rabbit 3.0.1

Ruby2 (2004)

Powered by Rabbit 3.0.1

not Ruby2.0 (2013)

Powered by Rabbit 3.0.1

I once tried to restart Ruby

Powered by Rabbit 3.0.1

Just like Perl6 or Python3000

Powered by Rabbit 3.0.1

It turned out to be a bad idea

Powered by Rabbit 3.0.1

Ruby2 Ideas

Powered by Rabbit 3.0.1

Selector Namespace
Keyword Arguments
Method Combination
Unicode Support
Pattern Match
Packages
JIT Compiler
Powered by Rabbit 3.0.1

Refinement (2.0)
Real Keyword Arguments (3.0)
Method Combination (2.0)
Unicode Support (1.9)
Pattern Match (2.7)
Packages
JIT (2.6)
Powered by Rabbit 3.0.1

Selector Namespace
Packages

Powered by Rabbit 3.0.1

Namespace Separation

Powered by Rabbit 3.0.1

Powered by Rabbit 3.0.1

One More Thing

Powered by Rabbit 3.0.1

Dream Story

Powered by Rabbit 3.0.1

SDGs

Powered by Rabbit 3.0.1

Sustainable Development Goals

Powered by Rabbit 3.0.1

GXPowered by Rabbit 3.0.1

Green Transformation

Powered by Rabbit 3.0.1

Ruby with less Comsuming

Powered by Rabbit 3.0.1

Memory & Performance

Powered by Rabbit 3.0.1

Single Binary

Powered by Rabbit 3.0.1

AOT Compiler

Powered by Rabbit 3.0.1

Type Profiling
Type Signatures
Profile Guided Compilation

Powered by Rabbit 3.0.1

Sponsored byNaClPowered by Rabbit 3.0.1

Sponsored by
OSS Vision

Powered by Rabbit 3.0.1

Sponsored by
GitHub Sponsors

Powered by Rabbit 3.0.1

Shopify
JetBrain [NEW]Powered by Rabbit 3.0.1

Sponsored by
Ruby Community

Powered by Rabbit 3.0.1

Thank you

Powered by Rabbit 3.0.1