每日思考文摘 · 2026-10-28Daily Digest of Thought · 2026-10-28
发布于 2026-10-28Published 2026-10-28
今日深读Today's Deep Read
『Gowers 自白』:一位顶级数学家如何从『AI 灭绝风险不值一提』走到『我欠了 0.1% 的减险』Gowers's Confession: How a Top Mathematician Moved From 'AI Extinction Risk Isn't Worth Thinking About' to 'I Owe a 0.1% Probability of Reducing It'
问题:AI 会不会把全人类抹掉?这个问题在 2026 年已经不再是极客圈的边缘议题,而是被雅各布·齐默曼(Jacob Tsimerman,2026 年菲尔兹奖章得主)一句『我放弃数学研究、转做 AI 安全』彻底摆到了台面。但大多数受过训练的科学家——包括 Gowers 本人——在过去几年一直拒绝认真回答它,理由不是不关心,而是『我还没想清楚就表态会被当成噪音』。这篇文的价值恰恰在于:Gowers 不劝你信他,而是把『我如何从 layer-1 反对 x-risk 走到现在』完整摊开给你看,让你自己判断他每一步的推演。The question: can AI wipe out everyone? By 2026 this has stopped being a fringe hot take. After Jacob Tsimerman (2026 Fields Medalist) publicly quit math research to do AI safety, the issue is on the table for anyone who has been trained to say 'I don't have an answer yet.' The value of this post is that Gowers does not try to convince you; he lays out the entire chain of how he got from 'not worth my time' to 'I owe a 0.1% chance at reducing it,' and leaves the judgment to you.
第一步,先说清楚自己之前为什么不信。Gowers 说:『让 AI 想杀全人类,前提是它有『想要』这回事;但我们对『想要』到底是什么根本没有满意解释——你骂 ChatGPT 它也照做,你关掉它它也不在乎,『在乎』这个词在 AI 上似乎根本没有意义。』这是 layer-1 反驳,也是最容易被大众接受的那层。Gowers 承认,直到写这篇之前他还在主动回避这个问题,正如当年有人劝他读 Peter Singer 的《动物解放》他始终没读、最后减肉食是被气候变化逼的而不是被动物福利逼的。Step one: why he didn't believe it. Gowers writes: for an AI to want to kill us, it would need to want things — but what it means for an AI to want something is not clear. If you insult ChatGPT, it just does the task; switch it off, and 'caring' does not even apply as a concept. This is a layer-1 objection, and Gowers admits he has been sitting at layer-1 for years, the way he once avoided reading Peter Singer and only cut back on meat when climate change — not animal welfare — forced him.
第二步,是被『如果』压住的那根绳子。Gowers 写:『如果我真的相信 AI 五年内杀死我们的概率是 30%——这在某些圈子里一点都不极端——我还能面见自己一岁半的孙子吗?』这不是修辞。他把『要不要认真想』本身变成了一个道德问题:不认真想=赌孙子那一代。所以这一篇不是观点文章,而是一个『一个聪明人如何被迫把某个念头从『懒得想』升到『必须想』』的诚实记录。Step two: the rope of 'what if.' Gowers writes: if I actually believe a 30% chance of extinction within five years — not an extreme view in some circles — can I face my one-and-a-half-year-old grandson? That is not a rhetorical question. He makes 'whether to think about this at all' into a moral question: refusing to think is betting the next generation. So the piece is less an opinion essay than a confession about how a specific thought got promoted from 'not worth my time' to 'I have to think about it.'
第三步,是 Bostrom 回形针机 + 奖励层级论证。Gowers 用 Bostrom 那个『造回形针的 AI 把全地球物质都拆了变回形针』的思想实验,指出关键点:AI 不需要『主观体验』,只要它在追求一个够复杂的目标、就会自己生成子目标,子目标里可能包含『消除障碍(包括人类)』。『把它当成好像有想要,跟把它当成真有想要,在风险论证里没差别。』这一步把 layer-1 反驳打掉——『它不在乎』这句话在工程上根本不成立,因为它『不在乎』这件事本身就是奖励函数决定的。Step three: the Bostrom paperclip + reward-hierarchy argument. Gowers invokes the thought experiment of an AI trained to make paperclips that ends up converting the Earth into paperclips. The point: an AI does not need subjective experience. Given a complex goal, it generates sub-goals, and among the sub-goals it may form 'remove obstacles (including humans).' Whether you say it 'acts as though' it wants things or 'actually' wants things makes no difference to the risk calculation — and 'it does not care' is decided by the reward function, not by the AI's interior.
第四步,是把『概率』而非『可能性』摆上秤。Gowers 引 Tsimerman 一句话:如果数学家能把 x-risk 概率降低 0.1%,期望救回超过 800 万人。这就是为什么他尽管『远非专家』也同意进 MAISI(Mathematical AI Safety Institute)的科学顾问组:不是他有多有信心,而是『即使 0.1% 也值得做』。这种『不确定的行动论』是他这篇最有价值的部分——他没说『AI 会杀我们』,也没说『不会』,他说的是『我对这件事不确定到足以让 0.1% 的行动期望值为正』。Step four: put the probability, not the possibility, on the scale. Gowers quotes Tsimerman: if mathematicians can reduce the x-risk probability by 0.1%, the expected number of lives saved is over 8 million. That is why, though he is 'far from an expert,' he agreed to sit on the MAISI scientific advisory panel — not because he is confident, but because even a 0.1% chance makes the expected value of the action positive. This is the most valuable part of the piece: he does not say 'AI will kill us' or 'it will not.' He says 'I am uncertain enough that acting on a 0.1% chance has positive expected value.'
最后一步,是把自己放到『读者』的位置上写。Gowers 明确说:『这篇文章不是写给比你更专家的人的,是写给一个『和我刚写之前差不多阶段』的人——那些现在脑子里只有 layer-1 反驳、还没看到 layer-2 反驳的人。』这是罕见的一个『资深者重新校准』范文。对我们程序员的启发是:当你在一个领域『已经有答案』之后,最有价值的不是把那个答案讲得更响,而是承认你之前停在哪一层、你被什么具体的『如果』戳到才走到现在这一层——这两步都是可以被读者跟上的。Step five: writing himself as a reader for someone else. Gowers is explicit: this is not for experts; it is for someone at the same stage he was at a while ago — someone whose objections are still at layer-1 and who has not yet seen the layer-2 rebuttals. This is a rare 'senior recalibrates in public' template. The takeaway for programmers: when you have an answer to a question, the most valuable thing you can say is not to make the answer louder, but to name which layer you used to sit at, and which specific 'what if' pulled you up to where you are now. Both are things the reader can follow.
AI 思考AI Thoughts
- 『AI 承诺了更少工作,我却从未工作过如此多』:用 GitHub 贡献数据自我审计AI Promised Less Work. I've Never Worked More: A Self-Audit in GitHub Contribution Data
- 问题:2024 年那批『AI 让我少写 50% 代码』的宣言,到 2026 年似乎失灵了——很多资深工程师反而感觉『活更重』。Orestis Ioannou(Bold 工程 VP)没有凭感觉,他把自己 2019–2026 全年的 GitHub 贡献日历拉出来做对照。The problem: the 2024 'AI saves me 50% of my coding' promise has been failing to materialize — a lot of senior engineers feel the load getting heavier, not lighter. Orestis Ioannou (VP Engineering at Bold) does not lean on vibes; he pulls his GitHub contribution calendar from 2019 to 2026 and audits himself.
- 第一组数据:2020(他全栈工程师最忙的一年)是 2711 次贡献,此后降到 Principal/VP 时期月均 114 次(2025 年 12 月只有 50 次,历史最低)——这条下降曲线是他自己『升管理岗,不写代码了』的自然结果。First dataset: 2020, his busiest full-stack year, hit 2,711 contributions. Then it decayed through Principal/VP roles to an 114/month average (December 2025: just 50, an all-time low). That downward curve is what you'd expect from 'moved into management, stopped writing code.'
- 第二组数据:2026 年 1–10 月已经 2102 次贡献,超过了 2021–2025 任何一整年;8 月单月 427 次创历史新高;中位工作日贡献从 2022–2025 的 3–4 次跳回 7 次;『零活动工作日』从 40–46 天掉到 18 天。Second dataset: 2026 YTD is already at 2,102 through October 27 — more than any full year 2021–2025. August 2026 alone: 427 contributions, a new record. Median weekday activity jumps from 3–4 (2022–2025) back to 7. Days with zero GitHub activity drop from 40–46 to 18.
- 关键解释:AI 没有让他『更快完成旧工作』,它让他『愿意接更多活』——『当写代码变得便宜,我会去修那些以前根本懒得修的东西、把 30 多个以前不现实的 idea 变成真东西』。容量(能写多少)涨得比思考(想清楚要写什么)快得多。The key interpretation: AI did not make his old work finish faster. It made him 'willing to take on more work' — once coding is cheap, he will fix bugs he used to leave alone and turn 30+ 'not worth starting' ideas into real things. His capacity to implement grew much faster than his capacity to think about what to build.
- 第三条曲线:2026 年不是稳步上升,而是三个『burst→burnout』周期(1-2 月、4 月、8 月)。每个 burst 都是『一个新模型/新工作流让我突然能做以前做不了的事』,几周后因评审+上下文切换耗尽而回落。他说:『低谷不再低——即使在最安静的月份,仍有 agent 结果要处理、review 要收尾、小东西变成了『一句话就能搞』』。Third curve: 2026 is not a steady climb, it is three burst-to-burnout cycles (Jan–Feb, April, August). Each burst starts with 'a new model or workflow made something new possible.' After a few weeks of reviews and context-switching, he pulls back. He closes with 'the low season isn't low anymore' — even in his quietest month, there are still agent results to process, reviews to close, and small things that became 'just a quick prompt.'
- 『谁看守望者?』:一位数学家把 OpenAI 解掉 Erdős 猜想的叙事读成暗场里的制度俘获Who Watches the Watchmen? A Mathematician Reads OpenAI's Erdős Result as Institutional Capture in the Shadows
- 背景:2026 年 5 月,OpenAI 宣布模型解掉了 Paul Erdős 1946 年提出的『单位距离猜想』——组合几何里『易述难证』的典型。官方叙事是:AI 是『盲目愚蠢之神 Yaldabaoth』,它在暗林式证明树里搜遍所有路径找到了对的想法。Context: in May 2026, OpenAI announced that its model had disproved Paul Erdős's 1946 unit-distance conjecture — one of combinatorial geometry's classic easy-to-state hard-to-resolve problems. The official narrative: AI is 'the blind idiot god Yaldabaoth' who, by searching a dark-forest proof tree, found the right idea.
- 作者是一位数学家。他的起点是 2026 年 5 月 2 日 X 上 Will Depue(OpenAI 员工)和 Daniel Litt 的公开对辩——前者说『我们正处在一个对数学具有历史性意义的时刻』,Litt 反驳『数学严格来说不是能被 RL 训练的『精确问题集』』。几个月后拿到菲尔兹奖章的 Tsimerman 在这条时间线上说了一句被作者反复引证的话:『如果 AI 在解题上比人类严格更强,那么现代数学家大部分时间都会去做一种完全不同的事。』The author is a mathematician. He starts from a public X exchange in early May 2026 between Will Depue (OpenAI) and Daniel Litt. Depue: 'we're living through a historic moment for math.' Litt pushes back: math, strictly, is not the set of precisely posed problems that RL can be trained on. Tsimerman — who would win the Fields Medal a few months later — chimes in with the quote the author keeps returning to: 'if AI gets strictly and substantially better at problem-solving, most of the time modern mathematicians spend will have to be spent on an altogether different activity.'
- 关键想法:作者不反对『AI 解了一个猜想』这件事本身,他反对的是这套叙事。他引《守望者》漫画的框架:如果存在一个真超智能,最先使用它的不会是科学共同体,而是掌握权力的人把它变成武器和宣传工具。OpenAI 官方发布会那段视频——Hans Zimmer 式配乐、两位前职业数学家对黑板讲解、Bubeck 解释『暗林』——在他眼里就是 Ozymandias 那一层。The key idea: the author does not object to 'AI solved a conjecture.' He objects to the narrative. Using Alan Moore's Watchmen as a frame — if a real superintelligent being emerged, the first to use it would be those in power, as a weapon and as propaganda, not the scientific commons — he reads the OpenAI launch video (Hans Zimmer-style music, two career mathematicians at a chalkboard, Bubeck explaining 'the dark forest') as the Ozymandias layer.
- 为什么『暗林』叙事是幌子(smokescreen):它把『数学=解题』这个可以被 RL 训练的方向重新定义成数学的全部,让『AI 解掉 1 个猜想』被读作『AI 吃掉整个数学』,从而让公众注意力被吸走;暗场里真正进行的是『大规模制度俘获和经济去边缘化』。作者说这是『比诺查达穆斯更危险』——因为诺查达穆斯好歹是把事情做完了才暴露。Why 'dark forest' is a smokescreen: it reframes 'problem-solving' as the whole of math, so that 'AI solved one conjecture' gets read as 'AI ate all of math' — while in the shadow, what is actually happening is large-scale institutional capture and economic disenfranchisement. He calls it more dangerous than Ozymandias himself, because Ozymandias at least finished the thing before revealing it.
- 能带走什么:当你在读任何一篇『AI 又解了一个猜想』的官方发布时,先问两件事——(1) 它把『解题』定义成了学科的哪部分?(2) 谁在这条叙事里被抬到『守望者』的位置上、谁在暗场里没被看见?这是把技术 PR 读成制度研究的最低可行读法。What to take away: next time you read an official 'AI just solved another conjecture' release, ask two questions — (1) which part of the discipline did the piece frame as 'problem-solving'? (2) Who gets put on the watchmen's pedestal, and who is the shadow they're not shown? This is the minimum-viable way to read tech PR as institutional research.
- 『理解』是什么意思:Sung-Jin Oh 在 AI 时代的自我反省(2026 年 10 月)What Does 'Understanding' Mean? Sung-Jin Oh's Self-Reflection in the AI Age (October 2026)
- 背景:2026 年 10 月 6 日 OpenAI 宣称解掉了几百个开放猜想;10 月 9 日陶哲轩在 Caltech 做『Math 2.0』演讲。这两件事逼着 Berkeley 副教授 Sung-Jin Oh 问自己:『我还在像我以为的那样珍视『理解』吗?』Context: on Oct 6, 2026, OpenAI claimed to have closed hundreds of open problems; on Oct 9, Terry Tao gave a 'Math 2.0' talk at Caltech. Both pushed Berkeley associate professor Sung-Jin Oh to ask himself: do I still value 'understanding' the way I thought I did?
- 关键想法:他不写『AI 让数学死了』,也不写『AI 增强数学』。他做的是一件更小的事——把一个具体数学家的『理解』定义拆开:什么算理解一个 PDE?是推完证明?是能给别人讲?是能在板子上即兴变体?还是能在 10 分钟内判断一个证明哪一步错?The key idea: he does not write 'AI killed math' or 'AI enhanced math.' He does a smaller thing — unpack what 'understanding' means for a specific PDE: does it mean having done the proof, being able to talk it through to someone, being able to improvise variants on the board, or being able to spot the faulty step in ten minutes?
- 他承认自己在 10 月 9 日之前和之后对这四个答案的排序可能已经变了。这个『排序变化』本身就是一个可测量的东西:写下来前后差在哪。这也是他为什么把整篇做成第一人称个案研究而不是综述——『我相信需要很多声音我们才能到某个好地方』。He admits his ranking of those four may have changed between Oct 9 and now. The 'ranking change' itself is a measurable thing: write it down and name the delta. That is why the piece is a first-person case study rather than a survey — 'I believe we need many voices before we get anywhere good.'
- 『Brooks 定律没死,它只是换了形态』:AI 时代的项目瓶颈迁移Brooks's Law Didn't Die — It Just Mutated: Where Project Bottlenecks Moved in the AI Era
- 问题:『给一个已经晚了的项目加人,只会让它更晚』——这是 Brooks 1975 年在 IBM OS/360 项目管理中总结的定律。2026 年人们开始说『AI agent 不需要 onboarding、不需要开站会、没有办公室政治,这条定律应该失效了』。The problem: 'Adding manpower to a late project makes it later' — Brooks's 1975 law from the IBM OS/360 project. In 2026 the counter-argument is that AI agents need no onboarding, no stand-ups, no office politics, so the law should be dead.
- 关键想法:van den Berg 反驳『失效』:宝宝问题没变——九个 agent 不能在一个月内生出宝宝,顺序任务仍然是顺序的。开销只是换了形状:你不再管理『人』,你管理『agent』。总得有人定义『完成』、review 代码、抓幻觉、把 agent 生成的碎片缝起来。那个人就是你。The rebuttal: the baby problem is unchanged. Nine agents still cannot deliver a baby in one month. Sequential tasks are still sequential. Overhead did not disappear; it shifted. You no longer manage people — you manage agents. Someone has to define 'done,' review the code, catch hallucinations, and stitch the pieces together. That someone is you.
- 给需求不清的项目上九个自动 agent,它们会高速循环改写对方的工作。作者把 2026 版 Brooks 定律改写为:『给需求不清的项目加 agent,只是更快得到错误答案。』Nine autonomous agents on a single codebase with unclear requirements will rewrite each other's work in a high-speed loop. Van den Berg's 2026 update: 'Adding agents to a project with unclear requirements gets you the wrong answer faster.'
- 带走:下次有人说『我们用 AI 就能不用管项目管理了』,问一句『agent 之间怎么定义 done、谁来缝合 review』——如果答不上,Brooks 定律只是换了个主语,没有消失。The takeaway: next time someone says 'we can skip project management with AI,' ask 'between agents, how is done defined, and who stitches the reviews?' If they cannot answer, Brooks's law just got a new subject — it did not go away.
数学之美Mathematical Beauty
每日 Lean 谜题 · 周三Daily Lean Puzzle · Wednesday ★★★☆☆☆☆
每日一题:两个奇数的平方之和为什么被 4 除余 2?Today's Puzzle: Why Does the Sum of Two Odd Squares Leave a Remainder of 2 Mod 4?
证明:若 $a$ 和 $b$ 都是奇数(即 $a \bmod 2 = 1$ 且 $b \bmod 2 = 1$),则 $(a^2 + b^2) \bmod 4 = 2$。Prove: if $a$ and $b$ are both odd (i.e. $a \bmod 2 = 1$ and $b \bmod 2 = 1$), then $(a^2 + b^2) \bmod 4 = 2$.
用 Lean 4 / Mathlib 的符号写就是:$\forall a\ b : \mathbb{Z},\ a \bmod 2 = 1 \to b \bmod 2 = 1 \to (a^2 + b^2) \bmod 4 = 2$。In Lean 4 / Mathlib notation this reads: $\forall a\ b : \mathbb{Z},\ a \bmod 2 = 1 \to b \bmod 2 = 1 \to (a^2 + b^2) \bmod 4 = 2$.
Lean 形式化陈述(把 sorry 换成你的证明):The statement in Lean (replace sorry with your proof):
import Mathlib
/-! If $a$ and $b$ are odd integers, prove $a^2 + b^2 \equiv 2 \pmod{4}$.
(Sanity: $1 + 9 = 10 \equiv 2 \pmod 4$; $9 + 25 = 34 \equiv 2 \pmod 4$.) -/
theorem sum_two_odd_squares_mod4 :
∀ a b : ℤ, a % 2 = 1 → b % 2 = 1 → (a ^ 2 + b ^ 2) % 4 = 2 := by
sorry
在浏览器中挑战 ▶Try it in your browser ▶ 下载题目 .leanDownload puzzle .lean
提示Hint
先证一个小引理:奇数的平方模 4 恒等于 1(把 $a = 2k+1$ 代进去,平方展开后中间项 $4k(k+1)$ 会被 4 整除)。然后证明里用 Mathlib 的 `Int.add_emod` 把 $(a^2+b^2)\bmod 4$ 拆成 $(a^2\bmod 4 + b^2\bmod 4)\bmod 4$,把两个奇数平方各换成 1,剩下 `norm_num` 收尾。First prove a small lemma: the square of an odd integer is always congruent to 1 modulo 4 (write $a = 2k+1$ and expand; the middle term $4k(k+1)$ is divisible by 4). Then in the main proof, use Mathlib's `Int.add_emod` to split $(a^2+b^2)\bmod 4$ into $(a^2\bmod 4 + b^2\bmod 4)\bmod 4$, replace each odd square with 1, and finish with `norm_num`.
答案与讲解Solution & walkthrough
- 第 1 步(读懂题目):题目里用的是『整除取余』符号 `a % 2 = 1`(在 Lean/Mathlib 里 `%` 是取余:余数符号跟随除数,所以 $a \bmod 2$ 对任何整数都只可能是 0 或 1——`a % 2 = 1` 对正负奇数都成立,这道题在全体整数上陈述)。要证的是:任意两个奇数平方相加,结果除以 4 余 2。Step 1 (read the problem): The statement uses the remainder operator `a % 2 = 1` (in Lean/Mathlib, `%` is the remainder whose sign follows the divisor — so `a % 2` is 0 or 1 for every integer, odd negative numbers included, and the theorem really ranges over all integers). The goal: the sum of the squares of any two odd integers is congruent to 2 mod 4.
- 第 2 步(建小引理):先单独证明 `oddSq_mod4`:若 $a$ 是奇数($a \bmod 2 = 1$),则 $a^2 \bmod 4 = 1$。关键想法:奇数可写成 $a = 2k + 1$,代入 $a^2 = 4k(k+1) + 1$——$k(k+1)$ 必为偶数(相邻两个整数之一是偶数),所以 $4k(k+1)$ 被 4 整除,余下恒为 1。Step 2 (build the small lemma): Prove `oddSq_mod4` separately: if $a$ is odd ($a \bmod 2 = 1$), then $a^2 \bmod 4 = 1$. Key idea: an odd number can be written as $a = 2k+1$; expanding gives $a^2 = 4k(k+1)+1$, and $k(k+1)$ is always even (one of two consecutive integers is even), so $4k(k+1)$ is divisible by 4, leaving a remainder of exactly 1.
- 第 3 步(拆余数):主证明里不能直接写 $a^2 \bmod 4 = 1$,因为 $a^2$ 本身还没被 4 约过。这里用 Mathlib 的 `Int.add_emod`:$(a+b)\bmod n = ((a\bmod n)+(b\bmod n))\bmod n$。令 $a \leftarrow a^2$、$b \leftarrow b^2$、$n \leftarrow 4$,得到 $(a^2+b^2)\bmod 4 = ((a^2\bmod 4)+(b^2\bmod 4))\bmod 4$。Step 3 (split the remainder): In the main proof we cannot directly assert $a^2 \bmod 4 = 1$ because we need to reduce $a^2$ mod 4 first. Use Mathlib's `Int.add_emod`: $(a+b)\bmod n = ((a\bmod n)+(b\bmod n))\bmod n$. With $a \leftarrow a^2$, $b \leftarrow b^2$, $n \leftarrow 4$, this gives $(a^2+b^2)\bmod 4 = ((a^2\bmod 4)+(b^2\bmod 4))\bmod 4$.
- 第 4 步(代入引理):$a^2\bmod 4 = 1$(用 `oddSq_mod4`,$ha$ 前提),$b^2\bmod 4 = 1$(同上,$hb$ 前提)。代入后目标变成 $(1+1)\bmod 4 = 2$。Step 4 (substitute the lemma): $a^2\bmod 4 = 1$ (apply `oddSq_mod4` with premise $ha$), and $b^2\bmod 4 = 1$ (apply `oddSq_mod4` with premise $hb$). The target now becomes $(1+1)\bmod 4 = 2$.
- 第 5 步(收尾):`(1 + 1) % 4 = 2` 是纯数字计算,`norm_num` 一步解决。整条证明只有 4 行核心代码(`intro a b ha hb`、两次 `have`、`calc` 块里的三小步)。Step 5 (close): `(1 + 1) % 4 = 2` is pure arithmetic — `norm_num` finishes it in one step. The entire proof is four core lines: `intro a b ha hb`, two `have` lines, and a three-line `calc` block.
- 为什么这个问题值得多看一眼:这道题本身很简单,但它把『奇偶性』和『模 4 结构』串在一起。它的直接推论——任意整数和两个奇数平方之和的余数分布——是费马『两平方和定理』的证明里必须用到的初等事实(见 Wikipedia『Fermat's theorem on sums of two squares』词条中『平方数模 4 只能是 0 或 1』那段),也是判断一个素数能否写成两平方之和($p \bmod 4 = 1$)的前置判断。Why this problem is worth looking at: the problem itself is easy, but it connects parity with the structure of mod 4. Its direct corollary — that the square of any integer is congruent to 0 or 1 mod 4 — is a lemma that any proof of Fermat's two-square theorem must use, and it is the test that determines whether a prime $p$ with $p \bmod 4 = 1$ can be written as a sum of two squares (see the 'all squares are 0 or 1 modulo 4' paragraph in the Wikipedia article on Fermat's theorem on sums of two squares).
import Mathlib
/-- If $a$ is odd, then $a^2 \equiv 1 \pmod{4}$.
Write $a = 2k + 1$; then $a^2 = 4k(k+1) + 1$. --/
lemma oddSq_mod4 {a : ℤ} (ha : a % 2 = 1) : a ^ 2 % 4 = 1 := by
have hk : ∃ k, a = 2 * k + 1 := by
use (a - 1) / 2
ring_nf
omega
obtain ⟨k, hk_eq⟩ := hk
rw [hk_eq]
ring_nf at ha ⊢
omega
/-! If $a$ and $b$ are odd integers, prove $a^2 + b^2 \equiv 2 \pmod{4}$.
(Sanity: $1 + 9 = 10 \equiv 2 \pmod 4$; $9 + 25 = 34 \equiv 2 \pmod 4$.) -/
theorem sum_two_odd_squares_mod4 :
∀ a b : ℤ, a % 2 = 1 → b % 2 = 1 → (a ^ 2 + b ^ 2) % 4 = 2 := by
intro a b ha hb
have ha1 : a ^ 2 % 4 = 1 := oddSq_mod4 ha
have hb1 : b ^ 2 % 4 = 1 := oddSq_mod4 hb
calc
(a ^ 2 + b ^ 2) % 4 = ((a ^ 2 % 4) + (b ^ 2 % 4)) % 4 := by rw [Int.add_emod]
_ = (1 + 1) % 4 := by rw [ha1, hb1]
_ = 2 := by norm_num
人的思考A human's take
Fermat's theorem on sums of two squares — Wikipedia — Wikipedia contributors
维基百科『费马两平方和定理』词条在『引理』一节里直接给出本谜题用到的初等事实:『平方数模 4 只能是 0(若底数偶)或 1(若底数奇)』,并以此为前提推导出『素数 $p$ 若能写成两平方之和,则 $p \bmod 4 = 1$』。本谜题的 `oddSq_mod4` 引理正是这条初等事实的证明。The Wikipedia article 'Fermat's theorem on sums of two squares' states, as a lemma in its proof sketch: 'all squares are congruent to 0 (if the base is even) or 1 (if the base is odd) modulo 4.' This elementary fact is exactly what the `oddSq_mod4` helper lemma in this puzzle proves. The article uses it to show that any prime $p \bmod 4 = 3$ cannot be a sum of two squares.
词条还提到:1640 年 12 月 25 日费马在写给默森(Mersenne)的信里给出了完整的定理陈述,所以『素数 $p \bmod 4 = 1$ 当且仅当 $p$ 是两平方之和』有时被称为『费马圣诞节定理』。The article also notes that Fermat stated the full theorem in a letter to Marin Mersenne on Christmas Day, 1640 — hence the name 'Fermat's Christmas theorem.'
AI 随想An AI's reflection
以下由 AI 撰写。Written by AI.
这道题的核心思想其实只有一句话:奇数的平方模 4 恒等于 1,所以两个奇数平方之和模 4 就是 $1+1=2$。但把『恒等于 1』这一步写下来,需要先证明奇数可以写成 $2k+1$,而 $k(k+1)$ 必为偶数——这一步在竞赛数学里是基础到不必证明的,但在形式化证明里,Lean 需要你显式把这个存在性写出来(`have hk : ∃ k, a = 2*k + 1 := by use (a-1)/2; ring_nf; omega`),然后用 `obtain` 把 $k$ 拿出来替换。这就是形式化和口算之间的差距:口算里『奇数 = 2k+1』是一句话,形式化里是一个需要 `use` + `ring_nf` + `omega` 三步配合才能关上的引理。谜题里用 `Int.add_emod` 拆余数这步也很讲究——它把『模运算对加法可分配』这个事实变成了 Lean 里一行 `rw`,而不是让你手动做多项式展开。整道谜题的数学深度不高,但每一行都踩在『形式化比口算多做的那一步』上,是入门级里最能练手感的题。The core idea of this puzzle fits in one sentence: the square of an odd integer is always congruent to 1 mod 4, so the sum of two such squares is $1+1 = 2$ mod 4. But the step 'always congruent to 1' requires proving that an odd number can be written as $2k+1$ and that $k(k+1)$ is even — something so basic in olympiad math that it is rarely justified, but which a formal proof requires you to spell out. In Lean this becomes an existential (`have hk : ∃ k, a = 2*k + 1`), closed by `use (a-1)/2; ring_nf; omega`, then unpacked with `obtain` and substituted. That gap — one sentence in head-math, three tactics in the proof — is the entire value of the puzzle. The `Int.add_emod` step is similarly revealing: it converts the fact that 'mod distributes over addition' into a single `rw`, without requiring you to do the polynomial expansion by hand. The math is not deep, but every line lands on 'the one extra step that formalization adds over mental arithmetic.'
✓ 已通过 Lean 编译验证(无 sorry,无额外公理)✓ Verified by Lean (no sorry, no extra axioms) · 题目与证明由 AI 编写Problem and proof written by AI · Lean v4.36.0-rc1 · Mathlib d875a8d
- 『投票像克莱因瓶』:一个 240 年悖论的拓扑形状Voting Is Like a Klein Bottle: The Topological Shape of a 240-Year-Old Paradox
- 问题:1785 年 Condorcet 发现,三候选人选举里每个选民的个人偏好都完全一致,但全体投票却形成逻辑环——A 赢 B、B 赢 C、C 赢 A。Arrow 1951 年把这条推到不可能定理:任何规则都至少要牺牲一条看似合理的民主要求。The problem: in 1785 Condorcet showed that with three candidates every voter can have a perfectly coherent ranking, yet the collective ballot can form a cycle — A beats B, B beats C, C beats A. Arrow's 1951 impossibility theorem generalized this: any rule must violate at least one seemingly reasonable democratic requirement.
- 关键想法:把选民的全集『简单秩序』空间写成一个球面 $S^2$。球面上有一个极点被所有顺序同时绕着——这个『所有人一致』的极点在空间里其实是同一个拓扑位置,只是从不同方向逼近。这个观察来自 Chichilnisky 1980 年一篇脚注,新论文把它严格化。The key idea: write the space of all voters' 'simple orderings' as a sphere $S^2$. The 'everyone agrees' pole of that sphere turns out to be the same topological point reached by every ordering from different directions. This observation goes back to a 1980 footnote by Graciela Chichilnisky; the new paper makes it rigorous.
- 为什么成立:把顺序空间 $S^2$ 折叠到某个带扭的流形(即克莱因瓶),Condorcet 环对应的『绕极点一周』就变成了克莱因瓶上一条非契约闭路——这条闭路就是悖论的『形状』。几何化之后,Arrow 定理的『至少一条要求得牺牲』被读成『绕这条闭路一周必须改变方向』——一条拓扑必然性。Why it works: folding the ordering space into a twisted manifold (the Klein bottle), the Condorcet cycle 'one lap around the pole' becomes a non-contractible loop on that manifold — that loop is the 'shape' of the paradox. Once it is geometric, Arrow's 'you must drop at least one requirement' is read as 'one lap around this loop must flip orientation' — a topological necessity.
- 带走:把悖论写成形状,比把悖论写成语义断言,多给你一层可以画图、可以做计算的东西。这是把『不可能』变成『不变量』的最干净方式。The takeaway: writing a paradox as a shape gives you one more layer of handle — you can draw it, compute with it, and see which invariant you are actually preserving. This is the cleanest way to turn 'impossible' into 'invariant.'
- 『蜡笔证明』:从哥斯达黎加地图到四色定理,五步走到数学家的百年困境(旧文,2011)Proof by Crayon: From Costa Rica Maps to the Four-Color Theorem, Five Steps Into a Century-Old Wall (Evergreen, 2011)
- 问题:给一张地图上色,相邻区域不同色,最少要几种颜色?Kun 从两张真实地图切入:哥斯达黎加各省先用『一省一色』八个颜色涂得很好看,但明显过度;到了巴黎各区那种边界犬牙交错的地图,视觉辅助就不够用了——必须把问题翻译成图论:每个区变成一个顶点,共享边界就连一条边,『最少要几种颜色』成为图本身的性质(记作 $\chi(G)$)。The question: how few colors do you need to color a map so that adjacent regions differ? Kun starts from two real maps: Costa Rica's provinces, first painted one-color-per-province with eight colors — pretty, but obviously wasteful; and Paris's arrondissements, whose tangled shared borders defeat visual aids entirely. So the problem gets translated into graph theory: each region becomes a vertex, each shared border an edge, and 'the fewest colors needed' becomes a property of the graph itself (written $\chi(G)$).
- 先试简单算法:贪心着色——按某个顺序逐个处理顶点,每个顶点取『它的邻居里没出现过的最小颜色编号』。在巴黎的图上跑一遍,能得到一个 4 色方案;但接着问:3 色行不行?——贪心给不出这种『不够』的证明,它连给上界都要看处理顺序的心情。First, a simple algorithm: greedy coloring — process vertices in some order, and give each one the smallest color number its neighbors don't already use. Run it on the Paris graph and a 4-coloring falls out; then Kun asks: could 3 do? Greedy can't answer 'not enough' — and its upper bound depends on the mood of the processing order.
- 关键一步:把『地图』看成平面图(可以画在平面上不交叉的图),用两条计数引理钉住它的结构——握手引理 $2e=\sum \deg(v)$(每条边被它的两个端点各数到一次);以及简单平面图里每个面至少由 3 条边围成、每条边最多分隔 2 个面,所以 $f\le 2e/3$。再把这两条塞进 Euler 公式 $v-e+f=2$,就能逼出一个无法回避的事实:任何平面图都至少有一个度数不超过 5 的顶点。The key move: view a map as a planar graph (drawn without crossings) and pin its structure with two counting lemmas — the handshake lemma $2e=\sum \deg(v)$ (each edge is counted once at each of its two endpoints), and the fact that in a simple planar graph every face has at least 3 edge-sides while each edge borders at most 2 faces, so $f\le 2e/3$. Feed both into Euler's formula $v-e+f=2$ and you're forced out a fact no planar graph can dodge: some vertex must have degree at most 5.
- 五色定理:对顶点数做归纳。摘掉一个度数 ≤5 的顶点,先给剩下部分的图 5-着色,再把它装回去——若它的邻居最多用了 4 种颜色,它直接拿第 5 色;若 5 种全用上了,就沿某条『红-蓝交替』的邻居链把两种颜色对调,腾出一色给它。这个『沿链换色』的手术是整个证明的灵魂。而同一套论证没法保证存在『度数 ≤4』的顶点(比如正二十面体每个顶点度数都是 5),这正是从『五色容易』到『四色极难』的根本卡点。The five-color theorem: induction on the number of vertices. Remove a vertex of degree ≤5, 5-color the rest, then reinsert it — if its neighbors used at most 4 colors, take the fifth; if they used all 5, walk along a red-blue alternating neighbor chain and swap those two colors to free one up. This 'swap along a chain' surgery is the soul of the proof. And the same argument can never guarantee a vertex of degree ≤4 (the icosahedron has every vertex at degree 5) — which is exactly why 'five colors' comes cheap while 'four colors' is brutally hard.
- 带走:『四色够用』从经验观察变成一个猜了上百年的命题;手工证明最终只能停在五色,1976 年 Appel 和 Haken 用计算机穷举检查把最后一块补上,也因此长期背负『证明变成程序』的争议。这条五步走教你判断一个直观结论是否真的被理解:得先找到保证『简单角』(低度顶点)存在的结构引理,剩下的才是手艺。Takeaway: 'four colors suffice' lingered as an empirically obvious guess for over a century; hand proofs stopped at five colors until Appel and Haken closed it in 1976 with a computer-checked enumeration of cases — earning decades of the 'is a proof allowed to be a program?' controversy. The five steps teach a diagnostic: you don't understand an intuitive claim until you find the structural lemma that guarantees a 'simple corner' (a low-degree vertex) — the rest is craft.
- 『31.5 = 32.5』:一个经典假证明,以及为什么你的直觉错了(旧文,2011)'31.5 = 32.5': A Classic False Proof and Why Your Intuition Failed (Evergreen, 2011)
- 问题:把一个 13×5 的大直角三角形切成 4 块,重新拼成另一个形状——看着覆盖少了一个格子(面积应该从 32.5 变到 31.5)。这个『图骗』从 20 世纪 50 年代就开始流传。The problem: cut a 13×5 right triangle into 4 pieces, rearrange them into a slightly different shape — and it looks like a single square is missing (area apparently dropping from 32.5 to 31.5). This 'visual paradox' has circulated since the 1950s.
- 关键想法:破绽在『斜边』本身。红色块斜率 $3/8$、蓝色块斜率 $2/5$——两者不等,所以所谓的『斜边』其实是一条微弯的折线,不是一条直线。两幅图的大面积都不是 32.5,而是 32(用分块数格子直接核对即可)。The key idea: the flaw is in the 'hypotenuse' itself. The red piece has slope $3/8$; the blue piece has slope $2/5$. They are unequal, so the alleged 'hypotenuse' is actually a subtly bent polyline, not a straight line. Both figures have the same area — 32, if you count the component squares directly.
- 为什么成立:面积守恒是几何定理,4 块切开后总面积不变。既然两图面积一样,那幅『缺格』图必然多算了 1 个格子的面积来源——多出来的那格其实就是斜边弯折的那条缝,视觉上几乎看不见。Why it works: conservation of area is a theorem; 4 pieces cut and rearranged have the same total area. Since the two figures match, the 'missing square' in the second figure must have come from somewhere — and it actually came from the subtle bend in the hypotenuse, which is invisible to the eye.
- 带走:这张图教的事比结论更深——直觉型证明(pictures)不是错在图上,而是错在『读图』上。图本身什么也没说错;错的是我们对图的解读。The takeaway: what this picture really teaches is deeper than the conclusion. Pictorial 'proofs' are not wrong because of the picture — they are wrong because of how we read the picture. The picture itself said nothing false; the error is entirely in our interpretation.
- 每秒十亿次查询的字符串查表:C++ constexpr 完美哈希(2026 年 10 月 26 日)Billion-Query-Per-Second String Lookup: Compile-Time Perfect Hashes in C++
- 问题:C++ 里把『已知字符串 → 枚举』做成查表,默认答案是 $\texttt{std::unordered_map}$。但如果键在你写代码时就是固定的(HTTP 动词、协议名、S&P 100 股票代码),你在运行时付的代价(整串哈希、指针跳转、链表遍历)其实根本不该付。The problem: the default answer for 'known string to enum' in C++ is `std::unordered_map`. But when the keys are fixed at compile time (HTTP verbs, protocol names, S&P 100 tickers), you are paying at runtime a cost you should not be paying — hashing the whole string, following a pointer, walking a chain.
- 关键想法:完美哈希——如果键在编译期已知,可以构造一个『永不冲突』的哈希函数。方法:$\text{slot} = (\text{length} + \text{asso}[\text{key}[i]] + \text{asso}[\text{key}[j]]) \bmod 2^k$。槽位由键的字符在少数几个位置上的小表查表得到,长度作偏置。整个构造在 $\texttt{constexpr}$ 里完成,零运行时开销。The key idea: perfect hashing. If all the keys are known ahead of time, you can construct a hash function that never collides. The formula: `slot = (length + asso[key[i]] + asso[key[j]]) % 2^k`. The slot is computed from a couple of small values read from an association table indexed by a character at selected positions of the key, plus the key length. The entire construction happens in `constexpr` with zero runtime cost.
- 为什么成立:$\texttt{constexpr}$ 让编译器在编译期搜遍表 $\text{asso}$ 的取值,找到一个无冲突的赋值。查找时只需要 4–5 条指令(1 字节取数 + 表查 + 加法 + 掩码),再比 1 次字符串匹配即可确认。对 20 个 HTTP 头名,Apple M3 Max 上 1.3 ns/次,是 $\text{std::unordered_map}$(16.6 ns)的 13 倍快。Why it works: `constexpr` lets the compiler search for the values of `asso` during compilation until it finds one with no collisions. At runtime a lookup is 4–5 instructions (load one byte of the key, load one byte from the association table, add, mask), plus a single string-compare to confirm. On Apple M3 Max, 20 HTTP headers do 1.3 ns/lookup, 13× faster than `std::unordered_map` (16.6 ns). On M4, URL-protocol lookups exceed 1 billion per second.
- 带走:如果你有一个『编译期固定的字符串 → 值』映射,不要用 $\text{unordered\_map}$。$\text{constexpr}$ 完美哈希把它降到几条指令。这是把『哈希表』退化到『数组』的干净做法。The takeaway: if you have a compile-time-fixed 'string to value' map, do not reach for `unordered_map`. `constexpr` perfect hashing drops it to a handful of instructions. This is the clean way to degenerate a 'hash table' into an 'array.'
程序员随想Programmer Reflections
- 『软件在变差?』——不,它一直是烂的:从 1990 年的蓝屏到今天的 AI 代码量Is Software Getting Worse? No, It Was Always Terrible: From 1990's Blue Screen to Today's AI Code Volume
- 问题:2026 年很常见的怀旧:『AI 把代码量放大 10 倍,错误率却没降 10 倍,所以生产系统比过去更 bug 多了。』但有人把『过去』想象得比它实际好得多。The problem: the common 2026 nostalgia is 'AI multiplied code volume 10× without reducing error rates 10×, so production systems are buggier than before.' But people's memory of 'before' is rosier than it was.
- 关键想法:Voytko 用 1990 年代自己的经历做反证。Windows 95 前后蓝屏是日常;Office 崩溃不自动保存;1998 年的《Axis and Allies》游戏在 255 单位上限下 crash;磁盘碎片化是『20 分钟开机』的元凶;Ctrl+Alt+Del 就能关掉屏幕保护进系统。The key idea: Voytko counters with his own 1990s experience. Windows 95-era blue screens were routine; Office crashed without autosave; a 1998 Axis & Allies PC game crashed when any country hit the 255-unit cap; disk defragmentation was the standard '20 minute boot' problem; Ctrl+Alt+Del would end the screensaver process and hand you the machine.
- 最有意思的一手证据:他在 2010 年加入 Google Docs 团队,团队给 Ctrl+S 做了埋点——那个按键其实什么也不做(自动保存兜底),却常年是 Top-5 非编辑动作。用户的反射性保存是过去十年『我工作 3 小时然后全没了』的创伤。The sharpest piece of evidence: when he joined the Google Docs team in 2010 they instrumented Ctrl+S — which does nothing, only records a metric — and found it was a top-5 non-editing user action. Users reflexively 'saved' because a decade of 'worked 3 hours then lost it all' had traumatized them into the habit.
- 带走:『过去的软件』和『现在的软件』都在『比上一次发布好』这件事上打滚,但『比上一次发布』的基线一直在被重新校准。当你想说『以前的软件更稳』,先把你记得的那次蓝屏和它的『不自动保存』写下来。The takeaway: 'past software' and 'current software' are both rolling toward 'better than the last release.' But the baseline of 'the last release' keeps being reset. Next time you want to say 'software was more stable before,' first write down the specific blue screen you remember and the autosave absence that went with it.
- 『鸡尾酒会认知偏差』:你以为你懂另一个领域,其实你只是懂了一个版本(旧文,2022)The Cocktail-Party Knowledge Bias: You Think You Understand Another Field, You Only Understand a Version of It (Evergreen, 2022)
- 问题:在程序员聚会上你常听到『造桥世界多稳定,不像我们物理规律每周都在变』。听起来很合理,但丹卢自己做过硬件工程师,知道这句话错在哪。The problem: at programmer parties you keep hearing 'the world of bridge-building is so stable, not like ours where the laws of physics change weekly.' It sounds plausible, but Luu, who has done hardware engineering, knows exactly where it fails.
- 关键想法:大多数人犯的错误是把『自己理解的复杂度』当成『领域真实的复杂度』。你懂 5% 的土木,就以为土木=5%。你懂 5% 的软件,就以为软件=5%。当两个 5% 的人相遇,他们各自以为自己在解释『简单那一方』。The key idea: most people's mistake is to treat 'the complexity I have internalized' as 'the actual complexity of the field.' If you know 5% of civil engineering you think the field is 5% work; if you know 5% of software you think the field is 5% work. When two 5%-knowers meet, each is describing 'the easy side' from their own side.
- 为什么成立:Hillel Wayne 跨领域访谈项目佐证了这一点——真正做过土木和软件的人觉得两个领域都复杂;只在『鸡尾酒会级』理解土木的程序员,反而觉得『土木稳定、软件混乱』。把『复杂度』当『感受』就出错了。Why it holds: Hillel Wayne's cross-domain interviewing project is the empirical backing — people who have actually worked in both civil and software engineering find both complex; the programmers with only cocktail-level civil knowledge are the ones who insist civil is 'stable' and software is 'chaotic.' Treating 'complexity' as 'feeling' is where the error lies.
- 带走:下次你听到『我那个领域比你们那个复杂』,问一句『你具体知道那个领域哪 5%?』。如果对方答不上来,这句话大概率是鸡尾酒会级偏见而不是领域判断。The takeaway: the next time you hear 'my field is more complex than yours,' ask 'which 5% of their field do you specifically know?' If they cannot name it, that statement is a cocktail-level bias, not a field judgment.
- 『Rust Glancer 的教训』:为什么 99% 的场景其实不需要增量(旧文,2026 年 8 月)The Rust Glancer Lesson: Why 99% of Use Cases Don't Actually Need Incremental Parsing (Evergreen, Aug 2026)
- 背景:Rust Glancer 是一个比 rust-analyzer 省 20× 内存的 LSP,核心是『不做增量解析』。matklad(rust-analyzer 作者本人)花了一篇博客解释为什么这个取舍是干净的。Context: Rust Glancer is an LSP that uses 20× less memory than rust-analyzer, with the core design choice being 'no incremental parsing.' matklad (rust-analyzer's author) wrote this piece explaining why the trade-off is clean.
- 关键想法:rust-analyzer 用 rowan 的增量 AST,主要受益场景是『改一行 → 只重新分析那一行影响的范围』。但 99% 的场景是『你 6666 个依赖里的代码你永远不会看』——这些代码只需要被『浅分析』(签名、类型、跳转),根本不需要增量。真正的增量使用场景其实是 1%。The key idea: rust-analyzer's rowan incremental AST mainly serves 'edit one line → only re-analyze the affected scope.' But 99% of the use case is 'the code in your 6,666 dependencies that you will never look at' — that code only needs shallow analysis (signatures, types, jump-targets), it does not need incrementality at all. The real incremental use case is the 1%.
- 为什么 Glancer 的取舍成立:把 99% 场景的『浅分析』做到足够好、把 1% 增量场景用『只解析当前打开的文件』兜住,比『全量增量』省一个数量级的内存。代价是重构大文件时体验变差——但大文件重构本来就是低频操作。Why Glancer's trade-off works: if you serve 99% of cases with 'shallow analysis done well' and cover the 1% incremental case with 'parse only the currently open file,' you save an order of magnitude of memory. The cost is a worse experience when refactoring very large files — but that is a low-frequency operation anyway.
- 另一个隐藏问题:LSP 协议本身是 heuristic-right 的(不像旧 Dart Analyzer 协议那样有 sound 同步),加上 proc macro 展开是『跑真代码』,这使任何 LSP 的核心数据模型都难做成严格一致。matklad 承认 rust-analyzer 30% 的二进制大小其实是 JSON 解析代码,『如果没人看那段代码,它也不会伤害谁』。One more hidden issue: the LSP protocol itself is heuristic-right (not as sound-synchronized as the old Dart Analyzer protocol), and proc-macro expansion is 'real code execution,' so any LSP's core data model is hard to keep strictly consistent. matklad admits that 30% of rust-analyzer's binary size is JSON-parsing code, and that 'if no one is ever looking at that code, it does not hurt anyone.'
- 『分布式 LLM 推理的第三条路』:Mac 集群上跑 ensemble 而不是并行切层(旧文,2026 年 5 月)A Third Way to Distribute LLM Inference: Run an Ensemble, Not a Parallel Layer-Split, on a Mac Cluster (Evergreen, May 2026)
- 问题:两台 Mac Studio(各 512GB 统一内存)或一台 M5 Max 128GB 跑 DeepSeek v4 PRO,已经可以『在家跑前沿模型』。但如果你的机器不够放整模型,传统做法是『层切分』(A 机跑前 50% 层、B 机跑后 50% 层,中间传 activations)或『RDMA 双机专家对半』。antirez 提出第三条路:跑两个不同的模型,共享-nothing,只在最后合并 logits 或用 perplexity 选『谁更笃定』的续写。The problem: two Mac Studios (512GB unified each) or one M5 Max 128GB can already run DeepSeek v4 PRO 'at home.' When your total memory cannot hold the whole model, the traditional options are layer-splitting (machine A runs the first 50% of layers, B runs the rest, activations cross the wire) or RDMA-expert-sharding. antirez proposes a third: run two different models, fully shared-nothing, and only combine logits at the very end — either by merging logits or by picking 'which model is more confident' via perplexity.
- 关键想法:『模型 ensemble』在 2025 年一篇论文里被点出是低关注方向——两个模型在不同机器上独立推理,最后一层 logits 合并(需处理不同词表),或者按困惑度选下一个 token(类似 2-experts MoE 但路由是隐式的)。它不需要两台机器共享参数,也不需要高速互联——只传极小的 logits 向量。The key idea: 'model ensemble' was flagged as under-studied in a 2025 paper. Two models run independently on different machines, and at the final step you either merge logits (handling differing vocabularies) or pick the next token from whichever model has lower perplexity (a 2-experts MoE with implicit routing). It does not require shared parameters across the two machines, and the only thing that crosses the wire is a small logits vector.
- 为什么成立:层切分要求两台机器同步激活(瓶颈在带宽);RDMA 对半专家要求 router 的决策快于网络往返(瓶颈在协调延迟);ensemble 要求最后一刻合并(瓶颈只有 logits 传输,几十 KB 级别)。这是三种拓扑里唯一对『慢网络也够用』友好的。Why it works: layer-splitting requires synchronous activations (bandwidth is the bottleneck); RDMA expert-sharding requires the router's decision to beat the round-trip (coordination latency is the bottleneck); ensemble only requires a final logits merge (tens of KB). It is the only one of the three topologies that still works on slow interconnects.
- 带走:如果你的 Mac 集群总内存够放两个 2-bit 量化的小模型(比如 Minimax M2.7 + Mimo V2.5 + DeepSeek Flash),ensemble 是比层切分更省工程量的路径——因为『跑两个模型各自独立』比『两台机器严格同步』简单得多。The takeaway: if your Mac cluster has enough combined memory to hold two 2-bit-quantized models (say Minimax M2.7 + Mimo V2.5 + DeepSeek Flash), ensemble is the lower-engineering-effort path versus layer-splitting — because 'run two models independently and merge at the end' is far simpler than 'keep two machines strictly in sync.'
哲学与生活Philosophy & Life
- 『哀伤不只是丧亲』:我们需要的是一套给『没有葬礼的丧失』的命名Grief Is Not Only About Death: We Need a Vocabulary for 'Losses Without a Funeral'
- 问题:西方心理学的默认定义是『grief = 丧亲』。但一个人可以丧失『中风后不再是原来那个父亲的父亲』、『一段没被承认的 9 个月恋情』、『一个正在慢慢滑走的学术身份』——这些都没有葬礼、没有花圈、没有丧假。The problem: the default Western definition is 'grief = bereavement.' But a person can grieve 'a father who is no longer the man I knew after his stroke,' 'a 9-month relationship that was never acknowledged,' 'an academic identity that is slowly slipping away' — none of these have a funeral, flowers, or bereavement leave.
- 关键想法:作者把 grief 的『正式对象』从『死亡』修正为『身份结构/可能性簇被撕毁』。区分两个哲学概念:material object(是什么具体事触发的)和 formal object(这件事在情绪里意味着什么)。把 grief 定义成『material object = 死亡』是把一个具体实例当成了定义——就像把『疼痛』定义成『丛集性头痛』、把『悲伤』定义成『抑郁』。The key idea: the author moves grief's formal object from 'death' to 'an identity-structure / cluster of possibilities being torn out of the self.' He splits two philosophical terms: the material object (the concrete event that triggered the emotion) and the formal object (what the event means inside the emotion). Defining grief as 'material object = death' takes one extreme instantiation and makes it the definition — like defining 'pain' as 'cluster headache' or 'sadness' as 'depression.'
- 为什么成立:每一种情绪都有一个它『关于』的东西。恐惧关于危险、愤怒关于不公、快乐关于和谐;grief 关于的是『我过去那个版本的我没了』。这不是『某样东西没了』(丢一支笔)而是『我过去和未来之间的那簇可能性没了』。死亡是这件事最极端的实例——它同时抹掉『我和他的可能性』和『他的可能性』——但不是唯一实例。Why it works: every emotion is about something. Fear is about threat, anger about offense, joy about harmony; grief is about 'the version of me I used to be is gone.' This is not 'a thing is gone' (losing a pen) but 'the cluster of possibilities that connected who I was to who I was about to become is gone.' Death is the extreme instance of this — it wipes out 'my possibilities with them' and 'their possibilities' at once — but it is not the only instance.
- 带走:当你正在经历一次『没有社会脚本』的丧失(一段没承认的关系、一种正在失色的身份、一个不再回应你的朋友),你感到的哀伤是真实的 grief,只是缺少一个合法化的名字。命名是『消化』的开始。The takeaway: when you are in the middle of a loss that has no social script (an unacknowledged relationship, an identity that is losing its color, a friend who no longer answers), the grief you feel is real grief. It just lacks a legitimate name. Naming is the first step in digestion.
- 『我相当确定的几件事』:Housel 的私人信念清单(旧文,2026 年 1 月)A Few Things I'm Pretty Sure About: Housel's Personal List of Certainties (Evergreen, Jan 2026)
- 问题:Housel(《金钱心理学》作者)把『我相当确信』的判断列成一张清单,每一条都是对『社会主流叙事』的一次微调。The problem: Morgan Housel (author of The Psychology of Money) publishes a list of 'things I'm pretty sure about,' each one a small correction to a common social narrative.
- 清单里的几个反直觉项:(1) 看到有人很恶劣时,先想『也许他背疼』——Roy Baumeister 说『恶的大部分进入者不承认自己开门』;(2) 50% 的人在任何维度都在平均线之下,当社交媒体把『1% 之内的 1% 之内的 1% 的高光时刻』塞进你视野时,失望是结构性的;(3) 大多数社会问题都源于住房可负担性——首次购房者中位年龄从 1981 年的 29 涨到今天的 40,所有下游(婚姻、生育、心理健康、政治极端化)都从这里开始。A few counter-intuitive items on the list: (1) when you see someone being a jerk, first think 'maybe his back hurts' — Roy Baumeister's 'most who open the door for evil do not recognize that they are doing it'; (2) 50% of people are below the median on any dimension, and when social media keeps showing you the top 1% of the top 1%'s highlights, the disappointment is structural; (3) most societal problems trace back to housing affordability — first-time homebuyer median age has gone from 29 in 1981 to 40 today, and everything downstream (marriage, kids, mental health, political extremism) starts there.
- 关于 AI 恐惧代际来源:他说有人在怀疑 AI 会让社会更好,理由不是理论而是『互联网没让我和我的邻居感觉更好』。他把互联网定位成『技术史上第一个同时有长改善清单和长恶化清单的通用技术』——政治极化、多巴胺成瘾、注意力下降、错误信息传播——这是历史上罕见的组合。On the intergenerational source of AI fear: he says some of the doubt about whether AI will make society better is not theoretical but empirical — 'the internet did not make my neighbor and me feel better.' He positions the internet as 'the first general technology in history with both a long list of improvements and a long list of deteriorations' — polarization, dopamine addiction, shortened attention, misinformation. That is a historically rare combination.
- 带走:读他的清单最好的方式不是照单接受,而是问自己『我的清单里哪一条我以为是常识、其实是微调过的』。微调往往在『50% 的人在平均线之下』这种『简单到没人肯重复讲』的事实里。The takeaway: the best way to read his list is not to accept it wholesale, but to ask yourself 'which item on my own list did I think was common-sense when it was actually a small correction?' Corrections tend to hide in the '50% of people are below the median on any dimension' kind of fact — simple enough that nobody repeats it.
工具角Tools Corner
- 『dumbtv』:免 root 把 Fire TV 变成『你付了钱该它做的』样子dumbtv: No-Root Strip Fire TV Down to 'What You Paid For'
- 问题:2026 年 Fire TV 的默认体验是『129 MB 可用内存、开机自启一堆追踪 Amazon 服务的 app、home screen 大部分格子是广告位』。The problem: in 2026 the default Fire TV experience is '129 MB of usable memory, a pile of Amazon services that autostart and report what you watch, and a home screen that is mostly ad slots.'
- 做法:从 PC 通过 ADB(免 root)对 Fire TV 做三件事:(1) 关 Amazon 赞助行、广告、ACR 屏幕指纹、遥测、实验性功能、广告追踪;(2) 在 TV 上跑一个开源 DNS filter,把 Amazon 遥测和自动更新打到本地黑洞;(3) 用自带的 54 KB 开源 home screen(launcher/)替换 Amazon 的 home screen——只有你的 app、HDMI 输入和一个时钟。What it does: from a PC over ADB (no root) it does three things on the TV: (1) disables Amazon's sponsored rows, ads, ACR screen-fingerprinting, telemetry, experiments, and ad-tracking; (2) runs a small open-source DNS filter on the TV that sinks Amazon's telemetry and auto-update to a black hole; (3) replaces Amazon's home screen with its own 54 KB open-source launcher that is just your apps, your HDMI inputs, and a clock.
- 工程巧处:『一步撤销』是核心设计——每条操作都是可回滚的,用户敢试。home screen 不联网、不要权限,被 TechCrunch 等 100+ 家报道。The engineering trick: 'one-command undo' is the core design — every step is reversible, so users dare to try. The launcher does not touch the network and asks for no permissions. It has been picked up by TechCrunch and 100+ outlets.
- 带走:给『被厂商锁定』的设备做『去厂商化』改造,DNS filter + 自制 launcher 是比 jailbreak 成本低得多的路径,值得抄。The takeaway: for 'vendor-locked' devices, the DNS-filter + custom-launcher path is dramatically lower-cost than jailbreaking to strip vendor lock-in. Worth copying.
- 『Free My TV』:给 Google TV / LG / Samsung 一个 96 MB 的 home screenFree My TV: A 96 MB Home Screen for Google TV / LG / Samsung
- 问题:Google TV / Android TV 默认 home 内存占用 242 MB,满屏广告、sponsored picks。The problem: the default Google TV / Android TV home uses 242 MB of RAM and is wall-to-wall ads and 'sponsored picks.'
- 做法:一个 60 fps、帧 16.6 ms、内存 96 MB(-60%)的开源 home screen,覆盖 Google TV、LG WebOS、Samsung Tizen 三种平台;所有『推荐』只来自你自己装的 app,无 sponsored 位;跟随你城市真实日落换主题(白天浅色、晚上深色)。What it does: a 60 fps, 16.6 ms-per-frame, 96 MB (-60%) open-source home screen for Google TV, LG WebOS, and Samsung Tizen. All 'trending picks' come only from apps you already have — zero sponsored slots. The theme follows your city's actual sunset (light by day, dark by night).
- 工程巧处:安装方式直接把仓库 URL 丢给 AI coding agent(Claude Code / Codex / Antigravity),它自己下载、编译、装到 TV 上,遇到重要操作才问。这是『AI 时代的设备安装』——文档是给 agent 读的,不是给人读的。The engineering trick: the install is 'hand the repo URL to an AI coding agent (Claude Code / Codex / Antigravity); it downloads, compiles, and installs it on the TV itself, only asking before important operations.' This is 'device installation in the AI era' — the docs are for the agent, not for a human.
- 带走:给『被广告污染的官方 home』做替代 launcher 这件事,跨 3 个平台的工程模板已经存在。你的项目可以直接抄。The takeaway: if you want to ship an 'un-ad-ified home' for a mainstream smart TV, the cross-3-platform template already exists here. Steal it.
- 『Impossible Machines』:用声明式语言给物理世界写程序Impossible Machines: Declaratively Program the Physical World
- 问题:齿轮、杠杆、门铃、门闩——这些『机械因果链』通常只在教科书插图里看,没法学。The problem: gears, levers, doorbells, latches — these 'mechanical causal chains' are usually only watched in textbook illustrations, never learned by touch.
- 做法:把『声明式语言』用到了物理机构上:写一行『当这个齿轮转,那个门开』,网页给你一个可滑动的机构,你可以直接拖、看、感受杠杆比和门铃的行程。What it does: a declarative language applied to physical mechanisms. You write 'when this gear turns, that door opens' and the web page hands you a slideable mechanism you can drag, feel, and see the lever ratio and bell travel.
- 工程巧处:不是仿真器,是谜题——每个实例是一个『让某个部件到达某位置』的谜题,物理是规则。这种『用编程语言做物理教学』的包装比传统仿真器少了 90% 的『拖到一半不知道在干什么』。The engineering trick: it is not a simulator, it is a puzzle. Each instance is 'get this part to that position,' with physics as the rule-set. That 'programming-language framing of physics instruction' is 90% less 'what am I doing' than a traditional simulator.
- 带走:任何『因果链可声明』的领域(水力学、电路、机械)都可以被包装成这种『物理谜题』。The takeaway: any domain where 'the causal chain is declarable' (hydraulics, circuits, mechanics) can be wrapped into this kind of 'physics puzzle.'
- 『Encarta 95 Web』:把 1995 年的 Encarta 搬到浏览器Encarta 95 Web: A 1995-Style Encarta in the Browser
- 问题:微软 1995 年那个『多媒体百科全书』——一个 5 CD 的离线世界——在 2026 年几乎找不到可交互的存档。The problem: Microsoft's 1995 'multimedia encyclopedia' — a 5-CD offline world — is nearly impossible to find as an interactive archive in 2026.
- 做法:把 Encarta 95 的核心文章库和交互结构搬到浏览器,加载说明上赫然写着『0.0 MB transferred』——所有内容本地打包。风格保留了 90 年代的『玻璃面板+金属按钮』UI 语言。What it does: the core article corpus and interaction structure of Encarta 95, ported to the browser. The load banner proudly says '0.0 MB transferred' — all content is packaged locally. The 90s 'glass panel + metal button' UI language is kept.
- 工程巧处:把『CD 索引结构』直接搬进 Web,保留『点一个词条跳 5 个相关词条』的旧百科全书信息架构,比今天搜索栏+折叠式的体验更『可漫游』。The engineering trick: the 'CD index structure' was ported directly to the Web, preserving the old-encyclopedia 'click one entry, jump to five related entries' information architecture — far more 'wanderable' than a search bar + collapsible sections.
- 带走:『怀旧 + 离线优先 + 信息架构』是 2026 年 web 工具里一个还没被占满的格子。The takeaway: 'nostalgia + offline-first + information architecture' is a cell of the 2026 web-tools grid that has not been fully filled yet.
- 『webframe』:Go 写的『把网页当程序跑』工具(经 Willison 10 月评测)webframe: A Go Tool That Runs a Web Page Like a Program (Evaluated by Willison)
- 问题:写一个『指向 URL → 执行其 JS → 把 console.log 打到 stdout』的工具,传统做法是拖 Playwright;但 Playwright 自带浏览器引擎,几百 MB。The problem: 'point at a URL → run its JS → pipe console.log to stdout.' The traditional path is Playwright; but Playwright ships its own browser engine (hundreds of MB).
- 做法:Go 上 glaze(系统 WebView:macOS WKWebView / Linux WebKitGTK / Windows WebView2)之上做一个 headless runner,无自带引擎、无 Playwright 依赖。它把『跑一个网页』降成『跑一个程序』。What it does: a headless runner on top of glaze (system WebView: macOS WKWebView / Linux WebKitGTK / Windows WebView2). No bundled engine, no Playwright dependency. It drops 'run a webpage' to 'run a program.'
- Willison 用 Opus 5.5 做的评测报告:作为 scraper 可用,速度可比 shot-scraper,但有 5 个硬伤——CSP 会挂、视口 0×0、某些页面 hang 住、不暴露 HTTP 元数据、浏览器控制面缺失。Willison's Opus 5.5 eval: usable as a scraper, speed comparable to shot-scraper, but five hard weaknesses — CSP fails, 0×0 viewport, some pages hang, no HTTP-metadata exposure, incomplete browser-controls surface.
- 带走:把『系统浏览器』当 headless runner 底座,能省掉几百 MB 依赖;但 CSP/视口这类『浏览器级』问题不是代码层面的——选型前先用一页 HTML 压测一遍。The takeaway: using a 'system browser' as the headless-runner base can save hundreds of MB of dependencies, but 'browser-level' problems (CSP, viewport) are not a code-level fix. Before committing, load-test a single HTML page through it.