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.

What happens when US economic data becomes unreliable

https://mitsloan.mit.edu/ideas-made-to-matter/what-happens-when-us-economic-data-becomes-unreliable
131•inaros•1h ago•83 comments

Montana passes Right to Compute act (2025)

https://www.westernmt.news/2025/04/21/montana-leads-the-nation-with-groundbreaking-right-to-compu...
166•bilsbie•4h ago•116 comments

Sunsetting Jazzband

https://jazzband.co/news/2026/03/14/sunsetting-jazzband
17•mooreds•40m ago•1 comments

The $2 per hour worker behind the OnlyFans boom

https://www.bbc.com/news/articles/cq571g9gd4lo
25•1659447091•3d ago•11 comments

An Ode to Bzip

https://purplesyringa.moe/blog/an-ode-to-bzip/
28•signa11•2h ago•15 comments

Baochip-1x: What it is, why I'm doing it now and how it came about

https://www.crowdsupply.com/baochip/dabao/updates/what-it-is-why-im-doing-it-now-and-how-it-came-...
214•timhh•2d ago•26 comments

NMAP in the Movies

https://nmap.org/movies/
72•homebrewer•1h ago•12 comments

Python: The Optimization Ladder

https://cemrehancavdar.com/2026/03/10/optimization-ladder/
177•Twirrim•3d ago•55 comments

Megadev: A Development Kit for the Sega Mega Drive and Mega CD Hardware

https://github.com/drojaazu/megadev
90•XzetaU8•9h ago•5 comments

Cookie jars capture American kitsch (2023)

https://www.eater.com/23651631/cookie-jar-trend-appreciation-collecting-history
16•NaOH•1d ago•1 comments

Show HN: GitAgent – An open standard that turns any Git repo into an AI agent

https://www.gitagent.sh/
32•sivasurend•4h ago•2 comments

Show HN: Learn Arabic with spaced repetition and comprehensible input

https://abjadpro.com
11•adangit•1h ago•2 comments

1M context is now generally available for Opus 4.6 and Sonnet 4.6

https://claude.com/blog/1m-context-ga
1041•meetpateltech•1d ago•439 comments

9 Mothers Defense (YC P26) Is Hiring in Austin

https://jobs.ashbyhq.com/9-mothers?utm_source=x8pZ4B3P3Q
1•ukd1•4h ago

Everything you never wanted to know about visually-hidden

https://dbushell.com/2026/02/20/visually-hidden/
15•PaulHoule•4d ago•3 comments

Wired headphone sales are exploding

https://www.bbc.com/future/article/20260310-wired-headphones-are-better-than-bluetooth
344•billybuckwheat•2d ago•574 comments

Online astroturfing: A problem beyond disinformation

https://journals.sagepub.com/doi/10.1177/01914537221108467
42•xyzal•2h ago•17 comments

Philosoph Jürgen Habermas Gestorben

https://www.spiegel.de/kultur/philosoph-juergen-habermas-mit-96-jahren-gestorben-a-8be73ac7-e722-...
102•sebastian_z•4h ago•35 comments

UBI Is Your Productivity Dividend – The Only Way to All Share What We All Built

https://scottsantens.substack.com/p/universal-basic-income-is-your-productivity
51•2noame•1h ago•33 comments

Nominal Types in WebAssembly

https://wingolog.org/archives/2026/03/10/nominal-types-in-webassembly
26•ingve•4d ago•13 comments

XML Is a Cheap DSL

https://unplannedobsolescence.com/blog/xml-cheap-dsl/
189•y1n0•6h ago•193 comments

Digg is gone again

https://digg.com/
335•hammerbrostime•23h ago•348 comments

The Isolation Trap: Erlang

https://causality.blog/essays/the-isolation-trap/
124•enz•2d ago•49 comments

Can I run AI locally?

https://www.canirun.ai/
1359•ricardbejarano•1d ago•322 comments

RAM kits are now sold with one fake RAM stick alongside a real one

https://www.tomshardware.com/pc-components/ram/fake-ram-bundled-with-real-ram-to-create-a-perform...
184•edward•8h ago•135 comments

I found 39 Algolia admin keys exposed across open source documentation sites

https://benzimmermann.dev/blog/algolia-docsearch-admin-keys
150•kernelrocks•19h ago•44 comments

A Survival Guide to a PhD (2016)

http://karpathy.github.io/2016/09/07/phd/
155•vismit2000•4d ago•93 comments

Show HN: Ink – Deploy full-stack apps from AI agents via MCP or Skills

https://ml.ink/
20•august-•3d ago•3 comments

Secure Secrets Management for Cursor Cloud Agents

https://infisical.com/blog/secure-secrets-management-for-cursor-cloud-agents
34•vmatsiiako•4d ago•5 comments

Atari 2600 BASIC Programming (2015)

https://huguesjohnson.com/programming/atari-2600-basic/
51•mondobe•2d ago•13 comments