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

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

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

AI will make formal verification go mainstream

https://martin.kleppmann.com/2025/12/08/ai-formal-verification.html
370•evankhoury•6h ago•190 comments

alpr.watch

https://alpr.watch/
650•theamk•10h ago•326 comments

No Graphics API

https://www.sebastianaaltonen.com/blog/no-graphics-api
449•ryandrake•8h ago•81 comments

Announcing the Beta release of ty

https://astral.sh/blog/ty
368•gavide•6h ago•74 comments

No AI* Here – A Response to Mozilla's Next Chapter

https://www.waterfox.com/blog/no-ai-here-response-to-mozilla/
141•MrAlex94•5h ago•82 comments

Midjourney is alemwjsl

https://www.aadillpickle.com/blog/midjourney-is-alemwjsl
91•aadillpickle•6d ago•36 comments

GPT Image 1.5

https://openai.com/index/new-chatgpt-images-is-here/
337•charlierguo•9h ago•175 comments

Pricing Changes for GitHub Actions

https://resources.github.com/actions/2026-pricing-changes-for-github-actions/
510•kevin-david•10h ago•594 comments

CS 4973: Introduction to Software Development Tooling – Northeastern Univ (2024)

https://bernsteinbear.com/isdt/
19•vismit2000•1h ago•0 comments

I ported JustHTML from Python to JavaScript with Codex CLI and GPT-5.2 in hours

https://simonwillison.net/2025/Dec/15/porting-justhtml/
80•pbowyer•4h ago•48 comments

Sei AI (YC W22) Is Hiring

https://www.ycombinator.com/companies/sei/jobs/TYbKqi0-llm-engineer-mid-senior
1•ramkumarvenkat•2h ago

More than 100 rally against data centers at Michigan Capitol

https://www.lansingstatejournal.com/story/news/local/2025/12/16/lansing-state-capitol-data-center...
35•rmason•3h ago•21 comments

40 percent of fMRI signals do not correspond to actual brain activity

https://www.tum.de/en/news-and-events/all-news/press-releases/details/40-percent-of-mri-signals-d...
400•geox•13h ago•176 comments

Mozilla appoints new CEO Anthony Enzor-Demeo

https://blog.mozilla.org/en/mozilla/leadership/mozillas-next-chapter-anthony-enzor-demeo-new-ceo/
435•recvonline•13h ago•680 comments

Why many Asian megacities are miserable places

https://www.economist.com/asia/2025/12/11/why-many-asian-megacities-are-miserable-places
6•andsoitis•18m ago•2 comments

Testing a cheaper laminar flow hood

https://chillphysicsenjoyer.substack.com/p/testing-a-cheaper-laminar-flow-hood
18•surprisetalk•4d ago•3 comments

Dafny: Verification-Aware Programming Language

https://dafny.org/
34•handfuloflight•4h ago•14 comments

Thin desires are eating life

https://www.joanwestenberg.com/thin-desires-are-eating-your-life/
340•mitchbob•1d ago•137 comments

Japan to revise romanization rules for first time in 70 years

https://www.japantimes.co.jp/news/2025/08/21/japan/panel-hepburn-style-romanization/
130•rgovostes•18h ago•109 comments

Sega Channel: VGHF Recovers over 100 Sega Channel ROMs (and More)

https://gamehistory.org/segachannel/
227•wicket•14h ago•36 comments

Locked out: How a gift card purchase destroyed an Apple account

https://appleinsider.com/articles/25/12/13/locked-out-how-a-gift-card-purchase-destroyed-an-apple...
24•nonfamous•1h ago•7 comments

Show HN: TheAuditor v2.0 – A ”Flight Computer“ for AI Coding Agents

https://github.com/TheAuditorTool/Auditor
12•ThailandJohn•13h ago•4 comments

Writing a blatant Telegram clone using Qt, QML and Rust. And C++

https://kemble.net/blog/provoke/
90•tempodox•11h ago•53 comments

Show HN: Learn Japanese contextually while browsing

https://lingoku.ai/learn-japanese
26•englishcat•2h ago•11 comments

MIT professor shot at his Massachusetts home dies

https://www.bbc.com/news/articles/cly08y25688o
209•mosura•5h ago•104 comments

The World Happiness Report is beset with methodological problems

https://yaschamounk.substack.com/p/the-world-happiness-report-is-a-sham
90•thatoneengineer•1d ago•110 comments

Nvidia Nemotron 3 Family of Models

https://research.nvidia.com/labs/nemotron/Nemotron-3/
152•ewt-nv•1d ago•29 comments

Twin suction turbines and 3-Gs in slow corners? Meet the DRG-Lola

https://arstechnica.com/cars/2025/11/an-electric-car-thats-faster-than-f1-around-monaco-thats-the...
4•PaulHoule•5d ago•0 comments

Meta's new A.I. superstars are chafing against the rest of the company

https://www.nytimes.com/2025/12/10/technology/meta-ai-tbd-lab-friction.html
77•furcyd•6d ago•95 comments

Chat-tails: Throwback terminal chat, built on Tailscale

https://tailscale.com/blog/chat-tails-terminal-chat
56•nulbyte•6h ago•11 comments