Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
190
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
880
Improve my own Ruby
sisshiki1969
1
400
My own Ruby, thereafter
sisshiki1969
0
350
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
250
仮想マシンにおけるスタックの管理
sisshiki1969
0
210
Rustでゴミ集め
sisshiki1969
1
340
RustでつくるRubyのFiber
sisshiki1969
0
300
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.7k
Other Decks in Programming
See All in Programming
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
100
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
340
非同期処理の迷宮を抜ける: 初学者がつまづく構造的な原因
pd1xx
1
660
関数の挙動書き換える
takatofukui
4
770
AIコーディングエージェント(Gemini)
kondai24
0
180
チームをチームにするEM
hitode909
0
250
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
230
AIコーディングエージェント(skywork)
kondai24
0
130
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
110
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
160
CSC305 Lecture 17
javiergs
PRO
0
300
テストやOSS開発に役立つSetup PHP Action
matsuo_atsushi
0
140
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Raft: Consensus for Rubyists
vanstee
141
7.2k
The Pragmatic Product Professional
lauravandoore
37
7.1k
GraphQLとの向き合い方2022年版
quramy
50
14k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Code Review Best Practice
trishagee
73
19k
Six Lessons from altMBA
skipperchong
29
4.1k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
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/