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.

MacBook Neo

https://www.apple.com/newsroom/2026/03/say-hello-to-macbook-neo/
1489•dm•10h ago•1834 comments

Building a new Flash

https://bill.newgrounds.com/news/post/1607118
251•TechPlasma•4h ago•58 comments

Something is afoot in the land of Qwen

https://simonwillison.net/2026/Mar/4/qwen/
495•simonw•8h ago•232 comments

Humans 40k yrs ago developed a system of conventional signs

https://www.pnas.org/doi/10.1073/pnas.2520385123
52•bikenaga•8h ago•19 comments

The View from RSS

https://www.carolinecrampton.com/the-view-from-rss/
63•Curiositry•4h ago•18 comments

NanoGPT Slowrun: Language Modeling with Limited Data, Infinite Compute

https://qlabs.sh/slowrun
112•sdpmas•6h ago•23 comments

Moss is a pixel canvas where every brush is a tiny program

https://www.moss.town/
165•smusamashah•14h ago•20 comments

An interactive map of Flock Cams

https://deflock.org/map#map=5/37.125286/-96.284180
488•anjel•6h ago•186 comments

Anthropic CEO calls OpenAI's messaging around military deal 'straight up lies'

https://techcrunch.com/2026/03/04/anthropic-ceo-dario-amodei-calls-openais-messaging-around-milit...
49•SilverElfin•1h ago•14 comments

“It turns out” (2010)

https://jsomers.net/blog/it-turns-out
231•Munksgaard•9h ago•75 comments

Was Windows 1.0's lack of overlapping windows a legal or a technical matter?

https://retrocomputing.stackexchange.com/questions/32511/was-windows-1-0s-lack-of-overlapping-win...
44•SeenNotHeard•4h ago•28 comments

BMW Group to deploy humanoid robots in production in Germany for the first time

https://www.press.bmwgroup.com/global/article/detail/T0455864EN/bmw-group-to-deploy-humanoid-robo...
61•JeanKage•3h ago•55 comments

Qwen3.5 Fine-Tuning Guide – Unsloth Documentation

https://unsloth.ai/docs/models/qwen3.5/fine-tune
259•bilsbie•12h ago•64 comments

Data Has Weight but Only on SSDs

https://cubiclenate.com/2026/03/04/data-has-weight-but-only-on-ssds-blathering/
61•LorenDB•6h ago•41 comments

Extending single-minus amplitudes to gravitons

https://openai.com/index/extending-single-minus-amplitudes-to-gravitons/
7•telotortium•1h ago•0 comments

NRC Issues First Commercial Reactor Construction Approval in 10 Years [pdf]

https://www.nrc.gov/sites/default/files/cdn/doc-collection-news/2026/26-028.pdf
30•Anon84•2h ago•6 comments

Glaze by Raycast

https://www.glazeapp.com/
189•romac•11h ago•117 comments

Show HN: Vertex.js – A 1kloc SPA Framework

https://lukeb42.github.io/vertex-manual.html
35•LukeB42•3d ago•22 comments

Daemon (2006)

https://en.wikipedia.org/wiki/Daemon_(novel)
8•solomonb•7h ago•3 comments

Roboflow (YC S20) Is Hiring a Security Engineer for AI Infra

https://roboflow.com/careers
1•yeldarb•7h ago

Making Firefox's right-click not suck with about:config

https://joshua.hu/firefox-making-right-click-not-suck
250•mmsc•6h ago•171 comments

Libre Solar – Open Hardware for Renewable Energy

https://libre.solar
203•evolve2k•3d ago•60 comments

Raspberry Pi Pico as AM Radio Transmitter

https://www.pesfandiar.com/blog/2026/02/28/pico-am-radio-transmitter
61•pesfandiar•4d ago•28 comments

Picking Up a Zillion Pieces of Litter

https://www.sixstepstobetterhealth.com/litter.html
4•colinbartlett•3d ago•0 comments

Does that use a lot of energy?

https://hannahritchie.github.io/energy-use-comparisons/
176•speckx•4h ago•151 comments

Faster C software with Dynamic Feature Detection

https://gist.github.com/jjl/d998164191af59a594500687a679b98d
54•todsacerdoti•6h ago•2 comments

MyFirst Kids Watch Hacked. Access to Camera and Microphone

https://www.kth.se/en/om/nyheter/centrala-nyheter/kth-studenten-hackade-klocka-for-barn-1.1461249
105•jidoka•11h ago•30 comments

Show HN: A shell-native cd-compatible directory jumper using power-law frecency

https://github.com/jghub/sd-switchdir
11•jghub•14h ago•0 comments

Flip Distance of Convex Triangulations and Tree Rotation Is NP-Complete

https://arxiv.org/abs/2602.22874
7•nill0•4d ago•0 comments

To understand our fascination with crystals, researchers gave some to chimps

https://www.nytimes.com/2026/03/04/science/chimpanzees-crystals.html
89•jimnotgym•17h ago•60 comments