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.

The Worst Acquisition in History, Again

https://www.profgmedia.com/p/the-worst-acquisition-in-history
15•JumpCrisscross•56m ago•7 comments

Tech employment now significantly worse than the 2008 or 2020 recessions

https://twitter.com/JosephPolitano/status/2029916364664611242
510•enraged_camel•4h ago•358 comments

Show HN: Moongate – Ultima Online server emulator in .NET 10 with Lua scripting

https://github.com/moongate-community/moongatev2
202•squidleon•7h ago•112 comments

Hardening Firefox with Anthropic's Red Team

https://www.anthropic.com/news/mozilla-firefox-security
386•todsacerdoti•10h ago•114 comments

Apache Otava

https://otava.apache.org/
46•djoldman•5d ago•3 comments

Open Camera is a FOSS Camera App for Android

https://opencamera.org.uk/
176•tetris11•4d ago•80 comments

Ada 2022

https://www.adaic.org/ada-resources/standards/ada22/
78•tosh•2h ago•14 comments

Anthropic, Please Make a New Slack

https://www.fivetran.com/blog/anthropic-please-make-a-new-slack
101•georgewfraser•2h ago•75 comments

Launch HN: Palus Finance (YC W26): Better yields on idle cash for startups, SMBs

26•sam_palus•3h ago•36 comments

CSS Proves Me Human

https://will-keleher.com/posts/this-css-makes-me-human/
3•todsacerdoti•11m ago•0 comments

Payphone Go

https://walzr.com/payphone-go/
267•walz•4d ago•57 comments

Triplet Superconductor

https://www.sciencedaily.com/releases/2026/02/260221000252.htm
31•jonbaer•4d ago•6 comments

Why it takes you and an elephant the same amount of time to poop (2017)

https://www.pbs.org/newshour/health/takes-elephant-amount-time-poop
49•Tomte•1h ago•44 comments

Astra: An open-source observatory control software

https://github.com/ppp-one/astra
67•pppone•5h ago•17 comments

CT Scans of Health Wearables

https://www.lumafield.com/scan-of-the-month/health-wearables
156•radeeyate•7h ago•34 comments

Multifactor (YC F25) Is Hiring an Engineering Lead

https://www.ycombinator.com/companies/multifactor/jobs/lcpd60A-engineering-lead
1•multifactor•5h ago

Entomologists use a particle accelerator to image ants at scale

https://spectrum.ieee.org/3d-scanning-particle-accelerator-antscan
71•gmays•6h ago•7 comments

LibreSprite – open-source pixel art editor

https://libresprite.github.io/
227•nicoloren•12h ago•75 comments

Nintendo Sues U.S. Government for Tariff Refunds

https://www.scribd.com/document/1008639172/Nintendo-Sues-U-S-Government-For-Tariff-Refunds
18•coloneltcb•34m ago•0 comments

A tool that removes censorship from open-weight LLMs

https://github.com/elder-plinius/OBLITERATUS
70•mvdwoord•7h ago•28 comments

Workers who love ‘synergizing paradigms’ might be bad at their jobs

https://news.cornell.edu/stories/2026/03/workers-who-love-synergizing-paradigms-might-be-bad-thei...
457•Anon84•8h ago•268 comments

Analytic Fog Rendering with Volumetric Primitives (2025)

https://matejlou.blog/2025/02/11/analytic-fog-rendering-with-volumetric-primitives/
74•surprisetalk•1d ago•4 comments

Good Bad ISPs

https://community.torproject.org/relay/community-resources/good-bad-isps/
84•rzk•7h ago•25 comments

Show HN: Claude-replay – A video-like player for Claude Code sessions

https://github.com/es617/claude-replay
45•es617•6h ago•21 comments

Global warming has accelerated significantly

https://www.researchsquare.com/article/rs-6079807/v1
858•morsch•7h ago•840 comments

TypeScript 6.0 RC

https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-rc/
36•johnz•1h ago•5 comments

Show HN: Reconstruct any image using primitive shapes, runs in-browser via WASM

https://github.com/taiseiue/primitive-playground
10•taiseiue•3d ago•1 comments

We might all be AI engineers now

https://yasint.dev/we-might-all-be-ai-engineers-now/
143•sn0wflak3s•12h ago•217 comments

Paul Brainerd, founder of Aldus PageMaker, has died

https://blog.adafruit.com/2026/03/04/pagemaker-and-aldus-founder-pioneer-paul-brainerd-1947-2026/
114•fortran77•6h ago•23 comments

Show HN: A trainable, modular electronic nose for industrial use

https://sniphi.com/
26•kwitczak•3d ago•10 comments