~/talk

Extending Ruby with Ruby

Talkat RailsConf 2012 · 2012-04-23..04-25· [ruby, compilers-and-language-design]
links:none on file
slides:none on file

Shows concrete Ruby implementations: a Python-style decorator system that registers via unary + and a class-level registry and redefines methods using the method_added hook, including a working transactional decorator that wraps ActiveRecord.transaction, memoization and parameterized retry decorators; a Scala-like partial-application hack using an underscore/partial object that binds block bindings and args; and a lazy evaluator built on BasicObject with method_missing to defer HTTP calls for streaming views. Code is packaged as a method_decorators gem, works but carries visibility, singleton-method and performance caveats.

AI-written summary · about

  1. 0:00Introduction
  2. 1:52Extending Ruby with Ruby
  3. 2:56Python decorators in Ruby
  4. 10:02Implementing Ruby decorators
  5. 15:28Scala partial application in Ruby
  6. 18:57Building partial application
  7. 22:10Haskell lazy evaluation in Ruby
  8. 24:15Lazy evaluation wrapper
  9. 26:01Lazy Ruby everywhere
  10. 27:49Lazy evaluation in Rails
  11. 28:12Conclusion and key takeaways
~/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.