~/talk

Zeitwerk Internals

Talkat Friendly.rb 2023 · 2023-09-27..09-28· [ruby-on-rails, ruby]
slides:none on file

Zeitwerk is an autoloader/reloader/eager loader implemented in ~1,000 lines with about 50 releases and ~300 million downloads on RubyGems; it scans only one directory level at setup, registers absolute-path autoloads, wraps require with a registry to intercept files and directories, creates modules on demand, uses an inflector per loader, eager loads breadth‑first by triggering pending autoloads, and handles reloads by removing constants and entries from loaded_features plus a TracePoint‑based explicit-namespace mechanism.

AI-written summary · about

  1. 0:00Introduction and welcome
  2. 1:04Speaker introduction
  3. 4:34Ruby constants and autoloading basics
  4. 17:27Zeitwerk setup and conventions
  5. 20:40Autoloading implementation
  6. 32:36How autoloads are executed
  7. 33:43Zeitwerk's require wrapper
  8. 42:36Recursive autoloading and name spaces
  9. 46:13Explicit name spaces and TracePoint
  10. 49:28Eager loading mechanics
  11. 52:44Reloading process
  12. 56:15Summary and closing
~/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.