~/talk

Compiling Ruby

Talkat RubyKaigi 2017 · 2017-09-18..09-20· [ruby, compilers-and-language-design]
github:kddeisz
slides:none on file

Shows how Ruby 2.3’s RubyVM::InstructionSequence::load_iseq lets code be compiled to YARV bytecode, stored and reloaded to skip parsing and cut startup time by about 30%. Demonstrates a proof‑of‑concept gem that rewrites source (using the parser gem), performs instruction elimination (e.g. folding 246060 into a literal) and writes/reads .iseq binaries, plus hex‑dumping the ISeq header. Work is intermittent — the custom binary writer is partially functional — but the pipeline and practical gains are reproducible.

AI-written summary · about

  1. 0:00Introduction and story
  2. 2:59Tokenizing and parsing Ruby
  3. 6:32Instruction sequences in Ruby
  4. 8:21Compiling to binary format
  5. 10:05Load ISEQ for faster requires
  6. 13:23Breaking the compilation process
  7. 16:15Macros and instruction elimination
  8. 18:28Modifying the AST
  9. 21:30Inspecting compiled binary
  10. 24:03Injecting debugging code
  11. 25:51Interoperability with Ruby
  12. 27:17Proof of concept challenges
  13. 28:42Future of Ruby compilation
  14. 35:07Q&A on metaprogramming
~/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.