Build Your Own Async
David BeazleyRecommended by 4 HN commenters across 3 months, 2020–2023
tutorial · advanced · evergreen · 2020–2023 on HN
David Beazley's workshop screencast builds asynchronous programming in Python from scratch, starting from callbacks and continuations and replacing threads to show how concurrency works underneath.
HN people recommend it as the best way to understand what async machinery actually does under the covers.
Up next
6 mo on HNJake Archibald on the web browser event loop, setTimeout, micro tasks, requestAnimationFrame, ...
JSConf
Recommended 7× on HN · 2018–2023
15 mo on HNBut what is the Fourier Transform? A visual introduction.
3Blue1Brown
Recommended 16× on HN · 2018–2025
14 mo on HNWhat the heck is the event loop anyway? | Philip Roberts | JSConf EU
JSConf
Recommended 16× on HN · 2015–2025
4 mo on HNUnderstanding the Python GIL
David Beazley
Recommended 4× on HN · 2013–2023
18 mo on HNRuby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich
Confreaks
Recommended 17× on HN · 2013–2026
16 mo on HNThe spelled-out intro to neural networks and backpropagation: building micrograd
Andrej Karpathy
Recommended 17× on HN · 2022–2025
16 mo on HNHow Python was Shaped by leaky Internals, Armin Ronacher, Flask framework
Видео с мероприятий {speach!
Recommended 15× on HN · 2017–2025
15 mo on HNRailsConf 2014 - All the Little Things by Sandi Metz
Confreaks
Recommended 15× on HN · 2015–2025
12 mo on HNHow To Design A Good API and Why it Matters
Google TechTalks
Recommended 12× on HN · 2011–2025
12 mo on HNThe Problem with Time & Timezones - Computerphile
Computerphile
Recommended 12× on HN · 2014–2026
10 mo on HNRailsConf 2016 - Turbolinks 5: I Can’t Believe It’s Not Native! by Sam Stephenson
Confreaks
Recommended 6× on HN · 2017–2020
9 mo on HNBrian Goetz - Stewardship: the Sobering Parts
ClojureTV
Recommended 10× on HN · 2014–2025
4 comments from Hacker News
Yes, something like that. Like here's David's "Build Your Own Async" [1], which I prefer over Philip's (still extremely good) "What the heck is the event loop anyway?" [2]. It's one thing to tell how something works, but to successfully show what the hell its actually doing under the covers, just conveys much more information. [1] ▶ this video [2] link
I've found this [1] screencast on the low-level principles of async in Python an amazing resource to understand async at a deep level. [1] ▶ this video
> I talk about generators as if they were the coroutine system in Python, but in fact, they’re one of two: Python also has a completely different kind of thing that it actually uses the name ‘coroutine’ for, in which function definitions start with async def and suspend with await . The async and await system of coroutines in Python is in fact layered on top of the yield system, via an intermediate construct called yield from —which isn’t even technically required, it’s just that implementing it as a loop passing values through from and to the subcoroutine is exceptionally tedious if done correctly[1] and can’t be abstracted as a function call. As a first approximation, await x in Python is equivalent to yield from x.__await__() . It should have been completely equivalent, arguably, but history got in the way. David Beazley has a talk[2] where he walks you through implementing an async runtime (to put it pompously) and you can see how the whole thing hangs together. It’s really quite simple, and in my experience it’s much better than trying to wrap your head around the asyncio docs, because while the language-level foundations are extremely nice and simple, asyncio the stdlib module just kind of sucks. [1] link [2] ▶ this video
I highly recommend Victor Skvortsov's exhaustive, 12-part series, "Python Behind the Scenes," a deep dive into the implementation details of just about every Python language feature one could possibly take for granted. There isn't a single one I haven't learned something from, but some of my personal favorites include: * Part 2, How the CPython compiler works: link * Part 6, How Python's object system works: link * Part 10, How Python dictionaries work: link * Part 13: The GIL and its effects on Python multithreading: link The whole series can be found here: link For a slightly higher-level (i.e., no macabre, low-level C code), but still incredibly enlightening dive into the "dark side" of Python, in particular various abuses and hexes for manipulating control flow, have a look at David Beazley's smorgasboard of keynote presentations like "Generators: The Final Frontier" ( link ), "Python Concurrency From The Ground Up" ( link ), and "Build Your Own Async" ( ▶ this video ).