编程 · 最新文章

今日新增 32 篇 · 共 2,698 篇 · 来自 79 个博客

Andrew Kelley·

Why I'm donating $150/month (10% of my income) to the musl libc project

AI 摘要The author, creator of the Zig programming language, announces he is donating $150/month (10% of his income) to the musl libc project, which Zig relies on for mentorship, cross-compilation support, and much of its standard library. Motivated by the recent V language controversy involving misleading marketing, he frames the donation as an honest marketing stunt to prove that open-source funding is not a zero-sum game. The experiment succeeded, with readers pledging an additional $178.65 toward musl.

brandur.org··Brandur Leach

Sequences: A Modest, Contra-garden Travel Project

AI 摘要The author laments the web's growing centralization into walled-garden platforms like Facebook and Medium, arguing that renewed decentralization depends on people continuing to create content that lives outside them. In that spirit of old-internet experimentation, they've launched Sequences, a self-hosted project in Berlin publishing one photo per day with a few words of text, distributed via RSS feed and announced on Twitter. It's framed as an independent, old-school alternative to Instagram, with no likes, comments, or reactions—just content published openly to the web.

brandur.org··Brandur Leach

Building a Robust Live Reloader with WebSockets and Go

AI 摘要The author describes implementing live reloading for a custom Go-based static site generator, using fsnotify to watch for file changes (with special handling for editor artifacts like Vim's backup files and the mysterious 4913 file) and coordinating watch/build goroutines so changes arriving during a build trigger a follow-up rebuild. Build completion is broadcast to browsers over WebSockets via Gorilla's library using a condition variable, prompting a tiny client-side JavaScript snippet to reload the page. The article also covers keeping connections alive with automatic reconnection and reflects on how well-abstracted foundational libraries made the implementation surprisingly simple.

Without Boats·

Update on await syntax

AI 摘要The Rust language team has made its final decision on the await operator syntax, opting for the postfix dot syntax, written as future.await. This decision, reached at the May 23 meeting, follows the preliminary proposal outlined earlier by the author, who also points readers to previous posts for background and a discussion of the trade-offs.

Josh W. Comeau··Josh W. Comeau

Folding the DOM

In this post, we'll explore a technique we can use to "fold" a DOM node, like folding a letter in real-life. On that journey, we'll learn a lot about 3D transforms and CSS animation techniques! Keep reading.

Without Boats·

Zero Cost Abstractions

AI 摘要The article explores the concept of 'zero cost abstractions,' a foundational design principle in programming languages like Rust and C++ that allows developers to write high-performance programs with minimal effort. The author, whose work is tied to Rust, seeks to clarify what exactly a zero cost abstraction is, referencing the original formulation by C++ creator Bjarne Stroustrup.

Without Boats·

A final proposal for await syntax

AI 摘要Rust's language team has announced a final proposal for the await operator syntax, one of the last major unresolved questions blocking the stabilization of async/await in Rust. The post covers the timeline for the final decision, the most likely syntax to be adopted, and the justification for the choice. Once stabilized, this feature will enable many more people to write non-blocking network services in Rust.

Lea Verou··Lea Verou

Utility: Convert SVG path to all-relative or all-absolute commands

AI 摘要The author, who enjoys hand-editing SVG files, describes the frustration of moving paths when exported path data mixes relative and absolute commands, since only fully relative paths adapt easily when the initial M command changes. To solve this, they built a quick demo based on the Snap.svg library that instantly converts any pasted path into both all-relative and all-absolute versions, displaying previews so users can verify the output matches the original.

Svelte Blog·

Svelte 3: Rethinking reactivity

AI 摘要The Svelte team announces the stable release of Svelte 3, a component framework like React or Vue that distinguishes itself by running at build time as a compiler, generating efficient imperative code that surgically updates the DOM. The major overhaul centers on rethinking reactivity: instead of APIs like this.set or React's setState, state changes are now expressed with plain JavaScript assignments, with the compiler instrumenting updates behind the scenes for a much better developer experience. The release also brings a new logo, website, and tagline, requires some manual upgrading from Svelte 2, and future work includes Sapper updates and first-class TypeScript support.

Svelte Blog·

Write less code

AI 摘要The article argues that code size matters because more code leads to more bugs, longer development times, and greater cognitive effort, yet developers rarely focus on minimizing it. It demonstrates how Svelte, being a compiler unconstrained by JavaScript's peculiarities, enables writing significantly less code than React or Vue — a simple component takes 145 characters in Svelte versus 442 in React — through features like flexible top-level elements, declarative bindings, and simple state assignments. The author contends that eliminating boilerplate results in more idiomatic, readable, and performant applications.

Without Boats·

for await loops (Part I)

AI 摘要The article addresses the unresolved debate over the final syntax for the await operator in async/await, noting that a summary of the language team's positions is forthcoming. The author instead focuses on a related but less-considered question—how to design for loops that process streams—since it directly impacts the await syntax decision.