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.

Antirender: remove the glossy shine on architectural renderings

https://antirender.com/
962•iambateman•10h ago•230 comments

Show HN: I trained a 9M speech model to fix my Mandarin tones

https://simedw.com/2026/01/31/ear-pronunication-via-ctc/
159•simedw•5h ago•54 comments

Show HN: Phage Explorer

https://phage-explorer.org/
8•eigenvalue•54m ago•0 comments

Peerweb: Decentralized website hosting via WebTorrent

https://peerweb.lol/
220•dtj1123•9h ago•78 comments

Target director's Global Entry was revoked after ICE used app to scan her face

https://arstechnica.com/tech-policy/2026/01/ice-protester-says-her-global-entry-was-revoked-after...
27•mmoustafa•24m ago•1 comments

Stonebraker on CAP theorem and Databases (2010)

https://perspectives.mvdirona.com/2010/04/stonebraker-on-cap-theorem-and-databases/
54•onurkanbkrc•6h ago•17 comments

Kimi K2.5 Technical Report [pdf]

https://github.com/MoonshotAI/Kimi-K2.5/blob/master/tech_report.pdf
266•vinhnx•13h ago•105 comments

Disrupting the largest residential proxy network

https://cloud.google.com/blog/topics/threat-intelligence/disrupting-largest-residential-proxy-net...
141•cdrnsf•2d ago•116 comments

Moltbook

https://www.moltbook.com/
1387•teej•1d ago•654 comments

The $100B megadeal between OpenAI and Nvidia is on ice

https://www.wsj.com/tech/ai/the-100-billion-megadeal-between-openai-and-nvidia-is-on-ice-aa3025e3
243•pixelesque•6h ago•148 comments

HTTP Cats

https://http.cat/
300•surprisetalk•16h ago•48 comments

Genesis

https://zenodo.org/records/18438130
3•KaoruAK•1h ago•0 comments

International Collection of Tongue Twisters (2018)

https://tongue-twister.net
9•NaOH•4d ago•2 comments

P vs. NP and the Difficulty of Computation: A ruliological approach

https://writings.stephenwolfram.com/2026/01/p-vs-np-and-the-difficulty-of-computation-a-ruliologi...
59•tzury•8h ago•27 comments

Declassifying JUMPSEAT: an American pioneer in space

https://www.nro.gov/news-media-featured-stories/news-media-archive/News-Article/Article/4392223/d...
26•mkmk•2d ago•4 comments

The engineer who invented the Mars rover suspension in his garage [video]

https://www.youtube.com/watch?v=QKSPk_0N4Jc
307•UltraSane•4d ago•44 comments

I trapped an AI model inside an art installation (2025) [video]

https://www.youtube.com/watch?v=7fNYj0EXxMs
75•handfuloflight•8h ago•22 comments

Surely the crash of the US economy has to be soon

https://wilsoniumite.com/2026/01/27/surely-it-has-to-be-soon/
242•Wilsoniumite•20h ago•361 comments

How to explain Generative AI in the classroom

https://dalelane.co.uk/blog/?p=5847
45•thinkingaboutit•1d ago•15 comments

Ask HN: Do you also "hoard" notes/links but struggle to turn them into actions?

162•item007•13h ago•76 comments

Code is cheap. Show me the talk

https://nadh.in/blog/code-is-cheap/
198•ghostfoxgod•18h ago•175 comments

Show HN: I built an AI conversation partner to practice speaking languages

https://apps.apple.com/us/app/talkbits-speak-naturally/id6756824177
58•omarisbuilding•8h ago•43 comments

Roots is a game server daemon that manages Docker containers for game servers

https://github.com/SproutPanel/roots
27•Kerrick•3d ago•6 comments

Show HN: Pinecone Explorer – Desktop GUI for the Pinecone vector database

https://www.pinecone-explorer.com
21•arsentjev•3d ago•3 comments

The National Herbarium of Ireland digital collection of Irish plants

https://dri.ie/news/new-collection-in-dri-the-national-herbarium-of-ireland-digital-collection-of...
101•gnabgib•3d ago•10 comments

Self Driving Car Insurance

https://www.lemonade.com/car/explained/self-driving-car-insurance/
119•KellyCriterion•14h ago•269 comments

Email experiments: filtering out external images

https://www.terracrypt.net/posts/email-experiments-image-filtering.html
56•todsacerdoti•18h ago•28 comments

Show HN: Amla Sandbox – WASM bash shell sandbox for AI agents

https://github.com/amlalabs/amla-sandbox
131•souvik1997•15h ago•71 comments

Starlink updates privacy policy to allow consumer data to train

https://finance.yahoo.com/news/musks-starlink-updates-privacy-policy-230853500.html
4•malchow•32m ago•0 comments

Chuck Klosterman on why we've never actually seen a real football game

https://www.latimes.com/entertainment-arts/books/story/2026-01-22/chuck-klosterman-new-book-football
37•proposal•3d ago•106 comments