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.

The tiniest yet real telescope I've built

https://lucassifoni.info/blog/miniscope-tiny-telescope/
48•chantepierre•1h ago•11 comments

GPT-5.2

https://openai.com/index/introducing-gpt-5-2/
960•atgctg•14h ago•811 comments

Nokia N900 Necromancy

https://yaky.dev/2025-12-11-nokia-n900-necromancy/
261•yaky•8h ago•79 comments

He set out to walk around the world. After 27 years, his quest is nearly over

https://www.washingtonpost.com/lifestyle/2025/12/05/karl-bushby-walk-around-world/
86•wallflower•4d ago•23 comments

Google de-indexed Bear Blog and I don't know why

https://journal.james-zhan.com/google-de-indexed-my-entire-bear-blog-and-i-dont-know-why/
120•nafnlj•7h ago•36 comments

Rivian Unveils Custom Silicon, R2 Lidar Roadmap, and Universal Hands Free

https://riviantrackr.com/news/rivian-unveils-custom-silicon-r2-lidar-roadmap-universal-hands-free...
305•doctoboggan•14h ago•385 comments

CRISPR fungus: Protein-packed, sustainable, and tastes like meat

https://www.isaaa.org/kc/cropbiotechupdate/article/default.asp?ID=21607
116•rguiscard•7h ago•54 comments

The highest quality codebase

https://gricha.dev/blog/the-highest-quality-codebase
520•Gricha•3d ago•336 comments

Guarding My Git Forge Against AI Scrapers

https://vulpinecitrus.info/blog/guarding-git-forge-ai-scrapers/
7•todsacerdoti•57m ago•1 comments

An SVG is all you need

https://jon.recoil.org/blog/2025/12/an-svg-is-all-you-need.html
232•sadiq•13h ago•89 comments

Programmers and software developers lost the plot on naming their tools

https://larr.net/p/namings.html
269•todsacerdoti•14h ago•368 comments

Denial of service and source code exposure in React Server Components

https://react.dev/blog/2025/12/11/denial-of-service-and-source-code-exposure-in-react-server-comp...
273•sangeeth96•12h ago•163 comments

Litestream VFS

https://fly.io/blog/litestream-vfs/
284•emschwartz•14h ago•78 comments

Stoolap: High-performance embedded SQL database in pure Rust

https://github.com/stoolap/stoolap
61•murat3ok•8h ago•12 comments

Show HN: Sim – Apache-2.0 n8n alternative

https://github.com/simstudioai/sim
190•waleedlatif1•15h ago•40 comments

Laying out the 404 Media zine

https://tedium.co/2025/12/10/404-media-zine-linux-affinity/?
59•robenkleene•8h ago•5 comments

Cadmium Zinc Telluride: The wonder material powering a medical 'revolution'

https://www.bbc.com/news/articles/c24l223d9n7o
40•1659447091•7h ago•11 comments

The architecture of “not bad”: Decoding the Chinese source code of the void

https://suggger.substack.com/p/the-architecture-of-not-bad-decoding
94•Suggger•18h ago•109 comments

Einstein: NewtonOS running on other operating systems

https://github.com/pguyot/Einstein
59•fanf2•3d ago•3 comments

Auto-grading decade-old Hacker News discussions with hindsight

https://karpathy.bearblog.dev/auto-grade-hn/
600•__rito__•1d ago•254 comments

Craft software that makes people feel something

https://rapha.land/craft-software-that-makes-people-feel-something/
287•lukeio•19h ago•140 comments

Pdsink: USB Power Delivery Sink library for embedded devices

https://github.com/pdsink/pdsink
37•zdw•5d ago•11 comments

The Walt Disney Company and OpenAI Partner on Sora

https://openai.com/index/disney-sora-agreement/
218•inesranzo•18h ago•454 comments

French supermarket's Christmas advert is worldwide hit (without AI) [video]

https://www.youtube.com/watch?v=Na9VmMNJvsA
330•gbugniot•19h ago•164 comments

EFF launches Age Verification Hub

https://www.eff.org/press/releases/eff-launches-age-verification-hub-resource-against-misguided-laws
324•iamnothere•1d ago•272 comments

Size of Life

https://neal.fun/size-of-life/
2509•eatonphil•1d ago•277 comments

Almond (YC X25) Is Hiring SWEs and MechEs

https://www.ycombinator.com/companies/almond-2/jobs
1•shawnpatel•11h ago

The Boot Order of the Raspberry Pi Is Unusual

https://patrickmccanna.net/the-raspberry-pi-boot-order-is-unusual/
14•0o_MrPatrick_o0•7h ago•3 comments

Powder and stone, or, why medieval rulers loved castles

https://1517.substack.com/p/powder-and-stone-or-why-medieval
44•areoform•11h ago•13 comments

My productivity app is a never-ending .txt file (2020)

https://jeffhuang.com/productivity_text_file/
234•simonebrunozzi•13h ago•148 comments