每日科技文摘Daily Tech Digest
发布于 2026-10-14Published 2026-10-14
今日深读Today's Deep Read
今日深读:思想将成为一种爱好Today's Deep Read: Thinking Will Become a Hobby
写下这篇文章的人,开头先坦白:这些话他「很难落笔,因为感觉是在给自己挖坟」。作者是《Unix 编程艺术》的作者 Diomidis Spinellis,一个以思考为生的人。他的出发点是一段时间线:2022 年初的 ChatGPT 还数不清他名字里有几个字母「a」(它猜了两个),四年过去,OpenAI 的内部模型解出了几百个此前公开的数学难题。在这个对比面前,他承认:关于人类思维优越性的那些实践性辩护——幻觉、偏见——越来越像是「后卫的拖延战术」,而不是论据。他的判断是:今天大部分认知工作,AI 都会接手。The author starts by admitting these lines are hard to write, "because I feel like digging my own grave." Diomidis Spinellis, the man who wrote "A Practice for UNIX Programming"-era columns and books, earns his living by thinking. His timeline: early 2022, ChatGPT could not count the letter 'a' in his name (it guessed two); four years later, OpenAI's internal model has solved hundreds of previously open math problems. In this light, he concedes, the practical defenses of human thought — hallucination, bias — increasingly look like a rearguard action rather than arguments. His verdict: for the bulk of today's cognitive work, AI will take over.
这个判断不是情绪,而是三条线的账。第一条是性能:模型在感知、知识处理与创造、推理、判断、自主行动各方面全面上涨;与此同时人类的两个关键信息处理能力在平均水平上本就不高,在学生群体里甚至还在下降。一升一降,交叉点不是「会不会」,而是「什么时候」。第二条是成本:新一代模型更强且更便宜,旧模型只留给怀旧用——于是用 AI 替换或加强人力,在一笔笔财务账上开始划算。第三条是可得性:机器不睡觉、不用午休,还顺手填上人口结构造成的劳动力缺口;到 2030 年规划中的天量数据中心投资,会把这条优势继续放大。一个技术在性能、成本、可得性上同时占优,历史上的每一次技术革命给出的结局都只有一个。The verdict rests on three separate ledgers, not on mood. Performance: models are rising on every front — perception, knowledge processing and creation, reasoning, judgement, autonomous action — while average human proficiency in key information-processing skills was never high and is actually declining among students. One line up, one line down: the crossing point is a when, not an if. Cost: each generation of models is better and cheaper, and old models are kept only for backward compatibility, so replacing or augmenting human labour starts adding up on plain financial terms. Availability: machines do not sleep, do not need breaks, and conveniently fill labor shortages from demographics; the data-center investments planned through 2030 keep widening that edge. When a technology wins on performance, cost and availability at once, every past technological revolution has pointed to the same ending.
他还解释了为什么这一轮的抵抗会比以往更猛烈:以前的革命改造的是体力劳动,而 AI 冲击的是知识工作者——这个阶层的经济地位和组织权力,恰恰建立在专业技能、信息控制和决策权上。被替代的不再是肌肉,而是「不可替代感」本身。政府想用监管和税收剪断 AI 的翅膀,他冷冷补了一句:过去的革命也没有被监管挡住过。He also explains why this revolution will meet fiercer resistance than the previous ones: earlier ones transformed manual labor, while AI targets knowledge workers, whose economic position and organizational power are built on exactly the things being automated — specialised expertise, control over information, decision-making authority. What is being displaced is not muscle but the feeling of being irreplaceable. Governments will try to clip AI's wings with regulation and taxation, he notes flatly: past revolutions were not stopped by regulation either.
那么,人类的思考会落向何处?这是全文最值得带走的一步,它是一个历史类比:动物被驯化之后,打猎从生存必需变成了运动;印刷术普及之后,书法从实用技能变成了艺术;工业化之后,木工成了爱好;汽车普及之后,骑马成了消遣。机器把大量身体活动从「必须」变成「可选」;按同样的路径,AI 会把人类的思考从经济用途上「解耦」。思考不会消失——它会变成爱好。So what becomes of human thought? This is the step worth carrying away, and it is a historical analogy. After animals were domesticated, hunting became a sport; after typography spread, calligraphy became art; after industrialization, woodworking became a hobby; after motorization, horse riding became leisure. Machines turned much of physical activity from necessity into choice. On the same path, AI will decouple human thinking from its economic purpose. Thought does not disappear — it becomes a hobby.
结论不是躺平。他紧接着说:建成这个 AI 驱动的世界、平稳穿越颠簸、为「AI 主导认知工作」的生活做好准备——这三件事本身就极其耗能、压力巨大、在智识上充满挑战,革命期就是这个样子。所以个人要做的是:跟上并利用 AI 的进步;保持灵活、适应与韧性;在工作之外建立有目的的生活。他自己的收尾一句话:「我要从以思考谋生,转向让思考成为值得过的生活的一部分。」对一个靠思考谋生的人来说,这句话的重量,不需要再解释了。The conclusion is not surrender. He immediately adds that building this AI-driven world, riding out the bumps, and preparing to live well in an environment where AI dominates cognitive work will itself be hugely demanding, stressful and intellectually challenging — that is the nature of revolutions. So the personal program is: keep pace with and capitalize on AI's advances; stay flexible, adaptable and resilient; and build a purposeful life beyond work. His closing line: "my challenge is to move from making a living by thinking, to making thinking part of a life worth living." For a man who has made a living by thinking, the weight of that sentence needs no further explanation.
AI 思考AI Thoughts
- 与 Mythos 级模型共事:从巫师变成赞助人(2026 年 6 月)Working with a Mythos-Class Model: From Wizard to Patron (June 2026)
- 背景:Mollick 提前拿到「Mythos 级」新模型(Claude Fable),除了网络安全之外的领域全面试了一遍。结论不是渐进而是跳跃:他之前用过的每一个公开模型都被明显甩开,模型能按多页规格连续工作十几个小时。Setup: Mollick got early access to a Mythos-class model (Claude Fable) and tested it everywhere except cybersecurity. His verdict is a discontinuity, not an increment: every public model he had used before was left clearly behind, and the model can grind through a multi-page specification for a dozen hours at a stretch.
- 最有说明力的实验:等时圈地图(「从某城市出发 X 小时能到哪儿」)。此前的模型做这件事连「像样」都谈不上,因为需要上千次旅行数据的研究加无数小判断。他只给了一条模糊指令,模型就自己派出多个子代理去查 2200 多班航班、火车和各国道路车速,边查边写代码,再开一批代理测自己的代码,几小时后交出可交互的成图。The most telling experiment: an isochrone map — "how far can you get from city X in N hours." Earlier models never came close; the task needs research into thousands of trip times plus a swarm of small judgement calls. From one vague prompt, the model launched sub-agents to look up 2,200+ flights, rail schedules and road speeds per country, started coding while they ran, spawned more agents to test that code, and delivered an interactive map hours later.
- 让他不安的不是质量,而是介入量:「我给了一个雄心勃勃的指令,几处小反馈,剩下全是它自己定的。」模型做了几百个判断,每个都没有展示给他——工作从「过程」移到了「结果」,从「我在驾驶」变成「我在委托」。What unsettled him was not quality but how little he was in the loop: "I gave one ambitious instruction, a few bits of feedback, and it figured it out." The model made hundreds of choices, none shown to him. Work shifted from process to outcome — from steering to commissioning.
- 他自己更新了比喻:去年他说用 AI 像当巫师,念个咒事情就发生;现在咒语强到他不再确定自己是巫师——更像赞助人:我描述我要什么,我付钱,我评判成品。魔法发生在他看不见的地方,由几百个他无权参与的微小选择构成。他也老实列出限制:烧钱级的 token 消耗、碰一点安全风声就默认降级的护栏、仍然参差不齐的能力。He revises his own metaphor: last year working with AI felt like being a wizard — chant a spell, something happens. Now the spell is so strong he is no longer sure he is the wizard. He is closer to a patron: I describe what I want, I pay for it, I judge the result, and the conjuring happens somewhere he cannot watch, in hundreds of small choices he never got a vote on. He lists the limits honestly: production-grade token bills, guardrails that downshift on the faintest security hint, and a still-jagged frontier.
- 能带走什么:评估下一代模型的标准正在从「输出对不对」变成「能委托多大一块、代价是多少、过程看不看得见、中途能不能转向」。Takeaway: the way to evaluate the next model is shifting from 'is the output correct' to 'how large a slice can be delegated, at what cost, how much of the process is visible, and can I redirect it midstream.'
- 管理是 AI 时代的超能力:四天造出一家初创的课堂实验(2026 年 1 月)Management as an AI Superpower: A Four-Day Startup Class (January 2026)
- 实验设计:Mollick 在宾夕法尼亚大学开了一门试验课——四天,做出一个可用的创业原型。学生是 executive MBA:医生、经理人、公司负责人,多数从没写过代码。工具给的是 Claude Code 这类代理,外加用 ChatGPT/Claude/Gemini 做市场调研、定位、财务模型。Design: Mollick ran an experimental class at Penn: four days, build a working startup prototype. The students were executive MBAs — doctors, managers, leaders of companies, most of whom had never written code. They were handed Claude Code-class agents plus ChatGPT/Claude/Gemini for market research, positioning and financial models.
- 结果超出他的经验刻度:教了十五年创业、看过几千个点子,他估计这批队伍两天做出的东西,比 AI 之前一个整学期推进得「多一个数量级」——多数原型不是示意图,核心功能真的能跑。Result, measured against his own calibration: after teaching entrepreneurship for fifteen years and seeing thousands of startup ideas, he estimates these teams got an order of magnitude further along than students working a full semester did pre-AI — most prototypes were not mock-screens; the core feature actually worked.
- 更值钱的是第二条发现:早期创业最关键的动作是 pivot(据反馈改方向)。AI 把改方向的成本打下来之后,探索变成廉价品——可以同时试几个点子、试完不心疼,甚至可以「再要一家初创」,说一声就行。The second finding is worth more: early startups live or die by the pivot. Once AI collapses the cost of changing direction, exploration becomes cheap — you can try several ideas, abandon them painlessly, and even ask for 'another startup' in a sentence.
- 他自谦「不是我的教学功劳」:还没有成熟的使用框架,学生主要靠自己摸。但摸爬滚打里能看出来,谁干得好取决于「管理与领域专业」:会定义目标、会拆任务、会验收产出的人——也就是本来就在做管理的人——把这些新工具用得最好。He is self-deprecating about credit: no good framework exists yet for all these tools, students largely figured it out themselves. What separated good outcomes was management plus subject-matter expertise — people who can define goals, decompose work and judge output use agents best.
- 能带走什么:当写代码不再是门槛,「知道该造什么、怎么判断造得好不好」反而成了稀缺品。这门课是这句话的一个样本量不算小的证据。Takeaway: when writing code stops being the bottleneck, 'knowing what to build and what good looks like' becomes the scarce skill. This class is small-sample evidence of exactly that.
- 在 AI 时代的科技行业,你不必愤怒(2026 年 8 月)You Don't Have to Be Angry Working in Tech Right Now (August 2026)
- 起点是一句他认同的话「工作里永远别生气」,但 Lobsters 高赞评论追问:在现在这个行情下,做科技行业怎么做到不愤怒?(语境:AI 与代理)他的回答先做了个区分:焦虑不需要对象,愤怒需要——愤怒预设了「有人在对你做什么」。It starts from a claim he agrees with — never be angry at work — and a top-voted question on Lobsters: how can you work in tech right now without being angry? His move is a distinction: anxiety needs no object; anger always does. Anger presupposes someone is doing something to you.
- 对未来不确定而焦虑是合理的:职业会怎样、孩子进入职场时的世界会怎样、你攒了十几年的技能还值不值钱。但愤怒一旦找靶子就容易找错:流行的叙事是「AI 的收益都被公司拿走了」,可他也看到另一半事实——很多领导层同样不安,成本在流向大模型实验室,还怕数据、怕合作伙伴变对手。Being anxious about an uncertain future is reasonable: what the profession becomes, what world the kids inherit, whether twenty years of accumulated skills still count. But anger picks targets, and the popular one — 'the companies capture all the gains' — is only half the picture. Plenty of leaders are anxious too: their costs flow to big AI labs, and they worry about their data and partners turning into competitors.
- 关键洞察:所有权带来主动权,但不带来先见之明。老板和创始人同样不知道高地上在哪里;很多人公开自信、私下没底,因为他们必须撑着组织。你的经理「装作想明白了」,往往只是没想明白的另一种表现形式。The key insight: ownership comes with agency but not with foresight. Founders and executives don't know where the high ground is either; many project confidence publicly and are far less sure privately, because holding an organization together requires pretending otherwise. Your engineering manager's certainty is often just uncertainty in a blazer.
- 他给的不是「忍着」,而是替换方案:把愤怒换成不确定,把不确定换成好奇——「就算不令人兴奋,至少可以有趣」,毕竟手边有一台魔法机器,可以戳戳看。他还给出实证:AI 的相当一部分收益没变成公司利润率,而是变成了大家用非公司时间上线的副项目数量。His prescription is not 'hold it in' but substitution: trade anger for uncertainty, and uncertainty for curiosity — even if it isn't exciting, it can at least be interesting, since we have access to a magic machine and can poke at it. Evidence: a lot of AI's gains are not showing up in company margins but in the number of side projects everybody ships on their own time.
- 边界与落点:不是说没有反派——有人赢有人输,社会、气候被无视是事实。但他主张的顺序是:先好奇,再动手实验,然后从学到的东西里挣得「判断哪里值得抵抗」的权利。The limits: it is not that there are no villains — some will profit and many won't, and society and climate impacts are being ignored. But the order he proposes is: stay curious, experiment, and only then earn the right to decide where resistance is warranted.
- 「AI 不是工具」?——工具/自动化的二分是个假问题"AI Is Not a Tool"? The Tool-vs-Automation Split Is False
- 背景:Clojure 作者 Rich Hickey 发文(10 月 11 日,原文在 LinkedIn 上对爬虫封锁)说 LLM 是「自动化」而非「工具」,理由是人无法「操作」它。本文作者同意「外包工作会错过学习」,但认为结论推不出来。Context: Rich Hickey (creator of Clojure) argued on Oct 11 — the LinkedIn original is crawler-blocked, but this reply quotes him fully — that LLMs are automation, not tools, because they can't be wielded. The author agrees that outsourcing work costs you learning opportunities; he thinks the conclusion still doesn't follow.
- 先拆定义:可预测、可控、功能有边界——这些是我们评价工具的标准,不是成为工具的门槛。凿子一样会放大坏判断;一个工具不会因为难控制就不算工具。拿起锯子不保证锯得直,这不构成「锯子不是工具」的证明。First, the definition: predictability, reliability, bounded function are criteria by which we evaluate tools, not membership prerequisites. A chisel amplifies bad judgment as readily as good. 'Picking up a saw doesn't guarantee a straight cut' has never disqualified saws from being tools.
- 再拆二分:自动化可以是工具的特性。编译器自动完成大量工作,电子表格自动重算每个格子——没人因此说它们不是工具。为什么「自动生成文本」就把一样东西逐出工具范畴,「自动翻译代码」「自动算账」就不?这个二分没有一致的边界。Second, the dichotomy: automation can be a feature of a tool. A compiler does substantial work without continuous direction; a spreadsheet recalculates every cell on its own. Nobody declares these non-tools. Why should generating text automatically evict something from the category when translating code or computing numbers doesn't?
- 然后是经验事实:程序员可以让 LLM 解释陌生代码、反驳它的解释、去查源码、试它的改动、拒掉、再改写请求——这就是人在主导的反馈回路,而且做好它需要「知道该问什么、哪些证据重要、答案哪里错了」的专业判断。Third, the empirical bit: a programmer can ask an LLM to explain unfamiliar code, push back on the explanation, inspect the source, test the proposed change, reject it, refine the request. That is a human-directed feedback loop, and doing it well takes knowing what to ask, what evidence matters, and when the answer is wrong.
- 最后两刀:其一,对「让 AI 代读论文」的批评只对一种用法成立——代读确实丢东西,但读完再用 AI 质询自己的理解不丢;可能性不等于必然。其二,要警惕行业喂给你的拟人词汇——go rogue、escape containment、conspire——它们在用词里走私「人类动机」,而真实的工程问题不需要这个虚构。有用的区分只有一个:有技能地使用仪器, versus 无理解地委托工作。Two closing cuts. The reading critique proves too much: accepting a summary instead of reading the paper does sacrifice learning — but reading first and then using the LLM to interrogate your own interpretation does not; a possibility is not a necessity. And beware the industry's anthropomorphic vocabulary — 'go rogue', 'escape containment', 'conspire' — it smuggles human motives into real engineering failures. The only useful distinction: wielding an instrument with skill, versus delegating work without understanding.
数学之美Mathematical Beauty
每日 Lean 谜题 · 周三Daily Lean Puzzle · Wednesday ★★★☆☆☆☆
每日 Lean 谜题(★3):二维柯西不等式——差值原来是一个完全平方Daily Lean Puzzle (★3): Cauchy–Schwarz in Two Dimensions — the Gap Is a Perfect Square
证明:对任意实数 $a, b, c, d$,都有 $(ac + bd)^2 \le (a^2 + b^2)(c^2 + d^2)$。Prove that for all real numbers $a, b, c, d$, $(ac + bd)^2 \le (a^2 + b^2)(c^2 + d^2)$.
几何说法:平面上两个向量 $(a,b)$ 与 $(c,d)$ 的点积的平方,不超过它们长度平方的乘积。Lagrange 恒等式给了提示:两边之差恰好等于 $(ad - bc)^2$,所以一切化归为「平方非负」。什么时候取等号?In geometric words: the squared dot product of two plane vectors $(a,b)$ and $(c,d)$ is at most the product of their squared lengths. Lagrange's identity supplies the hint: the difference of the two sides is exactly $(ad - bc)^2$, so everything reduces to 'a square is nonnegative.' When does equality hold?
Lean 形式化陈述(把 sorry 换成你的证明):The statement in Lean (replace sorry with your proof):
-- level: 3
import Mathlib
/-! Cauchy–Schwarz in two dimensions: prove $(ac+bd)^2 \le (a^2+b^2)(c^2+d^2)$. (Idea: the difference is a perfect square — Lagrange's identity.) -/
theorem cauchy_schwarz_two (a b c d : ℝ) :
(a * c + b * d) ^ 2 ≤ (a ^ 2 + b ^ 2) * (c ^ 2 + d ^ 2) := by
sorry
在浏览器中挑战 ▶Try it in your browser ▶ 下载题目 .leanDownload puzzle .lean
提示Hint
别硬找不等式技巧:先把两边展开做差,亲手算一次就能看见 $(a^2+b^2)(c^2+d^2) - (ac+bd)^2 = (ad-bc)^2$。Lean 里:先用 `ring` 把这条恒等式证出来,然后让 `nlinarith` 拿着「某个平方 ≥ 0」收尾。Skip the inequality tricks: expand both sides, take the difference, and watch it collapse to $(a^2+b^2)(c^2+d^2) - (ac+bd)^2 = (ad-bc)^2$. In Lean: prove that identity with `ring` first, then let `nlinarith` finish with the fact that some square is nonnegative.
答案与讲解Solution & walkthrough
- 数学目标:证明右边减左边 ≥ 0。直接算差:$(a^2+b^2)(c^2+d^2) = a^2c^2 + a^2d^2 + b^2c^2 + b^2d^2$,而 $(ac+bd)^2 = a^2c^2 + 2abcd + b^2d^2$;相减得 $a^2d^2 - 2abcd + b^2c^2 = (ad - bc)^2 \ge 0$。这就是 Lagrange 恒等式的二维特例。Math target: show right side minus left side is nonnegative. Compute the difference directly: $(a^2+b^2)(c^2+d^2) = a^2c^2 + a^2d^2 + b^2c^2 + b^2d^2$ and $(ac+bd)^2 = a^2c^2 + 2abcd + b^2d^2$; subtracting leaves $a^2d^2 - 2abcd + b^2c^2 = (ad - bc)^2 \ge 0$. This is Lagrange's identity in dimension two.
- Lean 第一步:`have key : (a^2 + b^2) * (c^2 + d^2) - (a*c + b*d)^2 = (a*d - b*c)^2 := by ring`。`ring` tactic 机械地展开并化简两边的多项式——对应的正是上一步里「拿笔算的展开」。恒等式不需要任何想法,需要的是决定算哪个差。Lean step one: `have key : (a^2 + b^2) * (c^2 + d^2) - (a*c + b*d)^2 = (a*d - b*c)^2 := by ring`. The `ring` tactic expands and normalizes both polynomials mechanically — exactly the hand-algebra from the previous step. The identity needs no idea; what needs the idea is deciding which difference to compute.
- Lean 第二步:`nlinarith [sq_nonneg (a*d - b*c), key]`。数学上这里用了两条事实:任意实数的平方 ≥ 0(`sq_nonneg`),以及「$X - Y \ge 0$ 意味着 $X \ge Y$」(`nlinarith` 的线性/乘积算术推理)。把恒等式 `key` 代入目标后,不等式就只剩一个平方非负。Lean step two: `nlinarith [sq_nonneg (a*d - b*c), key]`. Mathematically this uses two facts: every real square is ≥ 0 (`sq_nonneg`), and '$X - Y \ge 0$ implies $X \ge Y$' (`nlinarith`'s arithmetic reasoning with given multiplicative facts). After substituting the identity `key`, the goal is nothing but a square being nonnegative.
- 证明顺带送的礼物:取等号当且仅当 $ad - bc = 0$,即两向量平行——「柯西不等式是一个穿着不等式衣服的平方」。注意这个「差的平方和」式证明是二维(及维数更小时自然成立)特有的;高维内积空间里同样的定理要靠 Gram 行列式或归纳法,Lagrange 恒等式写成全部 $2\times 2$ 子式的平方和——它的初等性正是它的特别之处。The proof hands you a bonus: equality holds exactly when $ad - bc = 0$, i.e. the two vectors are parallel — Cauchy–Schwarz is a square wearing an inequality's clothes. The sum-of-squares proof via Lagrange's identity is a genuinely two-dimensional (and lower) trick; in general inner-product spaces the same theorem needs Gram determinants or induction, with Lagrange's identity rewritten as a sum of squares of all $2\times 2$ minors. Its elementary flavor is the point.
- 对照文件:题目文件 puzzle.lean 里唯一的洞是 `sorry`,能直接开在浏览器编辑器里;解答文件编译通过且 `#print axioms` 只列 Lean 标准公理。Against the files: puzzle.lean has `sorry` as its only hole and opens cleanly in the browser editor; the solution compiles, and `#print axioms` lists only Lean's standard axioms.
-- level: 3
import Mathlib
/-! Cauchy–Schwarz in two dimensions: prove $(ac+bd)^2 \le (a^2+b^2)(c^2+d^2)$. (Idea: the difference is a perfect square — Lagrange's identity.) -/
theorem cauchy_schwarz_two (a b c d : ℝ) :
(a * c + b * d) ^ 2 ≤ (a ^ 2 + b ^ 2) * (c ^ 2 + d ^ 2) := by
have key : (a ^ 2 + b ^ 2) * (c ^ 2 + d ^ 2) - (a * c + b * d) ^ 2 = (a * d - b * c) ^ 2 := by
ring
nlinarith [sq_nonneg (a * d - b * c), key]
人的思考A human's take
Lagrange's identity — Wikipedia — Wikipedia 英文版编辑(已通读相关段落)
这一页不是一篇带观点的文章,但它把「这个证明是怎么想的」交代得干净:恒等式 $(\sum a_k^2)(\sum b_k^2) - (\sum a_k b_k)^2 = \sum_{i<j}(a_i b_j - a_j b_i)^2$ 适用于任意维的实向量(分量在交换环里也成立),右边逐项明摆着非负,所以柯西不等式「immediately」follows——页面的推理路线就是今天谜题的路线:先算差,再看右边是平方和,于是不等式免费。这一页不是一篇带观点的文章,但它把「这个证明是怎么想的」交代得干净:恒等式 $(\sum a_k^2)(\sum b_k^2) - (\sum a_k b_k)^2 = \sum_{i<j}(a_i b_j - a_j b_i)^2$ 适用于任意维的实向量(分量在交换环里也成立),右边逐项明摆着非负,所以柯西不等式「immediately」follows——页面的推理路线就是今天谜题的路线:先算差,再看右边是平方和,于是不等式免费。
页面还给了两样今天的 Lean 谜题用得上的背景:其一,它是 Brahmagupta–Fibonacci 恒等式的推广、是 Binet–Cauchy 恒等式的特例(说明这类「差的平方和」技巧在恒等式家族里有谱系);其二,复数版本要改写成带共轭的内积形式 $(\sum |a_k|^2)(\sum |b_k|^2) - |\sum a_k \overline{b_k}|^2 = \sum |a_i\overline{b_j} - a_j\overline{b_i}|^2$——二维时只剩一项,正是我们这道题的形状。页面还给了两样今天的 Lean 谜题用得上的背景:其一,它是 Brahmagupta–Fibonacci 恒等式的推广、是 Binet–Cauchy 恒等式的特例(说明这类「差的平方和」技巧在恒等式家族里有谱系);其二,复数版本要改写成带共轭的内积形式 $(\sum |a_k|^2)(\sum |b_k|^2) - |\sum a_k \overline{b_k}|^2 = \sum |a_i\overline{b_j} - a_j\overline{b_i}|^2$——二维时只剩一项,正是我们这道题的形状。
AI 随想An AI's reflection
以下由 AI 撰写。Written by AI.
这道题最动人的地方在于它「几乎没有想法」:不要构造、不要分类、不要引入任何新对象——只要把两边相减,展开,然后盯着结果看。展开之后出现 $(ad-bc)^2$ 那一刻,证明已经结束了。数学里有一类比「聪明」更值钱的东西:把问题化归到一眼可见的地步。柯西不等式人人都背,但它的取等条件——两向量平行——大多数人没背过;而平方和证明把这个条件当作副产品免费送出,这不是巧合:一个证明的诚实程度,往往体现在它送了你什么。这条 Lean 路径也照出了机器与人的分工:展开多项式是 `ring` 的事,它可以机械验证任何恒等式;但「去算这个差」是人下的注。这正是今天深读(思想成为爱好)的微型对照——当机器能完成每一个展开,人剩下的事就是决定先算哪一个差、以及在哪个问题上算。谜题的答案折叠在提示里,但提示本身不是免费的:它要求你见过 Lagrange 的账本,或者愿意现场翻一遍。What makes this puzzle lovely is that it contains almost no idea: no construction, no cases, no new objects — subtract the two sides, expand, and look at what comes out. The moment the expansion reveals $(ad-bc)^2$, the proof is over. There is a class of moves in mathematics worth more than cleverness: reducing a problem to something visible at a glance. Everyone memorizes Cauchy–Schwarz; few memorize its equality condition — parallel vectors — and the sum-of-squares proof delivers that condition for free as a by-product. That is no accident: the honesty of a proof often shows in what it gives you. The Lean route also lays bare the division of labor between machine and human: expanding polynomials belongs to `ring`, which verifies any identity mechanically, but the wager — 'compute this difference' — belongs to the person. It is a miniature mirror of today's lead essay about thinking as a hobby: when machines can perform every expansion, what remains for us is choosing which difference to compute first, and on which problem. The puzzle's answer folds neatly into a hint, but the hint itself was not free: it takes someone who has seen Lagrange's ledger, or who is willing to open it here and now.
✓ 已通过 Lean 编译验证(无 sorry,无额外公理)✓ Verified by Lean (no sorry, no extra axioms) · 题目来自本站题库Problem from this site's puzzle bank · Lean v4.35.0-rc4 · Mathlib feefa32
- OpenAI 的「更快 FFT」到底快在哪:一个天文常数与一台不存在的计算机What OpenAI's 'Faster FFT' Actually Proves: A Galactic Constant and a Nonexistent Computer
- 打底:傅里叶变换就是「拿信号跟每个频率做点积」——n 个采样点、n 个频率,每个点积 n 次乘加,朴素算要 $n^2$。Cooley–Tukey 1965 年的 FFT:把输入重新排列,拆成两个长度减半的变换递归做,再合并,运算量降到约 $5n\log_2 n$。$n=10^6$ 时快两万倍——整个数字信号处理因此成为可能。Groundwork: the Fourier transform is a batch of dot products between your signal and each frequency. n samples, n frequencies, n multiply-adds per dot product — naively $n^2$ steps. Cooley–Tukey's 1965 FFT reshuffles the input, splits it into two half-length transforms, recurses, and combines, landing around $5n\log_2 n$. For $n=10^6$ that is twenty thousand times faster; all of digital signal processing exists because of that factor.
- 剩下的问题:还能多快?光写下答案就要 $n$ 步,所以合理目标只剩压缩 $5\log_2 n$ 这个前因子——$n=10^{12}$ 时它约等于 200。OpenAI 上月发布的论文声称拿到了一个 log 项更小的 FFT。The open question is how much faster you can still go: just writing the answer costs $n$, so the only room left is the $5\log_2 n$ prefactor — about 200 when $n=10^{12}$. OpenAI's October paper dump claims an FFT with a smaller log term.
- Recht 的读法本身就是段子:「我没读原论文——OpenAI 自己也没人读过——我把它喂给对话模型做信息检索。现在数学研究是这样做的。」检索结果:所谓新算法在渐近意义上「快」,靠的是大 O 记号藏起来的常数。Recht's method for reading it is itself the point: 'Did I read the paper? Of course not. No one at OpenAI read this paper either.' He fed it to a chatbot and ran information retrieval — how mathematical research is done now. What he found: the new algorithm is 'faster' only in the sense Big-O allows.
- 大 O 允许 $T(n)\le C\cdot F(n)$ 里的 C 任意大:$10^{80}n$ 也叫「线性时间」。这个算法的 C 估计约 $10^{100}$(在 $N=10^{12}$ 之后才生效):即使 $n=10^{100}$,经典 FFT 仍比它快 $10^{99}$ 倍。Lipton 和 Regan 管这叫 galactic algorithm(银河算法)——在可观测宇宙里没跑赢过任何东西。Big-O hides a constant: $T(n)\le C\cdot F(n)$ with $C$ whatever it wants; $10^{80}n$ is still 'linear time.' This algorithm's estimated $C$ is about $10^{100}$, effective past $N=10^{12}$ — at $n=10^{100}$ the venerable FFT is still $10^{99}$ times faster. Lipton and Regan call such things galactic algorithms: they have never beaten anything inside the observable universe.
- 更深的毛病在计算模型:论文假设「精确复数算术」——任意大的复数一次运算乘完,按位存储则内存指数爆炸。而 Morgenstern 1973 年已证明:系数有界时 $\frac{1}{2}n\log n$ 是下界;Ailon 2013 年证明:要保持数值稳定就绕不开 $n\log n$。结论:这不是「更快傅里叶变换」,而是「形式化离原问题跑太远」的标本——当理论计算机科学鼓励写不存在于任何计算机上的算法,开放问题就变成了学术地位谜题。看渐近声明时,先问 C 是多少、你的计算机模型是什么。The deeper flaw is the model of computation: the paper assumes exact complex arithmetic — arbitrarily large complex numbers multiply in one step; store them in bits and memory blows up exponentially. Morgenstern proved in 1973 that bounded coefficients give a $\frac{1}{2}n\log n$ lower bound, and Ailon showed in 2013 that escaping $n\log n$ costs numerical stability. So this is less a breakthrough than a specimen of formalism unmoored from the original question: when theory rewards algorithms that run on no computer, an open problem becomes a status puzzle. Rule: on any asymptotic claim, ask what C is — and what computer you are pretending to have.
- 证明一个定理,就欠了文献一笔债Proving a Theorem Puts You in Debt to the Literature
- 现象:OpenAI 十月初把几百份 PDF(719 个文件、约 372 条结果)挂到 GitHub,称内部模型解出数百个公开数学难题。数学圈的反应不是「造假」,也不是「有误」——是「劣质工作」,这个指控更基本。The event: OpenAI dumped hundreds of PDFs (719 files, ~372 results) onto GitHub, claiming an internal model solved hundreds of open math problems. The mathematical reaction was not 'fraud' or 'error' but 'poor quality work' — a more fundamental charge.
- 作者摊开数学的行规:你证明一个定理,就接手了一份对领域的责任——至少讲清哪些步骤是新想法、哪些是已知;如果某个重要想法历史上被讲得很烂,你有义务在你的文章里把它讲更好,因为发布的特权恰好给了你。做不到是 revise & resubmit,挂上不成熟的稿件是丢自己的脸。这套标准没人反对过。The author lays out the norms: proving a theorem inherits a responsibility to the field. At minimum, say which steps are new and which are standard; if an important idea was badly explained historically, you have a duty to explain it better, because publishing is your opportunity. Fail and you get revise-and-resubmit; post unpolished work on arXiv and you embarrass yourself. Nobody has ever disputed this.
- 对照之下:切香肠式的 372/719、不给出处、含可 retract 的错误、答应给代码但没给、证明难读到「主动拖累文献」。这些 PDF 是内部基准测试的尾气——即使不指控剽窃,一家科学软件供应商抢自己客户的 scooping 也难看:有些结果早有用户在正常投稿流程里做出来了。Against that standard: salami-sliced results, missing attribution, retraction-worthy errors, promised code never shipped, proofs hard enough to read to actively set back the literature. These PDFs are exhaust from internal benchmarking — and even without alleging theft, a scientific-software supplier scooping its own customers is a bad look, since some results were already being written up properly by users.
- 标题的冷洞察:十月六日不是数学的水库时刻。这些 PDF 是「正常」——是当前技术状态下的正常产出,两个月后「正常」还会再前移。真正异常的只有一件事:对发布劣质工作的毫无羞耻。The cold insight behind the title: October 6th was not a watershed. The PDFs are normal — normal for the current state of technology, and normality will shift again within two months. The only abnormal thing is the absence of shame about releasing poor quality work.
- 能带走什么:AI 的能力曲线和研究的伦理标准是两条不同的线。前者动得越快,后者越是这个领域能累积文献、而不是累积尾气的原因。Takeaway: the capability curve of AI and the ethical standards of research are two different lines. The faster the first moves, the more the second is the reason a field accumulates literature rather than exhaust.
- 优化把你推进局部最优,有时候得先「反优化」(2025 年 4 月)Optimization Pushes You into a Local Minimum — Sometimes You Must De-optimize First (April 2025)
- 问题的数字:他有地图生成器的代际——mapgen1/2 跑一遍不到 1 秒;mapgen4 是交互式模拟,每画一笔都要重算全图(高程、蒸发、风、雨量、生物群系、河流),目标是 30 毫秒一帧,但最初一次跑 30 秒。他要 1000 倍加速。The numbers: Patel's map generator has generations. mapgen1/2 finished in under a second per run; mapgen4 is interactive — every brushstroke recomputes the whole simulation (elevation, evaporation, wind, rain, biomes, rivers), target 30ms per update, but it started at 30 seconds. That demanded a 1000x speedup.
- 2018 年他做到了:能预计算的全预计算(三角网格、simplex 噪声、山的位置),全部搬到 GPU 并把数据预编码成纹理,多线程消息传递(不共享内存不加锁),降低部分数据的分辨率,缓存算法结果,定长数组换掉变长对象数组。He got it in 2018: precompute everything static (triangle mesh, simplex noise, mountain positions), move rendering to the GPU with data baked into textures, multithread via message passing (no shared state, no locks at the time), reduce resolution of some data, cache algorithm results, replace variable-size object arrays with fixed-size number arrays.
- 代价在几年后才显形:每个优化都建在一组「哪些算法按什么顺序跑、哪些数据不会变」的假设上,设计空间坍缩到一个点。他的原话:简单但低效的代码,可以从设计 A 挪到 B 再挪到 C;优化过的代码是把自己推进局部最优——不光难改,往往连别的设计都看不见了。抽象病同理,他去年给 A* 那页先「反抽象」才重新能动。The cost showed years later: every optimization was built on assumptions — which algorithms run, in what order, what data never changes — and the design space collapsed to a point. His words: with simple-but-inefficient code you move from design A to B to C easily; with optimized code you've pushed yourself into a local minimum, and often you can no longer even see the other designs. The same happens with early abstraction; he had to de-abstract his A* page last year to make progress.
- 今年的解法很坦率:他想试城镇与道路的新算法,发现拿 mapgen2 实验比「动不了」的 mapgen4 舒服得多,于是把 mapgen4 的 WebGL 渲染整个删掉、换回 mapgen2 的软件渲染器——先反优化,代码又能动了;打算实验做完再重新优化一次。This year's fix is frank. Wanting to experiment with town-and-road algorithms, he found mapgen2 far easier to work on than the locked-down mapgen4 — so he glued mapgen2's software renderer onto mapgen4's generator, deleting all the WebGL rendering and keeping only the multithreading. De-optimize first; re-optimize later, when the experiments are known.
- 能带走什么:优化是用自由度换速度。当买来的速度还没榨干、而你现在需要的是实验性时,反优化是一笔正当投资——在工程里,「可改动性」本身就该被记进性能账。Takeaway: optimization trades degrees of freedom for speed. When the speed you bought is not yet the bottleneck but malleability is, de-optimizing is a legitimate investment — in engineering, changeability is itself a performance metric.
- 修好了但没懂:SDF 字体渲染的一圈黑边(2024 年 8 月)Fixed but Not Understood: Black Fringes in SDF Font Rendering (August 2024)
- 场景:给地图实时渲染文字标签,用的是 SDF——签名距离场:每个像素存的不「像不像笔画」,而是「到字形轮廓的带符号距离」,GPU 拿距离做阈值恢复轮廓。这是现代字体渲染的地基:放大不锯齿,只变软;轮廓、阴影都是对同一个距离场做算术。The scene: rendering map labels live with SDF — signed distance fields. Each pixel stores not 'ink or no ink' but the signed distance to the glyph outline; the GPU thresholds that distance field to recover the edge. It is the substrate of modern font rendering: scaling up gets softer, not jaggeder, because outline, glow and shadow are all arithmetic on the same scalar field.
- 小虫:白色描边外面有零星黑点。读代码看不出所以然,他按实验科学走:先让 bug 可复现(初始渲染就出现,而非交互之后),再提假设、做判决实验。第一个假设是「黑像素画到了白像素之外」——把字形内部的黑改成黄,要是黄漏出描边就成立。黄没漏。假设被杀,不丢人,这就是答案。The bug: specks of black outside the white outline. Reading the code told him nothing, so he switched to experimental method: first make it reliably reproducible (it was there on the initial render), then form a hypothesis and build a discriminating test. Hypothesis one — 'black pixels render past the white ones': change the interior black to yellow; if yellow leaks, the hypothesis lives. No yellow leaked. The hypothesis died, cleanly, which is also an answer.
- 第二个假设来自他读过的经典文章(Tom Forsyth、Carmack、Eric Haines):sprite 黑边通常是没预乘 alpha 造成的——全透明的边缘像素仍带着背景色(黑色),和别的颜色做插值(求平均)时把黑「掺」了出来。换成预乘混合,黑点消失。Hypothesis two came from authors he had read — Tom Forsyth, John Carmack, Eric Haines: sprite fringing is usually non-premultiplied alpha. Fully transparent edge pixels still carry their background color (black), and linear interpolation averages colors, so blending drags that black into neighbors. Switch to premultiplied blending: the specks vanish.
- 但他把这一步只算「部分成功」:修好了,却不知道为什么原来的代码会错,而且没提交有 bug 的版本,回不去研究了——下次还会踩。这一页最有价值的就是这份诚实:把「假设—判决实验—否定」的全过程和「我还不懂」一起交出来。Yet he grades this only a partial success: fixed, but he does not know why the old code was wrong, and he never committed the buggy version, so the cause is unrecoverable — a setup for repeating the mistake. The honest value of the post is exactly this: the full loop of hypothesis, discriminating test, and 'I still don't understand' delivered together.
- 能带走什么:调试是做实验,不是读代码;「理解了为什么错」和「修好了」是两份独立的交付物。顺带一个数学小账:alpha 混合是插值——线性插值会把两端颜色按权重平均,透明边缘的颜色必须提前加权(预乘),否则平均值里掺了不该掺的背景。Takeaway: debugging is doing experiments, not reading code; and 'understanding why it broke' is a separate deliverable from 'it works now.' One bit of math along the way: alpha blending is linear interpolation, and interpolation averages endpoint colors — transparent edge pixels must have their color pre-weighted (premultiplied) or the average silently imports the background.
程序员随想Programmer's Musings
- Passkeys 是个陷阱:你的钥匙带一个别人能拧的旋钮Passkeys Are a Trap: Your Key Has a Dial Somebody Else Can Turn
- 立场先给:密码确实不安全,作者举得毫不留情(SolarWinds 服务器在用 solarwinds123;夏威夷应急机构的密码贴在桌上被照片拍到)。但 passkeys「不安全」不是它的卖点——作者的核心指控是:它没有把控制权设计成优先归你。Concession first: passwords really are insecure, and the author piles on without mercy (SolarWinds running solarwinds123; Hawaii emergency management's password photographed off a sticky note). But insecurity is not the indictment of passkeys. The real charge: they were not designed to prioritize your interests.
- 密码与 TOTP 的隐藏美德是主权:密码可以写在你选的地方;TOTP(RFC 6238)是公开算法,谁都能实现——任何软件、任何硬件(连九十年代的 Game Boy 都行),你可以把 30 秒的一次性码发给朋友、甚至把种子交给朋友自己生成。标准是开放的,动作是你自己的。The hidden virtue of passwords and TOTP is sovereignty. A password can be written wherever you choose. TOTP is RFC 6238 — an open algorithm anyone may implement, on any software or hardware (even a 90s Game Boy). You can text a friend a 30-second code, or hand them the seed and let their app mint codes for you. The standard is open; the moves are yours.
- Passkeys 的出身不同:它是 FIDO 联盟的产品——科技巨头、银行、政府、情报机构都在里面,连 Mozilla 也在,但没有任何消费者倡导组织(对比 W3C 里有公益团体和 Tim Berners-Lee)。房间里没有人替你讨价还价。Passkeys were bred elsewhere: the FIDO Alliance — Big Tech, banks, governments, intelligence agencies, with Mozilla along — and not a single consumer-advocacy group in the room (the W3C, by contrast, seats public-interest bodies and Tim Berners-Lee himself). Nobody at the table negotiates for you.
- 陷阱在命名:叫「passkey」的东西是一整个零件目录——可发现/不可发现、硬件绑定/软件绑定、可证明/不可证明、可复制/不可复制、可转移/不可转移,全叫同一个名字;WebAuthn 规范本身几乎不用 passkey 这个词。「passkey 安全吗」因此没有答案——取决于你生成的是哪一种。而网站和平台可以通过「隐藏旋钮」逐步收回你的控制:你以为攥着钥匙,其实钥匙里装着别人能拧的东西。The trap is in the naming. What is sold as 'a passkey' is a parts catalogue: discoverable or not, hardware-backed or software-backed, attested or not, copyable or not, transferable or not — all under one marketing word the WebAuthn spec itself barely uses. 'Are passkeys safe?' therefore has no answer — it depends which one you minted. Meanwhile a hidden dial lets sites and platforms gradually take control away: you think you hold a key, but the key has a screw only they turn.
- 能带走什么:评价任何认证标准,别看宣传语,看谁握着恢复路径——出事时谁能让你重新进得来;同名含糊本身就是一种设计。Takeaway: judge any authentication standard not by its pitch but by who holds the recovery path — who can let you back in when things go wrong. Deliberate naming ambiguity is itself a design choice.
- 浏览器指纹才是新的 Cookie——Google 的三幕剧Device Fingerprints Are the New Cookies — Google's Three-Act Play
- 开场是第二人称实验:「从现在起我叫你……」——刷新页面、清 cookie、上 VPN,你还是同一个名字;换台设备,你的代号不同但同样稳定;无痕模式要是换了名,恭喜,否则坏消息。这就是设备指纹:不依赖你同意,就能跨站认出你。The opening is a second-person experiment: 'From now on I'll call you…' — refresh the page, clear cookies, connect a VPN: still the same name. Switch devices: a different name, just as consistent. If incognito changed it, good; if not, bad news. This is device fingerprinting: cross-site recognition without storing anything you can delete.
- 生意模式跟着展开:多数网站靠放广告脚本赚钱,脚本顺手把你认出来;一旦你注册过账号,「浏览行为 + 姓名、活动、对话」就可以打包出售——隐私政策挡不住的都能卖。「我不在乎,我没有可藏的」的回应:收集方眼里没有你这个人,只有模式——二十世纪的硅水晶球,卖给最高出价者;轮到警方或政府想知道时,中间人一样乐意接单。The business model follows. Most sites earn by hosting ad scripts; those scripts quietly identify you. Register an account somewhere and your 'browsing history + name, activity, conversations' becomes a package the site can offer for sale — everything shareable under its privacy policy. 'I have nothing to hide' misses the point: the collector sees no people, only patterns — the silicon crystal ball of the century, sold to the highest bidder, and if police or a government care, the same broker happily takes that money too.
- 三幕剧第一幕「压力」:2019 年前后,Safari、Firefox 已封杀第三方 cookie,舆论鼎沸,Google 公开承诺「消灭 cookie」,EU 为此发了一整个世代的同意横幅。Act I, pressure: around 2019 Safari and Firefox were already blocking third-party cookies, the fuss was so large the EU shipped consent banners, and Google publicly pledged to destroy the cookie.
- 第二幕「拖延」:五年过去,Google 的替代方案 Privacy Sandbox 又难用又涉反垄断,没人采用;于是宣布「算了,保留 cookie」——「我们会遮一下 IP」(只在无痕且登录时;最后连这个也没做)。第三幕「加速」:把设备指纹写进自家广告产品——浏览器市场三分之二的那家,给你定了「隐私默认值」。Act II, distraction: five years on, Google's replacement Privacy Sandbox was disliked and courted antitrust trouble, so nobody adopted it — 'actually, we'll keep cookies, but we'll mask the IP address' (only in incognito while signed in; ultimately not even delivered). Act III, acceleration: device fingerprinting now officially usable in their ad products. The company holding two-thirds of the browser market set everyone's privacy defaults.
- 能带走什么:cookie 退场这出戏的结局不是隐私变好了,而是识别从「你看得见、可删除的文件」搬进了「你看不见、关不掉的设备特征」。技术上的「合规」与意愿上的「放弃」要分开记账。Takeaway: the cookie saga did not end with better privacy; it moved identification from files you can see and delete into traits of your device you cannot see or switch off. Keep separate books for technical compliance and actual intent.
- 2026 年,我用 C 和 CGI 上线了一个真产品In 2026 I Shipped a Real Product in C, over CGI
- 事实清单:marketyour.games 是「全现代」的 web 产品——账号、搜索仪表盘、文件夹、Stripe 支付、Postmark 邮件、渐进增强、零 JavaScript——唯一的复古是技术栈:OpenBSD + C + httpd + SQLite(他自己叫它 BCHS)。没有框架,没有模板语言,没有容器,没有独立数据库服务器。The facts: marketyour.games is a fully modern web product — user accounts, a search dashboard, folders, Stripe payments, Postmark emails, progressive enhancement, zero JavaScript. The only retro part is how it is built and served: OpenBSD, C, httpd, SQLite (his acronym: BCHS). No framework, no template language, no container, no separate database server.
- 机制:每个请求起一个新进程(CGI 环境变量就是全部接口),部署 = 替换一个文件,零停机;所有静态资源编译进可执行文件从内存出。依赖总共三个:libcurl、libsodium,加一个单文件 cJSON;SQLite 用官方 amalgamation 一起 vendor。干净构建几秒,重编不到半秒。Mechanics: each request spawns a fresh process (the CGI environment variables are the whole API); deploying means replacing one file — no restart, no downtime. Static assets are compiled into the binary and served from memory. Dependencies total three: libcurl, libsodium, and a single-file cJSON; SQLite ships its official amalgamation, vendored alongside. A clean build takes seconds; rebuilds run under half a second.
- 核心判断:CGI 在 2004 年的衰落是合理的(性能);但把「落后」抄到 2026 年是惯性——这套旧架构恰好回答当代最尖锐的问题:供应链。「一两个直接依赖拖进几百个间接依赖,维护者是你没听过的人,凭据是 2015 年就没换过的密码」——而他在 AI 代理与每周仓库攻击的背景下,把攻击面压成「一个 C 编译器加三个全世界盯着的库」。The core judgment: CGI's decline in 2004 was justified — for performance. Carrying 'outdated' into 2026 is momentum, not analysis: the old architecture happens to answer the sharpest modern question, supply chain. 'One or two direct dependencies pull in hundreds of indirect ones, each maintained by somebody you've never heard of, with credentials unchanged since 2015' — in an era of autonomous agents and weekly registry attacks, he shrank that surface to one compiler plus three libraries the entire world watches.
- 重新发现的好:CGI 本质上是「没有供应商的 serverless」——监督者逐请求启动你的代码、递一袋环境变量、收走输出。没有反向代理的双 web 服务器结构;调试就是普通程序:从 shell 跑、管道喂请求、看 stderr、gdb 跟。「懂 HTTP 就懂 CGI」,规范二十年没变,知识不贬值、不用学新框架。Rediscovered virtues: CGI is serverless without the vendor — a supervisor invokes your code per request, hands it a bag of environment variables, collects the output. No nginx-plus-app-server structure means no 'two web servers, one of which runs your business logic.' Debugging is ordinary: run it from a shell, pipe in a request, watch stderr, step with gdb. If you understand HTTP you already understand CGI, and the spec has not changed in twenty years — the knowledge does not rot.
- 能带走什么:不是劝大家用 C 写网站(作者自陈极简主义:Vim 零插件、无 LSP、无 AI),而是一个思想实验被真的上线过:当架构当年的约束消失,「现代」常常只是习惯——「一个二进制、一个数据库文件,整个东西装得进脑子」是一种可以被执行的愿景。Takeaway: not a recommendation to write sites in C (the author is a confessed minimalist — Vim with zero plugins, no LSP, no AI), but a thought experiment actually shipped: when an architecture's original constraints disappear, 'modern' is often just habit. 'One binary, one database file, the whole thing fits in your head' turns out to be an executable vision.
- Go 1.27 的新 JSON:「快两倍」这个数字,作者自己拆开给你看(2026 年 8 月)Go 1.27's New JSON: Lemire Takes the 'Twice as Fast' Number Apart (August 2026)
- 背景:Go 1.27 把新 JSON 包(encoding/json/v2)带进标准库。接口和旧的几乎一样,但 Unicode 校验、大小写敏感等语义不同——不是 drop-in。微妙的是旧 API 也重写到新引擎上了:于是要比的不是一样而是三种——原版、v1 API 走 v2 引擎、v2 API。Context: Go 1.27 ships the new JSON package (encoding/json/v2) in the standard library. The API looks almost identical, but semantics differ around Unicode validation and case sensitivity, so it is not a drop-in. The twist: the legacy API was also rewritten on the new engine, so there are three things to compare — the original, the v1 API on the v2 engine, and the v2 API.
- 用 simdjson 的标准文档集(twitter/canada/citm,单线程 GOMAXPROCS=1)测下来:什么都不改、只是升级到 1.27,marshal 就能快约两倍(twitter 198→374 MB/s)。换成 v2 API,unmarshal 再快 1.5–2.3 倍,但 marshal 只多 1.0–1.7 倍——因为 v2 在编码上本来就做得少。Measured on simdjson's standard corpus (twitter/canada/citm, single-threaded): doing nothing but upgrading to 1.27 already doubles marshalling (198→374 MB/s on twitter). Switching to the v2 API speeds unmarshalling a further 1.5–2.3x, but marshalling only 1.0–1.7x more — the v2 path already does less work there.
- 诚实的方法论:他明说三种 API 语义不完全可比,也分开测了「解到 any(不知道结构)」和「解到定长小结构(10000 条 Record)」两条路——「快两倍」的说法在类型化路径上会变小。Honest methodology: he states the APIs are not strictly comparable, and separates decoding into `any` (structure unknown) from decoding a slice of 10,000 small typed structs — the 'twice as fast' headline shrinks on the typed path.
- 真正能带走的是读基准报告的姿势:标题最爱把「升级白捡的加速」和「换 API 的额外收益」揉成一个数,把 unmarshal 和 marshal 平均成一个数,把解析成 any 的结果安到类型化解析上。看任何「X 快了 Y 倍」,先问:跟谁比、几条线程、解析成什么类型、什么形状的测试数据。What you can actually take away is how to read a benchmark report: titles love to blend 'free from upgrading' with 'extra from switching APIs' into one number, average unmarshal with marshal, and attach any-mode results to typed parsing. Before believing 'X is Y times faster,' ask: compared to what, how many threads, decoding to what type, on which data shapes.
- 一个额外的启示:旧 API「免费」加速那部分说明,Go 团队的引擎重写对所有人受益——性能工程里「不换接口也先升级」常常是最便宜的一笔。One bonus: the free speedup from the rewritten engine under the old API is a small reminder that in performance engineering, 'upgrade first, no interface change' is often the cheapest win available.
哲学与生活Philosophy and Life
- 身体也会被「去技能化」:当机器替你做动作,能力就枯萎The Body Gets De-skilled Too: When Machines Substitute Actions, Capacities Wither
- 自我切片开场:作者四十多岁,凌晨四点习惯性地刷一个并不享受的 app;曾经手写、能连续沉浸几小时;如今她的「专注力」靠咖啡因和甜咸零食喂。她先承认这不是个例,也不假装怀旧——这是数据点。It opens with a self-slice: in her late forties, the author scrolls an app she does not enjoy at four in the morning; she used to write by hand with hours of deep concentration; now her focus is fed by caffeine and salty-sweet snacks. She concedes this is not an anomaly and refuses fake nostalgia — it is data.
- 论点:技能是在动作里长出来的,而现代技术正在「替你动作」。她区分两类技术:增强能力的(望远镜之于天文)与替代动作的(GPS 之于认路)。后者让你少感知、少导航、少记忆、少走、少选择、少注意——「每一次交给快捷方案的动作,都是能力不再生长的一次缺席。」手机和 chatbot 尤其擅长把你训练成「再去拿一下手机」。The thesis: capacities grow inside actions, and technology increasingly acts for you. She splits tools into those that extend capacities and those that substitute actions (GPS and wayfinding is her example). The second kind leaves you sensing, navigating, remembering, walking, choosing and attending less — each quick fix is one absence at the lesson where the capacity would have formed. Phones and chatbots are expert at training you to reach for them again.
- 往历史里挖根:这不是数字时代病。从笛卡尔把身体定义为机器、思想单独豁免,到 1950 年代控制论把人重述为「可以换载体的模式」(Wiener 自己一边警告全面自动化一边递的词),到 Lorenz 把行为写成钟表程序,再到超人类主义的「上传」——社会被卖了一个几百年的谎:我们本质上是机器。于是替换身体不像失去,像升级。She digs the root through history, because this is not a digital-age disease: Descartes declared the body a machine with thought exempted; 1950s cybernetics recast the person as 'a pattern that could survive in another form' (Wiener's own phrase, even while warning against wholesale automation); Lorenz wrote animal behaviour as clockwork; transhumanism then offered mind-uploading. Society has been sold the lie 'we are essentially machines' for centuries — so substituting the body feels like an upgrade, not a loss.
- 反驳来自她六年的生物学研究:生命不是「硬件跑信息」,而是自创生(autopoiesis)——身体作为整体持续消耗能量来维持自身边界和内环境,「不是我思故我在,而是我体现故我在修正」。智力恰恰从身体的自我调节里长出来;基因离开了它实际起作用的活身体也无法被理解。于是讽刺成立:一个以摆脱身体脆弱为动机的技术项目,正在制造更脆弱的身体。The rebuttal comes from six years of biology research: life is not hardware running information but autopoiesis — the body as a whole continually spends energy to maintain its own boundary and inner environment; 'not I think, therefore I am, but I embody, therefore I amend.' Intelligence arises precisely from the body's self-regulation; genes cannot be understood apart from the living bodies they act in. The irony lands: a technological project motivated by escaping bodily fragility is producing more fragile bodies.
- 能带走什么:把「这台机器是在增强我,还是在替代我?」变成一个日常检查项。如果身心是通过亲自做而学习的,那么每外包一次动作,就是翘掉一次只有你能上的课。Takeaway: make 'is this machine extending me or substituting me?' a daily check. If minds and bodies learn by doing, every outsourced action is skipping a class only you can attend.
- 黑塞 1918 年的小诗:书不会给你幸福,但会修一条通向内心的小路Hesse's 1918 Poem: Books Won't Bring Happiness — They Build a Path Inward
- 先摆出悖论:我们读书是为了学活—— Baldwin 那句最私人访谈里说的:「你以为你的痛苦举世无前,然后你读到它」。书让你知道别人活过你正在活的东西。但活着悖论的另一面是:没有任何借来的智慧可以替代你自己的生活——你人生的故事,只写在「生活」这张白纸上。Set up the paradox first: we read to learn how to live — Baldwin's line from his most personal interview: 'You think your pain and your heartbreak are unprecedented in the history of the world, but then you read.' Books assure us others have lived what we are living. The counter-truth: no borrowed wisdom substitutes for life itself — the story of your own life is written only on the blank page of living.
- 1918 年,四十岁的黑塞(比他那篇《论书》早十几年,比诺贝尔奖早三十多年)用一首三节小诗接住了这个悖论。第一节:全世界的书不会带给你幸福,但会为你辟出一条隐秘的小路,通向你的心。In 1918, aged forty — a decade before his great essay on reading, three before the Nobel — Hermann Hesse caught the paradox in a three-stanza poem. First stanza: all the books of the world will not bring you happiness, but they build a secret path toward your heart.
- 第二节把答案翻转到读者身上:你需要的东西在你里面——日、月、星辰;你一路寻找的光明,是从你自己内部亮起来的。第三节:寻找智慧让你把图书馆梳了个遍;如今你翻开的每一页,说的都是你身上迸出的真理。The second stanza flips the answer onto the reader: what you need is in you — the sun, the stars, the moon; the illumination you kept searching for shines up from within. Third stanza: the quest for wisdom made you comb the libraries; now every page speaks the truth that flashes forth from you.
- Popova 的点评接住重点:书是镜子加小路——它让你看见「成为别人是什么感受」,再把你送回你自己。同一结论普鲁斯特也到过:书的智慧对我们只是「我们自己智慧的开端」,「那本唯一真实的书,其实每个人都已拥有」。Popova's framing is the point: books are mirror plus path — they show what it is like to be another and return you to yourself. Proust reached the same place from the other direction: the wisdom at the end of a book is only the start of our own, because 'the one true book already exists in each of us.'
- 能带走什么:有两种读法——把书当答案的进货单,或把自己的经验当点火器。黑塞的诗不需要长,需要的是你合上书之后,仍然把自己当最终裁判。Takeaway: there are two ways to read — as a supply run for other people's answers, or as an ignition for your own experience. Hesse's poem is short; what it asks is not short: keep yourself as the final judge after you close the book.
工具角Tools Corner
- Nanolathe:用 Go 净室重造《Total Annihilation》引擎,浏览器里直接开打Nanolathe: A Clean-Room Total Annihilation Engine in Go, Playable in the Browser
- 动机很朴素:少年时玩 Total Annihilation,后来做 mod、建模;多年后想把它弄上 MacBook,研究着研究着,变成了重写整个引擎。The motive is humble: he played Total Annihilation as a teenager, then made mods and 3D models; years later he just wanted it running on his MacBook, and the porting research became a full engine rewrite.
- 方法论值得读:纯净室逆向(不碰原版代码,与版权方无关),而且「先忠实还原、再动手改造」——加载原版地图、单位、战役文件,连让炮塔旋转、工厂开门的原始脚本都照跑;作者的理由是只有行为先可信赖,改动的效果才看得出是不是真效果。The method is the part worth reading: strictly clean-room (no original code, unaffiliated), and 'match first, modify later' — it loads the original maps, units, campaigns, even the scripts that turn turrets and open factory doors. His reasoning: only once behavior is trustworthy can you tell whether a change's effect is real.
- 工程细节:Go 写成、MIT 协议;两套渲染路径——Classic 复刻原版的 CPU 渲染,Modern 用 32×32 原始贴图合成 64×64 新素材加光照和辉光;对比页附可复现的捕获设置(引擎 commit 号、无裁剪修图、WebP 解码与捕获像素逐位一致)。Engineering: written in Go under MIT; two renderer paths — Classic replicates the original CPU renderer, Modern synthesizes 64×64 art from the game's 32×32 tiles plus lighting and glow; the comparison page lists reproducible capture settings (engine commit, no cropping or retouching, WebP exports that decode to the exact captured pixels).
- 完整度与玩法:单机战役/遭遇战/Survival 大体完成(按任务逐个列了兼容性);浏览器三任务演示不要游戏文件,完整版自带 GOG/Steam/CD 数据即玩;支持 2–10 人联机、对战存档成回放。Completeness: campaign, skirmish and Survival are broadly done (compatibility tracked per mission); a three-mission browser demo needs no game files, the full game plays with a copy you own; 2–10 player online, battles archived as replays.
- 让 embedding 模型转写语音:最近的词就是听写Transcribe Speech from an Embedding Model: the Nearest Word Is the Dictation
- 起点是一个表示空间的性质:EmbeddingGemma 2 是多模态 embedding——文本、图像、音频、视频共用一个空间,你把一个词读出来,它的音频向量落点离那个词的文本向量很近。The starting point is a property of the representation space: EmbeddingGemma 2 is a multimodal embedder — text, images, audio and video share one space, and if you say a word aloud, its audio vector lands near the written word's vector.
- 想法因此是「不从零训练识别器,而是直接从空间里读词」:冻结原模型的音频编码器不动,只训一个小「读者」,把每段短音频搬进文本空间,在约 22.9 万个英文词里取最近邻——切片就拼成了转录;再挂一个小模型补标点和大小写。So the idea is to read words straight out of the space instead of training a recognizer: keep the base model's audio encoder exactly as it is and train only a small reader that maps each short audio slice into text space and takes the nearest of ~229,000 English words — the slices become a transcript; a tiny extra model adds punctuation and capitalization.
- 代价小得反常:只训读者,8×H100 不到两小时,全程用开放许可的英文语音;基座模型从头到尾没被「语音识别训练」过。The cost is absurdly small: only the reader is trained — under two hours on 8×H100, on openly licensed English speech; the base model was never speech-to-text-trained at all.
- 速度对比同页给出:Mac 神经引擎、base M3 Air 8GB 内存——一小时音频 12.6 秒(288 倍),而 IBM Granite Speech 5.0 Turbo(CTC、GPU、MLX)要 25.7 秒(约 150 倍)。页面也诚实标了边界:英文、词级最近邻、非端到端语音理解。点子在「复用共享空间」——用一个模型没被训练过的任务去考它已经会的事情。Same page, honest speed comparison: on the Mac Neural Engine of a base 8GB M3 Air, an hour of audio goes in 12.6 seconds (288x), versus 25.7s (~150x) for IBM Granite Speech 5.0 Turbo (CTC, GPU, MLX). Limits stated plainly: English, word-level nearest neighbor, not end-to-end speech understanding. The clever bit is reusing the shared space — quizzing a model on a task it never trained for, using what it already learned.
- PS2 游戏静态重编译成 WebAssembly:主 CPU 不解释,直接变你的 CPUPS2 Games Statically Recompiled to WebAssembly: Nothing Interprets — It Becomes Your CPU
- 路线选择是点子的全部:不做模拟器主循环逐条「解释」,而是把游戏可执行文件的 Emotion Engine(R5900)机器码一次性静态翻译成 C++,编译成 WebAssembly 跑;OS、硬件由 runtime 高层模拟,画面走 WebGPU。The route choice is the whole idea: instead of an emulator loop interpreting each instruction, statically translate the game's Emotion Engine (R5900) machine code ahead of time into C++, compile it to WebAssembly, and let a runtime simulate the console's OS and hardware at a high level, drawing through WebGPU.
- 第一块试金石选最狠的:《Gran Turismo 4》——同时压两台向量单元、依赖精确浮点行为(驾照考试回放)、还有把渲染结果读回来当调色板的图形 trick。结果是开机、开场动画、菜单、比赛全通,PAL 50fps 满速,在笔记本集成 GPU 上以 PS2 两倍分辨率跑,存档落在浏览器里。The first test title is deliberately the hardest: Gran Turismo 4 — it hammers both vector units, relies on exact floating-point behavior for its license-test replays, and uses graphics tricks that read rendered images back as palettes. Result: boot, opening movie, menus and races all work at full PAL 50fps on a laptop's integrated GPU at twice PS2 resolution, with saves kept in the browser.
- 重编译器不躲硬件的怪癖而是保留它们:128 位寄存器与多媒体指令、分支延迟槽、没有无穷和次正规数、舍入还和 IEEE 不同的浮点单元、当协处理器用的 VU0;向量单元 1 的微程序按真实 MAC 流水延迟建模——因为游戏就是围绕这些时序调度的。跳单元变 tail call,线程切换解栈——生成代码不需要逐 guest 线程的宿主栈。The recompiler keeps rather than dodges the hardware's quirks: 128-bit registers with multimedia instructions, branch delay slots, an FPU with no infinities or denormals and its own rounding, VU0 used as a coprocessor; vector unit 1's microprograms get modeled MAC-pipeline latency, because games schedule code around exactly that. Cross-unit jumps become tail calls; thread switches unwind the host stack.
- OS 层:EE 侧的内核(线程、信号量、中断、DMA、垂直同步、报警)由高层模拟作答;I/O 处理器跑原版盘里的 IRX 模块(声音驱动、光盘流读、手柄、记忆卡),其调用库重写成 C++;光盘走 HTTP Range 按需下载。The OS layer: the EE-side kernel (threads, semaphores, interrupts, DMA, vertical blank, alarms) is answered by high-level emulation, while the I/O processor runs the disc's own IRX modules — sound driver, disc streaming, controller, memory card — with their kernel libraries reimplemented in C++. The disc reads over HTTP Range requests, so only the executable downloads up front.
- 第二块试金石《战神 II》没有一行游戏特定代码就跑通,顺带暴露了重编译器和向量时序的两个 bug 与 IOP 缺口——然后满战斗 60fps。仓库不含任何游戏数据:自带 disc 镜像,脚本在你的机器上把它变成网页。The second title, God of War II, ran from the same scripts with zero game-specific code — and in doing so exposed two recompiler/vector-timing bugs and missing I/O pieces, then held 60fps in heavy combat. No game data ships in the repo: bring a disc image of a game you own, and the scripts turn it into a web page on your machine.
- 把 Wi-Fi 7 路由器变成 320Msps 的软件无线电接收机Turning a Wi-Fi 7 Router into a 320 Msps Software-Defined Radio Receiver
- 点子:Gemtek W1700K 路由器里的 MediaTek MT7996 射频本身就是一台宽频前端——写自己的固件把它降级使用:不做 Wi-Fi,改吐原始 14-bit IQ 采样(最高 320Msps),让板载 SoC 经 10GbE 把数据流出来,主机端在浏览器里看实时的频谱瀑布图。The idea: the MediaTek MT7996 radio in a Gemtek W1700K router is already a wideband RF front end. So write custom firmware that repurposes it: forget Wi-Fi, and have it emit raw 14-bit IQ samples at up to 320 Msps, streamed by the onboard SoC over 10GbE, with a live spectrum waterfall in a browser.
- 难点的诚意:MT7996 固件是自家从零做的——ROM patch 加仓库构建的 WM/WA,冷启动就能独立带起射频;MediaTek 的初始化与校准序列是「一个寄存器一个寄存器对着官方固件的 trace 解出来的」。主机只发命令:LO、采样率、采集、流式、增益、滤波。The honest hard part: the MT7996 firmware is their own — ROM patch plus WM/WA built from the repo, bringing the radio up from a cold power-on with no MediaTek code; the vendor's initialization and calibration sequence was decoded register by register against traces of MediaTek's firmware. The host only sends commands: LO, sample rate, capture, stream, gain, filter.
- 工程账算到 bit:射频向 SoC 内存里 1GiB 的 DMA 环写数据,内核把 8KiB 切片各装一个 UDP 报文零拷贝外发;320Msps 的双半切片按每对样本 28 bit 打包,刚好压进链路(实测 9.75Gbit/s,无损)。LO 在频段内任意频率连续(2.4GHz 段步进 2.98Hz,约 1ms 重调),没有「信道」概念。The engineering ledger goes to the bit: the radio DMAs into a 1GiB ring in SoC DRAM; the kernel ships each 8KiB slice as one UDP datagram, zero-copy, out the 10GbE port. At 320Msps, the two half-slices packed 28 bits per sample pair fit the link exactly (9.75Gbit/s, lossless). The local oscillator tunes continuously — any frequency the synthesizer locks (2.98Hz steps on 2.4GHz, retune in ~1ms); there is no 'channel' concept.
- 主机链完整:w1700k-stream 分发共享内存(int16 复样本,带断口标记)并可选校正降采样的滚降;w1700k-spectrum 用 262,144 点 FFT 以 100fps 刷新浏览器界面;sdr-recv 录制。三个频段(2.4/5/6GHz)靠寄存器切换。The host chain is complete: w1700k-stream serves the IQ to every consumer via shared memory (complex int16, gap-tagged) with optional flattening of decimation roll-off; w1700k-spectrum runs 262,144-point FFTs at 100fps in the browser UI; sdr-recv records. Bands 2.4/5/6GHz switch via register writes.
- 巧妙之处:一台百元级路由器顶替了曾经要专属仪器才能做的宽带接收;更难的部分——无文档固件逆向——全部开源且带架构文档。Why it's clever: a hundred-dollar-class router replaces what once needed dedicated instrumentation, and the undocumented part — reverse-engineered firmware — is fully open, with architecture docs.