~/talk

Crafting elegant code with ruby DSLs

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

A brittle server-side UI that validates a Ruby gem’s diagnose report (collecting ~100 data points across a dozen subreports) gets replaced with a block-based DSL built using define_method, yield and instance_eval, dynamic class/module creation (module.new, Class.new) and a plugin system that scopes metadata per report. The DSL converts nested hashes into readable attribute blocks, generates per-report attribute classes to avoid cross-contamination, and works in development; code lives in an open repo intended for extraction into a gem.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 4:38What is a DSL
  3. 11:09Building the DSL foundation
  4. 17:51Extending the DSL with plugins
  5. 27:55Reflection and takeaways
  6. 30:25Conclusion and next steps
~/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.