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.

The struggle of resizing windows on macOS Tahoe

https://noheger.at/blog/2026/01/11/the-struggle-of-resizing-windows-on-macos-tahoe/
809•happosai•5h ago•367 comments

CLI agents like Claude Code make self-hosting on a home server easier and fun

https://fulghum.io/self-hosting
264•websku•4h ago•185 comments

This game is a single 13 KiB file that runs on Windows, Linux and in the Browser

https://iczelia.net/posts/snake-polyglot/
78•snoofydude•3h ago•27 comments

iCloud Photos Downloader

https://github.com/icloud-photos-downloader/icloud_photos_downloader
302•reconnecting•6h ago•151 comments

FUSE is All You Need – Giving agents access to anything via filesystems

https://jakobemmerling.de/posts/fuse-is-all-you-need/
67•jakobem•4h ago•20 comments

I Cannot SSH into My Server Anymore (and That's Fine)

https://soap.coffee/~lthms/posts/i-cannot-ssh-into-my-server-anymore.html
69•TheWiggles•4d ago•39 comments

I'm making a game engine based on dynamic signed distance fields (SDFs) [video]

https://www.youtube.com/watch?v=il-TXbn5iMA
180•imagiro•3d ago•22 comments

Sampling at negative temperature

https://cavendishlabs.org/blog/negative-temperature/
110•ag8•5h ago•39 comments

Don't fall into the anti-AI hype

https://antirez.com/news/158
596•todsacerdoti•15h ago•778 comments

Statement by Federal Reserve Chair Jerome F. Powell [video]

https://www.youtube.com/watch?v=KckGHaBLSn4
238•sprawl_•49m ago•103 comments

Elo – A data expression language which compiles to JavaScript, Ruby, and SQL

https://elo-lang.org/
46•ravenical•4d ago•5 comments

The Next Two Years of Software Engineering

https://addyosmani.com/blog/next-two-years/
56•napolux•3h ago•32 comments

Gentoo Linux 2025 Review

https://www.gentoo.org/news/2026/01/05/new-year.html
294•akhuettel•14h ago•150 comments

Show HN: What if AI agents had Zodiac personalities?

https://github.com/baturyilmaz/what-if-ai-agents-had-zodiac-personalities
15•arbayi•2h ago•6 comments

A set of Idiomatic prod-grade katas for experienced devs transitioning to Go

https://github.com/MedUnes/go-kata
103•medunes•4d ago•14 comments

Jerome Powell Responds

https://www.federalreserve.gov/newsevents/speech/powell20260111a.htm
68•0xedb•51m ago•7 comments

Show HN: Engineering Schizophrenia: Trusting yourself through Byzantine faults

32•rescrv•3h ago•9 comments

Insights into Claude Opus 4.5 from Pokémon

https://www.lesswrong.com/posts/u6Lacc7wx4yYkBQ3r/insights-into-claude-opus-4-5-from-pokemon
30•surprisetalk•5d ago•9 comments

Perfectly Replicating Coca Cola [video]

https://www.youtube.com/watch?v=TDkH3EbWTYc
133•HansVanEijsden•3d ago•70 comments

Ask HN: What are you working on? (January 2026)

144•david927•9h ago•477 comments

I'd tell you a UDP joke…

https://www.codepuns.com/post/805294580859879424/i-would-tell-you-a-udp-joke-but-you-might-not-get
88•redmattred•3h ago•27 comments

Moving Scratch generation to Python on browser

https://kushaldas.in/posts/introducing-ektupy.html
3•kushaldas•2d ago•0 comments

Poison Fountain

https://rnsaffn.com/poison3/
165•atomic128•8h ago•106 comments

A Glimpse into DexProtector

https://www.romainthomas.fr/post/26-01-dexprotector/
3•shelfchair•4d ago•0 comments

BYD's cheapest electric cars to have Lidar self-driving tech

https://thedriven.io/2026/01/11/byds-cheapest-electric-cars-to-have-lidar-self-driving-tech/
119•senti_sentient•5h ago•137 comments

“Food JPEGs” in Super Smash Bros. and Kirby Air Riders

https://sethmlarson.dev/food-jpegs-in-super-smash-bros-and-kirby-air-riders
258•SethMLarson•5d ago•66 comments

Quake 1 Single-Player Map Design Theories (2001)

https://www.quaddicted.com/webarchive//teamshambler.planetquake.gamespy.com/theories1.html
42•Lammy•20h ago•8 comments

"Scholars Will Call It Nonsense": The Structure of von Däniken's Argument (1987)

https://www.penn.museum/sites/expedition/scholars-will-call-it-nonsense/
55•Kaibeezy•6h ago•6 comments

Anthropic: Developing a Claude Code competitor using Claude Code is banned

https://twitter.com/SIGKITTEN/status/2009697031422652461
235•behnamoh•6h ago•139 comments

I dumped Windows 11 for Linux, and you should too

https://www.notebookcheck.net/I-dumped-Windows-11-for-Linux-and-you-should-too.1190961.0.html
740•smurda•14h ago•698 comments