frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

How async/await works in Python (2021)

https://tenthousandmeters.com/blog/python-behind-the-scenes-12-how-asyncawait-works-in-python/
61•sebg•10mo ago

Comments

quentinp•10mo ago
While it stays at the Python level, https://github.com/AndreLouisCaron/a-tale-of-event-loops really helped me to understand how asyncio and Trio are implemented. I had no idea how sleeps worked before reading that post.
incomingpain•10mo ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

punnerud•10mo ago
A more simplified version:

Synchronous code is like a single-lane road where cars (tasks) must travel one after another in perfect sequence. If one car stops for gas (waiting for I/O), every car behind it must stop too. While orderly and predictable, this creates massive traffic jams as tasks wait unnecessarily for others to complete before they can proceed.

Pure asynchronous code (with callbacks) is like dispatching multiple cars onto independent routes with no coordination. Cars move freely without waiting for each other, but they arrive at unpredictable times and following their progress becomes chaotic. It's efficient but creates a complex tangle of paths that becomes hard to maintain.

Async/await combines the best of both approaches with a multi-lane highway system. Cars follow clear, synchronous-looking routes (making code readable), but only wait at strategic "await" exit ramps when truly necessary. When a car needs data, it signals with "await", pulls off the highway temporarily, and other cars continue flowing past. Once its operation completes, it merges back into traffic and continues. This gives you the logical simplicity of synchronous code with the performance benefits of asynchronous execution - cars only wait at crossroads when they must, maximizing throughput while maintaining order.

The genius of async/await is that it lets developers write code that looks sequential while the runtime handles all the complex traffic management under the hood.

explodes•10mo ago
Excellent write up. I appreciate the level of details here showing the history from the days of old, before async/await were even keywords.
bilsbie•10mo ago
How does the GIL come into play here?
punnerud•10mo ago
GIL is like a "red-cap" on the head for the CPU-core running the task, so you would not be able to run true Async without GIL. Have to hand the "red-cap" back, for the next task.

Instead of using a global lock ("red-cap"), Python objects have introduced a specialized reference counting system that distinguishes between "local" references (owned by a single thread) and "shared" references (accessed by multiple threads).

In that way enabling to remove GIL in the long run, now starting with making it optional.

Show HN: 30u30.fyi – Is your startup founder on Forbes' most fraudulent list?

https://30u30.fyi
52•not-chatgpt•23m ago•4 comments

Fedware: Government apps that spy harder than the apps they ban

https://www.sambent.com/the-white-house-app-has-huawei-spyware-and-an-ice-tip-line/
308•speckx•4h ago•99 comments

Do your own writing

https://alexhwoods.com/dont-let-ai-write-for-you/
271•karimf•9h ago•84 comments

Learn Claude Code by doing, not reading

https://claude.nagdy.me/
64•taubek•2h ago•28 comments

Turning a MacBook into a touchscreen with $1 of hardware (2018)

https://anishathalye.com/macbook-touchscreen/
128•HughParry•3h ago•51 comments

Android Developer Verification

https://android-developers.googleblog.com/2026/03/android-developer-verification-rolling-out-to-a...
24•ingve•28m ago•3 comments

How to turn anything into a router

https://nbailey.ca/post/router/
535•yabones•9h ago•198 comments

Agents of Chaos

https://agentsofchaos.baulab.info/report.html
31•luu•3d ago•2 comments

Bird brains (2023)

https://www.dhanishsemar.com/writing/bird-brains
273•DiffTheEnder•9h ago•181 comments

Cherri – programming language that compiles to an Apple Shortuct

https://github.com/electrikmilk/cherri
204•mihau•2d ago•43 comments

The stealthy startup that pitched brainless human clones

https://www.technologyreview.com/2026/03/30/1134780/r3-bio-brainless-human-clones-full-body-repla...
23•joozio•11h ago•23 comments

Researchers find 3,500-year-old loom that reveals textile revolution

https://web.ua.es/en/actualidad-universitaria/2026/marzo2026/23-31/ua-researchers-find-3-500-year...
36•geox•3d ago•1 comments

Seeing Like a Spreadsheet

https://davidoks.blog/p/how-the-spreadsheet-reshaped-america
52•paulpauper•2d ago•16 comments

William Blake, Remote by the Sea

https://www.laphamsquarterly.org/roundtable/william-blake-remote-sea
35•occurrence•3h ago•1 comments

OCR for construction documents does not work, we fixed it

https://www.getanchorgrid.com/developer/docs/endpoints/drawings-doors
107•wcisco17•6h ago•67 comments

Roulette Computers: Hidden Devices That Predict Spins

https://www.roulette-computers.com/
38•o4c•2d ago•7 comments

A sea of sparks: Seeing radioactivity

https://maurycyz.com/projects/spinthariscope/
40•maurycyz•3h ago•16 comments

Agentic AI and the next intelligence explosion

https://arxiv.org/abs/2603.20639
13•silverpiranha•53m ago•2 comments

Show HN: Coasts – Containerized Hosts for Agents

https://github.com/coast-guard/coasts
47•jsunderland323•7h ago•16 comments

CodingFont: A game to help you pick a coding font

https://www.codingfont.com/
268•nvahalik•7h ago•157 comments

Recover Apple Keychain

https://arkoinad.com/posts/apple_keychain_recovery.html
38•speckx•5h ago•12 comments

IronGlass Brings Legendary Soviet Cinema Lenses to Mirrorless Cameras

https://petapixel.com/2026/02/19/ironglass-brings-legendary-soviet-cinema-lenses-to-mirrorless-ca...
5•PaulHoule•4d ago•0 comments

In math, rigor is vital, but are digitized proofs taking it too far?

https://www.quantamagazine.org/in-math-rigor-is-vital-but-are-digitized-proofs-taking-it-too-far-...
84•isaacfrond•4d ago•75 comments

Build123d: A Python CAD programming library

https://github.com/gumyr/build123d
103•Ivoah•1d ago•42 comments

Mathematical methods and human thought in the age of AI

https://arxiv.org/abs/2603.26524
182•zaikunzhang•11h ago•74 comments

Tickets Are Prompts

https://dheer.co/tickets-are-prompts/
8•bushido•1h ago•2 comments

I am definitely missing the pre-AI writing era

https://www.lesswrong.com/posts/BJ4pnropWdnzzgeJc/i-am-definitely-missing-the-pre-ai-writing-era
225•joozio•15h ago•181 comments

Take better notes, by hand

https://brianschrader.com/archive/take-better-notes-by-hand/
155•sonicrocketman•6h ago•72 comments

An NSFW filter for Marginalia search

https://www.marginalia.nu/log/a_134_nsfw/
81•speckx•6h ago•14 comments

FTC action against Match and OkCupid for deceiving users, sharing personal data

https://www.ftc.gov/news-events/news/press-releases/2026/03/ftc-takes-action-against-match-okcupi...
211•gnabgib•7h ago•110 comments