~/talk

Rewriting Rack: A Functional Approach

Talkat RubyConf 2017 · 2017-11-15..11-17· [ruby, frontend-architecture]
slides:none on file

Claim: rewrite Rack in Ruby using procs and lambdas and borrow immutable ideas from Clojure. Tools shown include replacing classes with closures, composing middleware as functions, and comparing Ruby code to Clojure equivalents. Surprising specifics: Rack::Builder is 171 lines (79 without comments), the library calls dup 29 times and freeze 96 times. A functional proc-based Rack stack is built and runs, it avoids shared mutable-state bugs (but does not magically solve every problem).

AI-written summary · about

  1. 0:00Start
  2. 1:25John Mccarthy
  3. 4:29Python Exceptions
  4. 7:58Functional Programming
  5. 9:31Basic Closure
  6. 10:26Basic Function Definition
  7. 15:52Lambda
  8. 16:31Middleware
  9. 17:26How Middleware Is Implemented
  10. 18:37Simplify the Example
  11. 20:26Can We Do Functional Programming in Ruby
  12. 24:08Shared Mutable State
  13. 32:05Functions Instead of Objects
~/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.