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
810
fukuoka.rb#202 RustでつくるRuby
monochrome
March 24, 2021
Tweet
Share
More Decks by monochrome
See All by monochrome
Improve my own Ruby
sisshiki1969
1
260
My own Ruby, thereafter
sisshiki1969
0
320
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
220
仮想マシンにおけるスタックの管理
sisshiki1969
0
200
Rustでゴミ集め
sisshiki1969
1
320
RustでつくるRubyのFiber
sisshiki1969
0
270
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.6k
RustでつくるRubyのFiber
sisshiki1969
0
490
Rustでつくるガーベジコレクタ
sisshiki1969
0
700
Other Decks in Programming
See All in Programming
Spring gRPC で始める gRPC 入門 / Introduction to gRPC with Spring gRPC
mackey0225
2
520
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
2
1k
関数型まつり2025登壇資料「関数プログラミングと再帰」
taisontsukada
2
840
Go Modules: From Basics to Beyond / Go Modulesの基本とその先へ
kuro_kurorrr
0
120
エンジニア向け採用ピッチ資料
inusan
0
140
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu38
1
110
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
120
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
22
6.2k
WindowInsetsだってテストしたい
ryunen344
1
190
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
190
ktr0731/go-mcpでMCPサーバー作ってみた
takak2166
0
170
F#で自在につくる静的ブログサイト - 関数型まつり2025
pizzacat83
0
310
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
What's in a price? How to price your products and services
michaelherold
245
12k
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
Six Lessons from altMBA
skipperchong
28
3.8k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
How to Ace a Technical Interview
jacobian
277
23k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
32
5.9k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
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/