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.

Mousefood – Build embedded terminal UIs for microcontrollers

https://github.com/ratatui/mousefood
86•orhunp_•3h ago•29 comments

Airfoil (2024)

https://ciechanow.ski/airfoil/
269•brk•6h ago•44 comments

Native Linux VST plugin directory

https://linuxmusic.rocks
18•Aldipower•1h ago•11 comments

Oban, the job processing framework from Elixir, has come to Python

https://www.dimamik.com/posts/oban_py/
118•dimamik•4h ago•58 comments

Microsoft forced me to switch to Linux

https://www.himthe.dev/blog/microsoft-to-linux
1321•bobsterlobster•6h ago•1039 comments

Computer History Museum Launches Digital Portal to Its Collection

https://computerhistory.org/press-releases/computer-history-museum-launches-digital-portal-to-its...
52•ChrisArchitect•3h ago•7 comments

Android's desktop interface leaks

https://9to5google.com/2026/01/27/android-desktop-leak/
68•thunderbong•17h ago•147 comments

I have written gemma3 inference in pure C

https://github.com/robitec97/gemma3.c
32•robitec97•2d ago•15 comments

The Five Levels: From Spicy Autocomplete to the Software Factory

https://www.danshapiro.com/blog/2026/01/the-five-levels-from-spicy-autocomplete-to-the-software-f...
9•benwerd•4d ago•3 comments

Show HN: The HN Arcade

https://andrewgy8.github.io/hnarcade/
268•yuppiepuppie•10h ago•68 comments

Spinning around: Please don't – Common problems with spin locks

https://www.siliceum.com/en/blog/post/spinning-around/
41•bdash•4h ago•14 comments

I Overengineered a Spinning Top

https://www.youtube.com/watch?v=Wp5NodfvvF4
94•bane•5d ago•22 comments

What does Werner Herzog's nihilist penguin teach us about life?

https://lwlies.com/article/werner-herzog-penguin-encounters-at-the-end-of-the-world
3•Marceltan•22m ago•0 comments

Amazon cuts 16k jobs

https://www.reuters.com/legal/litigation/amazon-cuts-16000-jobs-globally-broader-restructuring-20...
338•DGAP•5h ago•456 comments

Trying to craft AI images that are worth displaying to end users

https://www.approachwithalacrity.com/how-to-turn-sfo-jfk-into-a-beautiful-photo/
4•bblcla•1h ago•0 comments

Who sets the Doomsday Clock?

https://www.popularmechanics.com/science/a70162364/setting-the-doomsday-clock/
4•littlexsparkee•1h ago•0 comments

Native Instruments enters into insolvency proceedings

https://www.engadget.com/audio/native-instruments-enters-into-insolvency-proceedings-leaving-its-...
39•elevaet•1h ago•7 comments

Show HN: Cursor for Userscripts

https://github.com/chebykinn/browser-code
5•mifydev•1h ago•0 comments

LM Studio 0.4.0

https://lmstudio.ai/blog/0.4.0
73•jiqiren•2h ago•41 comments

3D-Printed Mathematical Lampshades

https://hessammehr.github.io/blog/posts/2025-12-24-maths-to-lampshade.html
32•hessammehr•4d ago•10 comments

Amazon One palm authentication discontinued

https://amazonone.aws.com/help
34•KerryJones•4h ago•69 comments

Some notes on starting to use Django

https://jvns.ca/blog/2026/01/27/some-notes-on-starting-to-use-django/
157•ingve•22h ago•90 comments

Kyber (YC W23) Is Hiring a Staff Engineer

https://www.ycombinator.com/companies/kyber/jobs/GPJkv5v-staff-engineer-tech-lead
1•asontha•9h ago

That's not how email works

https://danq.me/2026/01/28/hsbc-dont-understand-email/
156•HotGarbage•2h ago•100 comments

Show HN: SHDL – A minimal hardware description language built from logic gates

https://github.com/rafa-rrayes/SHDL
10•rafa_rrayes•8h ago•3 comments

If you tax them, will they leave?

https://www.theatlantic.com/economy/2026/01/california-wealth-tax-billionaire-migration/685779/
54•JumpCrisscross•8h ago•153 comments

There's only one Woz, but we can all learn from him

https://www.fastcompany.com/91477114/steve-wozniak-woz-apple-the-tech-interactive-humanitarian-award
293•coloneltcb•5d ago•142 comments

Will AIs take all our jobs and end human history, or not? (2023)

https://writings.stephenwolfram.com/2023/03/will-ais-take-all-our-jobs-and-end-human-history-or-n...
48•lukakopajtic•4h ago•94 comments

Package management is a wicked problem

https://nesbitt.io/2026/01/23/package-management-is-a-wicked-problem.html
80•zdw•4d ago•58 comments

Make.ts

https://matklad.github.io/2026/01/27/make-ts.html
201•ingve•13h ago•108 comments