~/talk

Edges of Python Three Radical Python Hacks for Fun and Profit

Talkat PyBay 2024 · on Saturday, 2024-09-21· [python]
links:none on file
slides:none on file

Three concrete hacks: a tiny sync shim that starts coroutines with coro.send(None) and replaces async streams with blocking sockets to reuse one async codebase as a synchronous client (works for simple network stacks but loses create_task/timeouts and adds marginal call overhead); using an immutables persistent map (HAMT) to get structural sharing instead of expensive full dict copies (copies become noticeable around ~10k entries, ~1 ms); and a value-dispatch pattern (dispatch on values not just types) with a reference implementation in the EdgeDB repo.

AI-written summary · about

  1. 0:00Introduction to hacks
  2. 1:08Async to sync client conversion
  3. 9:16In-memory transaction atomicity
  4. 14:57Persistent maps for performance
  5. 17:29Value-based dispatch patterns
  6. 18:33Q&A and closing remarks
~/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.