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
780
fukuoka.rb#202 RustでつくるRuby
monochrome
March 24, 2021
Tweet
Share
More Decks by monochrome
See All by monochrome
Improve my own Ruby
sisshiki1969
0
45
My own Ruby, thereafter
sisshiki1969
0
290
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
200
仮想マシンにおけるスタックの管理
sisshiki1969
0
190
Rustでゴミ集め
sisshiki1969
1
310
RustでつくるRubyのFiber
sisshiki1969
0
260
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.6k
RustでつくるRubyのFiber
sisshiki1969
0
470
Rustでつくるガーベジコレクタ
sisshiki1969
0
660
Other Decks in Programming
See All in Programming
国漢文混用体からHolloまで
minhee
1
170
Deoptimization: How YJIT Speeds Up Ruby by Slowing Down / RubyKaigi 2025
k0kubun
0
490
Ruby's Line Breaks
yui_knk
2
470
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
140
技術選定を未来に繋いで活用していく
sakito
3
100
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
2.6k
List とは何か? / PHPerKaigi 2025
meihei3
0
710
AWS で実現する安全な AI エージェントの作り方 〜 Bedrock Engineer の実装例を添えて 〜 / how-to-build-secure-ai-agents
gawa
8
710
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
730
ベクトル検索システムの気持ち
monochromegane
31
9.9k
AI Coding Agent Enablement - エージェントを自走させよう
yukukotani
13
5.8k
フロントエンドテストの育て方
quramy
11
2.9k
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
How to Think Like a Performance Engineer
csswizardry
23
1.5k
Testing 201, or: Great Expectations
jmmastey
42
7.4k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.1k
Scaling GitHub
holman
459
140k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Speed Design
sergeychernyshev
29
880
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
GraphQLの誤解/rethinking-graphql
sonatard
71
10k
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/