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
670
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
230
RustでつくるRubyのFiber
sisshiki1969
0
210
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.4k
RustでつくるRubyのFiber
sisshiki1969
0
360
Rustでつくるガーベジコレクタ
sisshiki1969
0
520
Other Decks in Programming
See All in Programming
Ruby GitHub Packages
bkuhlmann
0
620
Folding Cheat Sheet #3
philipschwarz
PRO
0
110
⼤規模⾔語モデルの拡張(RAG)が 終わったかも知れない件について
nearme_tech
22
15k
今の SmartHR にエンジニアで入社するとどうなるの?
daisukeshinoku
5
4.6k
Rubyでたのしむクリエイティブコーディング/Enjoy Creative coding with Ruby
chobishiba
1
160
PostmanでAPIの動作確認が楽になった話
h455h1
0
130
コードレビューで学ぶ!Kotlinオブジェクト指向デザインパターン
akkie76
2
180
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
310
What We Can Learn From OSS
inouehi
0
400
Tailwind CSSを本気でカスタマイズする方法
fsubal
2
260
オブジェクト指向のリ・オリエンテーション~歴史を振り返り、AI時代に向きなおる~
hanyudaeiiti
10
5.6k
Code Reviews
bkuhlmann
4
880
Featured
See All Featured
How GitHub (no longer) Works
holman
304
140k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
13
1.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
76
41k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
321
20k
Building Flexible Design Systems
yeseniaperezcruz
318
37k
GraphQLとの向き合い方2022年版
quramy
31
12k
Build your cross-platform service in a week with App Engine
jlugia
225
17k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
Music & Morning Musume
bryan
41
5.6k
Designing Experiences People Love
moore
136
23k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
119
38k
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/