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
Compiling a Dependently Typed Language to Ruby
Search
Michael Bernstein
June 12, 2015
Programming
3
210
Compiling a Dependently Typed Language to Ruby
A.K.A. "Compilers Are Dope And Also A Little Bit About Fancy Types"
Michael Bernstein
June 12, 2015
Tweet
Share
More Decks by Michael Bernstein
See All by Michael Bernstein
I'd like to introduce you to a few of my closest friends
mrb
1
4.8k
Papers We Love NYC: "Propositions As Types" By Philip Wadler
mrb
1
1.7k
Programs That Eat Programs
mrb
2
1.3k
Know Your Types
mrb
5
2.9k
The Art of Obsession
mrb
3
850
The Research Omphalos
mrb
1
270
Papers We Love: "A Unified Theory of Garbage Collection"
mrb
4
2.2k
Distributed Systems Archaeology
mrb
22
3.1k
GoRuCo 2013
mrb
11
5k
Other Decks in Programming
See All in Programming
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
120
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
CSC307 Lecture 06
javiergs
PRO
0
680
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
120
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
190
ぼくの開発環境2026
yuzneri
0
210
Oxlint JS plugins
kazupon
1
890
AgentCoreとHuman in the Loop
har1101
5
230
「ブロックテーマでは再現できない」は本当か?
inc2734
0
970
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
580
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Writing Fast Ruby
sferik
630
62k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Deep Space Network (abreviated)
tonyrice
0
47
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
It's Worth the Effort
3n
188
29k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
51
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Transcript
Compiling A Dependently Typed Language To Ruby Michael R. Bernstein
RubyNation / 2015.6.12 / Silver Spring, Maryland
None
Why?
New ways of looking at how programs are designed, written,
executed, optimized, refactored, etc.
A New Lens
Compilers Are Dope And Also A Little Bit About Fancy
Types Michael R. Bernstein RubyNation / 2015.6.12 / Silver Spring, Maryland
None
None
None
None
Very Interesting
Why?
How?
Compilers
Compiler: - a computer program - that consumes computer programs
- and produces computer programs
Compiler: - a computer program - that does whatever you
want
[Animated image representing the sheer awesomeness of COMPILERS]
“Modern Compiler Implementation in ML” Appel
None
C ASM ????
X Y ????
Idris Ruby ????
Idris Ruby Rainbows, wizard dust, prayers, mystical insights, etc.
None
None
Intermediate Representations
None
Idris Ruby ????
LAMBDA CALCULUS
Everything that is computable can be expressed in terms of
the lambda calculus.
Everything that is computable can be compiled to the lambda
calculus.
Intermediate Representations Intermediate Representations Intermediate Representations Intermediate Representations Intermediate Representations
Intermediate Representations
TT TT Case IR Case IR Lift IR Defunc IR
ANF Idris ???
TT TT Case IR Case IR Lift IR Defunc IR
ANF Idris PHP
Tour and Demo!
None
DEEP BREATH
Type Systems
[Animated image representing the sheer awesomeness of TYPE SYSTEMS]
Dependent Types
Fancy Types
Expressive Types
pythag : Int -> List (Int, Int, Int) counter_rpc :
Int -> Maybe Int -> Process (Maybe Int) (Int,Int)
Program Phases
Syntax Check Compile Execute Test Type Check Write
Syntax Check Compile Execute Test Type Check Write
Syntax Check Compile Execute Test Type Check Write
More People To Read
Stephanie Weirich
Conor McBride
Philip Wadler
Works Cited
Sam Elliot, Edwin Brady, #idris, RubyNation & you! Acknowledgements
Thank You w michaelrbernste.in t @mrb_bk