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
890
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
fukuoka.rb#202 RustでつくるRuby
monochrome
March 24, 2021
More Decks by monochrome
See All by monochrome
RubyKaigi2026: Invariants in my own Ruby
sisshiki1969
0
15
Improving my own Ruby thereafter
sisshiki1969
1
250
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
1k
Improve my own Ruby
sisshiki1969
1
580
My own Ruby, thereafter
sisshiki1969
0
410
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
320
仮想マシンにおけるスタックの管理
sisshiki1969
0
240
Rustでゴミ集め
sisshiki1969
1
380
RustでつくるRubyのFiber
sisshiki1969
0
320
Other Decks in Programming
See All in Programming
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
180
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
330
霧の中の代数的エフェクト
funnyycat
1
170
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
360
エンジニアと一緒にテストコードの設計と実装を改善した話
mototakatsu
0
250
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
210
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.6k
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
990
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
640
Contextとはなにか
chiroruxx
1
390
フィードバックで育てるAI開発
kotaminato
1
100
関数型プログラミングのメリットって何だろう?
wanko_it
0
130
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
430
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
380
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
The agentic SEO stack - context over prompts
schlessera
0
840
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
410
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Exploring anti-patterns in Rails
aemeredith
3
440
Discover your Explorer Soul
emna__ayadi
2
1.2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
240
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Accessibility Awareness
sabderemane
1
150
The Language of Interfaces
destraynor
162
27k
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/