Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
fukuoka.rb#202 RustでつくるRuby
Search
monochrome
March 24, 2021
Programming
1
830
fukuoka.rb#202 RustでつくるRuby
monochrome
March 24, 2021
Tweet
Share
More Decks by monochrome
See All by monochrome
Improving my own Ruby thereafter
sisshiki1969
1
180
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
860
Improve my own Ruby
sisshiki1969
1
380
My own Ruby, thereafter
sisshiki1969
0
340
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
240
仮想マシンにおけるスタックの管理
sisshiki1969
0
210
Rustでゴミ集め
sisshiki1969
1
340
RustでつくるRubyのFiber
sisshiki1969
0
290
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.7k
Other Decks in Programming
See All in Programming
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
120
自動テストのアーキテクチャとその理由ー大規模ゲーム開発の場合ー
segadevtech
1
630
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
120
NIKKEI Tech Talk#38
cipepser
0
400
ネストしたdata classの面倒な更新にさようなら!Lensを作って理解するArrowのOpticsの世界
shiita0903
1
270
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
560
マンガアプリViewerの大画面対応を考える
kk__777
0
460
AkarengaLT vol.38
hashimoto_kei
1
140
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
27
8.4k
Swift Concurrency 年表クイズ
omochi
3
220
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.6k
3年ぶりにコードを書いた元CTOが Claude Codeと30分でMVPを作った話
maikokojima
0
760
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Speed Design
sergeychernyshev
32
1.2k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Rails Girls Zürich Keynote
gr2m
95
14k
Why Our Code Smells
bkeepers
PRO
340
57k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
A designer walks into a library…
pauljervisheath
209
24k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Writing Fast Ruby
sferik
630
62k
Transcript
RustでつくるRuby処理系 monochrome twitter: @s_isshiki1969 GitHub: https://github.com/sisshiki1969 Slack: プログラミング言語処理系が好きな人の集まり https://prog-lang-sys-ja-slack.github.io/wiki/
ruruby (https://github.com/sisshiki1969/ruruby) • Rust製のRuby実装 • 仮想マシンインタプリタ • 他の既存実装・仮想マシンへの依存なし • 3万行ぐらい
モチベーション 1. Rustの勉強がしたい 2. 何か言語処理系を作りたい 3. Ruby面白そう
benchmark
開発のモチベーションをいかに維持するか 1. おもちゃじゃないプログラムを動かしたい 2. 「正しく動いている」ことがわかるもの 3. 実行速度を測定できるもの 4. 極力外部ライブラリに依存しないもの
Optcarrot • Rubyで書かれたファミコンのエミュレータ • 「Ruby3x3」のための準公式ベンチマーク • ベンチマーク用の速度測定モードがある • 生成した画像の正しさをチェックサムで検証できる •
(ベンチマークモードでは)外部ライブラリを使用しない
optcarrot benchmark
None
技術的に難しかった点 • ガベージコレクタ →自作した。 • Fiber →アセンブリで実装 (x86-64/linux, aarch64/MacOS)
言語処理系自作は • モチベーションを維持する工夫が大切 • 対象言語の実行モデルの勉強になる • 楽しいので、みんなで作ろう Slack: プログラミング言語処理系が好きな人の集まり https://prog-lang-sys-ja-slack.github.io/wiki/