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
Watching Ruby in browsers
Search
shigeru. nakajima
September 08, 2024
Programming
0
160
Watching Ruby in browsers
2024年8月31日 RubyKaigi 2024 follow up(
https://rhc.connpass.com/event/320709/
) の発表資料です。
shigeru. nakajima
September 08, 2024
Tweet
Share
More Decks by shigeru. nakajima
See All by shigeru. nakajima
Introduce dRuby
ledsun
0
460
Using Ruby in the browser is wonderful
ledsun
1
3.8k
Rubyで書いたテトリスをブラウザで動かしてみた
ledsun
0
2.5k
ruby.wasm に関する進捗報告
ledsun
0
1.2k
Hacking Guide of the ruby.wasm
ledsun
0
1.7k
私の作ったruby.wasm アプリケーション
ledsun
0
740
Load gem from browser
ledsun
2
1.9k
パラメタライズドテスト
ledsun
0
650
ゆっくり動くと速く動ける / If you move slowly, you can move more fast
ledsun
0
1.1k
Other Decks in Programming
See All in Programming
なんとなくわかった気になるブロックテーマ入門/contents.nagoya 2025 6.28
chiilog
1
270
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
120
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
150
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
12
4.5k
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
100
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
1
10k
5つのアンチパターンから学ぶLT設計
narihara
1
170
Rubyでやりたい駆動開発 / Ruby driven development
chobishiba
1
710
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
2.1k
Discover Metal 4
rei315
2
140
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
120
VS Code Update for GitHub Copilot
74th
2
650
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
Navigating Team Friction
lara
187
15k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Visualization
eitanlees
146
16k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Transcript
WA RB Ruby in the browser 観察日記 2024/08/31 ledsun (中島滋:株式会社ラグザイア)
於 RubyKaigi 2024 follow up
Self-introduction •ledsun@ github or X •Based in Tokyo •I am
programing web applications by Ruby on Rails and JavaScript WA RB
WA RB
WA RB
WA RB
RubyKaigi 2024で話したこと 1. ruby.wasm に追加した ruby in the browser 向け便利機能を紹介
(特に require_relative ) 2. 便利機能を使ったフレームワークを紹介 WA RB
Kaigi Effect WA RB
https://blog.tmtms.net/entry/202405-mysql-params WA RB さっそく使ってもらえた
ソースコードをみる と気になる点が WA RB
WA RB /lib/init.rb 内の記述
scriptタグで読みこんだ Rubyスクリプト中の require_relativeの起点は rubyVMを起動したHTML ファイル WA RB
WA RB 起点を指定出来る
WA RB
次の目標 WA RB
ruby.wasm + WebSocketで dRuby in the browser WA RB youchanさんがopal-drbやってた
WA RB
sendメソッドで エラーが起きる WA RB `method_missing': undefined method `Hello, world! from
Ruby' for an instance of JS::Object (NoMethodError)
JavaScriptオブジェクトのメソッド 呼び出しをmehtod_missingで 実装している WA RB
RubyにはObject#sendメソッドが あるので、method_missingは呼 ばれない WA RB
WA RB callメソッドを使えば 動かせる
WebSocket#send をそのまま呼びたい WA RB
WA RB 解決案の種類
バイパス WA RB
JavaScriptオブジェクトに Object#sendしたいん だっけ? WA RB
JavaScriptオブジェクト にconventional methods要る? WA RB
ためしにBasicObejectを 継承したら予想外の動き をした WA RB
WA RB 'Hoge::Fuga#bar': uninitialized constant Hoge::Fuga::Hoge (NameError)
あとでRubyistたちと相談 したいです。 WA RB
dRuby in the browser に期待していること WA RB
アプリケーションのプロトコル を作るための基盤がほしい WA RB HTTP RESTful アプリケーションのプロトコル WebSocket dRuby アプリケーションのプロトコル
Ruby in the browser でmiroみたいな共同 編集アプリケーションが つくれる、かも? WA RB
WA RB Presented by 終