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.

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/
111•moosia•4h ago•36 comments

Why does it take so long to release black fan versions?

https://www.noctua.at/en/expertise/blog/how-can-it-take-so-long-to-release-black-fan-versions
423•buildbot•9h ago•196 comments

Open Design: Use Your Coding Agent as a Design Engine

https://github.com/nexu-io/open-design
57•steveharing1•2h ago•23 comments

Why are there both TMP and TEMP environment variables? (2015)

https://devblogs.microsoft.com/oldnewthing/20150417-00/?p=44213
99•ankitg12•6h ago•52 comments

Becoming a father shrinks your cerebrum

https://www.economist.com/science-and-technology/2022/10/21/becoming-a-father-shrinks-your-cerebrum
28•andsoitis•2h ago•12 comments

Show HN: DAC – open-source dashboard as code tool for agents and humans

https://github.com/bruin-data/dac
54•karakanb•2d ago•12 comments

Dotcl: Common Lisp Implementation on .NET

https://github.com/dotcl/dotcl
82•reikonomusha•1d ago•8 comments

Ti-84 Evo

https://education.ti.com/en/products/calculators/graphing-calculators/ti-84-evo
502•thatxliner•18h ago•413 comments

Show HN: Mljar Studio – local AI data analyst that saves analysis as notebooks

https://mljar.com/
34•pplonski86•4h ago•5 comments

Russia Poisons Wikipedia

https://www.bettedangerous.com/p/russia-poisons-wikipedia
62•exceptione•1h ago•25 comments

Craig Venter of Human Genome Project Dies at 79

https://www.economist.com/obituary/2026/05/01/craig-venter-raced-to-decode-the-human-genome
12•bookofjoe•2h ago•1 comments

Show HN: Browser-based light pollution simulator using real photometric data

https://iesna.eu/?wasm=skyglow_demo
28•holg•5h ago•6 comments

Artemis II Photo Timeline

https://artemistimeline.com/#artemis-ii-walkout-nhq202604010003
265•geerlingguy•2d ago•21 comments

Show HN: Filling PDF forms with AI using client-side tool calling

https://copilot.simplepdf.com/?share=a7d00ad073c75a75d493228e6ff7b11eb3f2d945b6175913e87898ec96ca...
31•nip•5h ago•15 comments

New research suggests people can communicate and practice skills while dreaming

https://www.newyorker.com/culture/annals-of-inquiry/its-possible-to-learn-in-our-sleep-should-we
386•XzetaU8•20h ago•228 comments

Bitmap and tilemap generation from a single example

https://github.com/mxgmn/WaveFunctionCollapse
49•futurecat•2d ago•9 comments

To Restore an Island Paradise, Add Fungi

https://e360.yale.edu/digest/atoll-islands-sea-level-rise-fungi
95•Brajeshwar•2d ago•18 comments

Show HN: Pollen – distributed WASM runtime, no control plane, single binary

https://github.com/sambigeara/pollen
28•sambigeara•2d ago•15 comments

An unknown Sega Saturn project has come to light after 29 years

https://32bits.substack.com/p/under-the-microscope-pyramid-unreleased
32•bbayles•1h ago•0 comments

Show HN: Large Scale Article Extract of Newspapers 1730s-1960s

https://snewpapers.com/
23•brettnbutter•5h ago•13 comments

Thoughts on Historical Language Models and Talkie-1930

https://resobscura.substack.com/p/are-vintage-llms-the-start-of-a-new
5•benbreen•1d ago•0 comments

DeepSeek V4–almost on the frontier, a fraction of the price

https://simonwillison.net/2026/Apr/24/deepseek-v4/
244•indigodaddy•21h ago•133 comments

SFO Gate Explorer

https://www.flysfo.com/passengers/services/gate-explorer
10•CaliforniaKarl•1d ago•12 comments

CollectWise (YC F24) Is Hiring

https://www.ycombinator.com/companies/collectwise/jobs/rEWfZ6R-senior-forward-deployed-engineer
1•OBrien_1107•9h ago

Ask.com has closed

https://www.ask.com/
335•supermdguy•10h ago•179 comments

GameStop Preparing Offer for eBay

https://www.wsj.com/business/deals/gamestop-preparing-offer-for-ebay-1678e6de
48•voisin•3h ago•30 comments

I'm Peter Roberts, immigration attorney who does work for YC and startups. AMA

177•proberts•23h ago•225 comments

A report on burnout in open source software communities (2025) [pdf]

https://mirandaheath.website/static/oss_burnout_report_mh_25.pdf
110•susam•15h ago•41 comments

LFM2-24B-A2B: Scaling Up the LFM2 Architecture

https://www.liquid.ai/blog/lfm2-24b-a2b
52•nateb2022•2d ago•12 comments

Lib0xc: A set of C standard library-adjacent APIs for safer systems programming

https://github.com/microsoft/lib0xc
168•wooster•19h ago•64 comments