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.

OpenCode – The open source AI coding agent

https://opencode.ai/
404•rbanffy•4h ago•191 comments

Our commitment to Windows quality

https://blogs.windows.com/windows-insider/2026/03/20/our-commitment-to-windows-quality/
394•hadrien01•6h ago•692 comments

We rewrote our Rust WASM Parser in TypeScript – and it got 3x Faster

https://www.openui.com/blog/rust-wasm-parser
91•zahlekhan•3h ago•54 comments

Linux Applications Programming by Example: The Fundamental APIs (2nd Edition)

https://github.com/arnoldrobbins/LinuxByExample-2e
20•teleforce•1h ago•5 comments

France's aircraft carrier located in real time by Le Monde through fitness app

https://www.lemonde.fr/en/international/article/2026/03/20/stravaleaks-france-s-aircraft-carrier-...
464•MrDresden•12h ago•387 comments

Ghostling

https://github.com/ghostty-org/ghostling
71•bjornroberg•3h ago•9 comments

Lent and Lisp

https://leancrew.com/all-this/2026/02/lent-and-lisp/
16•surprisetalk•2d ago•0 comments

Attention Residuals

https://github.com/MoonshotAI/Attention-Residuals
118•GaggiX•7h ago•19 comments

Show HN: We built a terminal-only Bluesky / AT Proto client written in Fortran

https://github.com/FormerLab/fortransky
40•FormerLabFred•3h ago•28 comments

The Los Angeles Aqueduct Is Wild

https://practical.engineering/blog/2026/3/17/the-los-angeles-aqueduct-is-wild
289•michaefe•3d ago•162 comments

An FAQ on Reinforcement Learning Environments

https://epoch.ai/gradient-updates/state-of-rl-envs
18•dcre•1d ago•0 comments

VisiCalc Reconstructed

https://zserge.com/posts/visicalc/
162•ingve•3d ago•68 comments

Show HN: I made an email app inspired by Arc browser

https://demo.define.app
43•johndamaia•7h ago•25 comments

Work_mem: It's a Trap

https://mydbanotebook.org/posts/work_mem-its-a-trap/
30•enz•2d ago•2 comments

Show HN: Red Grid Link – peer-to-peer team tracking over Bluetooth, no servers

https://github.com/RedGridTactical/RedGridLink
16•redgridtactical•3h ago•12 comments

Discontinuation and reinitiation of dual-labeled GLP-1 receptor agonists

https://nautil.us/whiplash-heart-attack-and-stroke-risk-jumps-when-people-stop-taking-glp-1s-1279029
53•siquick•3h ago•73 comments

Show HN: Baltic shadow fleet tracker – live AIS, cable proximity alerts

https://github.com/FormerLab/shadow-fleet-tracker-light
30•FormerLabFred•4h ago•6 comments

The worst volume control UI in the world (2017)

https://uxdesign.cc/the-worst-volume-control-ui-in-the-world-60713dc86950
60•andsoitis•2d ago•28 comments

Delve – Fake Compliance as a Service

https://deepdelver.substack.com/p/delve-fake-compliance-as-a-service
540•freddykruger•1d ago•190 comments

NumKong: 2'000 Mixed Precision Kernels for All

https://ashvardanian.com/posts/numkong/
27•ashvardanian•5h ago•0 comments

Entso-E final report on Iberian 2025 blackout

https://www.entsoe.eu/publications/blackout/28-april-2025-iberian-blackout/
172•Rygian•14h ago•74 comments

Parallel Perl – Autoparallelizing interpreter with JIT

https://perl.petamem.com/gpw2026/perl-mit-ai-gpw2026.html#/4/1/1
99•bmn__•2d ago•35 comments

Meme Buildings

https://misfitsarchitecture.com/2026/03/15/meme-buildings/
18•speckx•9h ago•1 comments

The Social Smolnet

https://ploum.net/2026-03-20-social-smolnet.html
107•aebtebeten•12h ago•12 comments

A Japanese Glossary of Chopsticks Faux Pas

https://www.nippon.com/en/japan-data/h01362/
105•cainxinth•4h ago•95 comments

Video Encoding and Decoding with Vulkan Compute Shaders in FFmpeg

https://www.khronos.org/blog/video-encoding-and-decoding-with-vulkan-compute-shaders-in-ffmpeg
149•y1n0•4d ago•54 comments

Flash-KMeans: Fast and Memory-Efficient Exact K-Means

https://arxiv.org/abs/2603.09229
167•matt_d•3d ago•14 comments

ArXiv declares independence from Cornell

https://www.science.org/content/article/arxiv-pioneering-preprint-server-declares-independence-co...
715•bookstore-romeo•21h ago•248 comments

Show HN: An open-source safety net for home hemodialysis

https://safehemo.com/
39•qweliantanner•4d ago•6 comments

Super Micro Shares Plunge 25% After Co-Founder Charged in $2.5B Smuggling Plot

https://www.forbes.com/sites/tylerroush/2026/03/20/super-micro-shares-plunge-25-after-co-founder-...
325•pera•10h ago•133 comments