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

Comments

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

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

Multiprocessing all the way!

emmelaich•6mo ago
(2021)

Good article!

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

Anthropic acquires Bun

https://bun.com/blog/bun-joins-anthropic
1180•ryanvogel•5h ago•572 comments

EmacsConf 2025

https://emacsconf.org/2025/
76•birdculture•1h ago•2 comments

Paged Out

https://pagedout.institute
139•varjag•2h ago•17 comments

Claude 4.5 Opus' Soul Document

https://simonwillison.net/2025/Dec/2/claude-soul-document/
218•the-needful•4h ago•119 comments

Amazon launches Trainium3

https://techcrunch.com/2025/12/02/amazon-releases-an-impressive-new-ai-chip-and-teases-a-nvidia-f...
103•thnaks•4h ago•43 comments

I designed and printed a custom nose guard to help my dog with DLE

https://snoutcover.com/billie-story
332•ragswag•2d ago•45 comments

OpenAI declares 'code red' as Google catches up in AI race

https://www.theverge.com/news/836212/openai-code-red-chatgpt
340•goplayoutside•8h ago•425 comments

Free static site generator for small restaurants and cafes

https://lite.localcafe.org/
51•fullstacking•2h ago•25 comments

Ecosia: The greenest AI is here

https://blog.ecosia.org/ecosia-ai/
29•doener•1h ago•8 comments

Delty (YC X25) Is Hiring

https://www.ycombinator.com/companies/delty/jobs/aPWMaiq-full-stack-software-engineer
1•lalitkundu•2h ago

Learning music with Strudel

https://terryds.notion.site/Learning-Music-with-Strudel-2ac98431b24180deb890cc7de667ea92
354•terryds•6d ago•85 comments

AI generated font using nano banana

https://constanttime.notion.site/Worlds-first-Ai-generated-font-using-nano-banana-2ba6f8e15af1801...
20•ebaad96•1h ago•8 comments

100k TPS over a billion rows: the unreasonable effectiveness of SQLite

https://andersmurphy.com/2025/12/02/100000-tps-over-a-billion-rows-the-unreasonable-effectiveness...
235•speckx•5h ago•87 comments

All about automotive lidar

https://mainstreetautonomy.com/blog/2025-08-29-all-about-automotive-lidar/
59•dllu•1d ago•27 comments

Exploring Large HTML Documents on the Web

https://calendar.perfplanet.com/2025/exploring-large-html-documents-on-the-web/
6•zdw•34m ago•0 comments

Qwen3-VL can scan two-hour videos and pinpoint nearly every detail

https://the-decoder.com/qwen3-vl-can-scan-two-hour-videos-and-pinpoint-nearly-every-detail/
56•thm•2d ago•13 comments

Zig's new plan for asynchronous programs

https://lwn.net/SubscriberLink/1046084/4c048ee008e1c70e/
181•messe•8h ago•144 comments

Cursed circuits: charge pump voltage halver

https://lcamtuf.substack.com/p/cursed-circuits-charge-pump-voltage
48•surprisetalk•4h ago•9 comments

School cell phone bans and student achievement

https://www.nber.org/digest/202512/school-cell-phone-bans-and-student-achievement
53•harias•5h ago•54 comments

Show HN: Rhubarb – C89 Libraries in Latin

https://github.com/farant/rhubarb
7•water_badger•3d ago•3 comments

The Junior Hiring Crisis

https://people-work.io/blog/junior-hiring-crisis/
187•mooreds•5h ago•231 comments

Mistral 3 family of models released

https://mistral.ai/news/mistral-3
613•pember•8h ago•181 comments

Code Wiki: Accelerating your code understanding

https://developers.googleblog.com/en/introducing-code-wiki-accelerating-your-code-understanding/
42•geoffbp•6d ago•12 comments

YesNotice

https://infinitedigits.co/docs/software/yesnotice/
138•surprisetalk•1w ago•52 comments

Addressing the adding situation

https://xania.org/202512/02-adding-integers
238•messe•11h ago•81 comments

Advent of Compiler Optimisations 2025

https://xania.org/202511/advent-of-compiler-optimisation
323•vismit2000•13h ago•53 comments

Solving the Partridge Packing Problem Using MiniZinc

https://zayenz.se/blog/post/partridge-packing/
19•mzl•6d ago•1 comments

Python Data Science Handbook

https://jakevdp.github.io/PythonDataScienceHandbook/
194•cl3misch•10h ago•39 comments

Nixtml: Static website and blog generator written in Nix

https://github.com/arnarg/nixtml
75•todsacerdoti•8h ago•35 comments

A series of vignettes from my childhood and early career

https://www.jasonscheirer.com/weblog/vignettes/
134•absqueued•10h ago•85 comments