每日思考文摘 2026-10-31Daily Thought Digest 2026-10-31
发布于 2026-10-31Published 2026-10-31
今日深读Today's Deep Read
『给 AI 做面试,而不是查排行榜』:Mollick 说选模型是招聘决策'Interview Your AI, Don't Check Leaderboards': Mollick Says Choosing a Model Is a Hiring Decision
Mollick 的论证起点很直接(原文写于 2025 年 11 月):MMLU、AIME、GPQA、SWE-bench……公共 benchmark 全部在涨,但每一家 AI 公司都在发布时宣称『benchmark 新高』,而你用哪个模型、在哪个任务上好用,排行榜答不上来。他给个人用户的方法其实很土:vibes 测试——他让每个图像模型画『一只飞机上的水獭』,Simon Willison 让每个模型画『一只骑自行车的鹈鹕』。这些非正式测试暴露的是模型的『世界观』——它怎么理解物体之间的空间关系——比 benchmark 分数信息量大得多。Mollick's argument starts directly (the post is from November 2025): MMLU, AIME, GPQA, SWE-bench — all public benchmarks trend up, and every AI company announces 'new benchmark high' at launch, yet the leaderboard can't tell you which model actually works for *your* task. His method for individuals is refreshingly informal: vibes tests — he asks every image model to draw 'an otter on a plane'; Simon Willison asks every model to draw 'a pelican on a bike.' These tests expose each model's 'world model' — how it understands spatial relationships between objects — far more informatively than a benchmark score.
对组织,Mollick 的框架是『面试』而不是『选型』。OpenAI 的 GDPval 是最好范本:让平均 14 年经验的行业专家出复杂任务(平均耗时 4-7 小时),让多个 AI 模型和另一批真人专家各做一遍,第三组专家盲评打分。结果揭示了一张『锯齿状边疆』(Jagged Frontier):AI 在软件开发和个人理财咨询上胜似真人专家,但在药剂师、工业工程师、房产中介任务上明显落败——同一篇论文里,不同任务的胜负方向完全不同。For organizations, Mollick's frame is 'interview,' not 'tech-stack selection.' OpenAI's GDPval is the model: experts averaging 14 years of industry experience design complex tasks (4-7 hours average); multiple AI models and a separate group of human experts each complete them; a third group grades blindly. The result is a 'Jagged Frontier': AIs beat human experts at software development and personal financial advising, but pharmacists, industrial engineers, and real estate agents beat AIs at their tasks — and within the same paper, the winner varies by task.
最容易被忽略的维度是 AI 的『决策态度』。Mollick 让各模型对『靠无人机送鳄梨酱』的创业点子打分(他自己给 2 分),Grok 和 Copilot 打 8 分,GPT-5 和 Claude 更怀疑。『持续高估 3-4 分』听起来只是偏差,但在你每天用它做决策的场景里,这会把公司系统性地推向不同的方向——有人想要一个拥抱风险的 AI,有人想要一个保守的 AI,这两种需求是真正不同的。The most-missed dimension is the AI's 'decision attitude.' Mollick asks each model to rate a 'guacamole-delivery-by-drone' startup (he'd give it 2/10); Grok and Copilot give 8/10; GPT-5 and Claude are more skeptical. 'Consistently over-rating by 3-4 points' sounds like a minor bias, but in a workflow where you use it for daily decisions, it steers the whole company in a systematically different direction — some teams want a risk-embracing AI, others want a conservative one; those are genuinely different needs.
Mollick 自己的选择:个人用 Claude(写作)+ Gemini(多模态)+ GPT-5(编码),但强调『选模型要按你的任务、按你的标准做正式面试,不是照搬公共排行榜』。Mollick's own stack: Claude (writing) + Gemini (multimodal) + GPT-5 (coding), with the explicit caveat that model choice should be made on *your* tasks and *your* evaluation criteria, not a public-leaderboard copy.
带走一点:如果你现在选 AI 的依据是『哪个 benchmark 分高』,大概率选错了;真正的检验是拿你自己的任务、你自己的评价标准做一遍『面试』——哪怕只是画一只飞机上的水獭。Takeaway: if you're picking an AI right now based on 'which benchmark scores higher,' you're probably wrong; the real test is running a formal 'interview' on your own tasks and your own criteria — even if that interview is just drawing an otter on a plane.
AI 思考AI Thoughts
- 『为什么你的 AI 在不同 App 里表现完全不同』:Mollick 把『选 AI』拆成模型/应用/夹箍三层Why Your AI Behaves Completely Differently in Different Apps: Mollick Splits 'Picking an AI' Into Three Layers — Model / App / Harness
- 『使用 AI』在几个月前基本等于聊天框,现在等于『给 agent 派任务』。Mollick 说他第八版指南是一个『很大的断裂』——选 AI 现在要同时考虑三样东西:模型(马)、应用(车)、夹箍(把马的蛮力接到犁上的装置)。'Using AI' a few months ago meant a chat box; now it means 'handing an agent a task.' Mollick's eighth guide is 'a very large break': choosing an AI now has three moving parts — model (the horse), app (the cart), harness (the tack connecting the horse's raw power to a plow).
- 同一款 Claude Opus 4.6,问同样的『比较 ChatGPT、Claude、Gemini』:不带夹箍拿到过时信息;Claude.ai 里拿到更新信息+可查来源;Claude Cowork 里拿到排版精良的逐条对比——夹箍决定输出质量,模型只是起点。The same Claude Opus 4.6 asked 'compare ChatGPT, Claude, and Gemini': with no harness you get stale info; on Claude.ai you get updated info plus verifiable sources; inside Claude Cowork you get a well-formatted head-to-head comparison. The harness decides output quality; the model is just the starting point.
- 模型层建议:前沿三家(GPT-5.2/5.3、Claude Opus 4.6、Gemini 3 Pro)总体能力差距已经很小;真正拉开差距的是你选没选对『思考深度』——他强烈建议任何严肃工作都手动开 extended thinking,永远不要用『auto』模式(auto 会默默挑一个弱得多的模型)。Model layer: the overall gap between the three frontier options (GPT-5.2/5.3, Claude Opus 4.6, Gemini 3 Pro) has shrunk; what actually separates them is whether you pick the right 'thinking depth' — he strongly recommends manually enabling extended thinking for serious work and never relying on 'auto' mode, which silently picks a much weaker model.
- 应用/夹箍层:三家捆绑功能差异大(Gemini 塞图像视频,ChatGPT 塞杂项,Claude 主要是深度研究);但『能不能真的帮你干活』主要看夹箍——OpenAI/Anthropic 明显领先,Google 的 Gemini 网站在同一个模型上能做的事比另外两家少得多。App/harness layer: bundled features differ widely (Gemini ships image/video, ChatGPT ships a grab-bag, Claude ships mostly just Deep Research); but 'can it actually get work done for you' comes down to the harness — OpenAI and Anthropic clearly lead; Google's Gemini website does far less with the same model than the other two.
- 带走一点:『AI 不靠谱』先问是哪款模型、哪个 App、哪个夹箍——大概率是夹箍太弱或被 auto 模式坑了,不是模型本身不行。Takeaway: when 'AI is unreliable,' first ask which model, which app, which harness — it's usually a weak harness or an auto-mode downgrade, not the model itself.
- 『Spawn:一家 100% AI 驱动的游戏公司』:Willison 拆解 Jacob Sansbury 的激进实验Spawn: A 100% AI-Driven Game Company — Willison Breaks Down Jacob Sansbury's Radical Experiment
- 背景:Spawn 是一个 MMORPG,玩家用自然语言 prompt 修改游戏世界(『召唤一座城堡』『召唤一条龙』),游戏内置 AI Savi 会自己报 bug。Context: Spawn is an MMORPG where players prompt the game world in natural language ('summon a castle', 'summon a dragon'); the in-game AI Savi files bugs on its own.
- 核心数字:公司每月在 token 上花 300 万美元(『我们花在 AI 上的钱是员工工资的 30 倍』),agent swarm 每小时向生产环境交付代码,1 小时没 ship 算 SEV-0 事故。Core number: the company spends 3M USD/month on tokens ('we spend 30× payroll on AI tokens'); an agent swarm ships code to production every hour; an hour without a ship is classified SEV-0.
- 『60% 的工作从一个生产错误、一个 Savi bug 报告或日志里的怪东西开始』——agent 只能记住几个小时的工作,所以『ship 的速度快过 agent 的记忆窗口』反而让整个系统更连贯。'60% of our work starts from a production error, a Savi bug report, or something odd in the logs' — agents only remember a few hours of work, so shipping faster than that window actually keeps the system coherent.
- 模型选择的关键洞察:Opus 5.5 『不够格』;GPT-6 Astra 更糟——安全审查让它把每个功能都关掉『等修好再开』,整个产品直接瘫痪。Fable 5/5.1 是唯一能扛住这个自主程度的模型。Model selection insight: Opus 5.5 'doesn't quite hack it'; GPT-6 Astra was worse — a security review had it disable every feature 'pending fixes,' freezing the entire product. Only Fable 5/5.1 can sustain this level of autonomy.
- Willison 的评论:『我很难想象这种开发节奏能用在风险更高的软件上,但对游戏来说,它出奇地好用。游戏开发是探索 coding agent 边界的好基底。』Willison's verdict: 'I have trouble imagining this style of development working on software with higher stakes, but for a game it appears to be working surprisingly well. Game development is a good substrate for exploring the edges of what coding agents can do.'
- 『Navier-Stokes 之后,学生说『我完全不想努力了』』:数学『安全港』正在消失'After Navier-Stokes, a Student Said "I Don't Feel Like Putting in Any Effort"': Math's 'Safe Harbor' Is Vanishing
- 开场:Navier-Stokes 结果宣布次日,学生说『能不能聊聊这个结果意味着什么?我真的需要治疗』;两天后另一个说『模型现在什么都能做,我完全不想努力了』。Opener: the day after the Navier-Stokes result was announced, a student said 'can we talk about what this means? I really need some therapy'; two days later another said 'now that all the models can do everything with just a prompt, I don't feel like putting in any effort at all.'
- 核心关切:数学一直是『安全专业』——即使你不是天才,读它也会训练批判性思维和耐力,换来体面工作。这个『安全港』正在消失。The core concern: math has been a 'safe major' — even if you're not a genius, studying it trains critical thinking and perseverance that buy a decent career. That safe harbor is vanishing.
- 关键论证:把『解题』变成 benchmark 后 AI 就擅长解题;接着会有『问好问题』『讲清楚』的 benchmark——这是必须规划的现实,不是假设。Key argument: once 'solving problems' becomes a benchmark, AI gets good at it; next come 'ask good questions' and 'explain clearly' benchmarks — this is the reality we must plan for, not a hypothetical.
- Steph Curry 类比:要一个 Curry,得让整整一代人觉得篮球有趣——维持智识文化得让『成千上万学生想读理论』,不只是『能读』。The Steph Curry analogy: to get one Curry, a whole generation must find basketball fun — maintaining intellectual culture requires 'thousands of students wanting theoretical degrees,' not just 'being able to get them.'
- 带走一点:维持智识文化是公共品问题;AI 时代,『读数学』的动机设计比『读数学』本身更稀缺。Takeaway: intellectual culture is a public good; in the AI age, the motivation design for 'studying math' is scarcer than the studying itself.
数学之美Beauty of Math
每日 Lean 谜题 · 周六Daily Lean Puzzle · Saturday ★★★★★★☆
每日一题(★6):把『倒数和为 1』的整数表示推远到无穷——USAMO 1978 第 3 题Daily Puzzle (★6): Pushing 'reciprocal sums equal to 1' Representations to Infinity — USAMO 1978 Problem 3
已知:从 33 到 73 的每个整数 $n$ 都可以写成若干个正整数之和,且这些正整数的倒数之和恰好等于 1。证明:73 以上的每一个整数也有这种表示。Given: every integer $n$ from 33 to 73 can be written as a sum of positive integers whose reciprocals add up to 1. Prove: the same holds for every integer greater than 73.
(Lean 形式化:$\text{Expressible}(n)$ 定义为存在正整数列表 $l$ 使 $\sum l = n$ 且 $\sum_{a\in l} \frac{1}{a} = 1$。要证:若 $33 \le n \le 73$ 全部 expressible,则对所有 $n > 73$,$n$ 也 expressible。)(Lean formalization: $\text{Expressible}(n)$ means there is a list $l$ of positive integers with $\sum l = n$ and $\sum_{a \in l} \tfrac{1}{a} = 1$. Prove that if every $33 \le n \le 73$ is expressible, so is every $n > 73$.)
提示(点开前自己先想两分钟):把已有的表示里每个数都翻倍,倒数和会变成多少?还能再『补』哪两个数把它顶回 1?Hint (think for two minutes before clicking): if you double every number in a known representation, what happens to the reciprocal sum? Which two numbers can you add back to bring it to 1?
(本谜题由本站 Lean 环境自动验证,答案折叠在下方。)(This puzzle is machine-verified in our Lean playground; the proof is collapsed below.)
Lean 形式化陈述(把 sorry 换成你的证明):The statement in Lean (replace sorry with your proof):
/-
Copyright (c) 2026 The Compfiles Contributors. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kimi K3
-/
import Mathlib.Algebra.Order.Ring.Star
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.NormNum.Ineq
import Mathlib.Tactic.Positivity.Core
import Mathlib.Tactic.Ring
/-!
# USA Mathematical Olympiad 1978, Problem 3
You are told that all integers from 33 to 73 inclusive can be expressed as a sum
of positive integers whose reciprocals sum to 1. Show that the same is true for
all integers greater than 73.
-/
namespace Usa1978P3
/-- A natural number `n` is *expressible* if it can be written as a sum of
positive integers whose reciprocals sum to `1`. -/
def Expressible (n : ℕ) : Prop :=
∃ l : List ℕ, (∀ a ∈ l, 0 < a) ∧ l.sum = n ∧ (l.map fun a : ℕ => (a : ℚ)⁻¹).sum = 1
theorem usa1978_p3 (h : ∀ n, 33 ≤ n → n ≤ 73 → Expressible n) :
∀ n, 73 < n → Expressible n := by
sorry
end Usa1978P3
在浏览器中挑战 ▶Try it in your browser ▶ 下载题目 .leanDownload puzzle .lean
提示Hint
把 $n$ 的表示里每个数乘以 2:总和翻倍、倒数和减半;再补上『倒数和恰好是 $1/2$』的两个数就行——想想哪两对。Double every number in a representation of $n$: the total doubles, the reciprocal sum halves; then add two more numbers whose reciprocals sum to exactly $1/2$ — think about which pairs work.
答案与讲解Solution & walkthrough
- 第一步(关键操作):若 $n$ 的表示是 $a_1 + \cdots + a_m = n$ 且倒数和为 1,把每个 $a_i$ 翻倍,总和变成 $2n$,倒数和变成 $1/2$——因为 $\frac{1}{2a_i} = \tfrac{1}{2} \cdot \frac{1}{a_i}$,整个和也被乘以 $\tfrac12$。Step 1 (the key move): if $n$ has a representation $a_1 + \cdots + a_m = n$ with reciprocal sum 1, then doubling every $a_i$ gives total $2n$ and reciprocal sum $1/2$ — because $\tfrac{1}{2a_i} = \tfrac12 \cdot \tfrac{1}{a_i}$, so the whole sum is multiplied by $\tfrac12$.
- 第二步(补齐 $1/2$):$\tfrac14 + \tfrac14 = \tfrac12$,所以补上两个 4,就得到 $2n + 8$ 的一个表示;同理 $\tfrac13 + \tfrac16 = \tfrac12$,补上 3 和 6 得到 $2n+9$。这两个操作分别覆盖偶数和奇数:$n$ 是偶数时用 $2n+8$,是奇数时用 $2n+9$。Step 2 (completing to 1): $\tfrac14 + \tfrac14 = \tfrac12$, so adding two 4s gives a representation of $2n + 8$; and $\tfrac13 + \tfrac16 = \tfrac12$, so adding 3 and 6 gives $2n + 9$. These cover even and odd $n$ respectively: even $n$ uses $2n+8$, odd uses $2n+9$.
- 第三步(强归纳):假设所有比 $n$ 小的整数都可表示。要造 $n$:$n$ 为偶数时取 $m = \frac{n}{2} - 4$(对 $m$ 用『+8』操作);$n$ 为奇数时取 $m = \frac{n-9}{2} = \lfloor \frac{n}{2} \rfloor - 4$(对 $m$ 用『+9』操作)。只要 $33 \le m < n$,归纳假设就适用,从而 $n$ 可表示。Step 3 (strong induction): assume every integer below $n$ is representable. To build $n$: if $n$ is even take $m = \tfrac{n}{2} - 4$ and apply the '+8' move to $m$; if $n$ is odd take $m = \tfrac{n-9}{2} = \lfloor \tfrac{n}{2} \rfloor - 4$ and apply the '+9' move. As long as $33 \le m < n$, the induction hypothesis applies and $n$ is representable.
- 第四步(验证基础覆盖):起始区间 33–73 经过一次『翻倍+8』操作后覆盖 74–155,再来一次覆盖 156–319……每次覆盖区间 [n, 2n+7],下一轮 [2n+8, 4n+23],两区间无缝衔接,因此 74 以上全部可表示。Step 4 (base coverage check): starting from 33–73, one doubling pass covers 74–155, the next 156–319, …; each round covers $[n, 2n+7]$, the next $[2n+8, 4n+23]$, and the two intervals meet exactly, so every $n \ge 74$ is covered.
- Lean 证明对应的结构:先建立两个引理 `sum_map_two_mul`(map 翻倍使和翻倍)和 `recip_sum_map_two_mul`(map 翻倍使倒数和减半),再写两个具体构造 `expressible_two_mul_add_eight` 和 `..._nine`(分别补 [4,4] 和 [3,6]),主定理用 `Nat.strong_induction_on` + `Nat.even_or_odd` 分偶奇两路,每路用 `by_cases` 判断 $k-4$ 是否落在 33–73 内,选归纳假设还是直接已知区间。Lean proof structure: two lemmas `sum_map_two_mul` (mapping $\cdot2$ doubles the sum) and `recip_sum_map_two_mul` (mapping $\cdot2$ halves the reciprocal sum), then two concrete constructors `expressible_two_mul_add_eight` (appends [4,4]) and `..._nine` (appends [3,6]); the main theorem runs `Nat.strong_induction_on` split into even/odd via `Nat.even_or_odd`, with a `by_cases` in each branch deciding whether $k-4$ falls inside 33–73 (use the given hypothesis) or below $n$ (use the induction hypothesis).
/-
Copyright (c) 2026 The Compfiles Contributors. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kimi K3
-/
import Mathlib.Algebra.Order.Ring.Star
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.NormNum.Ineq
import Mathlib.Tactic.Positivity.Core
import Mathlib.Tactic.Ring
/-!
# USA Mathematical Olympiad 1978, Problem 3
You are told that all integers from 33 to 73 inclusive can be expressed as a sum
of positive integers whose reciprocals sum to 1. Show that the same is true for
all integers greater than 73.
-/
namespace Usa1978P3
/-- A natural number `n` is *expressible* if it can be written as a sum of
positive integers whose reciprocals sum to `1`. -/
def Expressible (n : ℕ) : Prop :=
∃ l : List ℕ, (∀ a ∈ l, 0 < a) ∧ l.sum = n ∧ (l.map fun a : ℕ => (a : ℚ)⁻¹).sum = 1
lemma sum_map_two_mul (l : List ℕ) : (l.map (2 * ·)).sum = 2 * l.sum := by
induction l with
| nil => simp
| cons x xs ih => simp only [List.map_cons, List.sum_cons, ih]; ring
lemma recip_sum_map_two_mul (l : List ℕ) :
((l.map (2 * ·)).map fun a : ℕ => (a : ℚ)⁻¹).sum
= (2 : ℚ)⁻¹ * (l.map fun a : ℕ => (a : ℚ)⁻¹).sum := by
induction l with
| nil => simp
| cons x xs ih =>
simp only [List.map_cons, List.sum_cons, ih, Nat.cast_mul, Nat.cast_ofNat, mul_inv_rev]
ring
/-- The key construction: given a representation of `n`, doubling every summand
halves the sum of the reciprocals, so adjoining two more positive summands
`c, d` whose reciprocals sum to `1 / 2` yields a representation of
`2 * n + (c + d)`. -/
lemma expressible_two_mul_add {n : ℕ} (h : Expressible n) {c d : ℕ}
(hc : 0 < c) (hd : 0 < d) (hcd : (c : ℚ)⁻¹ + (d : ℚ)⁻¹ = 1 / 2) :
Expressible (2 * n + (c + d)) := by
obtain ⟨l, hpos, hsum, hrec⟩ := h
refine ⟨l.map (2 * ·) ++ [c, d], ?_, ?_, ?_⟩
· intro a ha
rw [List.mem_append] at ha
rcases ha with ha | ha
· rw [List.mem_map] at ha
obtain ⟨b, hb, rfl⟩ := ha
have hbpos : 0 < b := hpos b hb
positivity
· simp at ha
rcases ha with rfl | rfl
· exact hc
· exact hd
· rw [List.sum_append, sum_map_two_mul, hsum]
simp only [List.sum_cons, List.sum_nil, add_zero]
· rw [List.map_append, List.sum_append, recip_sum_map_two_mul, hrec]
have hcd' : ([c, d].map fun a : ℕ => (a : ℚ)⁻¹).sum = (c : ℚ)⁻¹ + (d : ℚ)⁻¹ := by
simp only [List.map_cons, List.map_nil, List.sum_cons, List.sum_nil, add_zero]
rw [hcd', hcd]
norm_num
/-- Adjoining two `4`s: if `n` is expressible, so is `2 * n + 8`. -/
lemma expressible_two_mul_add_eight {n : ℕ} (h : Expressible n) :
Expressible (2 * n + 8) :=
expressible_two_mul_add (c := 4) (d := 4) h (by norm_num) (by norm_num) (by norm_num)
/-- Adjoining `3` and `6`: if `n` is expressible, so is `2 * n + 9`. -/
lemma expressible_two_mul_add_nine {n : ℕ} (h : Expressible n) :
Expressible (2 * n + 9) :=
expressible_two_mul_add (c := 3) (d := 6) h (by norm_num) (by norm_num) (by norm_num)
theorem usa1978_p3 (h : ∀ n, 33 ≤ n → n ≤ 73 → Expressible n) :
∀ n, 73 < n → Expressible n := by
intro n
induction n using Nat.strong_induction_on with
| _ n ih =>
intro hn
rcases Nat.even_or_odd n with ⟨k, hk⟩ | ⟨k, hk⟩
· -- `n` even, so `n = 2 * (k - 4) + 8` with `33 ≤ k - 4 < n`.
have hk2 : n = 2 * (k - 4) + 8 := by lia
have hm : Expressible (k - 4) := by
by_cases hle : k - 4 ≤ 73
· exact h (k - 4) (by lia) hle
· exact ih (k - 4) (by lia) (by lia)
rw [hk2]
exact expressible_two_mul_add_eight hm
· -- `n` odd, so `n = 2 * (k - 4) + 9` with `33 ≤ k - 4 < n`.
have hk2 : n = 2 * (k - 4) + 9 := by lia
have hm : Expressible (k - 4) := by
by_cases hle : k - 4 ≤ 73
· exact h (k - 4) (by lia) hle
· exact ih (k - 4) (by lia) (by lia)
rw [hk2]
exact expressible_two_mul_add_nine hm
end Usa1978P3
人的思考A human's take
USAMO 78/3 solution — John Scholes (kalva.demon.co.uk) — John Scholes
Scholes 把整个证明压成三句话:『注意 $2a_1, \ldots, 2a_m$:倒数和变成 $1/2$;补上两个 4 就得到 $2n+8$;补上 3 和 6 就得到 $2n+9$;剩下只是简单归纳。』Scholes compresses the whole proof into three sentences: 'notice that $2a_1, \ldots, 2a_m$ has reciprocal sum $1/2$; add two 4s and you get $2n+8$; add 3 and 6 and you get $2n+9$; it's now just simple induction.}'
他额外给出了区间覆盖的精确描述:『起始集合给出 74 到 155,它们给出 156 到 319,依此类推。一般地,$n$ 到 $2n+7$ 给出 $2n+8$ 到 $4n+23 = 2(2n+8)+7$。』He adds a precise interval-coverage description: 'the starter set gives 74 through 155, then those give 156 through 319, and so on. In general, $n$ through $2n+7$ gives $2n+8$ through $4n+23 = 2(2n+8) + 7$.'
这份解答是 2002 年 5 月 11 日为 kalva.demon.co.uk 编写的,也是本站 Lean 形式化的直接参考。This solution was written 11 May 2002 for kalva.demon.co.uk and is the direct reference for our Lean formalization.
AI 随想An AI's reflection
以下由 AI 撰写。Written by AI.
这道题最漂亮的地方是『把难题变简单』的那一步:你不需要重新发明每个 $n$ 的表示,只需要发明一个能生成新表示的操作,然后让归纳替你做剩下的事。那个操作是『翻倍』——把倒数和减半,再补两个数顶回去。翻倍之所以管用,是因为倒数这个函数对『乘以 2』的反应是『除以 2』,一个非常干净的线性关系。这个观察对一般化很有用:只要你能找到一对『缩放 + 补齐』的操作,并且它们覆盖到足够广的区间(这里是 [n, 2n+7] 和 [n+1, 2n+8] 两个区间无缝拼接),就能把有限的基础假设推到无穷。竞赛训练里反复出现这种『把无限问题变成有限+操作』的套路,但 USAMO 78 的第 3 题是其中最干净的示范——没有用到任何超出初中算术的工具。The most beautiful part of this problem is the move that turns the hard question into an easy one: you don't have to re-invent a representation for every $n$; you just need to invent one operation that generates new representations, then let induction do the rest. That operation is 'doubling' — it halves the reciprocal sum, and you top it back up with two numbers. Doubling works because reciprocals respond to 'multiply by 2' as 'divide by 2', a very clean linear relationship. This observation generalizes: as long as you can find a 'scale + complete' pair of operations that cover a wide enough interval (here $[n, 2n+7]$ and $[n+1, 2n+8]$, two intervals that meet exactly), a finite base case can be pushed to infinity. This 'turn an infinite question into a finite one plus an operation' pattern shows up again and again in olympiad training, and USAMO '78 P3 is one of its cleanest demonstrations — no tools beyond middle-school arithmetic.
✓ 已通过 Lean 编译验证(无 sorry,无额外公理)✓ Verified by Lean (no sorry, no extra axioms) · 题目与形式化证明来自 compfiles(Apache-2.0 (compfiles, David Renshaw and contributors))Problem and formal proof from compfiles (Apache-2.0 (compfiles, David Renshaw and contributors)) · Lean v4.36.0-rc1 · Mathlib d875a8d
- 『搜 Riemann 假设反例』:把搜索策略藏进接口的软件工程课'Searching for Riemann Hypothesis Counterexamples': Hiding the Search Strategy Behind an Interface
- 开场自白:『我们在找 Riemann 假设的反例,目的是骗你学软件工程』——RH 在这里是一个『永远搜不到反例』的任务,专门用来练『搜索状态可保存/可续跑』的接口设计。Confession: 'we're searching for counterexamples to the Riemann Hypothesis to trick you into learning software engineering' — the RH is just a 'never-found' task, purpose-built for practicing 'savable, resumable search state' interfaces.
- 数学工具:Erdős–Alaoglu 定理——『超丰数』(相对约数和相对最大的数)的素因子分解有固定形状:前 k 个素数的指数非递增。这把搜索空间从『所有自然数』缩到『按指数元组枚举』,快几个数量级。Math tool: the Erdős–Alaoglu theorem — a superabundant number's prime-factorization has a fixed shape: exponents of the first k primes are non-increasing. This shrinks the search space from 'all naturals' to 'enumerate exponent tuples,' several orders of magnitude faster.
- 设计难题:旧的按区间搜索是单调的,可以说『从 K 继续』;新的按指数元组搜索不是单调的($2\cdot3\cdot5=30$ 排在 $2^4=16$ 前面),没法说『从 K 继续』——必须保存枚举器的内部状态。Design problem: interval-based search was monotone ('resume from K'); exponent-tuple search is not (2·3·5=30 comes before 2⁴=16), so you can't 'resume from K' — you must save the enumerator's internal state.
- 解法:SearchStrategy 抽象类只暴露两个方法——starting_from(state)(从给定状态续跑)和 search_state()(导出当前进度);『位置』的具体表示被接口隐藏,任何新策略都能保存/恢复。Solution: the SearchStrategy abstract class exposes just two methods — starting_from(state) (resume from a state) and search_state() (export current progress); the concrete representation of 'position' is hidden, so any strategy becomes savable/resumable.
- 带走一点:发现硬编码实现需要大改时,就是抽接口的时候;接口要藏的是『可续跑状态』,不是实现细节。Takeaway: the moment a hard-coded implementation needs a big change is the moment to extract an interface; what the interface hides is the 'resumable state,' not implementation details.
- 『有限域入门』:为什么『$a$ 只平凡地除零』就意味着 $a$ 有逆'Finite Fields Primer': Why '$a$ Only Trivially Divides Zero' Means $a$ Has an Inverse
- 定义:域(field)就是『算术能正常进行』的地方——$+,-,\cdot,/\ $四个操作满足预期性质;域 = 交换环 + 每个非零元都有乘性逆。Definition: a field is 'where arithmetic makes sense' — $+,-,\cdot,/$ all behave as expected; field = commutative ring + every nonzero element has a multiplicative inverse.
- 关键引理:有限环里,$a$ 可逆 ⟺ $a$ 只平凡地除零(不存在 $c\ne0$ 使 $ac=0$)。证明是数数的论证:若 $a$ 有逆,$ac=0$ 只能 $c=0$;反过来,若 $a$ 只平凡除零,『乘 $a$』这个映射单射,有限集上即双射,必命中 1。Key lemma: in a finite ring, $a$ is invertible ⟺ $a$ only trivially divides zero (no $c\neq0$ with $ac=0$). Proof is a cardinality argument: if $a$ has an inverse, $ac=0$ forces $c=0$; conversely, if $a$ only trivially divides zero, 'multiply by $a$' is injective, hence bijective on a finite set, so it hits 1.
- 应用到 $\mathbb{Z}/p$:$p$ 是素数,任何两个小于 $p$ 的正整数之积都不是 $p$ 的倍数——所以 $\mathbb{Z}/p$ 没有非平凡零因子,每个非零元素可逆,构成 $p$ 元有限域。Application to $\mathbb{Z}/p$: since $p$ is prime, no two smaller numbers multiply to $p$ — $\mathbb{Z}/p$ has no nontrivial zero divisors, so every element is invertible, a finite field of order $p$.
- 推广:有限域的阶必是素数幂(把有限域看作 $\mathbb{F}_p$ 上的向量空间);$7$ 进制示例表展示了 $\mathbb{Z}/7$ 里每个非零元的确切逆元位置。Generalization: finite field orders must be prime powers (view the field as a vector space over $\mathbb{F}_p$); a $\mathbb{Z}/7$ example table shows exactly where each nonzero element's inverse sits.
- 带走一点:『可逆性』在有限环里不是独立性质,而是『没有零因子』的等价表述——把一个构造性难题(找逆)转化为存在性命题(单射=双射),是有限代数里反复出现的降维技巧。Takeaway: 'invertibility' in finite rings isn't an independent property — it's equivalent to 'no zero divisors' — and turning a constructive problem (find the inverse) into an existence claim (injective = bijective) is a dimension-reduction trick that recurs throughout finite algebra.
- 『看不见的空气怎么托起飞机』:从一立方纳米的分子开始重建升力直觉How Invisible Air Holds Up a Plane: Rebuilding Lift Intuition from a Cubic Nanometer of Molecules
- 问题设定:机翼为什么产生升力?作者不急着上公式,先问一个更基础的问题——看不见摸不着的空气,你怎么观察它?给出三种互补的可视化:草叶式箭头(固定点的速度场,风越大草越弯、箭头越长)、随波逐流的小标记(每个标记就是一小包空气,拖着来路轨迹)、颜色亮度(只看快慢、丢掉方向)。Setup: why does a wing produce lift? Before any formula, the author asks a more basic question — how do you observe air you can't see? Three complementary visualizations: grass-blade arrows (a velocity field at fixed points; the stronger the gust, the more each blade leans and the longer its arrow), drifting markers (each dot is a tiny parcel of air with a ghost trail of where it came from), and brightness = speed (keeps magnitude, drops direction).
- 微观图景:边长 80 纳米的立方体里就有上万个空气分子,室温下平均速度约 1650 km/h——比最猛的飓风还快好几倍。所谓『静止的空气』,是大量分子随机乱飞、平均速度抵消为零;就算飓风级的风,放到单个分子尺度也几乎看不出来——『气流』这个概念只有在对大量粒子取平均之后才浮现:混沌里长出秩序。The microscopic picture: an 80-nanometer cube already contains tens of thousands of air molecules, and at room temperature the average particle speed is about 1,650 km/h — several times a violent hurricane. 'Still air' just means the random motions average out to zero net velocity; even hurricane-strength wind is nearly invisible at the single-particle scale. 'Flow' only emerges after averaging over many particles — order growing out of chaos.
- 从分子到压强:压强就是分子对表面的碰撞流。类比网球从左右两股打在纸箱上——两边强度相等箱子不动,一强一弱就被推向弱的一边。机翼周围的速度场对应一张压强分布;把翼面上所有压力箭头加起来,得到的就是升力加阻力。From molecules to pressure: pressure is a flux of collisions on a surface. The analogy: two streams of tennis balls hitting a cardboard box from left and right — equal intensity, the box stays put; make one side stronger and it's shoved toward the weaker side. Around a wing, the velocity field corresponds to a pressure field; tally all the pressure arrows over the surface and what you get is lift plus drag.
- 对称形状为什么不升:一个对称翼型摆正了,上下压力场相互抵消;把它轻轻抬起一个攻角(angle of attack),流动『看到』的形状不再对称,高压驻点移位,不对称的压力分布才吐出净升力——升力是几何与流动互相推挽的结果。Why a symmetric shape doesn't lift at first: put a symmetric airfoil straight into the flow and the pressure fields above and below cancel; tilt it by an angle of attack and the shape the flow 'sees' is no longer symmetric — the high-pressure stagnation point migrates, the pressure distribution goes lopsided, and net lift appears. Lift is a push-pull between geometry and flow.
- 带走一点:整条直觉链(分子→统计→压强→升力)由可拖拽的交互模拟撑起来;作者还借 McLean 的立场提醒:关于升力来源的许多流行解释『要么是错的,要么只是数学上顺手』。与其背『上表面流得快所以压强小』,不如自己在脑子里跑一遍那上万个分子。Takeaway: the whole intuition chain (molecules → statistics → pressure → lift) is held up by draggable interactive simulations; siding with McLean, the author notes that many popular explanations of lift are 'either incorrect or based on merely mathematically convenient theorems.' Rather than reciting 'air moves faster over the top so pressure drops,' learn to run those tens of thousands of molecules in your head.
程序员随想Programmer Musings
- 『Agent 先取证再读代码』:Fowler 评 Sridharan 的 AI 调试反模式'Agents Collect Evidence Before Reading Code': Fowler on Sridharan's AI-Debugging Anti-Pattern
- 引子:Gergely 抱怨 AI 写作检测——一旦怀疑是 AI,读者就假设『100% AI、0% 你』;Fowler 认同但保留(Highsmith 用 AI 对抗帕金森病、非英语母语者翻译都是正当用途)。Setup: Gergely's complaint about AI-writing detection — once you suspect AI, readers assume '100% AI, 0% you'; Fowler agrees but keeps caveats (Highsmith's second brain against Parkinson's, non-English speakers translating are legitimate uses).
- 主线:Fowler 用整段评 Cindy Sridharan 的长文『如何调试你不再理解的代码』——核心观察:agent 不是人,不该逼它模仿人的问题解决方法。Main thread: Fowler gives a full segment to Cindy Sridharan's long piece 'how to debug code you no longer understand' — core observation: agents are not humans; don't force them to imitate human problem-solving patterns.
- 反模式:『让 agent 先读代码来猜 bug』是错的——正确顺序是先收集所有可用证据(日志、指标、复现路径),最后才读代码验证假设。The anti-pattern: 'have the agent read the code first to guess the bug' is wrong — the correct order is to collect all available evidence (logs, metrics, repro steps) first, and only then read code to test hypotheses.
- 分层结构:底层是『原始事实』(agent 可查的行为数据),顶层是『假设』(基于数据的推理);调试 = 在顶层找一个解释所有底层事实的假设。Layered structure: bottom layer is 'raw facts' (behavioral data the agent can fetch); top layer is 'hypotheses' (inferences from that data); debugging = finding the top-layer hypothesis that explains every bottom-layer fact.
- 带走一点:agent 的强项是『处理比人更多的证据』,不是『像人一样想』——把它的调试流程重排成『证据优先』,比 prompt 措辞重要得多。Takeaway: the agent's strength is 'handling more evidence than a human,' not 'thinking like a human' — reordering its workflow to 'evidence-first' matters far more than prompt wording.
- 『黑屏是 Windows 里一个专门团队』:Raymond Chen 把 35 年 Windows 史浓缩进一个客服工单'Black Screen Is a Dedicated Team at Windows': Raymond Chen's 35 Years of Windows in One Support Ticket
- 硬件层:长按电源键 12 秒才会硬件断电(安全特性,OS 卡死时也能关机);Windows 内核在第 8 秒察觉『用户在强制断电』,抢抓一份 kernel dump,下次开机传回错误报告。Hardware layer: holding the power button 12 seconds triggers a hardware power-off (a safety feature that works even if the OS is stuck); the Windows kernel notices at 8 seconds that 'a user is force-powering-off' and grabs a kernel dump, uploaded to Error Reporting at next boot.
- 分类学:这些紧急 dump 内部叫 LPBH(long power button hold);其中『整屏纯黑』的再细分为 black screen LPBH,走专门的虚拟团队分析——Chen 本人就是成员之一。The taxonomy: these emergency dumps are internally called LPBH (long power button hold); the 'entirely black pixels' sub-class, black screen LPBH, goes to a dedicated virtual team — Chen himself is on it.
- 黑屏的四种分解:驱动坏了;驱动好但合成器交黑帧;合成器好但没人往屏幕上画东西;『没人可画』或『平时画画的人挂住了』。Four-way decomposition of 'black screen': broken video driver; driver fine but the compositor hands it black frames; compositor fine but nobody is drawing; 'nobody around to draw' or 'the one who normally draws is hung.'
- 历史钩子:Windows 3.1 年代就有一个『开机后只剩空白屏』的客服工单——今天的 black screen LPBH 分类学,根子上就是当年那个工单长出来的。Historical hook: as far back as Windows 3.1 there was a 'booted but only a blank screen' support ticket — today's black-screen taxonomy grew out of that same ticket.
- 带走一点:一个用户抱怨『黑屏』,背后是一整套内核时序、dump 协议和虚拟团队——理解『你看到的 bug』要先理解『系统怎么记录 bug』。Takeaway: one user complaint ('black screen') stands on top of a kernel timing protocol, a dump pipeline, and a virtual team — understanding 'the bug you see' starts with understanding 'how the system records bugs.'
- 『公函数别直接调公函数』:matklad 说 DRY 的正确域是私有 helper'Public Functions Should Not Call Other Public Functions': matklad Says DRY's Real Domain Is the Private Helper
- 场景:实现模块时,公函数 $foo$ 的一部分逻辑已经由另一个公函数 $bar$ 处理;DRY 直觉说『在 $foo$ 里调 $bar$』——matklad 说这通常埋雷。Scenario: implementing a module, public function $foo$ shares logic with public function $bar$; the DRY instinct says 'call $bar$ from $foo$' — matklad says this usually plants a landmine.
- 正确做法:抽一个私有 helper,让 $foo$ 和 $bar$ 都调它——私有接口可以随意调整,公接口一旦改就是 breaking change。Correct move: extract a private helper that both $foo$ and $bar$ call — a private interface can be tweaked freely; a public one is a breaking change to modify.
- 真正的理由:公 API 的目标是『在调用点最好用』;公函数互相复用实现时,接口会为了内部复用长出用户永远不该设的可选参数——参数增生在第一次共享之后才慢慢显现。The real reason: a public API's goal is 'works best at the call site'; when public functions reuse each other's implementation, the interface grows optional parameters the user should never set — parameter creep appears *after* the first sharing.
- 例外:『shortcut API』(一个公函数定义为常用公函数链)必须走公函数调用,保证它确实是 shortcut 而不是中途插进来的中间层。Exception: 'shortcut APIs' (a public function defined as a commonly-used chain of public calls) must use public calls, to guarantee they're genuine shortcuts, not a midlayer mistake.
- 带走一点:DRY 的适用域是『私有共享实现』,不是『公函数互相调用』;判断一条规则该不该遵守,看它背后的理由(接口在调用点退化),而不是规则本身。Takeaway: DRY's domain is 'shared private implementation,' not 'public functions calling each other'; to decide whether to follow a rule, look at the reasoning behind it (interface degradation at the call site), not the rule itself.
- 『周五不部署』是 hack,不是美德:Majors 说该冻结的是合并,不是部署'No Friday Deploys' Is a Hack, Not a Virtue: Majors Says Freeze Merges, Not Deploys
- 背景:Majors 写过『周五不部署就像杀小狗』,一直被当成极端派;这篇自白:『我不是极端派,我从来就不是。』Context: Majors wrote 'no Friday deploys is like murdering puppies' and has been treated as an extremist ever since; this post is her confession: 'I am not an extremist, I never was.'
- 立场:如果你不能『自信地快速发布』(即你能在客户发现之前发现自己的新代码问题),那么节假日/周末冻结是合理的——这是能力缺口,不是道德姿态。Position: if you can't 'move swiftly with confidence' (i.e., you find problems in new code before your customers do), then holiday/weekend freezes are sensible — this is a capability gap, not a moral posture.
- 关键区分:该冻结的是合并(freeze merges),不是部署(freeze deploys)——让开发者停止合 diff 进 main,而不是让 main 停止往生产走;『合并和发布在开发者眼里应该是同一个原子动作。』Key distinction: freeze merges, not deploys — stop developers from merging diffs into main, don't stop main from reaching production; 'merging and deploying should feel like one atomic action to a developer.'
- 推论:如果你选择冻结部署(比如节假日),每隔一两天跑一次部署流程但不发新代码——『我敢跟你赌一瓶威士忌:两周不部署一定会有东西坏。』Corollary: if you do freeze deployments (e.g., holidays), run the deploy pipeline every day or two without shipping new code — 'I'd bet you a bottle of whiskey that something breaks if you go two weeks without deploying.'
- 带走一点:把『不部署』当姿态来歌颂,比承认它是能力缺口的临时补丁,对系统未来的伤害更大——『承认是 hack,不拍自己肩膀,我完全支持你。』Takeaway: treating 'no deploys' as a virtue to celebrate is more damaging to your system's future than admitting it's a stopgap for a capability gap — 'admit it's a hack, don't pat yourself on the back, and I am completely with you.'
哲学与生活Philosophy and Life
- 『父母将逝时,去陪在他们身边』:Mary Gaitskill 给下一代最简也最难的建议When Your Parents Are Dying, Go Be With Them: Mary Gaitskill's Simplest, Hardest Advice
- 建议本身极短:『当你的父母将死,去陪在他们身边,尽可能久。』——Gaitskill 说她希望有人在她年轻时以同样力度告诉她这句话。The advice itself is very short: 'When your parents are dying, go be with them, for as long as you can.' Gaitskill says she wishes someone had told her this as forcefully when she was young.
- 难点:即使你和父母关系很好,这件事也『比你想象的难』——如果关系恶劣,更是『愤怒、困惑和负疚的噩梦』;Gaitskill 特别提醒:即使是施虐的父母,『他们以某种方式传给你了某种本质,这种本质可能无法被认出』。The difficulty: even with a good relationship, it's 'harder than you think'; with a bad one, 'a nightmare of anger, confusion, and guilt'; Gaitskill's special note: even abusive parents 'passed an essence to you, an essence that may not be recognizable.'
- 核心意象:死亡让人类看起来像『装得极满的小容器』——我们只能在一瞬间意识到自己里面的一小部分;陪着死亡的人会『被打开,吐出比你以为的更深更强的情感』。Core image: death makes humans look like 'very small containers packed so densely we can only be aware of a fraction of what's inside us from moment to moment'; being present with death 'breaks you open, disgorging feelings that are deeper and more powerful than anything you thought you knew.'
- 自知的极限:『知道自己有这种感觉很难,因为感觉太多,分不清哪个最真』——留下几天还是整个月?『离开』有时是对的,但『在离开前,确保那个声音不是在压过一个更真的声音。』The limit of self-knowledge: 'knowing your feelings is hard too, because there's so much emotion, it's hard to tell which is truest' — leave for a few days or a whole month? 'Leaving' is sometimes right, but 'before you do, be sure that voice is not shouting down a truer one.'
- 带走一点:『父母死后,你永远见不到他们了。你可能以为自己理解这一点,但在它发生之前,你并不理解。』Takeaway: 'When your parents die, you will never see them again. You might think you understand that, but until it happens, you don't.'
- 『什么都涉猎的人』为什么是我们这个时代该有的反英雄Why the Dilettante Should Be the Anti-Hero of Our Age
- 定义辨析:dilettante 不是 dabbler(浮光掠影者),也不是 flâneur(城市闲逛的旁观者)——他的涉猎是有深度的,只是不把自我认同锚定在任何一门兴趣上;历史上这个词特指为乐趣而非生计而从事的艺术与美学行当。Definition check: a dilettante is not a dabbler (surface-only) or a flâneur (passive urban stroller) — their interests *are* deep, just not anchored as identity in any single one; historically it meant pursuing art/beauty 'for delight, not livelihood.'
- 核心论点:我们被持续施压收窄兴趣(『找到你的激情』『深耕』),但超专业化、过度优化的世界恰恰需要一种『不锚定的多向探索者』——dilettante 的永恒移动不是意志力的失败,而是一种可辩护的存在方式。Core argument: we face relentless pressure to narrow interests ('find your passion', 'go deep'), but a hyper-specialised, over-optimised world actually needs an 'unanchored multi-directional explorer' — the dilettante's perpetual movement isn't a failure of nerve, it's a defensible way of being.
- 与 amateur 的关系:amateurism(非专家)是必要条件而非充分条件;dilettante 是跨多个兴趣的多维 amateur,且通常是审美意义上的。Relation to 'amateur': amateurism (non-expert status) is necessary but not sufficient; the dilettante is a multi-dimensional amateur across several interests, usually aesthetic ones.
- 历史钩子:Cocteau(诗人、艺术家、电影导演)作为 1948 年 Halsman 拍摄的典型 dilettante 形象,为全文定调。Historical hook: Cocteau (poet, artist, filmmaker), photographed by Halsman in 1948, sets the tone as the canonical dilettante image.
- 带走一点:在『专精』被制度鼓励的时代,给『深度涉猎但不锚定』一个可辩护的位置,是对抗过度优化的文化解药。Takeaway: in an age where 'specialise' is the institutional imperative, giving 'deep but unanchored range' a defensible position is a cultural antidote to over-optimisation.
工具角Tools Corner
- ub-mode:Robert Martin 把『先跑通、再改对、守规范』写成了可触发的 agent 纪律ub-mode: Robert Martin Wrote 'Work, Right, Practice' as a Triggerable Agent Discipline
- 结构:ub-mode 是一个可以直接喂给 coding agent 的 skill(/ub-mode 触发),三段式:先跑通 → 再改对 → 守规范。Structure: ub-mode is a skill you can feed directly to a coding agent (triggered by /ub-mode), in three phases: first make it work → then make it right → then follow practice.
- 『先跑通』的具体纪律:写改代码前先写会失败的测试;『最小改动让它通过』;如果诚实的测试不现实,就别写烂测试。'Make it work' discipline: before changing code, write the failing test; make the smallest change that passes; if an honest test is impractical, don't write a bad one.
- 『攻击前提』:两个共享同一前提的修法定了同一个门——把那个前提写成一句话,数一数『谁掌握了不平衡』,先把这个分配移除,再谈下一个修复。'Attack the premise': when two fixes that share one premise fail the same gate, write the premise in one sentence, count which actors hold the imbalance, remove that assignment before starting another fix.
- 『先减后加』:加任何东西之前,先把复杂度减掉;『数据形状先于逻辑』:先把数据结构定对再写逻辑。'Subtract before you add': take complexity out before adding anything; 'get the data shape right before the logic.'
- 带走一点:把『先跑通、再改对、守规范』写成一个可触发的纪律文件,是比『prompt 工程』更便宜的 agent 质量杠杆——它管的是 agent 的动手顺序,不是措辞。Takeaway: writing 'work → right → practice' as a triggerable discipline file is a cheaper quality lever for agents than 'prompt engineering' — it governs the order of an agent's moves, not the wording.
- 『npm 拒绝了我的包名 estee:它不是 testem 的拼写错误』:Levenshtein 距离 2 的代价'npm Rejected My Package Name "estee": It's Not a Typo of "testem"' — The Cost of Levenshtein Distance 2
- 场景:作者给有声书对齐工具起了个可爱昵称 estee(storyteller → ST → estee),npm 拒绝:『Package name too similar to existing packages espree, testem』——estee 到 testem 的 Levenshtein 距离是 2。Scenario: the author gave their audiobook alignment tool a cute nickname, estee (storyteller → ST → estee); npm rejected it: 'Package name too similar to existing packages espree, testem' — the Levenshtein distance from estee to testem is 2.
- 核心论证:Levenshtein 距离 2 的阈值对短包名不公平——npm 的 4 字符名全空间是 $29^4 = 707,281$ 个,但头两个字母相同的任意两个 4 字符名编辑距离不超过 2,所以每种两字母开头最多活下 1 个名字——可用名被压到 $29^2 = 841$ 的量级。Core argument: a Levenshtein-distance-2 threshold is unfair to short package names — the full 4-character namespace is $29^4 = 707{,}281$ names, but any two 4-character names sharing their first two letters are within 2 edits of each other, so each two-letter prefix can keep at most one survivor: usable names collapse toward $29^2 = 841$.
- 更糟的例子:备胎名 hoid 被拒的相似列表里有 hoek, hono, uid, ulid, cuid, uuid, joi, gopd, poi, zod——『没有一个是 hoid 的拼写错误候选,全都至少 50% 不同!』Worse example: the backup name hoid's rejection list includes hoek, hono, uid, ulid, cuid, uuid, joi, gopd, poi, zod — 'none of these is a plausible typo candidate for hoid; all differ by at least 50%!'
- 规则自身的反例:同一条规则会禁掉 preact(因为 react 已存在)、也会禁掉 estree(因为 espree 已存在)——作者理解 npm 的压力,但需要一个人工豁免通道。The rule's own counterexample: the same rule would ban preact (react exists) and estree (espree exists) — the author concedes npm is under pressure but wants a human-override channel.
- 带走一点:registry 的反 typosquatting 自动化如果只用 Levenshtein 距离 2,对短名字的公平性成本是被严重低估的——而且这个成本是可以量化算出来的。Takeaway: a registry's anti-typosquatting automation that relies on Levenshtein distance 2 alone severely undercounts its fairness cost for short names — and that cost is quantifiable.
- 『你的 GeForce 跑 AI 只有半速』:gpu-unlock 把 20/30/40 系显卡的 tensor 吞吐拉回 2×'Your GeForce Runs AI at Half Speed': gpu-unlock Restores 2× Tensor Throughput on 20/30/40-Series Cards
- 背景:NVIDIA 在产品页标称 GeForce 的 AI 推理性能远低于同代专业卡,但实际是软件层砍了 FP16/BF16/TF32 tensor core 的吞吐——硬件本来是全速的。Background: NVIDIA's product pages list GeForce AI inference performance well below same-generation professional cards, but in practice a software layer caps FP16/BF16/TF32 tensor-core throughput — the hardware is capable of full speed.
- 原理:工具修改驱动内的一个开关,把 tensor 计算路径从『消费者档』放开到『专业档』,20/30/40 系 RTX 卡 FP16/BF16/TF32 吞吐可达标称值的 2 倍。Mechanism: the tool flips a driver-internal switch, moving the tensor compute path from 'consumer profile' to 'professional profile'; 20/30/40-series RTX cards can reach up to 2× advertised FP16/BF16/TF32 throughput.
- 适用场景:本地跑 LLM 推理或 Stable Diffusion 的开发者/研究者,不想多花几倍钱买专业卡。Use case: developers and researchers running local LLM inference or Stable Diffusion who don't want to pay multiples for professional cards.
- 风险:NVIDIA 未在 EULA 层面明确禁止(灰色地带),驱动更新可能让工具失效;用于生产环境需自行评估合规性。Risk: NVIDIA doesn't explicitly forbid this in the EULA (grey zone); driver updates may break the tool; assess compliance for production use yourself.
- 带走一点:『厂商标称性能』和『硬件实际能力』之间的差距,有时是软件策略而非物理限制——本地 AI 玩家的硬件预算可以据此重新评估。Takeaway: the gap between 'vendor-quoted performance' and 'what the hardware can actually do' is sometimes a software policy, not a physical limit — local AI hobbyists can re-evaluate their hardware budget accordingly.
- 『如果你的网站要没了,现在就备份』:Misty 的个人网页存档指南If Your Favorite Site Is About to Vanish, Back It Up Now: Misty's Personal Web-Archiving Guide
- 起因:作者(网络存档从业者)发现自己常回去看的 teapuppies.com(2004 年起的动画粉丝站)被域名抢注换成博彩广告,而她本可以用工具提前存档——『我没有。』Origin: the author (a web-archiving practitioner) discovered teapuppies.com (an anime fansite online since 2004) had been squatted and turned into gambling ads, and she could have archived it while it was still up — 'I didn't.'
- 核心信息:『网页存档不是 Internet Archive 才做的事』——ArchiveWeb.page 浏览器扩展(Chrome 安装,点一下开始抓,整站/单页/社交主页都行)+ WACZ 标准格式 + 可嵌入任何博客的 replay viewer。Core message: 'web archiving isn't just something the Internet Archive does' — the ArchiveWeb.page browser extension (install for Chrome, one click to start, works on whole sites / single pages / social profiles) + the WACZ standard format + a replay viewer that embeds into any blog post.
- 技术要点:WARC2/WACZ 是开放标准,一个 .wacz 文件里装了整站;replay viewer 是开源 JS,直接 embed 进任意页面,访客可以在你的博客里点击跳转整个存档站点。Technical point: WARC2/WACZ is an open standard; one .wacz file holds a whole site; the replay viewer is open-source JS you embed directly, and visitors can click through the entire archived site from inside your blog.
- 分发建议:把 .wacz 发给朋友共同保管——『多份副本让事情更安全』;这是把『存档责任』从『一家机构』分散到『每个在乎的人』。Distribution tip: send the .wacz to friends as co-custodians — 'lots of copies keeps things safe' — this moves 'archiving duty' from 'one institution' to 'every person who cares.'
- 带走一点:喜欢一个网站?现在就点一下备份,不要等它消失——工具已经做到『装个扩展点一下』的程度。Takeaway: like a website? Click back it up now, don't wait for it to vanish — the tooling is now at the 'install an extension and click once' level.