Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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.7k
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
830
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
4.9k
Other Decks in Programming
See All in Programming
connect-python: convenient protobuf RPC for Python
anuraaga
0
400
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
230
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
300
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
120
全員アーキテクトで挑む、 巨大で高密度なドメインの紐解き方
agatan
8
20k
Microservices rules: What good looks like
cer
PRO
0
1.2k
AIコーディングエージェント(skywork)
kondai24
0
160
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.3k
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
400
STYLE
koic
0
170
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
3k
「コードは上から下へ読むのが一番」と思った時に、思い出してほしい話
panda728
PRO
38
25k
Featured
See All Featured
Fireside Chat
paigeccino
41
3.7k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Rails Girls Zürich Keynote
gr2m
95
14k
Designing Experiences People Love
moore
143
24k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Bash Introduction
62gerente
615
210k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Thoughts on Productivity
jonyablonski
73
5k
Statistics for Hackers
jakevdp
799
230k
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