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

Comments

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

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

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

Plasma Bigscreen – 10-foot interface for KDE plasma

https://plasma-bigscreen.org
419•PaulHoule•9h ago•120 comments

UUID package coming to Go standard library

https://github.com/golang/go/issues/62026
181•soypat•7h ago•103 comments

QGIS 4.0

https://changelog.qgis.org/en/version/4.0/
33•jonbaer•1h ago•0 comments

this css proves me human

https://will-keleher.com/posts/this-css-makes-me-human/
262•todsacerdoti•12h ago•87 comments

Galileo's handwritten notes found in ancient astronomy text

https://www.science.org/content/article/galileo-s-handwritten-notes-found-ancient-astronomy-text
120•tzury•1d ago•24 comments

LLMs work best when the user defines their acceptance criteria first

https://blog.katanaquant.com/p/your-llm-doesnt-write-correct-code
216•dnw•8h ago•175 comments

Working and Communicating with Japanese Engineers

https://www.tokyodev.com/articles/working-and-communicating-with-japanese-engineers
21•zdw•3d ago•8 comments

Helix: A post-modern text editor

https://helix-editor.com/
136•doener•10h ago•48 comments

Maybe there's a pattern here?

https://dynomight.net/pattern/
118•surprisetalk•2d ago•73 comments

Show HN: Moongate – Ultima Online server emulator in .NET 10 with Lua scripting

https://github.com/moongate-community/moongatev2
255•squidleon•19h ago•139 comments

Querying 3B Vectors

https://vickiboykis.com/2026/02/21/querying-3-billion-vectors/
46•surprisetalk•3d ago•5 comments

Sarvam 105B, the first competitive Indian open source LLM

https://www.sarvam.ai/blogs/sarvam-30b-105b
34•logicchains•2h ago•5 comments

Editing changes in patch format with Jujutsu

https://www.knifepoint.net/~kat/kb-jj-patchedit.html
22•cassepipe•2d ago•2 comments

Modernizing swapping: virtual swap spaces

https://lwn.net/Articles/1059201/
26•voxadam•1d ago•16 comments

What canceled my Go context?

https://rednafi.com/go/context-cancellation-cause/
57•mweibel•3d ago•29 comments

Tech employment now significantly worse than the 2008 or 2020 recessions

https://twitter.com/JosephPolitano/status/2029916364664611242
884•enraged_camel•16h ago•582 comments

The Longing (1999)

https://www.cluetrain.com/book/longing.html
18•herbertl•3d ago•1 comments

My application programmer instincts failed when debugging assembler

https://landedstar.com/blog/posts/how-my-application-programmer-instincts-failed-when-debugging-a...
9•lifefeed•1d ago•6 comments

Show HN: Kula – Lightweight, self-contained Linux server monitoring tool

https://github.com/c0m4r/kula
54•c0m4r•9h ago•23 comments

CT Scans of Health Wearables

https://www.lumafield.com/scan-of-the-month/health-wearables
217•radeeyate•19h ago•45 comments

Lock Scroll with a Vengeance

https://unsung.aresluna.org/lock-scroll-with-a-vengeance/
6•etothet•3d ago•0 comments

Launch HN: Palus Finance (YC W26): Better yields on idle cash for startups, SMBs

51•sam_palus•15h ago•73 comments

Entomologists use a particle accelerator to image ants at scale

https://spectrum.ieee.org/3d-scanning-particle-accelerator-antscan
128•gmays•18h ago•24 comments

The shady world of IP leasing

https://acid.vegas/blog/the-shady-world-of-ip-leasing/
111•alibarber•12h ago•64 comments

Hardening Firefox with Anthropic's Red Team

https://www.anthropic.com/news/mozilla-firefox-security
566•todsacerdoti•22h ago•153 comments

C# strings silently kill your SQL Server indexes in Dapper

https://consultwithgriff.com/dapper-nvarchar-implicit-conversion-performance-trap
97•PretzelFisch•11h ago•69 comments

Show HN: 1v1 coding game that LLMs struggle with

https://yare.io
22•levmiseri•1d ago•6 comments

A tool that removes censorship from open-weight LLMs

https://github.com/elder-plinius/OBLITERATUS
167•mvdwoord•19h ago•78 comments

Tell HN: I'm 60 years old. Claude Code has re-ignited a passion

429•shannoncc•9h ago•304 comments

Workers who love ‘synergizing paradigms’ might be bad at their jobs

https://news.cornell.edu/stories/2026/03/workers-who-love-synergizing-paradigms-might-be-bad-thei...
559•Anon84•20h ago•310 comments