~/talk

Reading RSpec — a journey of meta programming

Talkat Euruko 2023 · 2023-09-21..09-23· [ruby, compilers-and-language-design]
slides:none on file

Reads RSpec source to show exactly how method.method + source_location locates describe, how describe uses module_eval/class.new to generate example group classes, how let is implemented by defining memoized instance methods inside a dynamically created module, and how it registers example groups into RSpec.world and runs them via runner.invoke → run → example_group.run → example.run. Demonstrates using Ruby introspection, grep-search and Vim to navigate files, points out surprising simplicity of many layers and the memoization pattern that makes let behave like cached defs.

AI-written summary · about

  1. 0:00Intro
  2. 3:02About me
  3. 4:30Meta programming
  4. 5:10Object
  5. 7:51Code
  6. 12:57Subclass
  7. 20:52Class Methods
  8. 23:07Examples
  9. 25:04Run method
  10. 31:57Summary
~/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.