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.

Redox OS has adopted a Certificate of Origin policy and a strict no-LLM policy

https://gitlab.redox-os.org/redox-os/redox/-/blob/master/CONTRIBUTING.md
56•pjmlp•47m ago•34 comments

Lotus 1-2-3 on the PC with DOS

https://stonetools.ghost.io/lotus123-dos/
81•TMWNN•3d ago•28 comments

Two Years of Emacs Solo

https://www.rahuljuliato.com/posts/emacs-solo-two-years
248•celadevra_•9h ago•70 comments

macOS Tahoe windows have different corner radiuses

https://lapcatsoftware.com/articles/2026/3/1.html
118•robenkleene•3d ago•72 comments

Optimizing Top K in Postgres

https://www.paradedb.com/blog/optimizing-top-k
69•philippemnoel•1d ago•9 comments

LoGeR – 3D reconstruction from extremely long videos (DeepMind, UC Berkeley)

https://loger-project.github.io
27•helloplanets•3h ago•12 comments

Building a Procedural Hex Map with Wave Function Collapse

https://felixturner.github.io/hex-map-wfc/article/
488•imadr•16h ago•71 comments

A useless infinite scroll experiment

https://futile.ch/en/
53•dolin_ch•3d ago•32 comments

No, it doesn't cost Anthropic $5k per Claude Code user

https://martinalderson.com/posts/no-it-doesnt-cost-anthropic-5k-per-claude-code-user/
204•jnord•10h ago•142 comments

Show HN: Remotely use my guitar tuner

https://realtuner.online/
190•smith-kyle•3d ago•42 comments

JSLinux Now Supports x86_64

https://bellard.org/jslinux/
316•TechTechTech•16h ago•92 comments

Is legal the same as legitimate: AI reimplementation and the erosion of copyleft

https://writings.hongminhee.org/2026/03/legal-vs-legitimate/
456•dahlia•18h ago•483 comments

Learnings from paying artists royalties for AI-generated art

https://www.kapwing.com/blog/learnings-from-paying-artists-royalties-for-ai-generated-art/
130•jenthoven•7h ago•101 comments

Show HN: I Was Here – Draw on street view, others can find your drawings

https://washere.live
24•mrktsm__•4h ago•17 comments

Darkrealms BBS

http://www.darkrealms.ca/
98•TigerUniversity•3d ago•22 comments

The hidden compile-time cost of C++26 reflection

https://vittorioromeo.com/index/blog/refl_compiletime.html
10•SuperV1234•3d ago•1 comments

The “JVG algorithm” only wins on tiny numbers

https://scottaaronson.blog/?p=9615
64•jhalderm•9h ago•35 comments

Show HN: DenchClaw – Local CRM on Top of OpenClaw

https://github.com/DenchHQ/DenchClaw
116•kumar_abhirup•18h ago•96 comments

DARPA’s new X-76

https://www.darpa.mil/news/2026/darpa-new-x-76-speed-of-jet-freedom-of-helicopter
195•newer_vienna•16h ago•181 comments

Launch HN: Terminal Use (YC W26) – Vercel for filesystem-based agents

101•filipbalucha•16h ago•74 comments

Getting Started in Common Lisp

https://lisp-stat.dev/blog/2026/03/09/getting-started/
43•oumua_don17•9h ago•8 comments

Graphing how the 10k* most common English words define each other

https://wyattsell.com/experiments/word-graph/
57•wyattsell•2d ago•16 comments

An opinionated take on how to do important research that matters

https://nicholas.carlini.com/writing/2026/how-to-win-a-best-paper-award.html
128•mad•17h ago•31 comments

Florida judge rules red light camera tickets are unconstitutional

https://cbs12.com/news/local/florida-news-judge-rules-red-light-camera-tickets-unconstitutional
426•1970-01-01•16h ago•540 comments

Worming out molecular secrets behind collective behaviour

https://iisc.ac.in/events/worming-out-molecular-secrets-behind-collective-behaviour/
11•rainhacker•3d ago•0 comments

OpenAI is walking away from expanding its Stargate data center with Oracle

https://www.cnbc.com/2026/03/09/oracle-is-building-yesterdays-data-centers-with-tomorrows-debt.html
349•spenvo•13h ago•202 comments

Notes on Baking at the South Pole

https://www.newyorker.com/culture/the-weekend-essay/the-most-beautiful-freezer-in-the-world
58•mitchbob•14h ago•21 comments

No leap second will be introduced at the end of June 2026

https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/P6D36VZSZBUSSTSMZKFXKF4T4IXWN23P/
111•speckx•21h ago•117 comments

Ireland shuts last coal plant, becomes 15th coal-free country in Europe (2025)

https://www.pv-magazine.com/2025/06/20/ireland-coal-free-ends-coal-power-generation-moneypoint/
958•robin_reala•23h ago•593 comments

Flash media longevity testing – 6 years later

https://old.reddit.com/r/DataHoarder/comments/1q6xnun/flash_media_longevity_testing_6_years_later/
160•1970-01-01•1d ago•89 comments