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
790
fukuoka.rb#202 RustでつくるRuby
monochrome
March 24, 2021
Tweet
Share
More Decks by monochrome
See All by monochrome
Improve my own Ruby
sisshiki1969
0
100
My own Ruby, thereafter
sisshiki1969
0
300
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
200
仮想マシンにおけるスタックの管理
sisshiki1969
0
190
Rustでゴミ集め
sisshiki1969
1
310
RustでつくるRubyのFiber
sisshiki1969
0
260
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.6k
RustでつくるRubyのFiber
sisshiki1969
0
480
Rustでつくるガーベジコレクタ
sisshiki1969
0
670
Other Decks in Programming
See All in Programming
エンジニアが挑む、限界までの越境
nealle
1
320
KawaiiLT 登壇資料 キャリアとモチベーション
hiiragi
0
160
Dissecting and Reconstructing Ruby Syntactic Structures
ydah
3
2k
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
1
170
The Missing Link in Angular’s Signal Story: Resource API and httpResource
manfredsteyer
PRO
0
140
開発者フレンドリーで顧客も満足?Platformの秘密
algoartis
0
170
プロフェッショナルとしての成長「問題の深掘り」が導く真のスキルアップ / issue-analysis-and-skill-up
minodriven
8
1.9k
ComposeでのPicture in Picture
takathemax
0
130
RubyKaigi Dev Meeting 2025
tenderlove
1
1.4k
インプロセスQAにおいて大事にしていること / In-process QA Meetup
medley
0
140
Making TCPSocket.new "Happy"!
coe401_
1
3.1k
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
78
20k
Featured
See All Featured
Designing for humans not robots
tammielis
253
25k
GraphQLの誤解/rethinking-graphql
sonatard
71
10k
How to Think Like a Performance Engineer
csswizardry
23
1.6k
Fireside Chat
paigeccino
37
3.4k
Automating Front-end Workflow
addyosmani
1370
200k
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
47
2.7k
KATA
mclloyd
29
14k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
780
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
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/