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.

Go hard on agents, not on your filesystem

https://jai.scs.stanford.edu/
327•mazieres•8h ago•187 comments

CERN uses tiny AI models burned into silicon for real-time LHC data filtering

https://theopenreader.org/Journalism:CERN_Uses_Tiny_AI_Models_Burned_into_Silicon_for_Real-Time_L...
33•TORcicada•1h ago•26 comments

AMD's Ryzen 9 9950X3D2 Dual Edition crams 208MB of cache into a single chip

https://arstechnica.com/gadgets/2026/03/amds-ryzen-9-9950x3d2-dual-edition-crams-208mb-of-cache-i...
157•zdw•7h ago•76 comments

The bee that everyone wants to save

https://naturalist.bearblog.dev/the-bee-that-everyone-wants-to-save/
96•nivethan•2d ago•22 comments

Trust Signals as Sparklines for Hacker News

https://hn-trustspark.com/
32•solaire_oa•1d ago•12 comments

Make macOS consistently bad unironically

https://lr0.org/blog/p/macos/
402•speckx•14h ago•285 comments

LG's new 1Hz display is the secret behind a new laptop's battery life

https://www.pcworld.com/article/3096432/lgs-new-1hz-display-is-the-secret-behind-a-new-laptops-ba...
231•robotnikman•4d ago•107 comments

Anatomy of the .claude/ folder

https://blog.dailydoseofds.com/p/anatomy-of-the-claude-folder
482•freedomben•18h ago•223 comments

Nashville library launches Memory Lab for digitizing home movies

https://www.axios.com/local/nashville/2026/03/16/nashville-library-digitize-home-movies
150•toomuchtodo•4d ago•36 comments

Show HN: Twitch Roulette – Find live streamers who need views the most

https://twitchroulette.net/
115•ellg•11h ago•57 comments

.apks are just .zips; semi-legally hacking software for orphaned hardware [video]

https://www.youtube.com/watch?v=P1kfuCkWo24
43•abadar•2d ago•23 comments

Velxio 2.0 – Emulate Arduino, ESP32, and Raspberry Pi 3 in the Browser

https://github.com/davidmonterocrespo24/velxio
145•dmcrespo•12h ago•44 comments

ISBN Visualization

https://annas-archive.gd/isbn-visualization?
163•Cider9986•13h ago•27 comments

‘Energy independence feels practical’: Europeans building mini solar farms

https://www.euronews.com/2026/03/26/suddenly-energy-independence-feels-practical-europeans-are-bu...
281•vrganj•1d ago•265 comments

Meow.camera

https://meow.camera/#4258783365322591678
271•surprisetalk•18h ago•61 comments

Installing a Let's Encrypt TLS certificate on a Brother printer with Certbot

https://owltec.ca/Other/Installing+a+Let%27s+Encrypt+TLS+certificate+on+a+Brother+printer+automat...
215•8organicbits•19h ago•52 comments

Iran-linked hackers breach FBI director's personal email

https://www.reuters.com/world/us/iran-linked-hackers-claim-breach-of-fbi-directors-personal-email...
244•m-hodges•18h ago•349 comments

Desperately Seeking Space Friends

https://reviewcanada.ca/magazine/2026/04/desperately-seeking-space-friends-review-the-pale-blue-d...
4•benbreen•2d ago•0 comments

The Future of SCIP

https://sourcegraph.com/blog/the-future-of-scip
71•jdorfman•17h ago•21 comments

Explore the Hidden World of Sand

https://magnifiedsand.com/
235•RAAx707•4d ago•39 comments

Telnyx package compromised on PyPI

https://telnyx.com/resources/telnyx-python-sdk-supply-chain-security-notice-march-2026
101•ramimac•1d ago•104 comments

Arm releases first in-house chip, with Meta as debut customer

https://www.cnbc.com/2026/03/24/arm-launches-its-own-cpu-with-meta-as-first-customer.html
12•goplayoutside•3d ago•2 comments

Improving Composer through real-time RL

https://cursor.com/blog/real-time-rl-for-composer
81•ingve•1d ago•24 comments

Building FireStriker: Making Civic Tech Free

https://firestriker.org/blog/building-firestriker-why-im-making-civic-tech-free
123•noleary•1d ago•26 comments

People inside Microsoft are fighting to drop mandatory Microsoft Account

https://www.windowscentral.com/microsoft/windows-11/people-inside-microsoft-are-fighting-to-drop-...
639•breve•19h ago•489 comments

Fets and Crosses: Tic-Tac-Toe built from 2458 discrete transistors

https://schilk.co/projects/fetsncrosses/
45•voxadam•3d ago•11 comments

Desk for people who work at home with a cat

https://soranews24.com/2026/03/27/japan-now-has-a-special-desk-for-people-who-work-at-home-with-a...
408•zdw•18h ago•146 comments

Colorado House passes bill to limit surveillance pricing and wage setting

https://coloradonewsline.com/briefs/surveillance-pricing-wage-setting/
112•jprs•13h ago•31 comments

Capability-Based Security for Redox: Namespace and CWD as Capabilities

https://www.redox-os.org/news/nlnet-cap-nsmgr-cwd/
55•ejplatzer•14h ago•6 comments

Automatically generate all 3D print files for organizing a drawer

https://geniecrate.com/
57•woktalk•2d ago•31 comments