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.

Schedule Claude Code tasks on the web

https://code.claude.com/docs/en/web-scheduled-tasks
23•iBelieve•39m ago•9 comments

Why so many control rooms were seafoam green (2025)

https://bethmathews.substack.com/p/why-so-many-control-rooms-were-seafoam
703•Amorymeltzer•1d ago•143 comments

Apple discontinues the Mac Pro

https://9to5mac.com/2026/03/26/apple-discontinues-the-mac-pro/
228•bentocorp•8h ago•185 comments

Show HN: I put an AI agent on a $7/month VPS with IRC as its transport layer

https://georgelarson.me/writing/2026-03-23-nullclaw-doorman/
169•j0rg3•6h ago•61 comments

From 0% to 36% on Day 1 of ARC-AGI-3

https://www.symbolica.ai/blog/arc-agi-3
56•lairv•3h ago•24 comments

Moving from GitHub to Codeberg, for lazy people

https://unterwaditzer.net/2025/codeberg.html
559•jslakro•15h ago•280 comments

Chroma Context-1: Training a Self-Editing Search Agent

https://www.trychroma.com/research/context-1
28•philip1209•10h ago•1 comments

Dobase – Your workspace, your server

https://dobase.co/
45•frenkel•3d ago•13 comments

Agent-to-Agent Pair Programming

https://axeldelafosse.com/blog/agent-to-agent-pair-programming
27•axldelafosse•3h ago•9 comments

Whistler: Live eBPF Programming from the Common Lisp REPL

https://atgreen.github.io/repl-yell/posts/whistler/
53•varjag•3d ago•2 comments

DOOM Over DNS

https://github.com/resumex/doom-over-dns
230•Venn1•3d ago•73 comments

My minute-by-minute response to the LiteLLM malware attack

https://futuresearch.ai/blog/litellm-attack-transcript/
331•Fibonar•13h ago•129 comments

Generators in Lone Lisp

https://www.matheusmoreira.com/articles/generators-in-lone-lisp
17•matheusmoreira•3d ago•0 comments

The Legibility of Serif and Sans Serif Typefaces on Paper and Screens

https://library.oapen.org//handle/20.500.12657/53344
9•the-mitr•3d ago•1 comments

Chicago artist creates tourism posters for city's neighborhoods

https://www.chicagotribune.com/2026/03/25/chicago-neighborhood-posters/
77•NaOH•6h ago•34 comments

Anthropic Subprocessor Changes

https://trust.anthropic.com
56•tencentshill•7h ago•30 comments

We rewrote JSONata with AI in a day, saved $500k/year

https://www.reco.ai/blog/we-rewrote-jsonata-with-ai
91•cjlm•6h ago•98 comments

HyperAgents: Self-referential self-improving agents

https://github.com/facebookresearch/hyperagents
159•andyg_blog•2d ago•59 comments

$500 GPU outperforms Claude Sonnet on coding benchmarks

https://github.com/itigges22/ATLAS
130•yogthos•11h ago•50 comments

We haven't seen the worst of what gambling and prediction markets will do

https://www.derekthompson.org/p/we-havent-seen-the-worst-of-what
642•mmcclure•9h ago•459 comments

OpenTelemetry profiles enters public alpha

https://opentelemetry.io/blog/2026/profiles-alpha/
157•tanelpoder•13h ago•21 comments

Running Tesla Model 3's computer on my desk using parts from crashed cars

https://bugs.xdavidhu.me/tesla/2026/03/23/running-tesla-model-3s-computer-on-my-desk-using-parts-...
879•driesdep•1d ago•305 comments

HandyMKV for MakeMKV and HandBrake Automation

https://github.com/dmars8047/handymkv
14•geerlingguy•3h ago•1 comments

John Bradley, author of xv, has died

https://voxday.net/2026/03/25/rip-john-bradley/
241•linsomniac•10h ago•73 comments

CERN to host a new phase of Open Research Europe

https://home.cern/news/news/cern/cern-host-europes-flagship-open-access-publishing-platform
208•JohnHammersley•9h ago•18 comments

Show HN: Turbolite – a SQLite VFS serving sub-250ms cold JOIN queries from S3

https://github.com/russellromney/turbolite
127•russellthehippo•10h ago•31 comments

Using FireWire on a Raspberry Pi

https://www.jeffgeerling.com/blog/2026/firewire-on-a-raspberry-pi/
71•jandeboevrie•9h ago•30 comments

Colibri – chat platform built on the AT Protocol for communities big and small

https://colibri.social/
110•todotask2•11h ago•66 comments

Show HN: Fio: 3D World editor/game engine – inspired by Radiant and Hammer

https://github.com/ViciousSquid/Fio
49•vicioussquid•8h ago•4 comments

Show HN: Veil – Dark mode PDFs without destroying images, runs in the browser

https://veil.simoneamico.com/
65•simoneamico•17h ago•12 comments