~/talk

Don't Fear The Lambda

Talkat Ru3y Manor 3 · on Saturday, 2011-11-05· [ruby, functional-programming]
slides:none on file

Argues for using Ruby's Enumerable methods to replace imperative loops: use functional style for returns and use each for side effects. Demonstrates concrete rewrites that become one-liners (detect for first match, any for existence, map+join for string building, flat_map for nested lists) and highlights Ruby 1.9 features (flat_map, map.with_index, enumerators/fibers). Warns that inject is powerful but often unreadable and that pure, immutable rewrites can be slower because Ruby creates new objects compared to mutating updates.

AI-written summary · about

  1. 0:00Start
  2. 1:32Ground Rules
  3. 1:43If You Return Your Value Use the Functional Style
  4. 2:43Side Effects
  5. 4:32Variable Names
  6. 6:47Flat Map
  7. 10:47Infinite Range
  8. 15:00Accumulator with an Array
  9. 15:54Hash Accumulator
  10. 17:32Array Accumulator
  11. 18:47Complex Nested Hash
  12. 20:20Blur
  13. 23:57Adding an Index
  14. 25:22Summary
  15. 26:52Naming the Parameters
~/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.