最新文章

今日新增 423 篇 · 共 7,436 篇 · 来自 241 个博客

Lil'Log·

Some Math behind Neural Tangent Kernel

AI 摘要This article introduces the neural tangent kernel (NTK), a kernel that explains how neural networks evolve during training via gradient descent and provides insights into why over-parameterized networks with sufficient width consistently converge to a global minimum despite random initialization. The post presents a deep dive into the motivation and definition of NTK, and proves deterministic convergence at different initializations for infinitely wide neural networks by characterizing NTK in that setting.

What If?··xkcd

Transatlantic Car Rental

AI 摘要The article humorously calculates how many rental cars it would take to build a drivable bridge across the Atlantic from Boston to Lisbon, estimating about a billion cars to reach the continental shelf and roughly a trillion for the deep ocean—far more than exist worldwide. It explains that cars on the bottom of the stack would be crushed by the weight of those above them, not by water pressure. Beyond the impractical scale, the scheme would violate rental agreements and credit card insurance coverage, and could disrupt ocean currents and naval shipping—potentially qualifying as an act of war or blockade.

Marc Brooker·

Histogram vs eCDF

AI 摘要The article argues that the empirical cumulative distribution function (eCDF) is nearly always a better choice than histograms for presenting data such as latency or throughput distributions. Using a bimodal latency example, it shows that eCDFs make it easy to read percentiles and quantiles directly off the graph, assess the relative contribution of different modes, zoom into details without bucketing artifacts, generate random samples from a measured distribution, and convert into a histogram—whereas the reverse is impossible because bucketing discards information. The author also clarifies terminology, distinguishing the eCDF (an empirical estimate) from the CDF (the true underlying distribution) and noting that 'histogram' can refer either to the graph or to a bucketed data structure for summarizing streams.

Svelte Blog·

What’s new in Svelte: September 2022

AI 摘要This September 2022 Svelte update highlights the final chance to get tickets for Svelte Summit Stockholm (Sept 8-9) and covers SvelteKit's newly merged filesystem-based router, including a migration guide and several breaking changes like the removal of named layouts in favor of groups. It also lists new SvelteKit features such as Link header support with Cloudflare's Automatic Early Hints, virtual $env modules, and improved TypeScript support in language tools. The post rounds up a community showcase of apps, learning resources like podcasts and tutorials, and numerous new libraries, UI kits, and starter templates.

Josh W. Comeau··Josh W. Comeau

Understanding useMemo and useCallback

What's the deal with these two hooks?! Lots of devs find them confusing, for a whole host of reasons. In this tutorial, we'll dig deep and understand what they do, why they're useful, and how to get the most out of them. Keep reading.

Baby Steps·

Come contribute to Salsa 2022!

AI 摘要Salsa is an incremental computation library used by tools like rust-analyzer to stay responsive during typing, and the team is currently working on Salsa 2022, a major new revision that will make the API more natural to use. The author is calling for contributors, as the project currently lacks a large group of maintainers, and invites interested people to check the Salsa 2022 tracking issue for tasks to tackle.

Josh W. Comeau··Josh W. Comeau

Why React Re-Renders

AI 摘要This article is a tutorial explaining when and why React re-renders, noting that instead of updating the DOM directly, developers tell React what the DOM should look like and React handles the rest. It unpacks the mechanics behind React's re-rendering process. The goal is to help readers use this knowledge to optimize the performance of their React applications.

Mara Bos·

Comparing Rust's and C++'s Concurrency Library

AI 摘要The article compares Rust's concurrency library with C++'s, noting that Rust's standard library features—threads, atomics, mutexes, and condition variables—closely resemble those introduced in C++11. C++ has since gained additional concurrency features through C++17 and C++20, with more proposals for future versions. The article reviews these C++ features, discusses what Rust equivalents could look like, and what it would take to implement them.

Lea Verou··Lea Verou

On ratings and meters

AI 摘要The author explores how to build a star rating web component that is semantically appropriate, ideally building on the element, but runs into limitations like styling difficulties, Safari's lack of customized built-in element support, and closed shadow roots that prevent custom styles. After experimenting with extending , nesting one in Shadow DOM, and using ARIA roles, they settle on two components: , a discrete version of , and , an editable rating widget that inherits from it. They remain uneasy about some design trade-offs, such as breaking encapsulation to share ElementInternals and the unclear semantics of an editable meter, and share their experiments at nudeui.com.