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.

At least 50 hallucinated citations found in ICLR 2026 submissions

https://gptzero.me/news/iclr-2026/
231•puttycat•3h ago•145 comments

Google Titans architecture, helping AI have long-term memory

https://research.google/blog/titans-miras-helping-ai-have-long-term-memory/
146•Alifatisk•4h ago•49 comments

Scala 3 slowed us down?

https://kmaliszewski9.github.io/scala/2025/12/07/scala3-slowdown.html
32•kmaliszewski•1h ago•8 comments

Goodbye, Microsoft: Schleswig-Holstein Relies on Open Source and Saves Millions

https://www.heise.de/en/news/Goodbye-Microsoft-Schleswig-Holstein-relies-on-Open-Source-and-saves...
277•doener•3h ago•129 comments

Java Hello World, LLVM Edition

https://www.javaadvent.com/2025/12/java-hello-world-llvm-edition.html
112•ingve•5h ago•31 comments

The Anatomy of a macOS App

https://eclecticlight.co/2025/12/04/the-anatomy-of-a-macos-app/
71•elashri•4h ago•12 comments

Using LLMs at Oxide

https://rfd.shared.oxide.computer/rfd/0576
558•steveklabnik•15h ago•221 comments

How the Disappearance of Flight 19 Fueled the Legend of the Bermuda Triangle

https://www.smithsonianmag.com/history/how-the-disappearance-of-flight-19-a-navy-squadron-lost-in...
26•pseudolus•4h ago•0 comments

Building a Toast Component

https://emilkowal.ski/ui/building-a-toast-component
23•FragrantRiver•4d ago•8 comments

Kilauea erupts, destroying webcam [video]

https://www.youtube.com/watch?v=TK2N99BDw7A
467•zdw•17h ago•105 comments

The programmers who live in Flatland

https://blog.redplanetlabs.com/2025/11/24/the-programmers-who-live-in-flatland/
19•winkywooster•1w ago•7 comments

Locks in PostgreSQL

https://habr.com/en/companies/postgrespro/articles/504498/
26•fanf2•1h ago•2 comments

Z2 – Lithographically fabricated IC in a garage fab

https://sam.zeloof.xyz/second-ic/
266•embedding-shape•13h ago•58 comments

GrapheneOS is the only Android OS providing full security patches

https://grapheneos.social/@GrapheneOS/115647408229616018
694•akyuu•1d ago•319 comments

Screenshots from developers: 2002 vs. 2015 (2015)

https://anders.unix.se/2015/12/10/screenshots-from-developers--2002-vs.-2015/
390•turrini•19h ago•162 comments

The past was not that cute

https://juliawise.net/the-past-was-not-that-cute/
315•mhb•19h ago•388 comments

Discovering the indieweb with calm tech

https://alexsci.com/blog/calm-tech-discover/
154•todsacerdoti•13h ago•17 comments

What even is "literate programming"? (2024)

https://pqnelson.github.io/2024/05/29/literate-programming.html
53•joecobb•4d ago•29 comments

Eurydice: a Rust to C compiler (yes)

https://jonathan.protzenko.fr/2025/10/28/eurydice.html
149•todsacerdoti•15h ago•83 comments

Tiny Core Linux: a 23 MB Linux distro with graphical desktop

http://www.tinycorelinux.net/
476•LorenDB•1d ago•211 comments

OpenAI disables ChatGPT app suggestions that looked like ads

https://techoreon.com/openai-disables-chatgpt-app-suggestions-ads-backlash/
18•GeorgeWoff25•1h ago•2 comments

Perl's decline was cultural

https://www.beatworm.co.uk/blog/computers/perls-decline-was-cultural-not-technical
321•todsacerdoti•23h ago•365 comments

Patching Pulse Oximeter Firmware

https://stefan-gloor.ch/pulseoximeter-hack
33•stgl•6d ago•5 comments

Z-Image: Powerful and highly efficient image generation model with 6B parameters

https://github.com/Tongyi-MAI/Z-Image
341•doener•1w ago•138 comments

Desperately Seeking Squircles (2018)

https://www.figma.com/blog/desperately-seeking-squircles/
15•williamjsdavis•1w ago•2 comments

Bikeshedding, or why I want to build a laptop

https://geohot.github.io//blog/jekyll/update/2025/11/29/bikeshedding-or-laptop.html
180•cspags•6d ago•195 comments

HTML as an Accessible Format for Papers (2023)

https://info.arxiv.org/about/accessible_HTML.html
251•el3ctron•1d ago•122 comments

Martin Parr has died

https://www.bbc.co.uk/news/articles/cg5m0mnvnvmo
20•yzydserd•1h ago•1 comments

Autism's confusing cousins

https://www.psychiatrymargins.com/p/autisms-confusing-cousins
313•Anon84•1d ago•289 comments

OMSCS Open Courseware

https://sites.gatech.edu/omscsopencourseware/
201•kerim-ca•21h ago•77 comments