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
190
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
GoのIteratorに詳しくなってしまう
inatonix
1
200
Regular Expressions, REXML, Automata Learning
makenowjust
0
220
2024 컴포즈 정원사
jisungbin
0
150
Some more adventure of Happy Eyeballs
coe401_
2
190
ドメイン駆動設計を実践するために必要なもの
bikisuke
4
330
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
0
350
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
250
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
380
GraphQL あるいは React における自律的なデータ取得について
quramy
11
3k
Ruby Parser progress report 2024
yui_knk
2
230
Swiftコードバトル必勝法
toshi0383
0
170
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
Featured
See All Featured
Six Lessons from altMBA
skipperchong
26
3.4k
How to name files
jennybc
75
98k
How STYLIGHT went responsive
nonsquared
93
5.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
24
610
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
43
2k
Faster Mobile Websites
deanohume
304
30k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
36
1.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
1
55
Fireside Chat
paigeccino
31
2.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.1k
RailsConf 2023
tenderlove
28
810
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