编程 · 最新文章

今日新增 29 篇 · 共 2,701 篇 · 来自 79 个博客

Josh W. Comeau··Josh W. Comeau

My Wonderful HTML Email Workflow

If you've ever had the misfortune of being tasked with building a template for HTML emails, you know it's tricky business! In this blog post, I share the approach I took to build responsive, client-friendly emails without a single tag. Keep

Baby Steps·

What it feels like when Rust saves your bacon

AI 摘要The article explains that Rust's type checker acts as a 'co-pilot' that helps developers avoid subtle bugs that would be painful to debug. However, the author points out that in the moment, this experience typically feels very frustrating, because developers find themselves unable to get their code to compile.

React Blog··Andrew Clark, Dan Abramov, Jan Kassens, Joseph Savona, Josh Story, Lauren Tan, Luna Ruan, Mengdi Chen, Rick Hanlon, Robert Zhang, Sathya Gunasekaran, Sebastian Markbage, and Xuan Huang

React Labs: What We've Been Working On – June 2022

AI 摘要The React team reflects on the years of research and exploration that went into developing React 18, acknowledging that many attempted paths led to dead-ends but ultimately produced valuable insights. A key lesson learned was that it is frustrating for the community to wait for new features without visibility into the work being explored. This article serves as a way to share the team's ongoing efforts more transparently.

Baby Steps·

Async cancellation: a case study of pub-sub in mini-redis

AI 摘要The author examines tokio's mini-redis example, praising it as a realistic, well-documented, and clean piece of async Rust code that nevertheless exemplifies both the best and worst of async Rust. The concern is that the code depends on subtle async conventions that, if done incorrectly, produce no compilation errors and only fail under unpredictable timing conditions unlikely to surface in unit tests. The author notes this is not mini-redis's fault, since there are no great alternative patterns available in async Rust today.

Marc Brooker·

Formal Methods Only Solve Half My Problems

AI 摘要Formal methods like TLA+ and P effectively verify safety and liveness properties of distributed systems, but they cannot answer many practical design questions about latency, cost, scalability, hardware needs, and behavior under overload, which today require costly prototyping, closed-form modeling, and simulation. The author calls for new tools that combine formal specification and model checking with quantitative performance analysis, enabling sensitivity analyses using real-world data on networks, packet loss, and workloads. Closing this gap represents a valuable opportunity for collaboration between the formal methods community and the systems and database communities.

Svelte Blog·

What’s new in Svelte: June 2022

AI 摘要This June 2022 Svelte update covers quality-of-life improvements such as cancellable custom events in createEventDispatcher, {@const} support in {#if} blocks, various bug fixes, and major progress toward SvelteKit 1.0, including smoother Vite 3 integration and breaking changes like dropping Node 14 support. The article also showcases community-built apps and sites, learning resources to read, watch, and hear, and a roundup of new libraries, tools, and Svelte stores released during the month.

Josh W. Comeau··Josh W. Comeau

The Surprising Truth About Pixels and Accessibility

“Should I use pixels or rems?”. In this comprehensive blog post, we'll answer this question once and for all. You'll learn about the accessibility implications, and how to determine the best unit to use in any scenario. Keep reading.

Mara Bos·

Converting Integers to Floats Using Hyperfocus

AI 摘要The author recounts how, through an unexpected chain of events, they implemented a conversion from 128-bit integers to 64-bit floats that turned out to be faster than the built-in conversion of every compiler they tested. The blog post explains what happened, how floats work, how the conversion functions, and how the project got a bit out of hand.

Raph Levien·

Xilem: an architecture for UI in Rust

AI 摘要The article introduces Xilem, a new architecture for building user interfaces in Rust, designed to overcome the problem that most existing UI architectures rely on shared mutable state, which is not idiomatic Rust. Xilem is based on a declarative, statically typed view tree that is diffed each cycle to incrementally update a persistent widget tree, with key innovations including event dispatching via id paths and Adapt nodes that enable clean component composition with separate mutable state access. The architecture draws on modern reactive patterns from toolkits like SwiftUI, Flutter, and React, and aims to deliver intuitive-to-write UI code with high performance through precise change propagation.

Josh W. Comeau··Josh W. Comeau

You Don’t Need a UI Framework

As developers, it can be tempting to grab a pre-styled UI framework like Material UI or Bootstrap. Seems like a great way to outsource design and save a bunch of time, right? In my experience, this is an unrealistic expectation, and things

Marc Brooker·

What is a simple system?

AI 摘要This essay explores the question of what makes a system 'simple,' arguing that naive simplicity (like ROT13 or flat files) fails against real adversarial, persistence, and concurrency demands. It contends that simplicity can only be evaluated within the full context of a system's world—technical, organizational, educational, and historical—drawing on ideas like Brooks' accidental versus essential complexity, Goodhart's law, and the history of tools like C and Unix. Ultimately, it concludes that simplicity is subjective and exists in the eye of the beholder, with appearance correlating to results only imperfectly.