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
contributing-to-spinel
Search
yamasaki
May 13, 2026
Programming
730
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
contributing-to-spinel
RubyKaigi 2026 アフターイベント〜初参加LT・スポンサー4社のパネル〜
https://mybest.connpass.com/event/392055/
yamasaki
May 13, 2026
More Decks by yamasaki
See All by yamasaki
YJITのBenchmarksに貢献した話
sacckey
0
76
Other Decks in Programming
See All in Programming
Building a Meta Ray-Ban display app
akkeylab
0
160
仕様駆動開発の消費期限
watany
20
8.5k
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
270
Built Our Own Background Agent at LayerX
layerx
PRO
10
5.6k
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.8k
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
270
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
390
数百円から始めるRuby電子工作
tarosay
0
160
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
230
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
300
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
380
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
410
Believing is Seeing
oripsolob
1
190
How to make the Groovebox
asonas
2
2.3k
The Invisible Side of Design
smashingmag
301
52k
We Are The Robots
honzajavorek
0
300
Building AI with AI
inesmontani
PRO
1
1.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
610
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
410
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
530
Scaling GitHub
holman
464
140k
Transcript
Spinelに貢献した話
note inc. ⾃⼰紹介 Yamasaki sacckey • 2020/04 note⼊社 • サーバーサイドエンジニア
◦ 最近は物語投稿サイトTALESの実装 • 個⼈開発/ピアノ/⿇雀 2
note inc. Matz Keynote 3
note inc. Spinel 4 • RubyのAOTコンパイラ • Ruby (.rb) →
parse → type inference → C (.c) → native binary • Rubyプログラムの実⾏速度とポータビリティの向上
note inc. さっそくSpinelを使ってみる % make deps % make % cat
> hello.rb <<'RUBY' def fib(n) n < 2 ? n : fib(n - 1) + fib(n - 2) end puts fib(34) RUBY % ./spinel hello.rb % ./hello # prints 5702887 (instantly) 5
note inc. Ruby Boy (https://github.com/sacckey/rubyboy) • Rubyで動くGame Boyのエミュレーター • ruby.wasmによってブラウザでも動く
◦ https://sacckey.github.io/rubyboy/ • 画⾯描画なしのベンチマークがある ◦ → Spinelでコンパイルしたい ◦ → コンパイル失敗 ◦ → 失敗箇所ごとにPR作成 6
note inc. Spinelに貢献する 7 Contributingを翻訳して抜粋 貢献を歓迎します。課題追跡システムはロードマップとしても機能します。未解決の問題であれば何でも 対象となります。最も有⽤なエントリーポイントは、再現⼿順を⽰すバグ報告(Spinelでは失敗するが CRubyでは成功する5⾏のRubyコードなど)と、そのような報告を解決するコード⽣成による修正です。 • コンパイルに失敗するコードを⼩さく切り出し、CRubyでは動くがSpinelでは落ちるテストを作る
• それを通るようにする
note inc. 貢献1: M::C.new対応 8 # コンパイルできるようになったコード module M class
C def initialize puts "init" end end end M::C.new M::C のような名前空間つきクラスに対して .new できなかった ConstantPathNode がレシーバーになる ケースに対応
note inc. 貢献2: インスタンス変数名とCキーワードの衝突回避 9 # コンパイルできるようになったコード class KeywordIvar def
initialize @if = 40 @iv_if = 1 end def value @if + @iv_if + 1 end end puts KeywordIvar.new.value @if をCコードに変換すると、 Cの if と衝突してしまっていた 生成されるCのフィールド名に iv_ prefixを付 けた 例: @if → iv_if @iv_if → iv_iv_if
note inc. その他の貢献 10 • nested ConstantPath reads • ConstantPath
receiverへのclass method dispatch • polymorphic returnのbox • constructor initialize pathのGC save重複排除
note inc. まとめ • SpinelでRuby Boyをコンパイルしようとしたら、まだ動かないRubyコードが⾒つかった ◦ ⼤きな機能追加ではなく、最⼩再現テストにすることが貢献になった • 「CRubyでは動くがSpinelでは落ちる5⾏のRuby」を⾒つけたら貢献のチャンス
◦ Spinelで遊んで、動かないコードを⾒つけたらPRを出そう! 11
note inc. 12 noteでは仲間を募集中です! https://note.jp/n/nc0fe1a230633 募集職種: • サーバーサイドエンジニア • サーバーサイドエンジニア
(次世代リーダー候補 / 第⼆新卒歓迎) • AIプラットフォームエンジニア 採⽤情報
None