Programming · Latest articles

30 new today · 2,704 articles · from 79 blogs

Bun Blog·

Bun v1.1.18

AI summaryBun v1.1.18 fixes 55 bugs and adds support for npmrc files. The release also brings improved constant folding and enum inlining, better console.log output for functions, and fixes for patching dependencies in workspaces and linking binaries in bun install. Additionally, it resolves a crash in dns.lookup, normalizes DNS errors to better match Node, fixes an assertion failure in Bun.escapeHTML, and upgrades JavaScriptCore.

Lea Verou··Lea Verou

Forget “show, don’t tell”. Engage, don’t show!

AI summaryDrawing on his daughter's piano lesson, the author argues that effective teaching requires minimizing upfront theory and instead connecting each concept to a clear purpose and immediate practice, since humans are goal-oriented and lose focus when learning feels disconnected from real application. He contends that explaining concepts in context, as they become relevant, yields far better retention and comprehension than front-loading theory, a principle that applies to all forms of knowledge transfer, from teaching and documentation to talks. His advice: always explain why something is useful, let students practice as soon as possible, and prefer engaging them over merely showing—hence "engage, don't show" rather than "show, don't tell."

Svelte Blog·

What’s new in Svelte: July 2024

AI summaryThe July 2024 Svelte update highlights new features in the Svelte 5 release candidate, including more succinct prop declarations via $props(), a new 'on' import from svelte/events to preserve event handler order, and performance improvements to svelte:element and CSS custom property wrappers. SvelteKit also received upgrades to its Node and Cloudflare adapters, such as unit suffix support for BODY_SIZE_LIMIT and a new sveltekit:shutdown event. The article rounds out with community showcases, learning resources, and tools like SSC, a fast Svelte compiler written in Rust.

V8··Francis McCabe, Thibaud Michaud, Ilya Rezvov, Brendan Dahl

Introducing the WebAssembly JavaScript Promise Integration API

AI summaryThe JavaScript Promise Integration (JSPI) API enables WebAssembly applications written with synchronous assumptions to work smoothly with asynchronous Web APIs by intercepting Promises, suspending the WebAssembly code, and resuming it once the asynchronous operation completes. The article explains how JSPI works through wrapping imports and exports during module instantiation, notes its low constant-time overhead, and states that it is now standardized (phase 4) and available in Chrome 137 and Firefox 139. Practical examples using Emscripten demonstrate computing Fibonacci via Promises and lazily loading WebAssembly code on a function's first call.

Deno Blog··Jo Franchetti

A Gentle Intro to TypeScript

Quick, digestible bites of TypeScript goodness for Deno developers. In this first bite, we introduce TypeScript, how to add type annotations to your code and why you should.

Baby Steps·

More thoughts on claiming

AI summaryThis post is the first of several follow-ups to 'Claiming, auto and otherwise', clarifying and tweaking the previously proposed design based on feedback received. The author's main takeaway is that people are very enthusiastic about the idea of making work with reference counted or cheaply cloneable data more ergonomic. Future posts plan to lay out some of the alternative designs the author has heard.

Bun Blog·

Bun v1.1.17

Fixes 4 bugs. Fixes a crash in bun repl. Makes fs.readdirSync 5% faster on macOS in small directories. Fixes "ws" module not calling the callback in "send" method. Fixes a crash when reading a corrupted lockfile in bun install. Makes macOS

Bun Blog·

Bun v1.1.16

AI summaryBun v1.1.16 fixes 41 bugs and introduces lcov code coverage reports in bun test, along with support for installing dependencies from private git repositories such as GitLab and Bitbucket. The release also makes Buffer.from(string, "base64") 6x to 30x faster on large inputs. Additional improvements include fixes for bun patch, bun install, and N-API addons, transpiler bugfixes, and Node.js compatibility enhancements.

Without Boats·

Ownership

AI summaryThis article explains how substructural type theory applies to programming language design, arguing that designers should use accessible metaphors like 'ownership' to help ordinary programmers understand concepts such as constructors, destructors, and preventing aliasing of objects that represent external resources. Using Rust's ownership model as the primary example, the author aims to demystify these ideas so they become more common knowledge among programmers. While the post contains nothing groundbreaking for experts, it includes notes critiquing certain aspects of Rust's implementation that the author believes are incorrect.

Baby Steps·

Claiming, auto and otherwise

AI summaryThe blog post proposes adding a new trait, Claim, alongside Rust's existing Copy and Clone traits. The goal is to address shortcomings in Rust's current binary split between Copy (types safe to memcpy) and Clone (types requiring custom code or having destructors). The author cites issues like maintenance hazards, performance footguns, ergonomic pain, and user confusion as motivation for this change.

Lea Verou··Lea Verou

Inline conditionals in CSS, now?

AI summaryThe article discusses the CSS Working Group's resolution to add an if() function to CSS, which is still years away, and surveys existing hacks that enable conditionals in CSS today, such as binary linear interpolation, space and cyclic toggles, layered toggles, and paused animations. The author argues that using such hacks in production can be justified under the 'Priority of Constituencies' principle—internal developer complexity is acceptable when it yields a cleaner API for component users—as long as the complexity is encapsulated and the code is well documented. However, these techniques are not advisable when the abstraction is likely to leak, in which case simpler approaches like attributes may be preferable.

Deno Blog··Andy Jiang

How We Made the Deno Language Server Ten Times Faster

When a customer reported performance issues with the Deno language server, we began a performance investigation that resulted in reducing auto-completion times from 6-8 seconds to under one second in large codebases. This is how we did it.

Bun Blog·

Bun v1.1.14

Fixes 63 bugs (addressing 519 👍). Patch node_modules with bun patch. ORM-less object mapping in bun:sqlite. Log fetch() calls as curl commands. Node.js compatibility improvements. bun install bugfixes, bun:sqlite bugfixes, WebSocket fixes,

Lea Verou··Lea Verou

Inline conditionals in CSS?

AI summaryThe CSS Working Group has reached consensus to add an inline if() function to CSS, allowing conditional values directly in declarations—a feature the author championed and which developers have received with overwhelming enthusiasm. The if() function complements style queries by enabling custom property-driven styling on the element itself, and can also incorporate media() and supports() conditions. The feature is not in browsers yet (optimistically arriving in about 2 years), and the article addresses FAQs, clarifying that CSS has always had conditionals and that if() makes CSS more, not less, declarative.

Hillel Wayne·

Composing TLA+ Specifications with State Machines

AI summaryThe article presents a technique for composing independently-developed TLA+ specifications, motivated by a Worker-Server authentication example where naive composition of specs leads to contradictory constraints on shared variables. The author's solution models the core component as an abstract state machine, writes other components as 'open' specs with internal/external variable separation, and uses a Sync action in the main spec that leverages TLA+'s primed-variable feature to add guards and side effects to state transitions. This allows the specs to be developed independently and integrated with minimal overhead, with the Sync action driving communication effects and constraints between components without requiring them to know about each other.