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.

Is Rust faster than C?

https://steveklabnik.com/writing/is-rust-faster-than-c/
96•vincentchau•3d ago•68 comments

I’m leaving Redis for SolidQueue

https://www.simplethread.com/redis-solidqueue/
160•amalinovic•4h ago•59 comments

There's a ridiculous amount of tech in a disposable vape

https://blog.jgc.org/2026/01/theres-ridiculous-amount-of-tech-in.html
525•abnercoimbre•1d ago•459 comments

India's Electric Two-Wheeler Market: Rise, Reset and What Comes Next

https://micromobility.io/news/indias-electric-two-wheeler-market-rise-reset-and-what-comes-next
13•prabinjoel•4d ago•1 comments

Show HN: Tiny FOSS Compass and Navigation App (<2MB)

https://github.com/CompassMB/MBCompass
59•nativeforks•3h ago•20 comments

Why NUKEMAP isn't on Google Maps anymore (2019)

https://blog.nuclearsecrecy.com/2019/12/13/why-nukemap-isnt-on-google-maps-anymore/
58•fanf2•1h ago•5 comments

1000 Blank White Cards

https://en.wikipedia.org/wiki/1000_Blank_White_Cards
242•eieio•11h ago•45 comments

ASCII Clouds

https://caidan.dev/portfolio/ascii_clouds/
247•majkinetor•11h ago•47 comments

Every GitHub object has two IDs

https://www.greptile.com/blog/github-ids
277•dakshgupta•22h ago•64 comments

Lago (Open-Source Billing) is hiring across teams and geos

1•Rafsark•1h ago

A 40-line fix eliminated a 400x performance gap

https://questdb.com/blog/jvm-current-thread-user-time/
301•bluestreak•15h ago•63 comments

Putting the "You" in CPU (2023)

https://cpu.land/
71•vinhnx•4d ago•10 comments

Systematically generating tests that would have caught Anthropic's top‑K bug

https://theorem.dev/blog/anthropic-bug-test/
31•jasongross•2d ago•8 comments

The Gleam Programming Language

https://gleam.run/
183•Alupis•11h ago•100 comments

Show HN: OSS AI agent that indexes and searches the Epstein files

https://epstein.trynia.ai/
127•jellyotsiro•12h ago•62 comments

Servo 2025 Stats

https://blogs.igalia.com/mrego/servo-2025-stats/
111•todsacerdoti•2h ago•34 comments

I Hate GitHub Actions with Passion

https://xlii.space/eng/i-hate-github-actions-with-passion/
70•xlii•3h ago•56 comments

System Programming in Linux: A Hands-On Introduction "Demo" Programs

https://github.com/stewartweiss/intro-linux-sys-prog
21•teleforce•4h ago•0 comments

No management needed: anti-patterns in early-stage engineering teams

https://www.ablg.io/blog/no-management-needed
242•tonioab•19h ago•247 comments

The truth behind the 2026 J.P. Morgan Healthcare Conference

https://www.owlposting.com/p/the-truth-behind-the-2026-jp-morgan
268•abhishaike•19h ago•61 comments

vLLM large scale serving: DeepSeek 2.2k tok/s/h200 with wide-ep

https://blog.vllm.ai/2025/12/17/large-scale-serving.html
123•robertnishihara•22h ago•43 comments

The $LANG Programming Language

232•dang•13h ago•44 comments

Show HN: 1D-Pong Game at 39C3

https://github.com/ogermer/1d-pong
49•oger•2d ago•10 comments

Are two heads better than one?

https://eieio.games/blog/two-heads-arent-better-than-one/
182•evakhoury•21h ago•57 comments

Show HN: The Tsonic Programming Language

https://tsonic.org
45•jeswin•20h ago•9 comments

The Emacs Widget Library: A Critique and Case Study

https://www.d12frosted.io/posts/2025-11-26-emacs-widget-library
91•whacked_new•2d ago•29 comments

April 9, 1940 a Dish Best Served Cold (2021)

https://todayinhistory.blog/2021/04/09/april-9-1940-a-dish-best-served-cold/
68•vinnyglennon•4d ago•11 comments

The Tulip Creative Computer

https://github.com/shorepine/tulipcc
234•apitman•21h ago•55 comments

AI generated music barred from Bandcamp

https://old.reddit.com/r/BandCamp/comments/1qbw8ba/ai_generated_music_on_bandcamp/
867•cdrnsf•19h ago•630 comments

How to make a damn website (2024)

https://lmnt.me/blog/how-to-make-a-damn-website.html
224•birdculture•20h ago•72 comments