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
230
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
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.9k
Papers We Love NYC: "Propositions As Types" By Philip Wadler
mrb
1
1.8k
Programs That Eat Programs
mrb
2
1.4k
Know Your Types
mrb
5
3k
The Art of Obsession
mrb
3
880
The Research Omphalos
mrb
1
290
Papers We Love: "A Unified Theory of Garbage Collection"
mrb
4
2.3k
Distributed Systems Archaeology
mrb
22
3.1k
GoRuCo 2013
mrb
11
5.1k
Other Decks in Programming
See All in Programming
メールのエイリアス機能を履き違えない
isshinfunada
0
210
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
210
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
130
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
160
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
200
『コードを書く以外の』エンジニアリング〜課金基盤移行プロジェクト推進のためのTips4選
yuriko1211
0
560
壊れたパーサから始める関数型設計と構成的なパーサ #fp_matsuri
raiga0310
2
440
継続モナドとリアクティブプログラミング
yukikurage
3
680
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.5k
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
180
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
170
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
22k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
450
Designing Powerful Visuals for Engaging Learning
tmiket
1
470
Design in an AI World
tapps
1
270
How to Talk to Developers About Accessibility
jct
2
470
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
30 Presentation Tips
portentint
PRO
1
360
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Amusing Abliteration
ianozsvald
1
240
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
420
Navigating Team Friction
lara
192
16k
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