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

Comments

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

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

Multiprocessing all the way!

emmelaich•10mo ago
(2021)

Good article!

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

Axios compromised on NPM – Malicious versions drop remote access trojan

https://www.stepsecurity.io/blog/axios-compromised-on-npm-malicious-versions-drop-remote-access-t...
706•mtud•5h ago•216 comments

Ollama is now powered by MLX on Apple Silicon in preview

https://ollama.com/blog/mlx
217•redundantly•5h ago•95 comments

Artemis II is not safe to fly

https://idlewords.com/2026/03/artemis_ii_is_not_safe_to_fly.htm
290•idlewords•6h ago•185 comments

Universal Claude.md – cut Claude output tokens

https://github.com/drona23/claude-token-efficient
286•killme2008•7h ago•112 comments

Google's 200M-parameter time-series foundation model with 16k context

https://github.com/google-research/timesfm
99•codepawl•3h ago•48 comments

Fedware: Government apps that spy harder than the apps they ban

https://www.sambent.com/the-white-house-app-has-huawei-spyware-and-an-ice-tip-line/
557•speckx•14h ago•182 comments

Do your own writing

https://alexhwoods.com/dont-let-ai-write-for-you/
523•karimf•20h ago•188 comments

Clojure: The Documentary, official trailer [video]

https://www.youtube.com/watch?v=JJEyffSdBsk
177•fogus•4d ago•14 comments

GitHub backs down, kills Copilot pull-request ads after backlash

https://www.theregister.com/2026/03/30/github_copilot_ads_pull_requests/
164•_____k•3h ago•93 comments

RamAIn (YC W26) Is Hiring

https://www.ycombinator.com/companies/ramain/jobs/jezgwo5-ai-ml-research-engineer
1•svee•1h ago

We're Pausing Asimov Press

https://www.asimov.press/p/pause
19•bookofjoe•23h ago•3 comments

Android Developer Verification

https://android-developers.googleblog.com/2026/03/android-developer-verification-rolling-out-to-a...
245•ingve•10h ago•244 comments

Good CTE, Bad CTE

https://boringsql.com/posts/good-cte-bad-cte/
25•radimm•1d ago•9 comments

Turning a MacBook into a touchscreen with $1 of hardware (2018)

https://anishathalye.com/macbook-touchscreen/
312•HughParry•13h ago•141 comments

How to turn anything into a router

https://nbailey.ca/post/router/
670•yabones•19h ago•230 comments

Show HN: Free AI Coding Skills for Rails

https://www.railsreviews.com/skills
7•julianrubisch•1h ago•0 comments

Mr. Chatterbox is a Victorian-era ethically trained model

https://simonwillison.net/2026/Mar/30/mr-chatterbox/
44•y1n0•6h ago•24 comments

Oscar Reutersvärd (2021)

https://escherinhetpaleis.nl/en/about-escher/escher-today/oscar-reutersvard
30•layer8•1d ago•1 comments

Bird brains (2023)

https://www.dhanishsemar.com/writing/bird-brains
317•DiffTheEnder•19h ago•200 comments

OpenGridWorks: The Electricity Infrasctructure, Mapped

https://www.opengridworks.com
105•jonbraun•11h ago•13 comments

CodingFont: A game to help you pick a coding font

https://www.codingfont.com/
407•nvahalik•17h ago•202 comments

Agents of Chaos

https://agentsofchaos.baulab.info/report.html
104•luu•3d ago•13 comments

Incident March 30th, 2026 – Accidental CDN Caching

https://blog.railway.com/p/incident-report-march-30-2026-accidental-cdn-caching
54•cebert•7h ago•18 comments

One of the largest salt mines in the world exists under Lake Erie

https://apnews.com/article/cleveland-salt-mine-winter-road-0daf091e3d56f65766bcf6a597683893
18•1659447091•2d ago•13 comments

Vulnerability research is cooked

https://sockpuppet.org/blog/2026/03/30/vulnerability-research-is-cooked/
177•pedro84•14h ago•119 comments

Cherri – programming language that compiles to an Apple Shortuct

https://github.com/electrikmilk/cherri
304•mihau•3d ago•59 comments

Sony halts memory card shipments due to NAND shortage

https://www.techzine.eu/news/devices/140058/sony-halts-memory-card-shipments-due-to-nand-shortage/
47•methuselah_in•3h ago•15 comments

Unit: A self-replicating Forth mesh agent running in a browser tab

https://davidcanhelp.github.io/unit/
33•DavidCanHelp•4d ago•2 comments

Researchers find 3,500-year-old loom that reveals textile revolution

https://web.ua.es/en/actualidad-universitaria/2026/marzo2026/23-31/ua-researchers-find-3-500-year...
112•geox•3d ago•14 comments

Car Seats as Contraception

https://www.journals.uchicago.edu/doi/abs/10.1086/731812
57•CGMthrowaway•13h ago•77 comments