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

Comments

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

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

Multiprocessing all the way!

emmelaich•11mo ago
(2021)

Good article!

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

VS Code inserting 'Co-Authored-by Copilot' into commits regardless of usage

https://github.com/microsoft/vscode/pull/310226
892•indrora•7h ago•422 comments

A Couple Million Lines of Haskell: Production Engineering at Mercury

https://blog.haskell.org/a-couple-million-lines-of-haskell/
74•unignorant•3h ago•16 comments

This Month in Ladybird - April 2026

https://ladybird.org/newsletter/2026-04-30/
176•richardboegli•6h ago•29 comments

Six Years Perfecting Maps on WatchOS

https://www.david-smith.org/blog/2026/04/29/maps-on-watchos/
198•valzevul•5h ago•38 comments

Clandestine network smuggling Starlink tech into Iran to beat internet blackout

https://www.bbc.com/news/articles/cvgzk91leweo
24•1659447091•1h ago•8 comments

Dav2d

https://code.videolan.org/videolan/dav2d
359•dabinat•9h ago•114 comments

Neanderthals ran 'fat factories' 125,000 years ago (2025)

https://www.universiteitleiden.nl/en/news/2025/07/neanderthals-ran-fat-factories-125000-years-ago
126•andsoitis•6h ago•33 comments

Do_not_track

https://donottrack.sh/
227•RubyGuy•9h ago•70 comments

Open Source Does Not Imply Open Community

https://blog.feld.me/posts/2026/04/open-source-does-not-imply-open-community/
7•RohanAdwankar•38m ago•0 comments

Inventions for battery reuse and recycling increase seven-fold in last decade

https://www.epo.org/en/news-events/news/inventions-battery-reuse-and-recycling-increase-more-seve...
167•JeanKage•2d ago•10 comments

Clojurists Together – Q2 2026 Open Source Funding Announcement

https://www.clojuriststogether.org/news/q2-2026-funding-announcement/
45•dragandj•5h ago•6 comments

Maryland Is First to Ban A.I.-Driven Price Increases in Grocery Stores

https://www.nytimes.com/2026/05/01/business/surveillance-pricing-groceries-maryland.html
42•doener•1h ago•18 comments

Show HN: State of the Art of Coding Models, According to Hacker News Commenters

https://hnup.date/hn-sota
61•yunusabd•5h ago•31 comments

A more efficient implementation of Shor's algorithm

https://lwn.net/Articles/1066156/
30•signa11•1d ago•1 comments

Dabbling in Erlang, part 2: A minimal introduction (2013)

https://agis.io/post/dabbling-in-erlang-a-minimal-introduction/
19•pasxizeis•18h ago•2 comments

Tesla owner won $10k in court for Tesla's FSD lies. Tesla is still fighting him

https://electrek.co/2026/05/02/this-tesla-owner-won-10k-in-court-for-teslas-fsd-lies-tesla-is-sti...
188•breve•4h ago•70 comments

A Physics Engine with Incremental Rollback for Multiplayer Games

https://easel.games/blog/2026-rollback-physics
48•BSTRhino•1d ago•19 comments

Voice-AI-for-Beginners – A curated learning path for developers

https://github.com/mahimairaja/voiceai
37•mahimai•5h ago•3 comments

How fast is a macOS VM, and how small could it be?

https://eclecticlight.co/2026/05/02/how-fast-is-a-macos-vm-and-how-small-could-it-be/
228•moosia•17h ago•83 comments

NetHack 5.0.0

https://nethack.org/v500/release.html
390•rsaarelm•9h ago•121 comments

Am I the only one who hates delivery robots?

https://www.latimes.com/entertainment-arts/story/2026-04-14/delivery-robots-creating-problems-gle...
35•robotlaunch•2h ago•14 comments

Little Magazines Are Back

https://wsjfreeexpression.substack.com/p/little-magazines-are-back
74•prismatic•2d ago•22 comments

Barman – Backup and Recovery Manager for PostgreSQL

https://github.com/EnterpriseDB/barman
141•nateb2022•3d ago•23 comments

California to begin ticketing driverless cars that violate traffic laws

https://www.bbc.com/news/articles/clypjx3rg2go
260•geox•9h ago•268 comments

The agent harness belongs outside the sandbox

https://www.mendral.com/blog/agent-harness-belongs-outside-sandbox
71•shad42•5h ago•56 comments

Show HN: Golang binaries built for your users depending on their arch and system

https://goblin.run
6•aliezsid•2d ago•3 comments

Refusal in Language Models Is Mediated by a Single Direction

https://arxiv.org/abs/2406.11717
99•fagnerbrack•13h ago•34 comments

The USB Situation

https://randsinrepose.com/archives/the-usb-situation/
96•herbertl•3d ago•108 comments

Roblox shares plummet 18% as child safety measures weigh on bookings

https://www.cnbc.com/2026/05/01/roblox-rblx-stock-child-safety-earnings.html
206•1vuio0pswjnm7•10h ago•127 comments

Open Design: Use Your Coding Agent as a Design Engine

https://github.com/nexu-io/open-design
185•steveharing1•14h ago•87 comments