import chaos

The edge cases of software engineering.

Cancellation In JavaScript: Why It's Harder Than It Looks

•
javascript
typescript

At some point, every JavaScript developer asks the same question: why can't I just cancel this async operation? A user navigates away, a component unmounts, a newer request supersedes an older one - surely there must be a way to stop work that's no longer needed! In practice, we reach for familiar patterns: Promise.race() with a timeout, ignoring the result when it eventually arrives, or wiring up an AbortController and assuming the problem is solved. Often this appears to work, until the application starts leaking resources, performing late side effects, or behaving inconsistently under load.

The Database Zoo: Vector Databases and High-Dimensional Search

•
database zoo
databases

Vector embeddings have quietly become one of the most important data types in modern systems. Every LLM application, recommendation engine, semantic search feature, image similarity tool, fraud detector, and 'find me things like this' workflow ultimately boils down to the same operation: convert some input into a high-dimensional vector, then search for its nearest neighbours.

Modern JavaScript Concurrency

•
javascript
typescript

When most developers think of JavaScript, the word single-threaded often comes to mind. But modern JS runtimes are far more sophisticated than the old 'one thread, one call stack' stereotype. From the event loop and async/await to Web Workers, async iterators, and SharedArrayBuffers, today's JavaScript offers a rich (although muddled) concurrency landscape: one that spans browsers, Node.js / Bun / Deno, and edge environments.

Ffetch v4.1.0 Is Out!

•
announcements
javascript
typescript

Ffetch v4.1.0 is out. No breaking changes, but major improvements and revamped docs.