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
830
fukuoka.rb#202 RustでつくるRuby
monochrome
March 24, 2021
Tweet
Share
More Decks by monochrome
See All by monochrome
Improving my own Ruby thereafter
sisshiki1969
1
180
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
1
840
Improve my own Ruby
sisshiki1969
1
370
My own Ruby, thereafter
sisshiki1969
0
330
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
240
仮想マシンにおけるスタックの管理
sisshiki1969
0
210
Rustでゴミ集め
sisshiki1969
1
340
RustでつくるRubyのFiber
sisshiki1969
0
290
Shinjuku.rs#15 Rustでつくるx86アセンブラ
sisshiki1969
0
1.7k
Other Decks in Programming
See All in Programming
エンジニアインターン「Treasure」とHonoの2年、そして未来へ / Our Journey with Hono Two Years at Treasure and Beyond
carta_engineering
0
420
GC25 Recap: The Code You Reviewed is Not the Code You Built / #newt_gophercon_tour
mazrean
0
110
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
330
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
190
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
540
AkarengaLT vol.38
hashimoto_kei
1
120
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
100
スキーマ駆動で、Zod OpenAPI Honoによる、API開発するために、Hono Takibiというライブラリを作っている
nakita628
0
320
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
970
オンデバイスAIとXcode
ryodeveloper
0
130
モテるデスク環境
mozumasu
3
1.3k
Featured
See All Featured
Unsuck your backbone
ammeep
671
58k
4 Signs Your Business is Dying
shpigford
185
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
GitHub's CSS Performance
jonrohan
1032
470k
The Invisible Side of Design
smashingmag
302
51k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
The Pragmatic Product Professional
lauravandoore
36
7k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
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/