~/talk

Zeitwerk Internals

Talkat Rails World 2023 · 2023-10-05..10-06· [ruby-on-rails, ruby]
slides:none on file

Zeitwerk is the Ruby autoloader that scans configured root directories just one level deep, sets autoloads for files and directories, and defers loading until Ruby triggers those autoloads; it intercepts require to do bookkeeping, defines missing modules on the fly and then descends into that branch, and implements reloading by removing constants and entries from loaded_features. Implementation details: ~1k LOC, per-loader deterministic inflector, tracepoint on class event, and uses absolute paths for require for speed.

AI-written summary · about

  1. 0:00Introduction to Zeitwerk
  2. 2:35Ruby constants and namespaces
  3. 12:57How Zeitwerk sets autoloads
  4. 21:15Triggering autoloads in Ruby
  5. 29:28Reloading and eager loading
  6. 33:47Summary and Q&A
~/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.