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•1y ago

Comments

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

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

Multiprocessing all the way!

emmelaich•1y ago
(2021)

Good article!

punnerud•1y 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•1y 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•1y ago
How does the GIL come into play here?
punnerud•1y 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's Linear so fast? A technical breakdown

https://performance.dev/how-is-linear-so-fast-a-technical-breakdown
227•howToTestFE•4h ago•115 comments

Building from zero after addiction, prison, and a felony

https://gavinray97.github.io/blog/building-from-zero-after-addiction-prison-felony
265•gavinray•4h ago•135 comments

If LLMs Have Human-Like Attributes, Then So Does Age of Empires II

https://arxiv.org/abs/2605.31514
78•ketchup32613•4h ago•56 comments

Show HN: I Derived a Pancake

https://www.absurdlyoptimized.com/recipes/pancakes/
47•bkazez•2d ago•10 comments

Making peace with your unlived dreams (2023)

https://nik.art/making-peace-with-your-unlived-dreams/
100•herbertl•4h ago•47 comments

Silurus/ooxml: Pixel-faithful Office documents, rendered in the browser

https://github.com/yukiyokotani/office-open-xml-viewer
107•maxloh•5h ago•39 comments

Powering up a module from the IBM 604: an electronic calculator from 1948

https://www.righto.com/2026/06/ibm-604-thyraton-tube-module.html
65•elpocko•5h ago•19 comments

Do we fear the serializable isolation level more than we fear subtle bugs?

https://blog.ydb.tech/do-we-fear-the-serializable-isolation-level-more-than-we-fear-subtle-bugs-5...
31•b-man•4d ago•9 comments

What is the purpose of the lost+found folder in Linux and Unix? (2014)

https://unix.stackexchange.com/questions/18154/what-is-the-purpose-of-the-lostfound-folder-in-lin...
103•tosh•2d ago•41 comments

My automated doubt development process

https://www.alexself.dev/blog/automated-doubt
43•aself101•4h ago•16 comments

LLMs are eroding my software engineering career and I don't know what to do

https://human-in-the-loop.bearblog.dev/llms-are-eroding-my-software-engineering-career-and-i-dont...
745•poisonfountain•10h ago•717 comments

A Fundamental Principle of Aeronautical Engineering Has Been Overturned

https://www.tohoku.ac.jp/japanese/2026/05/press20260512-02-DMR.html
11•mhb•5d ago•6 comments

Cloning a Sennheiser BA2015 battery pack

https://blog.brixit.nl/cloning-a-sennheiser-ba2015-accu-pack/
95•zdw•1d ago•16 comments

Show HN: Lathe – Use LLMs to learn a new domain, not skip past it

https://github.com/devenjarvis/lathe
214•devenjarvis•11h ago•41 comments

The 29th International Obfuscated C Code Contest (IOCCC) 2025 Winners

https://www.ioccc.org/2025/
353•matt_d•17h ago•86 comments

VibeOS: First ever AI-native operating system

https://vibeos.sh/
9•doener•1h ago•8 comments

Why isn't the U.S. better at soccer?

https://www.natesilver.net/p/why-isnt-the-us-better-at-soccer
46•7777777phil•3h ago•107 comments

Proliferate (YC S25) is hiring to building open source Codex

https://www.ycombinator.com/companies/proliferate/jobs/L3copvK-founding-engineer
1•pablo24602•6h ago

The complete IPv4 address space, mapped

https://worldip.io/
29•theanonymousone•4h ago•11 comments

Backrest – a web UI and orchestrator for restic backup

https://github.com/garethgeorge/backrest
68•flexagoon•5d ago•5 comments

Crashing cars and improving hover detection

https://motion.dev/magazine/collision-detection-in-hover-detection
3•azhenley•3d ago•0 comments

Anthropic, please ship an official Claude Desktop for Linux

https://github.com/anthropics/claude-code/issues/65697
424•predkambrij•9h ago•243 comments

Podman 6: machine usability improvements (2025)

https://blog.podman.io/2025/10/podman-6-machine-usability-improvements/
88•daesorin•9h ago•7 comments

A visual introduction to kernel functions

https://kelvinpaschal.com/blog/kernel-functions/
22•Kelvinidan•2d ago•1 comments

An Ohio Valley 100k-watt FM signal is severed in broad daylight

https://www.radioworld.com/news-and-business/headlines/an-ohio-valley-100000-watt-fm-signal-is-se...
132•pkaeding•21h ago•126 comments

Splash Is a Colour Format

https://www.todepond.com/lab/splash/
43•tobr•4d ago•59 comments

The gamers taking on the industry to stop it switching off games

https://www.bbc.com/news/articles/c8e8e7g0r82o
98•Brajeshwar•6h ago•105 comments

Ask HN: Are we as society going to let LLM companies take all the values?

8•randomdev123•32m ago•2 comments

I design with Claude more than Figma now

https://blog.janestreet.com/i-design-with-claude-code-more-than-figma-now-index/
234•MrBuddyCasino•17h ago•214 comments

Win16 Memory Management

http://www.os2museum.com/wp/win16-memory-management/
125•supermatou•2d ago•67 comments