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•8mo ago

Comments

quentinp•8mo 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•8mo ago
Page didnt load for me.

https://realpython.com/async-io-python/

Multiprocessing all the way!

emmelaich•8mo ago
(2021)

Good article!

punnerud•8mo 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•8mo 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•8mo ago
How does the GIL come into play here?
punnerud•8mo 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.

OpenBSD-current now runs as guest under Apple Hypervisor

https://www.undeadly.org/cgi?action=article;sid=20260115203619
108•gpi•1h ago•4 comments

Boeing knew of flaw in part linked to UPS plane crash

https://www.bbc.com/news/articles/cly56w0p9e1o
35•1659447091•55m ago•7 comments

Apple is fighting for TSMC capacity as Nvidia takes center stage

https://www.culpium.com/p/exclusiveapple-is-fighting-for-tsmc
617•speckx•14h ago•372 comments

Pocket TTS: A high quality TTS that gives your CPU a voice

https://kyutai.org/blog/2026-01-13-pocket-tts
267•pain_perdu•23h ago•50 comments

Inside The Internet Archive's Infrastructure

https://hackernoon.com/the-long-now-of-the-web-inside-the-internet-archives-fight-against-forgetting
292•dvrp•1d ago•65 comments

Briar keeps Iran connected via Bluetooth and Wi-Fi when the internet goes dark

https://briarproject.org/manual/fa/
198•us321•9h ago•88 comments

My Gripes with Prolog

https://buttondown.com/hillelwayne/archive/my-gripes-with-prolog/
53•azhenley•4h ago•36 comments

Linux boxes via SSH: suspended when disconected

https://shellbox.dev/
143•messh•8h ago•94 comments

Ask HN: How can we solve the loneliness epidemic?

474•publicdebates•12h ago•782 comments

Photos capture the breathtaking scale of China's wind and solar buildout

https://e360.yale.edu/digest/china-renewable-photo-essay
588•mrtksn•19h ago•442 comments

Show HN: Gambit, an open-source agent harness for building reliable AI agents

https://github.com/bolt-foundry/gambit
57•randall•4h ago•11 comments

JuiceFS is a distributed POSIX file system built on top of Redis and S3

https://github.com/juicedata/juicefs
128•tosh•10h ago•70 comments

Claude is good at assembling blocks, but still falls apart at creating them

https://www.approachwithalacrity.com/claude-ne/
199•bblcla•1d ago•147 comments

All 23-Bit Still Lifes Are Glider Constructible

https://mvr.github.io/posts/xs23.html
28•HeliumHydride•5h ago•3 comments

Data is the only moat

https://frontierai.substack.com/p/data-is-your-only-moat
100•cgwu•10h ago•24 comments

Show HN: OpenWork – An open-source alternative to Claude Cowork

https://github.com/different-ai/openwork
157•ben_talent•2d ago•27 comments

Go-legacy-winxp: Compile Golang 1.24 code for Windows XP

https://github.com/syncguy/go-legacy-winxp/tree/winxp-compat
87•Oxodao•3d ago•35 comments

CVEs affecting the Svelte ecosystem

https://svelte.dev/blog/cves-affecting-the-svelte-ecosystem
146•tobr•11h ago•26 comments

The five orders of ignorance (2000)

https://cacm.acm.org/opinion/the-five-orders-of-ignorance/
13•svilen_dobrev•3d ago•4 comments

SETI Home Flags 100 Signals After Sorting 12B Others

https://news.berkeley.edu/2026/01/12/for-21-years-enthusiasts-used-their-home-computers-to-search...
55•TMEHpodcast•2h ago•12 comments

First impressions of Claude Cowork

https://simonw.substack.com/p/first-impressions-of-claude-cowork
162•stosssik•1d ago•89 comments

Aviator (YC S21) is hiring to build multiplayer AI coding platform

https://www.ycombinator.com/companies/aviator/jobs
1•ankitdce•8h ago

Everything you need to know about act() in React tests

https://howtotestfrontend.com/resources/react-act-function-everything-you-need-to-know
3•howToTestFE•4d ago•0 comments

I Built a 1 Petabyte Server from Scratch [video]

https://www.youtube.com/watch?v=vVI7atoAeoo
30•zdw•5d ago•1 comments

Show HN: Reversing YouTube’s “Most Replayed” Graph

https://priyavr.at/blog/reversing-most-replayed/
21•prvt•3h ago•4 comments

Use of Bayesian methodology in clinical trials of drug and biological products [pdf]

https://www.fda.gov/media/190505/download
54•brendanashworth•21h ago•17 comments

What a Programmer Does (1967) [pdf]

http://archive.computerhistory.org/resources/text/Knuth_Don_X4100/PDF_index/k-9-pdf/k-9-u2769-1-B...
35•nz•5d ago•5 comments

Supply Chain Vuln Compromised Core AWS GitHub Repos & Threatened the AWS Console

https://www.wiz.io/blog/wiz-research-codebreach-vulnerability-aws-codebuild
103•uvuv•11h ago•22 comments

25 Years of Wikipedia

https://wikipedia25.org
472•easton•15h ago•381 comments

Why senior engineers let bad projects fail

https://lalitm.com/post/why-senior-engineers-let-bad-projects-fail/
158•SupremumLimit•6h ago•115 comments