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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

Bus stop balancing is fast, cheap, and effective

https://worksinprogress.co/issue/the-united-states-needs-fewer-bus-stops/
134•surprisetalk•2h ago•192 comments

Sandboxes won't save you from OpenClaw

https://tachyon.so/blog/sandboxes-wont-save-you
43•logicx24•1h ago•34 comments

Never buy a .online domain

https://www.0xsid.com/blog/online-tld-is-pain
518•ssiddharth•5h ago•294 comments

Large-Scale Online Deanonymization with LLMs

https://simonlermen.substack.com/p/large-scale-online-deanonymization
57•DalasNoin•1d ago•83 comments

Following 35% growth, solar has passed hydro on US grid

https://arstechnica.com/science/2026/02/final-2025-data-is-in-us-energy-use-is-up-as-solar-passes...
141•rbanffy•2h ago•75 comments

New accounts on HN 10x more likely to use em-dashes

https://www.marginalia.nu/weird-ai-crap/hn/
277•todsacerdoti•4h ago•232 comments

om

https://www.om-language.com/
17•tosh•59m ago•0 comments

GNU Texmacs

https://www.texmacs.org/tmweb/home/welcome.en.html
57•remywang•3h ago•15 comments

How to fold the Blade Runner origami unicorn (1996)

https://web.archive.org/web/20011104015933/www.linkclub.or.jp/~null/index_br.html
192•exvi•2d ago•23 comments

Trellis AI (YC W24) is hiring deployment lead to accelerate medication access

https://www.ycombinator.com/companies/trellis-ai/jobs/7ZlvQkN-lead-deployment-strategist
1•macklinkachorn•1h ago

Racket v9.1

https://blog.racket-lang.org/2026/02/racket-v9-1.html
63•azhenley•2h ago•7 comments

Claude Code Remote Control

https://code.claude.com/docs/en/remote-control
382•empressplay•11h ago•215 comments

PL/0

https://en.wikipedia.org/wiki/PL/0
33•tosh•3d ago•7 comments

Show HN: Django Control Room – All Your Tools Inside the Django Admin

https://github.com/yassi/dj-control-room
70•yassi_dev•4h ago•29 comments

Show HN: I ported Tree-sitter to Go

https://github.com/odvcencio/gotreesitter
3•odvcencio•19m ago•0 comments

Text-Based Google Directions

https://gdir.telae.net/
12•TigerUniversity•4d ago•2 comments

The Pentagon Threatens Anthropic

https://www.astralcodexten.com/p/the-pentagon-threatens-anthropic
48•lukeplato•58m ago•5 comments

Launch HN: TeamOut (YC W22) – AI agent for planning company retreats

https://app.teamout.com/ai
24•vincentalbouy•4h ago•32 comments

Topological Naming Problem

https://wiki.freecad.org/Topological_naming_problem
36•tripdout•4d ago•17 comments

Danish government agency to ditch Microsoft software (2025)

https://therecord.media/denmark-digital-agency-microsoft-digital-independence
605•robtherobber•8h ago•313 comments

Show HN: A real-time strategy game that AI agents can play

https://llmskirmish.com/
169•__cayenne__•8h ago•61 comments

100M-Row Challenge with PHP

https://github.com/tempestphp/100-million-row-challenge
141•brentroose•8h ago•64 comments

Show HN: Sgai – Goal-driven multi-agent software dev (GOAL.md → working code)

https://github.com/sandgardenhq/sgai
13•sandgardenhq•2h ago•10 comments

The Slow Death of the Power User

https://fireborn.mataroa.blog/blog/the-slow-death-of-the-power-user/
8•microsoftedging•21m ago•0 comments

Why isn't LA repaving streets?

https://lapublicpress.org/2026/02/why-isnt-la-repaving-streets/
11•speckx•1h ago•8 comments

Pi – A minimal terminal coding harness

https://pi.dev
545•kristianpaul•20h ago•270 comments

Confusables.txt and NFKC disagree on 31 characters

https://paultendo.github.io/posts/unicode-confusables-nfkc-conflict/
47•pimterry•2d ago•26 comments

The Misuses of the University

https://www.publicbooks.org/the-misuses-of-the-university/
71•ubasu•2h ago•43 comments

The History of a Security Hole

https://www.os2museum.com/wp/the-history-of-a-security-hole/
27•st_goliath•3d ago•2 comments

Mercury 2: Fast reasoning LLM powered by diffusion

https://www.inceptionlabs.ai/blog/introducing-mercury-2
325•fittingopposite•20h ago•117 comments