~/talk

Applying Functional Programming Patterns

Talkat Scala.IO 2016 · 2016-10-27..10-28· [machine-learning]
links:none on file
slides:none on file

Demonstrates using Monoids to do a one-pass monoid fold over an RDD in Apache Spark that returns a tuple (example: 7 words, 28 chars and a word->count map) and shows swapping the tuple to add max/min or other metrics with no code rewalk; reports the monoid version has more allocation but is almost as fast as handwritten; shows replacing try/catch with Either/Validated/Ior so validation either accumulates all errors with Validated (NonEmptyList) or emits warnings with Ior; notes Validated is applicative not a monad.

AI-written summary · about

  1. 0:00Introduction
  2. 1:01Lego vs Duplo
  3. 4:05Monoid Laws
  4. 4:38Monoid Typeclass trait Monoid (A) def empty: A
  5. 5:31Using Our Monoid
  6. 6:58Monoid Zoo
  7. 9:08Monoids Compose (Lego Principle)
  8. 11:37RDDs and Folds
  9. 12:51The Program
  10. 13:48Running this program
  11. 15:19Easy Extension
  12. 16:23The new program
  13. 16:56More Monoid Tricks
  14. 18:12The Traditional Way
  15. 19:24The Functional Way
  16. 19:46Out Of The Box
  17. 21:54Example Time
  18. 22:19Validating Passwords
  19. 24:40Passwords with Validated
  20. 25:34Using Validated
  21. 27:16First Class Errors
  22. 28:07Enough Duplo, time for Lego!
~/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.