~/talk

Compiling Ruby

Talkat RubyConf 2017 · 2017-11-15..11-17· [ruby]
github:kddeisz
slides:none on file

Shows how Ruby 2.3’s RubyVM::InstructionSequence::load_iseq lets compiled YARV bytecode be saved, reloaded and substituted for source, and demonstrates actual tools: Bootsnap’s loader, the parser gem for AST rewrites, a Vernacular gem that injects lexical macros, and a Tuby prototype that emits bytecode and sometimes works. Claims include performance wins from instruction elimination, practical uses in tests, and brittle dependency on Ruby’s binary dump format.

AI-written summary · about

  1. 0:00Compiling Ruby
  2. 1:22Ruby execution process
  3. 1:54Tokenizing the input
  4. 5:08Building YARV instruction sequences
  5. 6:16Executing YARV instruction sequences
  6. 7:00Reading/writing YARV instruction sequences Ruby 2.3
  7. 9:10Programmatically loading YARV instruction sequences
  8. 12:04Examples
  9. 12:47Now for the fun part
  10. 18:26Let's go further
  11. 21:37Let's go even further
  12. 23:19We can inject debugging code into Ruby to learn the binary structure of a YARV bytecode dump.
  13. 28:21Why would you ever do this?
  14. 28:40Code gets read many more times than it gets written.
  15. 30:30What's next?
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.