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

Comments

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

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

Multiprocessing all the way!

emmelaich•9mo ago
(2021)

Good article!

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

The Feynman Lectures on Physics (1961-1964)

https://www.feynmanlectures.caltech.edu/
172•rramadass•17h ago•57 comments

Software design is now cheap

https://dottedmag.net/blog/cheap-design/
26•dottedmag•2d ago•17 comments

Exploring a Modern SMTPE 2110 Broadcast Truck

https://www.jeffgeerling.com/blog/2026/exploring-a-modern-smpte-2110-broadcast-truck-with-my-dad/
52•assimpleaspossi•2d ago•5 comments

The Day the Telnet Died

https://www.labs.greynoise.io/grimoire/2026-02-10-telnet-falls-silent/
255•pjf•6h ago•177 comments

The Singularity will occur on a Tuesday

https://campedersen.com/singularity
900•ecto•11h ago•522 comments

Fun With Pinball

https://www.funwithpinball.com/exhibits/small-boards
45•jackwilsdon•4h ago•6 comments

Ex-GitHub CEO launches a new developer platform for AI agents

https://entire.io/blog/hello-entire-world/
400•meetpateltech•13h ago•350 comments

The Little Learner: A Straight Line to Deep Learning (2023)

https://mitpress.mit.edu/9780262546379/the-little-learner/
110•AlexeyBrin•2d ago•16 comments

YouTube's $60B revenue revealed amid paid subscriber push

https://www.bbc.com/news/articles/crkrkd2xlx6o
43•1659447091•1h ago•44 comments

Clean-room implementation of Half-Life 2 on the Quake 1 engine

https://code.idtech.space/fn/hl2
350•klaussilveira•17h ago•69 comments

My eighth year as a bootstrapped founder

https://mtlynch.io/bootstrapped-founder-year-8/
172•mtlynch•2d ago•52 comments

Willow – Protocols for an uncertain future [video]

https://fosdem.org/2026/schedule/event/CVGZAV-willow/
29•todsacerdoti•2d ago•1 comments

Rivian R2: Electric Mid-Size SUV

https://rivian.com/r2
63•socialcommenter•3h ago•73 comments

Simplifying Vulkan one subsystem at a time

https://www.khronos.org/blog/simplifying-vulkan-one-subsystem-at-a-time
223•amazari•15h ago•149 comments

Mathematicians disagree on the essential structure of the complex numbers (2024)

https://www.infinitelymore.xyz/p/complex-numbers-essential-structure
169•FillMaths•12h ago•217 comments

The Falkirk Wheel

https://www.scottishcanals.co.uk/visit/canals/visit-the-forth-clyde-canal/attractions/the-falkirk...
54•scapecast•8h ago•20 comments

Show HN: JavaScript-first, open-source WYSIWYG DOCX editor

https://github.com/eigenpal/docx-js-editor
60•thisisjedr•1d ago•18 comments

Show HN: Rowboat – AI coworker that turns your work into a knowledge graph (OSS)

https://github.com/rowboatlabs/rowboat
134•segmenta•12h ago•32 comments

A brief history of oral peptides

https://seangeiger.substack.com/p/a-brief-history-of-oral-peptides
94•odedfalik•1d ago•35 comments

Tambo 1.0: Open-source toolkit for agents that render React components

https://github.com/tambo-ai/tambo
71•grouchy•8h ago•16 comments

How did Windows 95 get permission to put Weezer video 'Buddy Holly' on the CD?

https://devblogs.microsoft.com/oldnewthing/20260210-00/?p=112052
142•ingve•9h ago•109 comments

Europe's $24T Breakup with Visa and Mastercard Has Begun

https://europeanbusinessmagazine.com/business/europes-24-trillion-breakup-with-visa-and-mastercar...
741•NewCzech•17h ago•616 comments

Show HN: Model Training Memory Simulator

https://czheo.github.io/2026/02/08/model-training-memory-simulator/
3•czheo•2d ago•0 comments

Competition is not market validation

https://www.ablg.io/blog/competition-is-not-validation
78•tonioab•12h ago•26 comments

Show HN: I built a macOS tool for network engineers – it's called NetViews

https://www.netviews.app
187•n1sni•23h ago•53 comments

Show HN: Distr 2.0 – A year of learning how to ship to customer environments

https://github.com/distr-sh/distr
72•louis_w_gk•16h ago•18 comments

Markdown CLI viewer with VI keybindings

https://github.com/taf2/mdvi
60•taf2•11h ago•30 comments

Show HN: ArtisanForge: Learn Laravel through a gamified RPG adventure

https://artisanforge.online/
25•grazulex•2d ago•1 comments

Oxide raises $200M Series C

https://oxide.computer/blog/our-200m-series-c
545•igrunert•14h ago•290 comments

Show HN: Sol LeWitt-style instruction-based drawings in the browser

https://intervolz.com/sollewitt/
35•intervolz•8h ago•6 comments