~/talk

Diving into Dynamic: Demystefying Metaprogrammaing with Ruby

Talkat RubyConf India 2023 · 2023-08-26..08-27· [ruby, compilers-and-language-design]
slides:none on file

Shows how a wrapper reads a data_source that exposes methods like cpu, mouse, keyboard and either generates 100+ accessors with define_method or handles calls dynamically with method_missing/respond_to_missing to flag component prices > $99. Demonstrates using public_send (not send), explains method lookup order, warns about monkey patching, memory/performance cost of runtime generation, and recommends explicit tests and docs; example code compiles and runs in demo.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 2:28What is metaprogramming
  3. 6:42Dynamic dispatch with send
  4. 10:21Creating methods at runtime
  5. 12:08Method lookup and method_missing
  6. 14:39Open classes and monkey patching
  7. 16:48Metaprogramming in Ruby on Rails
  8. 17:51Trade-offs and best practices
  9. 20:24Q&A session
~/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.