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
Virtual Machines: Down the Rabbit Hole
Search
Josep M. Bach (Txus)
June 06, 2013
Technology
1
210
Virtual Machines: Down the Rabbit Hole
Talk given at the Ruby User Group meeting in Berlin.
Josep M. Bach (Txus)
June 06, 2013
Tweet
Share
More Decks by Josep M. Bach (Txus)
See All by Josep M. Bach (Txus)
The Power of Small Abstractions
txus
1
220
Monadic Ruby
txus
1
110
Programming the Future
txus
0
120
C - The Revolution In Systems Programming
txus
3
250
Revolver - programmers are expendable
txus
0
200
Being Matz for a day
txus
1
140
Fuby - Functional Ruby
txus
2
810
Building a Clojure webservice in 10 minutes
txus
7
4.6k
Polyglot Rails Applications in Rubinius
txus
3
530
Other Decks in Technology
See All in Technology
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
FlutterアプリにおけるSLI/SLOを用いたユーザー体験の可視化と計測基盤構築
ostk0069
0
100
複雑なState管理からの脱却
sansantech
PRO
1
150
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
690
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
150
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
140
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
AGIについてChatGPTに聞いてみた
blueb
0
130
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Building Your Own Lightsaber
phodgson
103
6.1k
We Have a Design System, Now What?
morganepeng
50
7.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Done Done
chrislema
181
16k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Being A Developer After 40
akosma
87
590k
How GitHub (no longer) Works
holman
310
140k
Transcript
Virtual Machines DOWN THE RABBIT HOLE Ruby USER GROUP BERLIN
6. JUNE 2013
TXUSTICE
None
POLITICAL SCIENCE DROPOUT
DON'T TRUST A WORDI SAY
BARCELONA / BERLIN =>
PROCESS VIRTUAL MACHINES
WHY oh why
WHY oh why Portability
WHY oh why Portability PERFORMANCE
WHY oh why PELICAN
wat
SOURCE CODE puts "hello world"
SOURCE CODE puts "hello world" AST send self puts hello
world
SOURCE CODE puts "hello world" AST send self puts hello
world BYTECODE PUSH_SELF PUSH "puts" PUSH "hello world" CALL 1
COMPALER
COMPILER
BUT HOW DOES A VM LOOK LIKE?
HUGE-ASS CASE STATEMENT
STACK PUSH 2 PUSH 3 ADD PROGRAM IP 2 *
3
2 STACK PUSH 2 PUSH 3 ADD PROGRAM IP 2
* 3
3 2 STACK PUSH 2 PUSH 3 ADD PROGRAM IP
2 * 3
5 STACK PUSH 2 PUSH 3 ADD PROGRAM IP 2
* 3
STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2 CALL 2
PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
<SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2 CALL
2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
"puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2
CALL 2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
BABY DUCK
"hello world" "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1
PUSH_LIT 2 CALL 2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
42 "hello world" "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT
1 PUSH_LIT 2 CALL 2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
nil STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LIT 2 CALL
2 PROGRAM IP puts "hello world", 42 "puts" "hello world" 42 LITERALS
IT PRINTED "HELLO WORLD" HEH
EVER SEEN A FUNCTION? def greet(name) puts "Hello, ", name
end
STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0 CALL 2
PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
<SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0 CALL
2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
"puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0
CALL 2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
"Hello, " "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1
PUSH_LOCAL 0 CALL 2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
"John" "Hello, " "puts" <SELF> STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT
1 PUSH_LOCAL 0 CALL 2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
nil STACK PUSH_SELF PUSH_LIT 0 PUSH_LIT 1 PUSH_LOCAL 0 CALL
2 PROGRAM IP def greet(name) puts "Hello, ", name end "puts" "Hello, " LITERALS name: "John" LOCALS
GARBAGE COLLECTION
THE ALLOCATOR
WHAT'S THE OPPOSITE OF AN ALLIGATOR?
REFERENCE COUNTING object.refcount++ WHEN WE PUSH AN OBJECT TO THE
STACK object.refcount-- WHEN WE POP AN OBJECT FROM THE STACK BROUGHT TO YOU BY NAIVETY
COOLER ALGORITHMS GENERATIONAL BAKER'S TREADMILL BROUGHT TO YOU BY COMPUTER
SCIENCE MASTERMINDS REAL-TIME INCREMENTAL NON-MOVING NON-COPYING MOVING COPYING CONCURRENT BITMAP MARKING TRICOLOR STOP-THE-WORLD MARK & SWEEP BACON-FLAVOURED SENTIMENTAL KEBAP
JUST IN TIME
JUST IN TIME COMPILING VM Bytecode MACHINE CODE x86 x86_64
arm
CHECK THIS OUT breaux: even cooler cool IF THIS TOPIC
IS RELEVANT TO YOUR INTERESTS
THANKS! txustice txus QUESTIONS?