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.

Show HN: I built a frontpage for personal blogs

https://text.blogosphere.app/
266•ramkarthikk•3h ago•99 comments

Marc Andreessen is wrong about introspection

https://www.joanwestenberg.com/marc-andreessen-is-wrong-about-introspection/
180•surprisetalk•1h ago•152 comments

Big-Endian Testing with QEMU

https://www.hanshq.net/big-endian-qemu.html
33•jandeboevrie•2h ago•19 comments

Solar and batteries can power the world

https://nworbmot.org/blog/solar-battery-world.html
131•edent•1h ago•143 comments

Samsung Magician disk utility takes 18 steps and two reboots to uninstall

https://chalmovsky.com/2026/03/29/samsung-magician.html
154•chalmovsky•4d ago•74 comments

April 2026 TLDR Setup for Ollama and Gemma 4 26B on a Mac mini

https://gist.github.com/greenstevester/fc49b4e60a4fef9effc79066c1033ae5
171•greenstevester•6h ago•77 comments

A Recipe for Steganogravy

https://theo.lol/python/ai/steganography/seo/recipes/2026/03/27/a-recipe-for-steganogravy.html
56•tbrockman•5d ago•10 comments

Improving my focus by giving up my big monitor

https://ounapuu.ee/posts/2026/04/01/focus/
19•Fudgel•2d ago•17 comments

Show HN: Apfel – The free AI already on your Mac

https://apfel.franzai.com
450•franze•6h ago•94 comments

Decisions that eroded trust in Azure – by a former Azure Core engineer

https://isolveproblems.substack.com/p/how-microsoft-vaporized-a-trillion
1025•axelriet•1d ago•473 comments

What Category Theory Teaches Us About DataFrames

https://mchav.github.io/what-category-theory-teaches-us-about-dataframes/
108•mchav•5d ago•33 comments

ESP32-S31: Dual-Core RISC-V SoC with Wi-Fi 6, Bluetooth 5.4, and Advanced HMI

https://www.espressif.com/en/news/ESP32_S31_Release
142•topspin•5d ago•74 comments

SSH certificates: the better SSH experience

https://jpmens.net/2026/04/03/ssh-certificates-the-better-ssh-experience/
71•jandeboevrie•6h ago•23 comments

NHS staff refusing to use FDP over Palantir ethical concerns

https://www.freevacy.com/news/financial-times/nhs-staff-refusing-to-use-fdp-over-palantir-ethical...
217•chrisjj•6h ago•71 comments

TDF ejects its core developers

https://meeksfamily.uk/~michael/blog/2026-04-02-tdf-ejects-core-devs.html
87•janvdberg•4h ago•68 comments

What we learned building 100 API integrations with OpenCode

https://nango.dev/blog/learned-building-200-api-integrations-with-opencode/
55•rguldener•3d ago•11 comments

Critics say EU risks ceding control of its tech laws under U.S. pressure

https://www.politico.eu/article/fatal-decision-eu-slammed-for-caving-to-us-pressure-on-digital-ru...
150•nickslaughter02•5h ago•90 comments

Intel Assured Supply Chain Product Brief

https://www.intel.com/content/www/us/en/content-details/850997/intel-assured-supply-chain-product...
31•aw-engineer•4d ago•4 comments

Tailscale's new macOS home

https://tailscale.com/blog/macos-notch-escape
519•tosh•21h ago•268 comments

Google releases Gemma 4 open models

https://deepmind.google/models/gemma/gemma-4/
1656•jeffmcjunkin•23h ago•441 comments

Cursor 3

https://cursor.com/blog/cursor-3
491•adamfeldman•21h ago•363 comments

Artemis II's toilet is a moon mission milestone

https://www.scientificamerican.com/article/artemis-iis-toilet-is-a-moon-mission-milestone/
304•1659447091•1d ago•137 comments

The True Shape of Io's Steeple Mountain

https://www.weareinquisitive.com/news/hidden-in-the-shadow
93•carlosjobim•5d ago•2 comments

Category Theory Illustrated – Types

https://abuseofnotation.github.io/category-theory-illustrated/06_type/
24•boris_m•6h ago•1 comments

I prefer OG style websites – what are yours?

21•gorfian_robot•1h ago•21 comments

Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux

https://github.com/oven-sh/bun/pull/28801
22•tosh•4h ago•9 comments

Good ideas do not need lots of lies in order to gain public acceptance (2008)

https://blog.danieldavies.com/2004/05/d-squared-digest-one-minute-mba.html
326•sedev•22h ago•161 comments

C89cc.sh – standalone C89/ELF64 compiler in pure portable shell

https://gist.github.com/alganet/2b89c4368f8d23d033961d8a3deb5c19
170•gaigalas•2d ago•55 comments

Vector Meson Dominance

https://johncarlosbaez.wordpress.com/2026/03/29/vector-meson-dominance/
48•chmaynard•5d ago•5 comments

New Rowhammer attacks give complete control of machines running Nvidia GPUs

https://arstechnica.com/security/2026/04/new-rowhammer-attacks-give-complete-control-of-machines-...
109•01-_-•7h ago•6 comments