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

Comments

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

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

Multiprocessing all the way!

emmelaich•6mo ago
(2021)

Good article!

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

Same-day upstream Linux support for Snapdragon 8 Elite Gen 5

https://www.qualcomm.com/developer/blog/2025/10/same-day-snapdragon-8-elite-gen-5-upstream-linux-...
255•mfilion•5h ago•116 comments

Underrated reasons to be thankful V

https://dynomight.net/thanks-5/
21•numeri•1h ago•9 comments

Physicists drive antihydrogen breakthrough at CERN

https://phys.org/news/2025-11-physicists-antihydrogen-breakthrough-cern-technique.html
58•naves•5d ago•3 comments

Quake Engine Indicators

https://fabiensanglard.net/quake_indicators/index.html
146•liquid_x•3d ago•25 comments

Memories of .us

https://computer.rip/2025-11-11-dot-us.html
65•sabas_ge•1d ago•6 comments

Why Strong Consistency?

https://brooker.co.za/blog/2025/11/18/consistency.html
50•SchwKatze•23h ago•26 comments

Feedback doesn't scale

https://another.rodeo/feedback/
61•ohjeez•1d ago•12 comments

LinkedIn is loud, and corporate is hell

https://ramones.dev/posts/linkedin-is-loud/
12•austinallegro•1h ago•4 comments

Tell HN: Happy Thanksgiving

359•prodigycorp•16h ago•84 comments

Linux Kernel Explorer

https://reverser.dev/linux-kernel-explorer
491•tanelpoder•15h ago•72 comments

DeepSeekMath-V2: Towards Self-Verifiable Mathematical Reasoning [pdf]

https://github.com/deepseek-ai/DeepSeek-Math-V2/blob/main/DeepSeekMath_V2.pdf
36•fspeech•1h ago•9 comments

Penpot: The Open-Source Figma

https://github.com/penpot/penpot
648•selvan•19h ago•159 comments

Show HN: Runprompt – run .prompt files from the command line

https://github.com/chr15m/runprompt
85•chr15m•7h ago•27 comments

Inspired by Spider-Man, scientists recreate web-slinging technology

https://scienceclock.com/inspired-by-spider-man-scientists-recreate-web-slinging-technology/
22•ohjeez•1d ago•5 comments

The VanDersarl Blériot: a 1911 airplane homebuilt by teenage brothers

https://www.historynet.com/vandersarl-bleriot/
29•ForHackernews•5h ago•26 comments

Pakistan says rooftop solar output to exceed grid demand in some hubs next year

https://www.reuters.com/sustainability/boards-policy-regulation/pakistan-says-rooftop-solar-outpu...
142•toomuchtodo•5h ago•109 comments

TPUs vs. GPUs and why Google is positioned to win AI race in the long term

https://www.uncoveralpha.com/p/the-chip-made-for-the-ai-inference
172•vegasbrianc•8h ago•166 comments

The input stack on Linux: An end-to-end architecture overview

https://venam.net/blog/unix/2025/11/27/input_devices_linux.html
85•venamresm__•4h ago•6 comments

Mixpanel Security Breach

https://mixpanel.com/blog/sms-security-incident/
186•jaredwiener•14h ago•102 comments

DIY NAS: 2026 Edition

https://blog.briancmoses.com/2025/11/diy-nas-2026-edition.html
363•sashk•18h ago•231 comments

Coq: The World's Best Macro Assembler? (2013) [pdf]

https://nickbenton.name/coqasm.pdf
128•addaon•17h ago•59 comments

Show HN: SyncKit – Offline-first sync engine (Rust/WASM and TypeScript)

https://github.com/Dancode-188/synckit
63•danbitengo•7h ago•28 comments

Ray Marching Soft Shadows in 2D (2020)

https://www.rykap.com/2020/09/23/distance-fields/
164•memalign•14h ago•28 comments

The current state of the theory that GPL propagates to AI models

https://shujisado.org/2025/11/27/gpl-propagates-to-ai-models-trained-on-gpl-code/
151•jonymo•8h ago•186 comments

AI CEO – Replace your boss before they replace you

https://replaceyourboss.ai/
294•_tk_•3h ago•120 comments

Show HN: MkSlides – Markdown to slides with a similar workflow to MkDocs

https://github.com/MartenBE/mkslides
58•MartenBE•8h ago•8 comments

ZZ9000 multifunction card for Zorro Amigas

https://www.amiga-shop.net/en/Amiga-Hardware/Amiga-graphic-cards/ZZ9000-multifunction-card-for-Zo...
6•doener•4d ago•1 comments

Interactive λ-Reduction

https://deltanets.org/
106•jy14898•3d ago•22 comments

Technical Deflation

https://benanderson.work/blog/technical-deflation/
65•0x79de•3d ago•63 comments

Music eases surgery and speeds recovery, study finds

https://www.bbc.com/news/articles/c231dv9zpz3o
175•1659447091•16h ago•83 comments