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
650
fukuoka.rb#202 RustでつくるRuby
monochrome
March 24, 2021
Tweet
Share
More Decks by monochrome
See All by monochrome
仮想マシンにおけるスタックの管理
sisshiki1969
0
150
Rustでゴミ集め
sisshiki1969
1
220
RustでつくるRubyのFiber
sisshiki1969
0
200
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.4k
RustでつくるRubyのFiber
sisshiki1969
0
350
Rustでつくるガーベジコレクタ
sisshiki1969
0
510
Other Decks in Programming
See All in Programming
Learning PHP and Static Analysis with PHP Parser
inouehi
1
220
WasmOS: Wasmを実行する自作Microkernel
riru
0
360
マイクロサービスがほしいと思ったときに本当に必要だったもの〜なぜ人は共通基盤の夢を見るのか〜 / why microservice
77web
5
830
人口ダッシュボード作成講座資料
jo76shin
0
170
So You Think You Know Git - Part 2
schacon
PRO
0
1.3k
PHPerライフをChrome拡張開発でちょっと便利に / PR TIMES x DMM.com
meihei3
0
190
CSC308B Lecture 12
javiergs
PRO
0
110
phpunit/php-code-coverageって何をしてるんだ #phperkaigi
o0h
PRO
2
190
php-src debug マニュアル
onopon
1
650
Apple Vision Pro購入RTA 1泊3日弾丸ハワイツアー / RTA: Purchase Apple Vision Pro in Hawaii
yutailang0119
0
480
DDD, necessary but insufficient: physical design principles for microservices
cer
PRO
0
120
Deno に Web 標準 API を実装する / Implementing Web Standard API to Deno
petamoriken
0
310
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
71
5k
Bash Introduction
62gerente
604
210k
JazzCon 2018 Closing Keynote - Leadership for the Reluctant Leader
reverentgeek
178
11k
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
How to Ace a Technical Interview
jacobian
272
22k
Design by the Numbers
sachag
274
18k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.8k
Product Roadmaps are Hard
iamctodd
43
9.6k
Designing on Purpose - Digital PM Summit 2013
jponch
109
6.4k
Embracing the Ebb and Flow
colly
78
4.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
10
4.4k
Web Components: a chance to create the future
zenorocha
304
41k
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/