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
220
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
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
3
280
20241218_今年はSLI/SLOの導入を頑張ってました!
zepprix
0
100
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.9k
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
190
AWS環境におけるランサムウェア攻撃対策の設計
nrinetcom
PRO
0
170
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
160
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
39
16k
日本版とグローバル版のモバイルアプリ統合の開発の裏側と今後の展望
miichan
1
140
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
120
OCI技術資料 : ファイル・ストレージ 概要
ocise
3
11k
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
330
クレカ・銀行連携機能における “状態”との向き合い方 / SmartBank Engineer LT Event
smartbank
2
100
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Gamification - CAS2011
davidbonilla
80
5.1k
Typedesign – Prime Four
hannesfritz
40
2.4k
Faster Mobile Websites
deanohume
305
30k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Building Applications with DynamoDB
mza
91
6.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.3k
Optimising Largest Contentful Paint
csswizardry
33
3k
The Language of Interfaces
destraynor
154
24k
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?