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
180
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
0
4.3k
Papers We Love NYC: "Propositions As Types" By Philip Wadler
mrb
1
1.5k
Programs That Eat Programs
mrb
2
1.3k
Know Your Types
mrb
5
2.7k
The Art of Obsession
mrb
3
760
The Research Omphalos
mrb
1
250
Papers We Love: "A Unified Theory of Garbage Collection"
mrb
4
2.2k
Distributed Systems Archaeology
mrb
22
2.9k
GoRuCo 2013
mrb
11
4.6k
Other Decks in Programming
See All in Programming
社内 LT 会を発足し、アウトプット文化を醸成させるために考えたこと・やったこと / Starting internal LT meetings and fostering an output culture
mackey0225
3
120
Google's Recipe for Scaling (Web) Security – LocoMocoSec 2024
lweichselbaum
0
170
유연한 Composable 설계
l2hyunwoo
0
380
AHC035解説
terryu16
0
730
Prompt FlowによるLLMアプリケーション開発
yuto2000
1
1k
CSC307 Lecture 14
javiergs
PRO
0
220
12年前の『型システム入門』翻訳の思い出話
mame
11
1.2k
I/O Extended Android in Korea 2024 ~ Whats new in Android development tools
pluu
0
250
コード生成を伴うLLMエージェント - 2024.07.18 Tokyo AI
smiyawaki0820
11
4.1k
Clean Architecture by TypeScript & NestJS
ryounasso
0
150
はしめてのプログラミングとロボット制御
watawatavoltage
0
290
CSC307 Lecture 10
javiergs
PRO
0
310
Featured
See All Featured
How GitHub (no longer) Works
holman
305
140k
Building Adaptive Systems
keathley
34
2k
Docker and Python
trallard
37
2.9k
Rails Girls Zürich Keynote
gr2m
93
13k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
78
15k
The Power of CSS Pseudo Elements
geoffreycrofte
64
5.2k
Practical Orchestrator
shlominoach
185
10k
Raft: Consensus for Rubyists
vanstee
134
6.5k
The Invisible Customer
myddelton
117
13k
The Mythical Team-Month
searls
217
43k
The Straight Up "How To Draw Better" Workshop
denniskardys
229
130k
How to name files
jennybc
67
96k
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