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.

Jira Is Turing-Complete

https://seriot.ch/computation/jira.html
114•vinhnx•3h ago•37 comments

Didgeridoo playing as alternative treatment for obstructive sleep apnea(2006)

https://pmc.ncbi.nlm.nih.gov/articles/PMC1360393/
71•kelseyfrog•2d ago•19 comments

Show HN: Audiomass – a free, open-source multitrack audio editor for the web

https://audiomass.co/?multitrack=1
323•pantelisk•16h ago•66 comments

I love my Bluetooth keyboard

https://liquidbrain.net/blog/i-love-my-bluetooth-keyboard/
47•evakhoury•2d ago•27 comments

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

https://esengine.github.io/DeepSeek-Reasonix/
534•Alifatisk•18h ago•222 comments

Migrating from Go to Rust

https://corrode.dev/learn/migration-guides/go-to-rust/
236•jabits•13h ago•220 comments

White Rabbit – sub-nanosecond synchronization for large distributed systems

https://ohwr.org/projects/white-rabbit/
75•michaelsbradley•1d ago•20 comments

Bug 1950764: Work Around Crash on Intel Raptor Lake CPU

https://phabricator.services.mozilla.com/D301917
72•luu•2d ago•21 comments

A fundamental principle of aeronautical engineering has been overturned

https://www.wired.com/story/a-fundamental-principle-of-aeronautical-engineering-has-been-overturned/
144•littlexsparkee•12h ago•73 comments

I spent 50 hours drawing a line graph

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

C constructs that still don't work in C++

https://lospino.so/blog/c-constructs-that-still-dont-work-in-cpp/
43•jalospinoso•3d ago•30 comments

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

https://arxiv.org/abs/2605.06445
226•wek•18h ago•119 comments

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

https://epoch.ai/data-insights/ai-chip-component-cost-shares
371•intelkishan•15h ago•378 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...
464•DamnInteresting•1d ago•162 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...
84•sohkamyung•2d ago•27 comments

The Eternal Sloptember

https://geohot.github.io//blog/jekyll/update/2026/05/24/the-eternal-sloptember.html
278•razin•3h ago•206 comments

Build Adafruit projects right from Firefox

https://www.firefox.com/en-US/landing/adafruit/
159•mch82•3d ago•49 comments

Building Pi with Pi

https://lucumr.pocoo.org/2026/5/24/pi-oss/
75•mplanchard•14h ago•34 comments

Mastering Dyalog APL

https://mastering.dyalog.com/README.html
142•tosh•19h ago•36 comments

Using HTTP/2 Cleartext for a server in Go 1.24

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

Gorilla: A fast, scalable, in-memory time series database (2016)

https://blog.acolyer.org/2016/05/03/gorilla-a-fast-scalable-in-memory-time-series-database/
4•xnorswap•4d ago•0 comments

Greg Brockman interview [video]

https://fs.blog/knowledge-project-podcast/greg-brockman/
196•prakashqwerty•23h ago•204 comments

Noroboto: Lying Fonts and Mitigation in Rust

https://tritium.legal/blog/noroboto
74•piker•2d ago•31 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/
283•spike021•1d ago•154 comments

Childhood Computing

https://susam.net/childhood-computing.html
196•blenderob•19h ago•93 comments

Perceptual Image Codec: What Matters in Practical Learned Image Compression

https://apple.github.io/ml-pico/
110•ksec•19h ago•33 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/
56•speckx•3d ago•21 comments

Why is Vivado 2026.1 dropping Linux support for free tier?

https://adaptivesupport.amd.com/s/question/0D5Pd00001YQLdMKAX/why-is-vivado-20261-dropping-linux-...
314•zdw•1d ago•195 comments

I keep bouncing off the Scheme language

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

Time to talk about my writerdeck

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