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
910
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
27
Improving my own Ruby thereafter
sisshiki1969
1
250
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
1.1k
Improve my own Ruby
sisshiki1969
1
600
My own Ruby, thereafter
sisshiki1969
0
420
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
330
仮想マシンにおけるスタックの管理
sisshiki1969
0
250
Rustでゴミ集め
sisshiki1969
1
390
RustでつくるRubyのFiber
sisshiki1969
0
330
Other Decks in Programming
See All in Programming
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
540
Go 1.27 における memory allocation の高速化
andpad
0
300
仕様駆動開発の消費期限
watany
20
8.9k
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
2
920
プロポーザルを書いてもらう
pvcresin
0
580
Dockerfile CMD for Node.js
grazie1999
0
120
リアルな遅延を測る仕様
kota_yata
1
120
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
710
不幸な GC
chencmd
0
680
MySQLとPostgreSQLって何が違うの?
akagami
0
130
引き算の組織 ― アウトカムとAIに全振りするために辞めたこと ― / Organization by Subtraction
hirokiyamamoto14
PRO
0
290
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
780
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.8k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Building Applications with DynamoDB
mza
96
7.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
620
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
220
Building an army of robots
kneath
306
46k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Product Roadmaps are Hard
iamctodd
55
12k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
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/