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
860
Improve my own Ruby
sisshiki1969
1
380
My own Ruby, thereafter
sisshiki1969
0
340
Running Optcarrot (faster) on my own Ruby.
sisshiki1969
1
250
仮想マシンにおけるスタックの管理
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
オンデバイスAIとXcode
ryodeveloper
0
470
AIを駆使して新しい技術を効率的に理解する方法
nogu66
0
600
乱雑なコードの整理から学ぶ設計の初歩
masuda220
PRO
29
11k
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
2
410
AIの弱点、やっぱりプログラミングは人間が(も)勉強しよう / YAPC AI and Programming
kishida
9
4k
Kotlin 2.2が切り拓く: コンテキストパラメータで書く関数型DSLと新しい依存管理のかたち
knih
0
420
Inside of Swift Export
giginet
PRO
1
550
OSS開発者の憂鬱
yusukebe
11
3.7k
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
530
Java_プロセスのメモリ監視の落とし穴_NMT_で見抜けない_glibc_キャッシュ問題_.pdf
ntt_dsol_java
0
140
Amazon Bedrock Knowledge Bases Hands-on
konny0311
0
140
DartASTとその活用
sotaatos
2
110
Featured
See All Featured
Writing Fast Ruby
sferik
630
62k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
1.8k
For a Future-Friendly Web
brad_frost
180
10k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Gamification - CAS2011
davidbonilla
81
5.5k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Embracing the Ebb and Flow
colly
88
4.9k
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/