编程 · 最新文章

今日新增 30 篇 · 共 2,702 篇 · 来自 79 个博客

Marc Brooker·

Bélády's Anomaly Doesn't Happen Often

AI 摘要Bélády's anomaly is the counterintuitive phenomenon, discovered by IBM researchers in 1969, where increasing the size of a FIFO cache can actually worsen performance. Through simulations with random access patterns, the author shows the anomaly occurs extremely rarely—in fewer than 0.175% of uniform access patterns—and concludes it isn't a significant concern for system builders choosing FIFO caches. A correction notes that the anomaly can also occur in LFU caches, though apparently less frequently than with FIFO.

Svelte Blog·

Announcing Svelte 4

AI 摘要Svelte 4 has been released as a mainly maintenance-focused update that improves performance by shrinking hydration code, reducing package size by roughly 75%, and cutting dependencies from 61 to 16. It also enhances developer experience through better transitions defaults, easier preprocessors, an overhauled approach to custom elements, and IDE improvements, alongside a redesigned website and tutorial. The release primarily sets the stage for Svelte 5, which will be a full rewrite of the compiler and runtime, while migration from Svelte 3 is generally straightforward with a migration tool available.

Marc Brooker·

What is a container?

AI 摘要The article explains that the term 'container' is a frequent source of confusion because it refers to at least four distinct things: a way of packaging applications with their dependencies, a set of development and operational practices, Linux isolation tools like namespaces and cgroups, and specific implementations such as Docker and Kubernetes. These definitions are largely independent of each other, which leads to miscommunication—for example, debates about containers as a security boundary concern only the isolation tools, while container image support in AWS Lambda relates mainly to the packaging concept. The author urges readers to verify that their audience shares their definition before discussing 'containers.'

Raph Levien·

A note on Metal shader converter

AI 摘要The author critiques Apple's new Metal shader converter, which eases porting DirectX 12 games by translating DXIL/HLSL shaders to Metal, arguing it adds underspecified complexity rather than advancing robust GPU infrastructure. A key complaint is that Metal remains the only major GPU API lacking device-scope atomic barriers (present in HLSL since Direct3D 11 in 2009), which prevents single-pass prefix sum implementations and reliable cross-threadgroup coordination, and in turn holds back WebGPU's performance. The author recommends Apple document which HLSL features are unsupported, and points to WebGPU and Asahi Linux's work as more promising paths toward well-specified, portable GPU compute.

Baby Steps·

Higher-ranked projections (send bound problem, part 4)

AI 摘要The author discusses feedback from Josh Triplett on a draft RFC about Return Type Notation, which led to a third proposed solution to the 'send bound problem' in Rust. Called 'higher-ranked projections,' the idea involves defining T::Foo when T has higher-ranked bounds. Although the author still prefers RTN, they consider this alternative interesting and worth elaborating on.

Josh W. Comeau··Josh W. Comeau

Animated Pride Flags

Happy Pride month! In this tutorial, I'll share a handful of my favourite animation tricks. You'll learn how to build an animated wavy pride flag using CSS keyframes and linear gradients. We'll also see how to make it dynamic using React. 🏳

Svelte Blog·

What’s new in Svelte: June 2023

AI 摘要This June 2023 Svelte newsletter congratulates the SvelteHack winners announced at Svelte Summit and covers the release of Svelte 4.0.0-next.0, the first pre-release of Svelte 4, plus Svelte 3.59.0's new features such as spread operator support, new accessibility warnings, and additional bindings. SvelteKit updates include route-level entry generators for prerendering, crawling of URLs in meta tags, renamed enhance function arguments, and a new resolvePath export. The article also rounds up community-built apps, learning resources, and new libraries and tools.

Without Boats·

A governance system, if you can keep it

AI 摘要The article recounts Benjamin Franklin's famous reply to Elizabeth Willing Powel after the 1787 Constitutional Convention, in which he described America's new government as "a republic, if you can keep it." It then suggests that, given the self-conscious references to "constitutions" and "checks and balances" in the Rust project's recent governance RFC, reflecting on this quote and its broader implications about governance may be appropriate for the project and its community.

Marc Brooker·

Container Loading in AWS Lambda

AI 摘要AWS Lambda explains how it added support for container images up to 10GiB without increasing cold start latency, as detailed in its Usenix ATC'23 paper. The key techniques are block-level deduplication of popular base images, lazy loading through a FUSE filesystem that fetches only the chunks actually needed, and a highly effective tiered cache spanning local workers, availability zones, and S3. Resilience comes from erasure coding and salted chunk naming, which reduce tail latency, tolerate node failures without hit-rate loss, and limit the blast radius of corrupted data.

The Vue Point·

Announcing Vue 3.3

AI 摘要Vue 3.3 'Rurouni Kenshin' is a release focused on developer experience improvements, particularly for using SFC

Marc Brooker·

Open and Closed, Omission and Collapse

AI 摘要This article explains the critical difference between open-system workload models (where requests arrive independently of completions) and closed-system models (where new requests only follow completions), demonstrating through simulations that closed-loop benchmarks can drastically underestimate tail latency—a phenomenon known as coordinated omission. It further shows how open systems are vulnerable to congestive collapse, where timeouts and retries increase arrival rates, which raises latency and triggers even more retries in a self-reinforcing spiral. The author concludes that most stable production systems avoid these failures by approximating closed behavior through limits on concurrency or arrival rate.

Baby Steps·

Giving, lending, and async closures

AI 摘要The author follows up on a previous post about async closures in Rust, now exploring what it would take to make async functions matchable with types like `impl FnMut() -> impl Future`. This investigation leads into a discussion of the distinction between 'giving' and 'lending' traits. Notably, the author observes that closure traits are a special case for backward compatibility because of their special syntax.