~/talk

Refactoring Ruby with Monads

Talkat Barcelona Ruby Conference 2014 · 2014-09-11..09-13· [ruby]
slides:none on file

Claims that monads are practical in Ruby and shows concrete refactorings: replace nil-check pyramids, flatten nested collections, and sequence asynchronous callbacks. Implements decorator classes Optional, Many, Eventually with operations and_then and from_value plus within that chain safely; examples traverse models, aggregate words from comments, and call the GitHub API, and the patterns run end to end. Code appears packaged as a gem and published on GitHub.

AI-written summary · about

  1. 0:00Start
  2. 0:48ANALOGIES
  3. 15:50MULTIPLE RESULTS
  4. 18:33ASYNCHRONOUS CODE
  5. 24:15ABSTRACT DATA TYPE
  6. 25:56COMMON INTERFACE
~/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.