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
900
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
17
Improving my own Ruby thereafter
sisshiki1969
1
250
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
1k
Improve my own Ruby
sisshiki1969
1
590
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
330
Other Decks in Programming
See All in Programming
Foundation Models frameworkで画像分析
ryodeveloper
1
190
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
290
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
150
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
3
1.3k
音楽のための関数型プログラミング言語mimiumにおける多段階計算の活用
tomoyanonymous
1
370
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
290
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.9k
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
630
AIエージェントで 変わるAndroid開発環境
takahirom
2
750
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
140
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
420
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
450
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
GitHub's CSS Performance
jonrohan
1033
470k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
Into the Great Unknown - MozCon
thekraken
41
2.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Prompt Engineering for Job Search
mfonobong
0
390
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Paper Plane
katiecoart
PRO
2
52k
Documentation Writing (for coders)
carmenintech
77
5.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
360
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/