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
250
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Virtual Machines: Down the Rabbit Hole
Talk given at the Ruby User Group meeting in Berlin.
Josep M. Bach (Txus)
June 06, 2013
More Decks by Josep M. Bach (Txus)
See All by Josep M. Bach (Txus)
The Power of Small Abstractions
txus
1
270
Monadic Ruby
txus
2
150
Programming the Future
txus
1
160
C - The Revolution In Systems Programming
txus
4
290
Revolver - programmers are expendable
txus
1
240
Being Matz for a day
txus
2
190
Fuby - Functional Ruby
txus
3
920
Building a Clojure webservice in 10 minutes
txus
7
4.7k
Polyglot Rails Applications in Rubinius
txus
3
590
Other Decks in Technology
See All in Technology
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
520
【試作】IoT x AIエージェント
happysamurai294
0
110
[RSJ26] NarrativeFlow: Flow-Based Vision-Language-Action Model Using Robot Velocity Fields
keio_smilab
PRO
0
140
AI時代に、プロダクトの数だけ積み上がる所有コストをどうエンジニアリングするか / Engineering the Cost of Ownership
kzkmaeda
0
930
[RSJ26] AnoleVLA: Lightweight Vision-Language-Action Model with Deep State Space Models for Mobile Manipulation
keio_smilab
PRO
0
120
Bet AI Day 2026丨How We Bet AI: AIとともに働く場をつくる
layerx
PRO
1
2.1k
Bet AI Day 2026丨AIによって本質に戻るシステムリスク管理
layerx
PRO
0
770
深夜のクラウド懺悔室 1:29:300 or 1:0:0
kazzpapa3
0
110
Bet AI Day 2026丨Agentは、「金融」という巨大産業の何を変えられるのか
layerx
PRO
0
690
Instana&Bob トラブルシュートハンズオン
mayamasaki68
0
110
[RSJ26] Flow as Flow: Modeling Robot Velocity Fields as Probability Velocity Fields
keio_smilab
PRO
0
190
Beyond the Hype: Practical AI for Your Oracle Database with MCP
thatjeffsmith
1
220
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
1
2.4k
How STYLIGHT went responsive
nonsquared
100
6.3k
The Curse of the Amulet
leimatthew05
2
14k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
4 Signs Your Business is Dying
shpigford
187
23k
A better future with KSS
kneath
240
18k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
510
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
690
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
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?