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.

Tell HN: Anthropic no longer allowing Claude Code subscriptions to use OpenClaw

462•firloop•6h ago•429 comments

Artemis II crew take “spectacular” image of Earth

https://www.bbc.com/news/articles/ce8jzr423p9o
621•andsoitis•9h ago•233 comments

Delve removed from Y Combinator

https://www.ycombinator.com/companies/delve
162•carabiner•3h ago•71 comments

iNaturalist

https://www.inaturalist.org/
370•bookofjoe•12h ago•104 comments

Gold overtakes U.S. Treasuries as the largest foreign reserve asset

https://economictimes.indiatimes.com/news/international/us/gold-overtakes-u-s-treasuries-as-the-w...
92•lxm•3h ago•47 comments

OpenClaw privilege escalation vulnerability

https://nvd.nist.gov/vuln/detail/CVE-2026-33579
299•kykeonaut•13h ago•171 comments

Herbie: Automatically improve imprecise floating point formulas

https://herbie.uwplse.org/doc/latest/tutorial.html
61•summarity•3d ago•9 comments

What changes when you turn a Linux box into a router

https://patrickmccanna.net/7-configuration-changes-that-turn-a-multi-homed-host-into-a-switch-rou...
132•0o_MrPatrick_o0•3d ago•34 comments

Show HN: Travel Hacking Toolkit – Points search and trip planning with AI

https://github.com/borski/travel-hacking-toolkit
46•borski•3h ago•14 comments

Run Linux containers on Android, no root required

https://github.com/ExTV/Podroid
62•politelemon•7h ago•17 comments

The house is a work of art: Frank Lloyd Wright

https://aeon.co/essays/frank-lloyd-wright-as-a-mirror-of-the-american-condition
64•midnightfish•7h ago•25 comments

We replaced RAG with a virtual filesystem for our AI documentation assistant

https://www.mintlify.com/blog/how-we-built-a-virtual-filesystem-for-our-assistant
258•denssumesh•1d ago•108 comments

Improving my focus by giving up my big monitor

https://ounapuu.ee/posts/2026/04/01/focus/
57•Fudgel•3d ago•68 comments

Post Mortem: axios NPM supply chain compromise

https://github.com/axios/axios/issues/10636
214•Kyro38•1d ago•95 comments

Go on Embedded Systems and WebAssembly

https://tinygo.org/
138•uticus•12h ago•19 comments

The Technocracy Movement of the 1930s

https://donotresearch.substack.com/p/welcome-to-the-technocracy
76•lazydogbrownfox•1d ago•73 comments

How to make a sliding, self-locking, and predator-proof chicken coop door (2020)

https://www.backyardchickens.com/articles/how-to-make-a-sliding-self-locking-and-predator-proof-c...
88•uticus•10h ago•42 comments

The FAA’s flight restriction for drones is an attempt to criminalize filming ICE

https://www.eff.org/deeplinks/2026/04/faas-temporary-flight-restriction-drones-blatant-attempt-cr...
309•detaro•5h ago•84 comments

Big-Endian Testing with QEMU

https://www.hanshq.net/big-endian-qemu.html
84•jandeboevrie•16h ago•86 comments

Charge Robotics (YC S21) Is Hiring Software and Hardware Engineers

https://jobs.ashbyhq.com/charge-robotics
1•banks_h•8h ago

Oracle Files H-1B Visa Petitions Amid Mass Layoffs

https://nationaltoday.com/us/tx/austin/news/2026/04/03/oracle-files-thousands-of-h-1b-visa-petiti...
471•kklisura•9h ago•254 comments

F-15E jet shot down over Iran

https://www.theguardian.com/world/2026/apr/03/us-fighter-jet-confirmed-shot-down-over-iran
434•tjwds•13h ago•984 comments

Fake Fans

https://www.wordsfromeliza.com/p/fake-fans
90•performative•7h ago•18 comments

South Polar Times

https://www.laphamsquarterly.org/roundtable/south-polar-times
21•Thevet•4d ago•0 comments

Bourbon waste could provide next-gen supercapacitor components

https://spectrum.ieee.org/supercapacitor-electrodes-bourbon-waste
26•prabal97•3d ago•14 comments

Build your own Dial-up ISP with a Raspberry Pi

https://www.jeffgeerling.com/blog/2026/build-your-own-dial-up-isp-with-a-raspberry-pi/
127•arjunbajaj•14h ago•29 comments

Why are we still using Markdown?

https://bgslabs.org/blog/why-are-we-using-markdown/
83•veqq•11h ago•150 comments

An experimental guide to Answer Engine Optimization

https://mapledeploy.ca/blog/answer-engine-optimization-guide
7•rosslh•2d ago•3 comments

Age verification on Systemd and Flatpak

https://cybrkyd.com/post/age-verification-on-systemd-and-flatpak/
103•londonanon•10h ago•88 comments

SSH certificates: the better SSH experience

https://jpmens.net/2026/04/03/ssh-certificates-the-better-ssh-experience/
231•jandeboevrie•19h ago•101 comments