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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Josep M. Bach (Txus)
June 06, 2013
Technology
230
2
Share
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
260
Monadic Ruby
txus
2
130
Programming the Future
txus
1
140
C - The Revolution In Systems Programming
txus
4
280
Revolver - programmers are expendable
txus
1
220
Being Matz for a day
txus
2
170
Fuby - Functional Ruby
txus
3
900
Building a Clojure webservice in 10 minutes
txus
7
4.7k
Polyglot Rails Applications in Rubinius
txus
3
570
Other Decks in Technology
See All in Technology
今年60歳のおっさんCBになる
kentapapa
2
380
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
1
210
聞き手の目線で考えるプロポーザル
takefumiyoshii
0
380
建設的な現実逃避のしかた / How to practice constructive escapism
pauli
4
330
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
74k
新規サービス開発におけるReact Nativeのリアル〜技術選定の裏側と実践的OSS活用〜
grandbig
2
190
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
16k
Hello UUID
mimifuwacc
0
140
明日からドヤれる!超マニアックなAWSセキュリティTips10連発 / 10 Ultra-Niche AWS Security Tips
yuj1osm
0
370
LLM とプロンプトエンジニアリング/チューターを定義する / LLMs and Prompt Engineering, and Defining Tutors
ks91
PRO
0
360
Claude Teamプランの選定と、できること/できないこと
rfdnxbro
1
2.3k
BigQuery × dbtでコスト削減した話
rightcode
0
120
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Abbi's Birthday
coloredviolet
2
6.6k
Color Theory Basics | Prateek | Gurzu
gurzu
0
290
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
210
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
340
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
93
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
150
Designing for humans not robots
tammielis
254
26k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
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?