Augmented Ruby: The Rubinius Language Platform

A8e44ce1b57c2689d5a7172d15df42b5?s=47 brixen
March 04, 2014

Augmented Ruby: The Rubinius Language Platform

Talk presented at the March 4th, 2014 ChicagoRuby meetup.

A8e44ce1b57c2689d5a7172d15df42b5?s=128

brixen

March 04, 2014
Tweet

Transcript

  1. Augmented Ruby! The Rubinius Language Platform!

  2. Brian Shirai

  3. You can create your own programming language

  4. None
  5. None
  6. None
  7. None
  8. 3 steps to designing! a language

  9. Steps to designing a language 1.Syntax

  10. def divide(a, b) # ... end ! function divide(a, b)

    { /* ... */ }
  11. Steps to designing a language 1. Syntax 2.Semantics

  12. def divide(a, b) a / b # 1 / 3

    => 0 end ! function divide(a, b) { a / b; /* 1 / 3 => 0.333 */ }
  13. Steps to designing a language 1. Syntax 2. Semantics 3.Model

  14. 3 parts to building! a language

  15. Parts to building a language 1.Parser

  16. + 1 2 Parse: 1 + 2 + 3 +

    3
  17. None
  18. None
  19. None
  20. Parts to building a language 1. Parser 2.Compiler

  21. Parts to building a language 1. Parser 2. Compiler 3.Machine

  22. None
  23. processing input output Pipeline of transformations

  24. Parts to building a language 1.Parser

  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. Parts to building a language 1. Parser 2.Compiler

  32. None
  33. None
  34. Parts to building a language 1. Parser 2. Compiler 3.Machine

  35. ->0000: meta_push_1 0001: meta_push_2 0002: send_stack :+, 1 0005: push_int

    3 0007: send_stack :+, 1 0010: ret Stack Instructions 1 Interpretation
  36. Stack Instructions 1 Interpretation 2 0000: meta_push_1 ->0001: meta_push_2 0002:

    send_stack :+, 1 0005: push_int 3 0007: send_stack :+, 1 0010: ret
  37. Stack Instructions 3 Interpretation 0000: meta_push_1 0001: meta_push_2 ->0002: send_stack

    :+, 1 0005: push_int 3 0007: send_stack :+, 1 0010: ret
  38. Stack Instructions 3 Interpretation 3 0000: meta_push_1 0001: meta_push_2 0002:

    send_stack :+, 1 ->0005: push_int 3 0007: send_stack :+, 1 0010: ret
  39. Stack Instructions 6 Interpretation 0000: meta_push_1 0001: meta_push_2 0002: send_stack

    :+, 1 0005: push_int 3 ->0007: send_stack :+, 1 0010: ret
  40. Stack Instructions 6 Interpretation 0000: meta_push_1 0001: meta_push_2 0002: send_stack

    :+, 1 0005: push_int 3 0007: send_stack :+, 1 ->0010: ret
  41. None
  42. None
  43. Thank you

  44. Credits https://www.thingiverse.com/thing:16023 http://snokey.com/furniture-designing-with-simple-concept-of- decoration/simple-capture-of-designing-with-writing-photo-capture/ http://www.citsolutions.edu.au/uploads/flags.jpg http://atomy-lang.org http://fancy-lang.org https://github.com/apricot-lang/apricot https://github.com/evanphx/kpeg http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html