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•9mo ago

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

punnerud•9mo 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•9mo 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•9mo ago
How does the GIL come into play here?
punnerud•9mo 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.

Statement from Dario Amodei on our discussions with the Department of War

https://www.anthropic.com/news/statement-department-of-war
1590•qwertox•8h ago•824 comments

The Hunt for Dark Breakfast

https://moultano.wordpress.com/2026/02/22/the-hunt-for-dark-breakfast/
148•moultano•3h ago•53 comments

What Claude Code chooses

https://amplifying.ai/research/claude-code-picks
365•tin7in•13h ago•147 comments

Julia: Performance Tips

https://docs.julialang.org/en/v1/manual/performance-tips/
14•tosh•3d ago•2 comments

80386 Protection

https://nand2mario.github.io/posts/2026/80386_protection/
25•nand2mario•2d ago•3 comments

Layoffs at Block

https://twitter.com/jack/status/2027129697092731343
648•mlex•10h ago•684 comments

What does " 2>&1 " mean?

https://stackoverflow.com/questions/818255/what-does-21-mean
232•alexmolas•11h ago•129 comments

AirSnitch: Demystifying and breaking client isolation in Wi-Fi networks [pdf]

https://www.ndss-symposium.org/wp-content/uploads/2026-f1282-paper.pdf
344•DamnInteresting•15h ago•162 comments

Parakeet.cpp – Parakeet ASR inference in pure C++ with Metal GPU acceleration

https://github.com/Frikallo/parakeet.cpp
27•noahkay13•3h ago•3 comments

I rendered 1,418 confusables over 230 fonts. Most aren't confusable to the eye

https://paultendo.github.io/posts/confusable-vision-visual-similarity/
31•paultendo•1d ago•12 comments

Dear Time Lords: Freeze Computers in 1993

https://graydon2.dreamwidth.org/322461.html
53•zdw•2h ago•22 comments

Launch HN: Cardboard (YC W26) – Agentic video editor

https://www.usecardboard.com/
108•sxmawl•12h ago•58 comments

An Introduction to the Codex Seraphinianus, the Strangest Book Ever Published

https://www.openculture.com/2026/02/an-introduction-to-the-codex-seraphinianus.html
59•vinhnx•3d ago•13 comments

Move tests to closed source repo

https://github.com/tldraw/tldraw/issues/8082
33•nilsbunger•1d ago•22 comments

OsmAnd's Faster Offline Navigation (2025)

https://osmand.net/blog/fast-routing/
145•todsacerdoti•12h ago•46 comments

I baked a pie every day for a year

https://www.theguardian.com/lifeandstyle/2026/feb/22/a-new-start-after-60-i-baked-a-pie-every-day...
260•NaOH•3d ago•169 comments

Hydroph0bia – fixed SecureBoot bypass for UEFI firmware from Insyde H2O (2025)

https://coderush.me/hydroph0bia-part3/
52•transpute•9h ago•1 comments

LiteLLM (YC W23): Founding Reliability Engineer – $200K-$270K and 0.5-1.0% equity

https://www.ycombinator.com/companies/litellm/jobs/unlCynJ-founding-reliability-performance-engineer
1•ij23•6h ago

Smartphone market forecast to decline this year due to memory shortage

https://www.idc.com/resource-center/press-releases/wwsmartphoneforecast4q25/
216•littlexsparkee•9h ago•212 comments

Palm OS User Interface Guidelines (2003) [pdf]

https://cs.uml.edu/~fredm/courses/91.308-spr05/files/palmdocs/uiguidelines.pdf
180•spiffytech•14h ago•86 comments

Museum of Plugs and Sockets

https://plugsocketmuseum.nl/index.html
104•ohjeez•3d ago•36 comments

BuildKit: Docker's Hidden Gem That Can Build Almost Anything

https://tuananh.net/2026/02/25/buildkit-docker-hidden-gem/
169•jasonpeacock•17h ago•62 comments

Show HN: Hacker Smacker – Spot great (and terrible) HN commenters at a glance

https://hackersmacker.org
109•conesus•2d ago•122 comments

Show HN: Deff – Side-by-side Git diff review in your terminal

https://github.com/flamestro/deff
93•flamestro•13h ago•53 comments

Show HN: Linex – A daily challenge: placing pieces on a board that fights back

https://www.playlinex.com/
60•Humanista75•2d ago•20 comments

Nano Banana 2: Google's latest AI image generation model

https://blog.google/innovation-and-ai/technology/ai/nano-banana-2/
551•davidbarker•15h ago•511 comments

Two insider cases we've recently closed

https://news.kalshi.com/p/kalshi-trading-violation-enforcement-cases
20•fortran77•5h ago•48 comments

Understanding the Go Runtime: The Memory Allocator

https://internals-for-interns.com/posts/go-memory-allocator/
54•valyala•3d ago•10 comments

This time is different

https://shkspr.mobi/blog/2026/02/this-time-is-different/
150•speckx•17h ago•244 comments

The Physics and Economics of Moving 44 Tonnes at 56mph

https://www.mikeayles.com/blog/heavy-haulage-basics/
108•mikeayles•3d ago•92 comments