Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Ruby 3 Redux
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Bozhidar Batsov
April 11, 2019
Programming
640
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Ruby 3 Redux
Slide deck from my presentation at RubyDay 2019 in Verona, Italy.
Bozhidar Batsov
April 11, 2019
Transcript
142 slides
None
Ciao!
Божидар
Bozhidar
Bozhidar
Bug cool
@bbatsov
Sofia, Bulgaria Sofia, Bulgaria
None
None
bbatsov
metaredux.com
Ruby & Rails style guides
None
None
None
None
None
None
Not on Ruby’s Core Team
None
None
None
None
Matz on Ruby
Language Maturity
The Ruby Community
Ruby is not dying
None
None
We have to feed the community intellectually. — Matz
We have to keep moving forward. — Matz
Backwards Compatibility
We’re not going to repeat the Python 3 mistakes! —
Matz
Victim of the Hype Cycle
None
Rails Mania (2008)
Ruby Today
Ruby Today
2025
Matz’s Retirement
None
Ruby 4
Ruby 4x4
Ruby 4 is going to be 4 times faster than
Ruby 3
Ruby 4 is going to be 12 times faster than
Ruby 2
Ruby 4 is finally going to be fast enough!
None
What about Ruby 3?
–Matz “We’ll aim to release Ruby 3 for the Olympic
Games in Tokyo in 2020.”
Ruby 3 Goals •Improved programming safety •Faster performance •Better concurrency/parallelism
support •Better tools
Optional static typing?
Duck inference?
Actors?
Stream based model?
Ownership based model?
Guilds?
3 times faster performance?
Smaller Goals •Sane keyword arguments (?!!?!) •Pattern Matching •Deprecation of
quirky features •Frozen string literals
None
Ruby 3.0 Redux
Dictionary Definitions
Ruby
noun 1. a precious stone consisting of corundum in colour
varieties varying from deep crimson or purple to pale rose. 2. a programming language optimised for programmer happiness
3
number 1. equivalent to the sum of one and two;
one more than two; 3 2. A mystical version rarely achieved by most software projects.
Redux
adjective 1. brought back, revived Emacs era redux 2. (usually
postpositive) (esp of an artistic work) presented in a new way Apocalypse Now Redux
None
Ruby 3.0 is not a single magic release
Ruby 3.0 is an idea
None
Ruby follows SemVer
Ruby 3 is going to be 3 times faster than
Ruby 2.0
Generational GC (Ruby 2.1)
Incremental GC (Ruby 2.2)
MJIT (Ruby 2.6)
Deprecation of flip-flops (Ruby 2.6)
Ruby 2.7
Numbered block parameters
numbers.map { Math.log2(@1) }
foo.bar { @1 + @2 }
h = Hash.new { @1[@2] = "Go Fish: #{@2}" }
h = Hash.new { @1[@2] = "Go Fish: #{@2}" }
None
https://bugs.ruby-lang.org/issues/15723
Method reference operator
[2, 4, 8, 16, 32].map { |n| Math.log2(n) }
[2, 4, 8, 16, 32].map(&method(Math.log2))
[2, 4, 8, 16, 32].map(&Math.:log2)
[2, 4, 8, 16, 32].map { Math.log2($1) }
Beginless range
Beginless range
Beginningless range
arr[..3]
items.where(price: ..20)
None
Ruby 3.0 (Current Status)
Better Tools
RubyGems 3
The bundling of Bundler (Ruby 2.6)
Gemifying the Standard Library (ongoing progress)
Default vs Bundled Gems
Default Gems • Bundler • RubyGems • date • irb
• json • …
Bundled Gems • minitest • did_you_mean • rake • …
stdgems.org
Ruby 3x3
Only applies to certain benchmarks
Ruby 2.6 is 65% faster than Ruby 2.0
None
10% average speedup per release
None
MJIT is the biggest hope for Ruby 3x3
Guilds
None
None
Developed outside the Ruby’s main repo
https://github.com/ko1/ruby/tree/guild
Work in progress ™
Parallel Programming in Ruby 3 with Guilds (http://www.atdot.net/~ko1/activities/2018_rubyconf2018.pdf)
Sane Keyword Arguments
https://bugs.ruby-lang.org/issues/14183
# The following calls pass keyword arguments foo(..., key: val)
foo(..., **hsh) foo(..., key: val, **hsh)
# The following calls pass **normal** arguments foo(..., {key: val})
foo(..., hsh) foo(..., {key: val, **hsh})
Breaking change!!!
Migration warning in Ruby 2.7
Pattern Matching (https://bugs.ruby-lang.org/issues/14912)
What’s not in Ruby 3.0?
Optional Static Typing
Actors
Stream processing
Frozen string literals
Deprecation of autoload
Community Impact
Community Contributed Features • UTF-8 • Enumerator • Generational GC
• Keyword Arguments • JIT • Concurrency
Community Contributions • Rake • Bundler • Documentation & Tutorials
• A ton of amazing libraries • Rails • …
None
Real Namespaces (https://bugs.ruby-lang.org/issues/14982)
RubyKaigi Updates
None
Felina
Grazie! twitter: @bbatsov github: @bbatsov https://metaredux.com https://emacsredux.com RubyDay 2019 Verona,
Italy 11.04.2019
More Decks by Bozhidar Batsov
See All by Bozhidar Batsov
RuboCop 2.0: Where do we go now?
bbatsov
0
100
Clojure: The Bad Parts
bbatsov
0
140
Weird Ruby (RubyDay 2024, Verona)
bbatsov
0
200
Sustainable OSS (Balkan Ruby 2024, Sofia)
bbatsov
0
220
Ruby's Creed (RubyDay 2023, Verona)
bbatsov
0
90
Victims of Complexity
bbatsov
0
360
Ruby 3.0 Redux (Spark Academy, Jan 2021)
bbatsov
1
310
Ruby 3.0 Redux (Pivorak 4.0)
bbatsov
0
530
The Elements of Programming Style (HackConf 2019)
bbatsov
0
230
Other Decks in Programming
See All in Programming
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
200
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
290
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.4k
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
470
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
670
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
120
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
SONY CISC-NEWS NWS-1750 + NWB-225 ハードウェアメンテとフレームバッファカラー対応 / KOF2026
tsutsui
0
120
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
SODA - FACT BOOK(JP)
sodainc
1
40k
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
310
Featured
See All Featured
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
540
The Curious Case for Waylosing
cassininazir
1
620
Exploring anti-patterns in Rails
aemeredith
4
570
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.2k
Site-Speed That Sticks
csswizardry
13
1.6k
Documentation Writing (for coders)
carmenintech
77
5.6k
4 Signs Your Business is Dying
shpigford
187
23k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The World Runs on Bad Software
bkeepers
PRO
72
12k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
WCS-LA-2024
lcolladotor
0
1k
Designing for Timeless Needs
cassininazir
1
570