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.

Leanstral: Open-Source foundation for trustworthy vibe-coding

https://mistral.ai/news/leanstral
223•Poudlardo•2h ago•38 comments

Meta’s renewed commitment to jemalloc

https://engineering.fb.com/2026/03/02/data-infrastructure/investing-in-infrastructure-metas-renew...
306•hahahacorn•5h ago•128 comments

The “small web” is bigger than you might think

https://kevinboone.me/small_web_is_big.html
278•speckx•6h ago•124 comments

US commercial insurers pay 254% of Medicare for the same hospital procedures

https://github.com/rexrodeo/american-healthcare-conundrum
110•rexroad•6h ago•64 comments

My Journey to a reliable and enjoyable locally hosted voice assistant (2025)

https://community.home-assistant.io/t/my-journey-to-a-reliable-and-enjoyable-locally-hosted-voice...
298•Vaslo•10h ago•92 comments

Show HN: Trackm, a personal finance web app

https://trackm.net
3•iccananea•11m ago•0 comments

Show HN: Oxyde – Pydantic-native async ORM with a Rust core

https://github.com/mr-fatalyst/oxyde
36•mr_Fatalyst•3d ago•20 comments

Why I love FreeBSD

https://it-notes.dragas.net/2026/03/16/why-i-love-freebsd/
326•enz•12h ago•150 comments

Language Model Teams as Distrbuted Systems

https://arxiv.org/abs/2603.12229
62•jryio•6h ago•25 comments

Starlink Mini as a failover

https://www.jackpearce.co.uk/posts/starlink-failover/
167•jkpe•15h ago•147 comments

Launch HN: Voygr (YC W26) – A better maps API for agents and AI apps

58•ymarkov•7h ago•37 comments

AnswerThis (YC F25) Is Hiring

https://www.ycombinator.com/companies/answerthis/jobs/CNdatw5-founding-engineering-lead
1•ayush4921•2h ago

Polymarket gamblers threaten to kill me over Iran missile story

https://www.timesofisrael.com/gamblers-trying-to-win-a-bet-on-polymarket-are-vowing-to-kill-me-if...
1262•defly•11h ago•842 comments

Apideck CLI – An AI-agent interface with much lower context consumption than MCP

https://www.apideck.com/blog/mcp-server-eating-context-window-cli-alternative
113•gertjandewilde•8h ago•103 comments

Show HN: Thermal Receipt Printers – Markdown and Web UI

https://github.com/sadreck/ThermalMarky
9•howlett•3d ago•2 comments

Nvidia Launches Vera CPU, Purpose-Built for Agentic AI

https://nvidianews.nvidia.com/news/nvidia-launches-vera-cpu-purpose-built-for-agentic-ai
101•lewismenelaws•3h ago•68 comments

On The Need For Understanding

https://blog.information-superhighway.net/on-the-need-for-understanding
66•zdw•4d ago•28 comments

AirPods Max 2

https://www.apple.com/airpods-max/
173•ssijak•10h ago•337 comments

Show HN: Claude Code skills that build complete Godot games

https://github.com/htdt/godogen
128•htdt•7h ago•75 comments

Home Assistant waters my plants

https://finnian.io/blog/home-assistant-waters-my-plants/
241•finniananderson•4d ago•126 comments

Corruption erodes social trust more in democracies than in autocracies

https://www.frontiersin.org/journals/political-science/articles/10.3389/fpos.2026.1779810/full
626•PaulHoule•12h ago•323 comments

The bureaucracy blocking the chance at a cure

https://www.writingruxandrabio.com/p/the-bureaucracy-blocking-the-chance
78•item•1d ago•108 comments

Lies I was told about collaborative editing, Part 2: Why we don't use Yjs

https://www.moment.dev/blog/lies-i-was-told-pt-2
187•antics•3d ago•95 comments

Cert Authorities Check for DNSSEC from Today

https://www.grepular.com/Cert_Authorities_Check_for_DNSSEC_From_Today
80•zdw•1d ago•180 comments

Kona EV Hacking

http://techno-fandom.org/~hobbit/cars/ev/
112•AnnikaL•5d ago•64 comments

Lazycut: A simple terminal video trimmer using FFmpeg

https://github.com/emin-ozata/lazycut
138•masterpos•11h ago•45 comments

US Job Market Visualizer

https://karpathy.ai/jobs/
382•andygcook•8h ago•305 comments

MoD sources warn Palantir role at heart of government is threat to UK security

https://www.thenerve.news/p/palantir-technologies-uk-mod-sources-government-data-insights-securit...
572•vrganj•11h ago•230 comments

Comparing Python Type Checkers: Typing Spec Conformance

https://pyrefly.org/blog/typing-conformance-comparison/
88•ocamoss•11h ago•33 comments

Launch HN: Chamber (YC W26) – An AI Teammate for GPU Infrastructure

https://www.usechamber.io/
19•jshen96•6h ago•5 comments