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.

Apple Is Fighting for TSMC Capacity as Nvidia Takes Center Stage

https://www.culpium.com/p/exclusiveapple-is-fighting-for-tsmc
43•speckx•23m ago•9 comments

The URL shortener that makes your links look as suspicious as possible

https://creepylink.com/
586•dreadsword•11h ago•118 comments

Show HN: TinyCity – A tiny city SIM for MicroPython (Thumby micro console)

https://github.com/chrisdiana/TinyCity
17•inflam52•1h ago•2 comments

25 Years of Wikipedia

https://wikipedia25.org
18•easton•2h ago•1 comments

The Palantir app helping ICE raids in Minneapolis

https://www.404media.co/elite-the-palantir-app-ice-uses-to-find-neighborhoods-to-raid/
41•fajmccain•30m ago•8 comments

Claude Cowork exfiltrates files

https://www.promptarmor.com/resources/claude-cowork-exfiltrates-files
764•takira•19h ago•336 comments

The 3D Software Rendering Technology of 1998's Thief: The Dark Project (2019)

https://nothings.org/gamedev/thief_rendering.html
43•suioir•4h ago•16 comments

Impeccable Style

https://impeccable.style
46•noemit•3d ago•21 comments

Programming, Evolved: Lessons and Observations

https://github.com/kulesh/dotfiles/blob/main/dev/dev/docs/programming-evolved.md
13•dnw•2h ago•4 comments

OBS Studio 32.1.0 Beta 1 available

https://github.com/obsproject/obs-studio/releases/tag/32.1.0-beta1
12•Sean-Der•27m ago•0 comments

Z80 Mem­ber­ship Card

https://sunrise-ev.com/z80.htm
61•exvi•3d ago•17 comments

Investing with GIFs: A Visual Guide

https://www.ft.com/content/9b1ff0b8-a1e8-4869-8d61-620c5ed32d35
5•7777777phil•5d ago•1 comments

Jiga (YC W21) Is Hiring Full Stack Engineers

https://jiga.io/about-us
1•grmmph•3h ago

French Court Orders Popular VPNs to Block More Pirate Sites, Despite Opposition

https://torrentfreak.com/french-court-orders-popular-vpns-to-block-more-pirate-sites-despite-oppo...
55•iamnothere•2h ago•30 comments

The 500k-ton typo: Why data center copper math doesn't add up

https://investinglive.com/news/the-500000-ton-typo-why-data-center-copper-math-doesnt-add-up-2026...
58•thebeardisred•2h ago•78 comments

Ask HN: Share your personal website

719•susam•22h ago•1973 comments

Show HN: MailPilot – Freedom to go anywhere while your agents work

23•keepamovin•8h ago•30 comments

Raspberry Pi's New AI Hat Adds 8GB of RAM for Local LLMs

https://www.jeffgeerling.com/blog/2026/raspberry-pi-ai-hat-2/
184•ingve•7h ago•142 comments

Ask HN: How are you doing RAG locally?

250•tmaly•1d ago•106 comments

San Remo Pasta Measurer

https://www.toxel.com/tech/2025/09/17/san-remo-pasta-measurer/
34•surprisetalk•5d ago•22 comments

Ask HN: What did you find out or explore today?

149•blahaj•21h ago•250 comments

Scaling long-running autonomous coding

https://cursor.com/blog/scaling-agents
237•samwillis•17h ago•146 comments

Python: Tprof, a Targeting Profiler

https://adamj.eu/tech/2026/01/14/python-introducing-tprof/
34•jonatron•6h ago•0 comments

Crafting Interpreters

https://craftinginterpreters.com/
168•tosh•16h ago•41 comments

Bubblewrap: A nimble way to prevent agents from accessing your .env files

https://patrickmccanna.net/a-better-way-to-limit-claude-code-and-other-coding-agents-access-to-se...
137•0o_MrPatrick_o0•13h ago•106 comments

Photos Capture the Breathtaking Scale of China's Wind and Solar Buildout

https://e360.yale.edu/digest/china-renewable-photo-essay
263•mrtksn•5h ago•198 comments

The State of OpenSSL for pyca/cryptography

https://cryptography.io/en/latest/statements/state-of-openssl/
173•SGran•17h ago•42 comments

New Safari developer tools provide insight into CSS Grid Lanes

https://webkit.org/blog/17746/new-safari-developer-tools-provide-insight-into-css-grid-lanes/
99•feross•14h ago•54 comments

Furiosa: 3.5x efficiency over H100s

https://furiosa.ai/blog/introducing-rngd-server-efficient-ai-inference-at-data-center-scale
196•written-beyond•14h ago•131 comments

Test your square brackets

https://fluca1978.github.io/2025/12/10/testAndSquareBrackets.html
54•speckx•6d ago•44 comments