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.

Personal Encyclopedias

https://whoami.wiki/blog/personal-encyclopedias
238•jrmyphlmn•15h ago•58 comments

Swift 6.3

https://www.swift.org/blog/swift-6.3-released/
92•ingve•3h ago•31 comments

Running Tesla Model 3's computer on my desk using parts from crashed cars

https://bugs.xdavidhu.me/tesla/2026/03/23/running-tesla-model-3s-computer-on-my-desk-using-parts-...
652•driesdep•14h ago•209 comments

From zero to a RAG system: successes and failures

https://en.andros.dev/blog/aa31d744/from-zero-to-a-rag-system-successes-and-failures/
17•andros•2d ago•3 comments

Obsolete Sounds

https://citiesandmemory.com/obsolete-sounds/
39•benbreen•7h ago•6 comments

What came after the 486?

https://dfarq.homeip.net/what-came-after-486/
43•jnord•2d ago•37 comments

ARC-AGI-3

https://arcprize.org/arc-agi/3
413•lairv•17h ago•264 comments

Shell Tricks That Make Life Easier (and Save Your Sanity)

https://blog.hofstede.it/shell-tricks-that-actually-make-life-easier-and-save-your-sanity/
126•zdw•10h ago•58 comments

The truth that haunts the Ramones: 'They sold more T-shirts than records'

https://english.elpais.com/culture/2026-03-17/the-uncomfortable-truth-that-will-always-haunt-the-...
139•c420•4d ago•84 comments

Earthquake scientists reveal how overplowing weakens soil at experimental farm

https://www.washington.edu/news/2026/03/19/earthquake-scientists-reveal-how-overplowing-weakens-s...
167•Brajeshwar•21h ago•78 comments

Niche Museums

https://www.niche-museums.com/
13•bookofjoe•2d ago•4 comments

LibreOffice and the Art of Overreacting

https://blog.documentfoundation.org/blog/2026/03/25/libreoffice-and-the-art-of-overreacting/
17•bundie•1h ago•1 comments

More precise elevation data for GraphHopper routing engine

https://www.graphhopper.com/blog/2026/03/23/more-precise-elevation-data-for-graphhopper/
52•karussell•2d ago•2 comments

Ashby (YC W19) Is Hiring Engineers Who Make Product Decisions

https://www.ashbyhq.com/careers?ashby_jid=c3c7125d-7883-4dff-a2bf-f5a55de4a364&utm_source=hn
1•abhikp•4h ago

The Cassandra of 'The Machine'

https://www.thenewatlantis.com/publications/the-cassandra-of-the-machine
13•Hooke•7h ago•0 comments

My DIY FPGA board can run Quake II

https://blog.mikhe.ch/quake2-on-fpga/part4.html
164•sznio•3d ago•51 comments

The Last Contract: William T. Vollmann's Battle to Publish an Epic (2025)

https://www.metropolitanreview.org/p/the-last-contract
10•benbreen•7h ago•0 comments

The EU still wants to scan your private messages and photos

https://fightchatcontrol.eu/?foo=bar
1220•MrBruh•14h ago•328 comments

90% of Claude-linked output going to GitHub repos w <2 stars

https://www.claudescode.dev/?window=since_launch
299•louiereederson•17h ago•184 comments

Supreme Court Sides with Cox in Copyright Fight over Pirated Music

https://www.nytimes.com/2026/03/25/us/politics/supreme-court-cox-music-copyright.html
353•oj2828•20h ago•279 comments

Show HN: Robust LLM Extractor for Websites in TypeScript

https://github.com/lightfeed/extractor
47•andrew_zhong•7h ago•33 comments

Maxell MXCP-P100 – wireless cassette player

https://maxell-usa.com/product/cassetteplayer/
29•ChrisArchitect•2d ago•17 comments

Show HN: Optio – Orchestrate AI coding agents in K8s to go from ticket to PR

https://github.com/jonwiggins/optio
55•jawiggins•18h ago•33 comments

Two studies in compiler optimisations

https://www.hmpcabral.com/2026/03/20/two-studies-in-compiler-optimisations/
86•hmpc•3d ago•9 comments

Thoughts on slowing the fuck down

https://mariozechner.at/posts/2026-03-25-thoughts-on-slowing-the-fuck-down/
885•jdkoeck•21h ago•395 comments

"Disregard That" Attacks

https://calpaterson.com/disregard.html
89•leontrolski•12h ago•61 comments

Quantization from the Ground Up

https://ngrok.com/blog/quantization
264•samwho•19h ago•50 comments

False claims in a widely-cited paper

https://statmodeling.stat.columbia.edu/2026/03/24/false-claims-in-a-published-no-corrections-no-c...
294•qsi•10h ago•120 comments

Government agencies buy commercial data about Americans in bulk

https://www.npr.org/2026/03/25/nx-s1-5752369/ice-surveillance-data-brokers-congress-anthropic
72•nuke-web3•5h ago•31 comments

Show HN: A plain-text cognitive architecture for Claude Code

https://lab.puga.com.br/cog/
108•marciopuga•11h ago•33 comments