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

Comments

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

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

Multiprocessing all the way!

emmelaich•7mo ago
(2021)

Good article!

punnerud•7mo 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•7mo 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•7mo ago
How does the GIL come into play here?
punnerud•7mo 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 Outage for Opus 4.5 and Sonnet 4/4.5 across all services

https://status.claude.com/incidents/9g6qpr72ttbr
149•pablo24602•1h ago•78 comments

2002: Last.fm and Audioscrobbler Herald the Social Web

https://cybercultural.com/p/lastfm-audioscrobbler-2002/
109•cdrnsf•2h ago•46 comments

JSDoc is TypeScript

https://culi.bearblog.dev/jsdoc-is-typescript/
71•culi•3h ago•92 comments

Hashcards: A plain-text spaced repetition system

https://borretti.me/article/hashcards-plain-text-spaced-repetition
212•thomascountz•6h ago•87 comments

Ask HN: What Are You Working On? (December 2025)

115•david927•6h ago•393 comments

In the Beginning was the Command Line (1999)

https://web.stanford.edu/class/cs81n/command.txt
69•wseqyrku•6d ago•28 comments

Claude CLI deleted my home directory Wiped my whole Mac

https://old.reddit.com/r/ClaudeAI/comments/1pgxckk/claude_cli_deleted_my_entire_home_directory_wi...
17•tamnd•13m ago•4 comments

The Typeframe PX-88 Portable Computing System

https://www.typeframe.net/
83•birdculture•5h ago•21 comments

Developing a food-safe finish for my wooden spoons

https://alinpanaitiu.com/blog/developing-hardwax-oil/
121•alin23•4d ago•63 comments

Interview with Kent Overstreet (Bcachefs) [audio]

https://linuxunplugged.com/644
9•teekert•3d ago•1 comments

History of Declarative Programming

https://shenlanguage.org/TBoS/tbos_15.html
3•measurablefunc•50m ago•0 comments

Advent of Swift

https://leahneukirchen.org/blog/archive/2025/12/advent-of-swift.html
35•chmaynard•3h ago•6 comments

AI and the ironies of automation – Part 2

https://www.ufried.com/blog/ironies_of_ai_2/
194•BinaryIgor•10h ago•83 comments

Shai-Hulud compromised a dev machine and raided GitHub org access: a post-mortem

https://trigger.dev/blog/shai-hulud-postmortem
168•nkko•13h ago•103 comments

GraphQL: The enterprise honeymoon is over

https://johnjames.blog/posts/graphql-the-enterprise-honeymoon-is-over
153•johnjames4214•6h ago•130 comments

Disks Lie: Building a WAL that actually survives

https://blog.canoozie.net/disks-lie-building-a-wal-that-actually-survives/
42•jtregunna•2d ago•39 comments

GNU recutils: Plain text database

https://www.gnu.org/software/recutils/
89•polyrand•4h ago•26 comments

Checkers Arcade

https://blog.fogus.me/games/checkers-arcade.html
9•fogus•2d ago•1 comments

Price of a bot army revealed across online platforms

https://www.cam.ac.uk/stories/price-bot-army-global-index
66•teleforce•7h ago•16 comments

Standalone Meshtastic Command Center – One HTML File Offline

https://github.com/Jordan-Townsend/Standalone
42•Subtextofficial•5d ago•10 comments

Linux Sandboxes and Fil-C

https://fil-c.org/seccomp
328•pizlonator•1d ago•129 comments

Baumol's Cost Disease

https://en.wikipedia.org/wiki/Baumol_effect
67•drra•11h ago•76 comments

Illuminating the processor core with LLVM-mca

https://abseil.io/fast/99
54•ckennelly•8h ago•5 comments

From sci-fi to reality: Researchers realise quantum teleportation using tech

https://cordis.europa.eu/article/id/462587-from-sci-fi-to-reality-researchers-realise-quantum-tel...
11•donutloop•1h ago•4 comments

Compiler Engineering in Practice

https://chisophugis.github.io/2025/12/08/compiler-engineering-in-practice-part-1-what-is-a-compil...
99•dhruv3006•15h ago•18 comments

Efficient Basic Coding for the ZX Spectrum (2020)

https://blog.jafma.net/2020/02/24/efficient-basic-coding-for-the-zx-spectrum/
47•rcarmo•11h ago•11 comments

iOS 26.2 fixes 20 security vulnerabilities, 2 actively exploited

https://www.macrumors.com/2025/12/12/ios-26-2-security-vulnerabilities/
122•akyuu•7h ago•108 comments

Do dyslexia fonts work? (2022)

https://www.edutopia.org/article/do-dyslexia-fonts-actually-work/
43•CharlesW•3h ago•40 comments

I fed 24 years of my blog posts to a Markov model

https://susam.net/fed-24-years-of-posts-to-markov-model.html
285•zdw•1d ago•112 comments

Kimi K2 1T model runs on 2 512GB M3 Ultras

https://twitter.com/awnihannun/status/1943723599971443134
196•jeudesprits•10h ago•98 comments