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.

Defeating a 40-year-old copy protection dongle

https://dmitrybrant.com/2026/02/01/defeating-a-40-year-old-copy-protection-dongle
523•zdw•12h ago•160 comments

Apple's MacBook Pro DFU port documentation is wrong

https://lapcatsoftware.com/articles/2026/2/1.html
92•zdw•6h ago•17 comments

My iPhone 16 Pro Max produces garbage output when running MLX LLMs

https://journal.rafaelcosta.me/my-thousand-dollar-iphone-cant-do-math/
282•rafaelcosta•12h ago•128 comments

Show HN: Wikipedia as a doomscrollable social media feed

https://xikipedia.org
176•rebane2001•9h ago•66 comments

Show HN: NanoClaw – “Clawdbot” in 500 lines of TS with Apple container isolation

https://github.com/gavrielc/nanoclaw
356•jimminyx•10h ago•121 comments

Actors: A Model of Concurrent Computation [pdf] (1985)

https://apps.dtic.mil/sti/tr/pdf/ADA157917.pdf
79•kioku•8h ago•28 comments

Ratchets in Software Development

https://qntm.org/ratchet
21•nvader•3d ago•1 comments

Contracts in Nix

https://sraka.xyz/posts/contracts.html
52•todsacerdoti•1d ago•14 comments

Apple I Advertisement (1976)

http://apple1.chez.com/Apple1project/Gallery/Gallery.htm
229•janandonly•15h ago•128 comments

Adventure Game Studio: OSS software for creating adventure games

https://www.adventuregamestudio.co.uk/
319•doener•19h ago•64 comments

Treasures found on HS2 route stored in secret warehouse

https://www.bbc.com/news/articles/c93v21q5xdvo
59•breve•11h ago•27 comments

Leaked Chats Expose the Daily Life of a Scam Compound's Enslaved Workforce

https://www.wired.com/story/the-red-bull-leaks/
103•smurda•4h ago•34 comments

Ian's Shoelace Site

https://www.fieggen.com/shoelace/
152•righthand•14h ago•30 comments

Rev Up the Viral Factories

https://www.science.org/content/blog-post/rev-viral-factories
10•etiam•2d ago•0 comments

Time Machine-style Backups with rsync (2018)

https://samuelhewitt.com/blog/2018-06-05-time-machine-style-backups-with-rsync
74•accrual•9h ago•32 comments

Building Your Own Efficient uint128 in C++

https://solidean.com/blog/2026/building-your-own-u128/
73•PaulHoule•12h ago•32 comments

Two kinds of AI users are emerging

https://martinalderson.com/posts/two-kinds-of-ai-users-are-emerging/
179•martinald•9h ago•154 comments

Efficient String Compression for Modern Database Systems

https://cedardb.com/blog/string_compression/
118•jandrewrogers•2d ago•31 comments

Founding is a snowball

https://blog.bawolf.com/p/founding-is-a-snowball
75•bryantwolf•3d ago•26 comments

MicroPythonOS graphical operating system delivers Android-like user experience

https://www.cnx-software.com/2026/01/29/micropythonos-graphical-operating-system-delivers-android...
211•mikece•3d ago•73 comments

Netbird – Open Source Zero Trust Networking

https://netbird.io/
677•l1am0•23h ago•262 comments

FOSDEM 2026 – Open-Source Conference in Brussels – Day#1 Recap

https://gyptazy.com/blog/fosdem-2026-opensource-conference-brussels/
231•yannick2k•23h ago•148 comments

A Crisis comes to Wordle: Reusing old words

https://forkingmad.blog/wordle-crisis/
90•cyanbane•15h ago•99 comments

Towards a science of scaling agent systems: When and why agent systems work

https://research.google/blog/towards-a-science-of-scaling-agent-systems-when-and-why-agent-system...
81•gmays•15h ago•29 comments

Soldering Prototypes with Enamel Magnet Wire (2020)

https://tomverbeure.github.io/2020/02/22/In-The-Lab-Magnet-Wire-Soldering.html
20•hasheddan•2d ago•24 comments

Amiga Unix (Amix)

https://www.amigaunix.com/doku.php/home
123•donatj•22h ago•54 comments

Building a Telegram Bot with Cloudflare Workers, Durable Objects and Grammy

https://flashblaze.xyz/posts/cloudflare-workers-durable-objects-telegram-bot/
17•flashblaze•6h ago•2 comments

Clearspace (YC W23) Is Hiring an Applied Researcher (ML)

https://www.ycombinator.com/companies/clearspace/jobs/GOWiDwp-research-engineer-at-clearspace
1•anteloper•14h ago

Stop Using Pseudo-Types

https://f2r.github.io/en/stop-using-pseudo-types.html
11•speckx•4d ago•1 comments

Teaching my neighbor to keep the volume down

https://idiallo.com/blog/teaching-my-neighbor-to-keep-the-volume-down
689•firefoxd•14h ago•326 comments