Compiling a Dependently Typed Language to Ruby

Compiling a Dependently Typed Language to Ruby

A.K.A. "Compilers Are Dope And Also A Little Bit About Fancy Types"

25ee17e694c4590abcc3c1e3c628724b?s=128

Michael Bernstein

June 12, 2015
Tweet

Transcript

  1. Compiling A Dependently Typed Language To Ruby Michael R. Bernstein

    RubyNation / 2015.6.12 / Silver Spring, Maryland
  2. None
  3. Why?

  4. New ways of looking at how programs are designed, written,

    executed, optimized, refactored, etc.
  5. A New Lens

  6. Compilers Are Dope And Also A Little Bit About Fancy

    Types Michael R. Bernstein RubyNation / 2015.6.12 / Silver Spring, Maryland
  7. None
  8. None
  9. None
  10. None
  11. Very Interesting

  12. Why?

  13. How?

  14. Compilers

  15. Compiler: - a computer program - that consumes computer programs

    - and produces computer programs
  16. Compiler: - a computer program - that does whatever you

    want
  17. [Animated image representing the sheer awesomeness of COMPILERS]

  18. “Modern Compiler Implementation in ML” Appel

  19. None
  20. C ASM ????

  21. X Y ????

  22. Idris Ruby ????

  23. Idris Ruby Rainbows, wizard dust, prayers, mystical insights, etc.

  24. None
  25. None
  26. Intermediate Representations

  27. None
  28. Idris Ruby ????

  29. LAMBDA CALCULUS

  30. Everything that is computable can be expressed in terms of

    the lambda calculus.
  31. Everything that is computable can be compiled to the lambda

    calculus.
  32. Intermediate Representations Intermediate Representations Intermediate Representations Intermediate Representations Intermediate Representations

    Intermediate Representations
  33. TT TT Case IR Case IR Lift IR Defunc IR

    ANF Idris ???
  34. TT TT Case IR Case IR Lift IR Defunc IR

    ANF Idris PHP
  35. Tour and Demo!

  36. None
  37. DEEP BREATH

  38. Type Systems

  39. [Animated image representing the sheer awesomeness of TYPE SYSTEMS]

  40. Dependent Types

  41. Fancy Types

  42. Expressive Types

  43. pythag : Int -> List (Int, Int, Int) counter_rpc :

    Int -> Maybe Int -> Process (Maybe Int) (Int,Int)
  44. Program Phases

  45. Syntax Check Compile Execute Test Type Check Write

  46. Syntax Check Compile Execute Test Type Check Write

  47. Syntax Check Compile Execute Test Type Check Write

  48. More People To Read

  49. Stephanie Weirich

  50. Conor McBride

  51. Philip Wadler

  52. Works Cited

  53. Sam Elliot, Edwin Brady, #idris, RubyNation & you! Acknowledgements

  54. Thank You w michaelrbernste.in t @mrb_bk