本文探讨了依赖管理器如何使细粒度的软件复用变得无处不在,让开发者能够轻松依赖互联网上陌生人编写的软件包;然而,过去的信任机制——商业、法律和声誉方面的支持——并未延续到这一新模式中。作者认为,这种转变带来了严重却常被忽视的风险,对于生产环境软件尤其如此,因为依赖项故障可能造成高昂的代价。为降低这些风险,文章建议在采用依赖项之前仔细审查,评估诸如 API 设计、代码质量、测试实践以及项目问题跟踪器的状态等因素。
For decades, discussion of software reuse was far more common than actual software reuse.
Today, the situation is reversed: developers reuse software written by others every day,
in the form of software dependencies,
and the situation goes mostly unexamined.
My own background includes a decade of working with
Google’s internal source code system,
which treats software dependencies as a first-class concept,1
and also developing support for
dependencies in the Go programming language.2
Software dependencies carry with them
serious risks that are too often overlooked.
The shift to easy, fine-grained software reuse has happened so quickly
that we do not yet understand the best practices for choosing
and using dependencies effectively,
or even for deciding when they are appropriate and when not.
My purpose in writing this article is to raise awareness of the risks
and encourage more investigation of solutions.
继续阅读全文
为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。
AI 摘要This post proves the correctness of uscale, a fast unrounded scaling algorithm based on a 64×128-bit multiplication and floating-point approximation, which underlies the author's floating-point printing and parsing algorithms (FixedWidth, Short, and Parse). The proof proceeds through a series of lemmas handling exact results, small positive and negative powers, and finally the large-power cases, which cannot be exhaustively tested directly. For those large-power cases, the author uses the Ivy calculator—an APL-inspired language with arbitrary-precision rationals and right-to-left precedence—to implement a two-step approach, loosely following work by Vern Paxson and Tim Peters, that solves a 'modular search' problem to find the first satisfying value and a 'modular minimum' problem to verify all relevant inputs.
AI 摘要This article presents fast floating-point printing and parsing algorithms built on a new primitive called fast unrounded scaling, which approximates scaling by powers of ten, often in a single 64-bit multiplication. These simple algorithms reportedly outperform all prior known methods, including Dragon4, Grisu3, Ryū, Schubfach, and Dragonbox, and the author plans to include a Go implementation in Go 1.27. The post walks through the necessary concepts (fixed-point and floating-point numbers, unrounded numbers) and outlines implementations for fixed-width and shortest-width printing as well as decimal parsing.
AI 摘要This article is a reply to Donald Knuth's 1989 paper on proving the correctness of a program that converts 16-bit fixed-point binary fractions to their shortest accurate decimal representations, written in honor of Knuth's 88th birthday. The author presents what they argue is a better proof of Knuth's program P2 by starting with a simpler program that has a trivial direct correctness proof—implemented in the APL-like Ivy language—and then transforming it into P2 step by step, proving each transformation correct. The post also explores alternative solutions and concludes with reflections on how language and notation shape programs and proofs.
AI 摘要The article introduces the 'Floating Point Formatting' blog series, which began in 2011 and continued with new posts in 2026. It lists four posts covering topics such as floating-point to decimal conversion, a proof inspired by Knuth's fixed-point printer, simple and fast floating-point printing and parsing, and a proof of fast unrounded scaling verified with Ivy.
AI 摘要The article describes 'differential coverage', a debugging technique that compares the code coverage profile of a failing test with those of passing tests to isolate code blocks unique to the failing case. Demonstrating in Go, the author diffs two coverage profiles and views the result with go tool cover -html, successfully narrowing an injected bug down to 10 lines among over 15,000. While not foolproof (e.g., data-dependent bugs or insensitive tests can evade it), the technique is cheap to compute and can save considerable debugging time.