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•1y ago

Comments

quentinp•1y 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•1y ago
Page didnt load for me.

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

Multiprocessing all the way!

emmelaich•1y ago
(2021)

Good article!

punnerud•1y 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•1y 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•1y ago
How does the GIL come into play here?
punnerud•1y 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: Audiomass – a free, open-source multitrack audio editor for the web

https://audiomass.co/?multitrack=1
132•pantelisk•9h ago•33 comments

DeepSeek reasonix, DeepSeek native coding agent with high caching and low cost

https://esengine.github.io/DeepSeek-Reasonix/
425•Alifatisk•12h ago•195 comments

Defeating Git Rigour Fatigue with Jujutsu

https://ikesau.co/blog/defeating-git-rigour-fatigue-with-jujutsu/
89•ikesau•6h ago•66 comments

A fundamental principle of aeronautical engineering has been overturned

https://www.wired.com/story/a-fundamental-principle-of-aeronautical-engineering-has-been-overturned/
44•littlexsparkee•6h ago•19 comments

Memory has grown to nearly two-thirds of AI chip component costs

https://epoch.ai/data-insights/ai-chip-component-cost-shares
286•intelkishan•8h ago•307 comments

I spent 50 hours drawing a line graph

https://www.dougmacdowell.com/50-hours-to-draw-some-lines.html
428•dougdude3339•3d ago•73 comments

Using HTTP/2 Cleartext for a server in Go 1.24

https://www.clarityboss.com/blog/go-http2-cleartext-h2c-cloud-run
53•dan_sbl•5d ago•6 comments

Constraint Decay: The Fragility of LLM Agents in Back End Code Generation

https://arxiv.org/abs/2605.06445
167•wek•12h ago•83 comments

Selling SaaS in Germany

https://embedworkflow.com/blog/selling-saas-in-germany-austria-and-switzerland-dach/
19•ewf•2d ago•0 comments

Microsoft open-sources “the earliest DOS source code discovered to date”

https://arstechnica.com/gadgets/2026/04/microsoft-open-sources-the-earliest-dos-source-code-disco...
421•DamnInteresting•23h ago•145 comments

Mastering Dyalog APL

https://mastering.dyalog.com/README.html
125•tosh•13h ago•36 comments

Scientists solve 200-year-old puzzle of how tobacco plants make nicotine

https://www.york.ac.uk/news-and-events/news/2026/research/200-year-old-puzzle-tobacco-plants-nico...
37•sohkamyung•2d ago•14 comments

Noroboto: Lying Fonts and Mitigation in Rust

https://tritium.legal/blog/noroboto
55•piker•2d ago•25 comments

Build Adafruit projects right from Firefox

https://www.firefox.com/en-US/landing/adafruit/
108•mch82•2d ago•32 comments

Greg Brockman interview [video]

https://fs.blog/knowledge-project-podcast/greg-brockman/
174•prakashqwerty•16h ago•166 comments

Getting an old Computer online with Android Ethernet tethering

https://82mhz.net/posts/2026/05/getting-an-old-computer-online-with-android-ethernet-tethering/
33•speckx•3d ago•14 comments

1k-year-old dingo bones show that it was injured, cared for, and ritually buried

https://www.popsci.com/environment/dingo-bones-ritual-burial-australia/
11•gmays•5d ago•0 comments

Migrating from Go to Rust

https://corrode.dev/learn/migration-guides/go-to-rust/
129•jabits•6h ago•122 comments

Scammers are abusing an internal Microsoft account to send spam links

https://techcrunch.com/2026/05/21/scammers-are-abusing-an-internal-microsoft-account-to-send-spam/
267•spike021•1d ago•148 comments

LAN-LOK: The Antarctic DOS Sabotage Game Lost for 34 Years

https://alphapixeldev.com/lan-lok-the-antarctic-dos-sabotage-game-lost-for-34-years-part-1/
49•miffe•4d ago•6 comments

Childhood Computing

https://susam.net/childhood-computing.html
157•blenderob•13h ago•87 comments

Flick (YC F25) Is Hiring Front End Engineer to Build Figma for AI Filmmaking

https://www.ycombinator.com/companies/flick/jobs/Tdu6FH6-senior-frontend-engineer
1•rayruiwang•8h ago

Why is Vivado 2026.1 dropping Linux support for free tier?

https://adaptivesupport.amd.com/s/question/0D5Pd00001YQLdMKAX/why-is-vivado-20261-dropping-linux-...
298•zdw•21h ago•179 comments

Perceptual Image Codec: What Matters in Practical Learned Image Compression

https://apple.github.io/ml-pico/
86•ksec•13h ago•25 comments

Book Review: On the Calculation of Volume

https://www.stephendiehl.com/posts/calculation_of_volume/
29•ibobev•3d ago•6 comments

Ruby for Good

https://ti.to/codeforgood/rubyforgood
115•mooreds•9h ago•51 comments

I keep bouncing off the Scheme language

https://www.sicpers.info/2026/05/i-keep-bouncing-off-the-scheme-language/
129•ingve•2d ago•52 comments

Usborne 1980s Computer Books

https://usborne.com/us/books/computer-and-coding-books
157•ngram•9h ago•48 comments

The C64 Dead Test Font

https://www.masswerk.at/nowgobang/2026/c64-dead-test-font
125•masswerk•21h ago•24 comments

Time to talk about my writerdeck

https://veronicaexplains.net/my-first-writerdeck/
453•hggh•1d ago•274 comments