~/talk

Are generator-coroutines really the answer?

Talkat PyData London 2024 · 2024-06-14..06-16· [python, reactive-programming]
slides:none on file

Claim: generator-coroutines let code linearize state machines and externalize stopping criteria, but practical costs appear: Python ≥3.6 async/await and yield from get used, itertools and pandas/numpy/Scipy reveal mismatches, and composition requires reimplementing chainlike helpers. Timing shows decisions cost ~1 μs while small work is ~ns so eager kernels dominate; for slower 1 ms tasks generators help. Pumping/priming and the first-rest modality force awkward wrappers; demos (data pipeline, Uno) sometimes run but need extra plumbing and fragile priming.

AI-written summary · about

  1. 0:00Generator-coroutines intro
  2. 4:19Terminology confusion
  3. 10:34Lazy vs eager computation
  4. 15:45Homogeneity in generators
  5. 20:41Iteration helpers benefits
  6. 28:01State machines with generators
  7. 33:56First-rest modality issues
  8. 37:28Composition limits
  9. 40:18Practical challenges
  10. 41:21Answer: generator-coroutines?
~/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.