~/talk

Functional programming in Python with PyToolz

Talkat PyOhio 2014 · 2014-07-26..07-27· [functional-programming, python]
links:none on file
slides:none on file

Library demo of toolz and cytoolz shows concrete utilities (pipe, compose, curry, memoize, dicttoolz, itertoolz) that extend itertools/functools and target real tasks: pipelined word counting and a Markov-chain genome scan. Curried functions and lazy iterators compose cleanly; groupby is claimed as the fastest pure-Python impl. Replacing pure-Python toolz calls with cytoolz speeds a genomic example from about seven seconds to two seconds, so the APIs are practical and the Cython backend noticeably speeds heavy workloads.

AI-written summary · about

  1. 0:00Intro
  2. 2:59We don't need everything from functional programming languages
  3. 4:27PyToolz brings elements of functional programming to Python
  4. 5:13Functional programming is a paradigm
  5. 6:31languages change, style endures
  6. 9:33Is Python a functional programming language?
  7. 9:58Many functional elements built-in
  8. 11:03first-class citizens in Python
  9. 13:36Another perspective: Shell scripting!
  10. 16:56compose(*funcs): simple but effective
  11. 18:41curry is a more advanced partial
  12. 22:56Making decorators easier with curry
  13. 25:57@memoize decorator is curried: simple usage
  14. 26:58cache keyword usage
  15. 28:23memoize: "how" vs "what"
  16. 29:26Remember map, reduce, filter, etc?
  17. 36:55Final sales pitch for toolz
~/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.