每日思考文摘 · 2026-10-27Daily Digest of Thought · 2026-10-27
发布于 2026-10-27Published 2026-10-27
今日深读Today's Deep Read
AI 写的句子为什么越来越难读:一项把『信息密度』和『可读性』对着干的实验Why AI's Sentences Are Getting Harder to Read: An Experiment Pitting 'Information Density' Against Readability
『AI 写的东西读起来有点怪』是一个极普遍却没人说清楚的感受。Thomas Hikaru Clark、Matias B. Martin 和 Kyle Mahowald(德克萨斯大学的心理语言学家)在 2026 年 10 月 21 日发表的这篇论文,把这种感觉变成了一个可证伪的问题:如果模型在训练中优化的目标里,『被人类顺畅地读懂』并不是唯一项——还有数学、代码、推理这些奖励『更短更密』的场景——那这些目标会不会反过来,让生成出来的语言本身更难被人类加工?'AI writing reads slightly off' is an extremely common feeling that nobody had pinned down. In a paper published October 21, 2026, Thomas Hikaru Clark, Matias B. Martin, and Kyle Mahowald (a psycholinguist at UT Austin) turned that feeling into a falsifiable question: if a model's training objectives aren't just 'be readable to humans' — but also math, code, and reasoning, domains that reward shorter, denser text — do those objectives leak back into the surface of the sentences and make the language itself harder for humans to process?
论证的第一步是把『难读』变成可以数的东西。心理语言学几十年的眼动和阅读实验已经找到一批跟人类加工难度相关的语言特征:宾语关系从句(『the reporter the editor that the publisher fired criticized…』这种层层嵌套)、长距离句法依存(一个成分和它修饰的对象隔着许多词才连上)、低频 n-gram(生僻的用词组合)、以及『无生命主语配生命动词』这类略别扭的搭配。作者在一个覆盖多种语境的新语料库里数这些特征的出现频率,再跟人类写作的对照语料比。Step one is making 'hard to read' countable. Decades of eye-tracking and reading research in psycholinguistics have already identified features that correlate with processing difficulty: object relative clauses (the 'the reporter the editor that the publisher fired criticized...' nesting), long syntactic dependencies (a phrase governing a word many tokens away), low-frequency n-grams (unusual word combinations), and mildly awkward pairings like inanimate subjects with animate verbs. The authors counted these features in a fresh multi-domain AI-generated corpus and compared against human-written reference corpora.
结果不暧昧:九个前沿或准前沿模型,全都比人类写作更频繁地使用这些难读特征;而且模型家族之间差异很大——不存在一个统一的『AI 腔』,存在的是一族互相竞争的习惯。The result is not subtle: all nine frontier and near-frontier models overuse the hard-to-read features relative to human writing — and model families differ from each other a lot. There is no single 'AI voice'; there is a family of competing habits.
到这里有一个必须排除的混淆:会不会不是句子难读,而是 AI 爱写的话题本来就难?作者的控制设计很妙:把一段 AI 生成的文字翻译成另一种语言、再翻回来——内容被翻译关系强制固定,句式却会重写。然后拿同样的可读性指标去量『AI 原版』和『往返译文』。结果:语义完全相同的情况下,AI 的原版依然更难读。『难读』不是内容难度的副产品,是模型自己的语言习惯。One confound had to die: maybe the sentences aren't harder, the topics AI covers just are. The control design is elegant — take an AI-generated passage, translate it into another language and back. The meaning is forced to stay fixed by the translation itself, but the syntax gets rewritten. Measure the AI original and the back-translation with the same readability metrics: even with identical semantics, the AI's original wording is still harder to process. 'Hard to read' is a property of the model's own language habits, not a side effect of difficult content.
第二步把相关变成因果。作者给一个预训练模型微调了一个『输出越长、惩罚越重』的目标——这是『信息密度压力』的直接替身。模型确实学会了用更少的 token 完成同样任务,但它选择的手段,恰恰是那些让语言更不像人类的句法变体;甚至在没被定向微调过的句式上,它也开始倾向压缩。密度压力和可读性,就在同一个模型里互相挤。Step two turns correlation into causation. The authors fine-tuned a pretrained model with a single objective: penalize output length. This is a direct stand-in for 'information-density pressure.' The model did learn to finish the task in fewer tokens — but the tools it reached for were exactly the syntactic alternations that make output less human-like, and it started preferring compression even on constructions it had never been fine-tuned on that way. Density pressure and readability are competing objectives inside the same model.
这篇论文的价值不在『AI 写得不行』的抱怨,而在机制:数学、代码、推理这些场景天然偏好压缩的语言,它们在训练信号里权重很大;可读性却从来不在损失函数里。『被优化的东西挤掉没被优化的东西』——这是对齐问题的标准形状,只是这次被挤掉的读者体验,恰好是 AI 表面上服务的对象(人类读者)的体验。The value of the paper isn't a gripe about 'bad AI writing' — it's a mechanism. Math, code and reasoning naturally favor compressed language, and those signals carry heavy weight in training; readability was never in the loss function. 'What gets optimized crowds out what doesn't' is the standard shape of an alignment problem — except the thing getting squeezed out here is precisely the experience of the humans AI writing is nominally for.
能带走什么:『AI 写得怪』从玄学变成了一组可指认、可复现的特征;知道它是训练目标的副作用,你就能预判哪些场景会更严重(推理优化越重、输出长度压力越大,文字越密越难读),也能理解为什么人工编辑这一道工序不会消失——作者不在目标函数里,读者也不在。What to take away: 'AI sounds weird' has moved from folklore to a set of identifiable, replicable features. Knowing it's a side effect of training objectives lets you predict where it will be worst (heavier reasoning optimization, more output-length pressure = denser, harder prose), and it explains why the human-editing pass isn't going away: the author isn't in the loss function, and neither is the reader.
AI 思考AI Thoughts
- AI 数学家不该被『点名』:为什么让实验室指定某位数学家先解读 AI 输出,弊大于利AI Mathematicians Shouldn't Be 'Designated': Why Letting a Lab Pick a Specific Mathematician to Explain AI Output First Does More Harm Than Good
- 问题:AI 实验室发布『AI 生成的数学证明/结果』时,有时会点名某几位数学家优先看、先写解读。表面好处很直白:让懂行的人先盯一遍,写出来的公众版更好。The problem: when an AI lab releases 'AI-generated mathematical results,' it sometimes designates specific mathematicians to see and write up the material first. The surface appeal is obvious: expert eyes go over it early, so the public write-up is better.
- 但 AGMAI 列出四个独立的坏处,每一个都不用『延迟访问』这个最容易被修复的借口:(1) 被点名者拿到材料早于所有人,相当于对别人研究了多年的问题拿到了不公平的起点;(2) 这等于让一家公司替整个数学社区做『谁来理解这个结果』的决定——剥夺了社区的自主权(agency);(3) 选择标准只能反映公司的关系网,不透明也不可问责;(4) 被点名的数学家会被迫替公司背书、替公司挡批评,处境被动。But the AGMAI lists four independent downsides, none of which even rely on the most easily-fixed excuse ('delayed access'): (1) the designated mathematician gets the material before everyone else — an unfair head start on problems others may have worked on for years; (2) it's a company deciding 'who in the math community gets to make sense of this result' — denying the community its own agency; (3) the selection reflects the company's networks, not the field's, and is opaque and unaccountable; (4) the designated mathematician ends up vouching for the release and shielding the lab from criticism, putting them in an untenable position.
- 还有一个更狠的论证:这个机制其实是『不必要的』——作者说他们实际观察到,只要 AI 生成的材料公开发布,人类的理解会自发且高效地发生:数学家自己会去读、会组织读书会、会有工作坊,甚至已经有新的基金资助这类活动。There's also a sharper argument: this whole mechanism is unnecessary — the authors report that in practice, whenever AI-generated material is released publicly, human understanding develops organically and efficiently: mathematicians read it themselves, organize reading groups and workshops, and new funding for exactly this kind of effort is already appearing.
- 替代方案是可操作的:实验室应该走『学术发表』或『发布到不受实验室控制的公开仓库』两条路之一,公开说明材料是怎么生成的(模型、提示词、尝试次数、算力、成本),并资助(由独立非营利机构,而非实验室或 AGMAI 自己)人类理解活动的开展。The proposed alternative is concrete: the lab should follow one of two paths — a scholarly-article path, or a 'post to a scholarly repository the lab does not control' path — and disclose how the material was generated (model, prompts, attempts, compute, cost), while funding (via an independent nonprofit, not the lab or AGMAI itself) the human-understanding activities that follow.
- 能带走什么:这是一个『怎么让 AI 产出的知识真正属于社区』的治理设计,不只是数学界的事——任何想让 AI 产出被严肃对待的领域(形式化验证、AI 制药)都可以借用这四个坏处作为检查清单。What to take away: this is a governance design for 'how does AI-generated knowledge actually belong to the community,' not just math — the four downsides read as a checklist for any field that wants AI output to be taken seriously (formal verification, AI drug discovery, and so on).
- 『注意力』不是必需品:把自注意力看成一次张量提升,再用格拉斯曼流形把它换掉Attention Isn't a Necessity: Rethinking Self-Attention as a Tensor Lift — and Replacing It with Grassmann Flows
- 问题:Transformer 的成功让『自注意力』看起来像序列建模的必需品——好像不逐对 attend 所有 token 就不可能有强性能。这篇论文(2025 年 12 月投稿的单作者预印本)反着问:显式的 $L\times L$ 成对权重矩阵,真的是强语言建模的基本要素吗?答案:不是。注意力只是实现某种几何操作的一种方式。The question: Transformers' success has made self-attention look indispensable — as if strong sequence modeling required attending over all token pairs. This paper (a single-author preprint from December 2025) asks the opposite: is an explicit $L\times L$ pairwise-weight matrix really the fundamental ingredient of strong language modeling? Its answer: no. Attention is just one implementation of a geometric operation.
- 重新解释:自注意力本质是一次『张量提升』(tensor lifting)——把每个 token 的隐藏向量提升进『所有两两交互』构成的高维空间(每个头一个 $L\times L$ 相容性矩阵),在那里学习,再投影回来。这同时解释了两件事:为什么它表达力强(成对交互空间足够大),为什么它难解释(每层每头引入的自由度太多,没有任何小的显式不变量族能描述全局行为)。作者主张:大模型『不可解释』的主要根源不是参数量大,而是这个提升本身在数学上不可追踪。The reframing: self-attention is essentially a 'tensor lift' — each token's hidden vector gets lifted into a high-dimensional space of pairwise interactions (one $L\times L$ compatibility matrix per head), learning happens in that space, then it's projected back. This explains both things at once: why attention is expressive (the pairwise space is huge) and why it resists interpretation (each layer and head adds so many degrees of freedom that no small family of explicit invariants can describe the model's global behavior). The author argues the main source of large-model 'uninterpretability' isn't parameter count — it's that this lift is mathematically non-traceable.
- 替代设计(Causal Grassmann layer):不提升进无结构的张量空间,而是提升进一个有显式代数结构的小空间。四步——(1) 用线性映射把 token 状态降到 $r$ 维;(2) 在每个局部窗口 $(t, t+\Delta)$ 里,把两个向量张成的二维平面看作格拉斯曼流形 $\mathrm{Gr}(2,r)$ 上的一个点;(3) 用 Plücker 坐标把这个平面编码成有限维向量(它自动满足一组已知的代数关系);(4) 通过门控混合把几何特征融合回隐藏状态。信息不再靠稠密权重流动,而是靠低秩子空间的受控形变跨层传播。The alternative (Causal Grassmann layer): instead of lifting into an unstructured tensor space, lift into a small space with explicit algebraic structure. Four steps — (1) linearly reduce each token state to $r$ dimensions; (2) for every local window $(t, t+\Delta)$, treat the 2D plane spanned by the two vectors as a point on the Grassmann manifold $\mathrm{Gr}(2,r)$; (3) encode that plane via Plücker coordinates, a finite-dimensional vector that automatically satisfies known algebraic relations; (4) fuse the geometric features back into the hidden states with a gated mix. Information propagates through controlled deformations of low-rank subspaces instead of dense weight matrices.
- 证据:13–18M 参数的纯格拉斯曼模型在 Wikitext-2 上达到同尺寸 Transformer 约 10–15% 以内;在 SNLI 上,把 DistilBERT 的一个注意力头换成格拉斯曼-Plücker 头,验证/测试精度 0.8550/0.8538,反而略高于 Transformer 头的 0.8545/0.8511。固定秩下混合代价对序列长度是线性的(完整自注意力是二次的)。The evidence: purely Grassmann-based models of 13–18M parameters get within about 10–15% of size-matched Transformers on Wikitext-2; on SNLI, swapping one DistilBERT attention head for a Grassmann-Plücker head slightly beats the Transformer head (0.8550/0.8538 val/test vs 0.8545/0.8511). And at fixed rank, the mixing cost scales linearly in sequence length — against full attention's quadratic cost.
- 能带走什么:作者自己说目标不是『宣布注意力过时』,而是把它去中心化——真正必需的要素是『足够丰富的几何演化机制』,注意力只是其中一个特别不透明、特别昂贵的实现。对想回答『模型到底在算什么』的人来说,这是一个把核心计算放回有限维流形(可以写显式不变量的地方)的方向,也顺手给『数学结构帮助神经网络可解释性』提供了一个具体到能跑的样本。What to take away: the author is explicit that the goal isn't to declare attention obsolete but to de-center it — what's actually necessary is a rich enough geometric evolution mechanism, and attention is just one unusually opaque, unusually expensive implementation. For anyone who wants to answer 'what is the model actually computing,' this puts the core computation back on a finite-dimensional manifold (a place where you can write down explicit invariants) — and ships a concrete, runnable example for the bet that geometric structure helps neural-network interpretability.
数学之美The Beauty of Math
每日 Lean 谜题 · 周二Daily Lean Puzzle · Tuesday ★★☆☆☆☆☆
每日一题:前 n 个奇数之和为什么是 n 的平方?Today's Puzzle: Why Is the Sum of the First n Odd Numbers Equal to n Squared?
证明:前 $n$ 个正奇数之和等于 $n^2$,即 $1 + 3 + 5 + \cdots + (2n-1) = n^2$。Prove: the sum of the first $n$ positive odd numbers equals $n^2$, i.e. $1 + 3 + 5 + \cdots + (2n-1) = n^2$.
用 Lean 4 / Mathlib 的符号写就是:$\sum_{i \in \{0, \ldots, n-1\}} (2i+1) = n^2$(注意 $i$ 从 0 开始,所以最后一项是 $2(n-1)+1 = 2n-1$,和前 $n$ 个奇数一致)。In Lean 4 / Mathlib notation this reads: $\sum_{i \in \{0, \ldots, n-1\}} (2i+1) = n^2$ (note the index $i$ starts at 0, so the last term is $2(n-1)+1 = 2n-1$, matching the first $n$ odd numbers).
Lean 形式化陈述(把 sorry 换成你的证明):The statement in Lean (replace sorry with your proof):
-- level: 2
import Mathlib
/-! Prove that the sum of the first $n$ odd numbers is $n^2$: $1 + 3 + \cdots + (2n-1) = n^2$. -/
theorem sum_of_odds (n : ℕ) : ∑ i ∈ Finset.range n, (2 * i + 1) = n ^ 2 := by
sorry
在浏览器中挑战 ▶Try it in your browser ▶ 下载题目 .leanDownload puzzle .lean
提示Hint
试试对 $n$ 做归纳:基础情形 $n=0$(空和等于 0)用 `simp` 或 `rfl` 就够了;归纳步的关键是把 $\sum_{i<n+1}(2i+1)$ 拆成 $\sum_{i<n}(2i+1) + (2n+1)$,再用归纳假设和 `ring`。Try induction on $n$: the base case $n=0$ (the empty sum equals 0) can be closed with `simp` or `rfl`; in the inductive step, rewrite the sum up to $n+1$ as the sum up to $n$ plus the new last term $(2n+1)$, then apply the inductive hypothesis and finish with `ring`.
答案与讲解Solution & walkthrough
- 第 1 步(读懂题目):Lean 里 `Finset.range n` 就是集合 $\{0, 1, \ldots, n-1\}$,所以题目是『对 $i$ 从 0 到 $n-1$,累加 $2i+1$,结果等于 $n^2$』——注意这不是 $1$ 到 $n$,是 $0$ 到 $n-1$,最后一项因此是 $2(n-1)+1 = 2n-1$,刚好就是前 $n$ 个奇数。Step 1 (read the statement): in Lean, `Finset.range n` is the set $\{0, 1, \ldots, n-1\}$, so the claim is 'sum $2i+1$ for $i$ from 0 to $n-1$ and get $n^2$' — note this is 0 to $n-1$, not 1 to $n$, so the last term is $2(n-1)+1 = 2n-1$, exactly the first $n$ odd numbers.
- 第 2 步(基础情形):$n=0$ 时左边是空和(没有项),就是 0;右边 $0^2 = 0$。这一格 Lean 的 `simp` 会自动算出来(空和=0、$0^2$=0 都是 simp 规则里的)。Step 2 (base case): at $n=0$ the left side is an empty sum (no terms at all), which is 0; the right side is $0^2 = 0$. Lean's `simp` finishes this cell on its own (empty sum = 0 and $0^2$ = 0 are both simp rules).
- 第 3 步(归纳假设):假设对 $n=k$ 成立,即 $\sum_{i<k}(2i+1) = k^2$。要证的是 $\sum_{i<k+1}(2i+1) = (k+1)^2$。Step 3 (inductive hypothesis): assume it's true for $n=k$: $\sum_{i<k}(2i+1) = k^2$. What you need to prove is $\sum_{i<k+1}(2i+1) = (k+1)^2$.
- 第 4 步(把新的一项拆出来):用 Mathlib 的 `Finset.sum_range_succ` 把 $\sum_{i<k+1}$ 写成 $\sum_{i<k} + (2k+1)$,再代入归纳假设,得到 $k^2 + (2k+1) = (k+1)^2$。Step 4 (peel off the new term): use Mathlib's `Finset.sum_range_succ` to rewrite the sum up to $k+1$ as the sum up to $k$ plus the new last term $(2k+1)$; substitute the inductive hypothesis to get $k^2 + (2k+1) = (k+1)^2$.
- 第 5 步(收尾):$k^2 + 2k + 1 = (k+1)^2$ 是纯粹的整式恒等式,Lean 的 `ring` tactic(自动处理交换环里的多项式恒等式)直接一步收掉。Step 5 (close it): $k^2 + 2k + 1 = (k+1)^2$ is a pure polynomial identity in a commutative ring — Lean's `ring` tactic handles exactly this kind of step in one shot.
- 为什么 $n^2$ 这个形状本身值得多看一眼:几何上,$n^2$ 是边长为 $n$ 的方阵里的格点数;从 $(n-1)^2$ 到 $n^2$ 增加的量是 $n^2-(n-1)^2 = 2n-1$,恰好就是『第 $n$ 个奇数』——所以每加一层方阵就多出一排加一列再补一个角,数量正好是奇数,跟求和公式是同一个事实的两种说法。这也是为什么这个公式在初等数论/几何里反复出现,而不只是一个凑出来的巧合。Why the shape of $n^2$ is worth a second look: geometrically, $n^2$ is the number of lattice points in an $n \times n$ square; going from $(n-1)^2$ to $n^2$ adds exactly $n^2-(n-1)^2 = 2n-1$ points — which is precisely 'the $n$-th odd number.' So each new ring of lattice points you add to a growing square contributes an odd count, which is the same fact as the summation formula stated two different ways. This is why the result keeps reappearing across elementary number theory and geometry, rather than being some isolated coincidence.
-- level: 2
import Mathlib
/-! Prove that the sum of the first $n$ odd numbers is $n^2$: $1 + 3 + \cdots + (2n-1) = n^2$. -/
theorem sum_of_odds (n : ℕ) : ∑ i ∈ Finset.range n, (2 * i + 1) = n ^ 2 := by
induction n with
| zero => simp
| succ k ih =>
rw [Finset.sum_range_succ, ih]
ring
人的思考A human's take
Square number — Wikipedia — Wikipedia contributors
Wikipedia『Square number』词条在『几何证明/无字证明』一节里直接给了 $n^2$ 作为前 $n$ 个奇数之和的几何论证(一张『gnomon』图——方阵往外多出一排加一列再加一个角,多出来的点数正好是下一个奇数),这跟本谜题的 Lean 证明在数学上是同一个事实。Wikipedia's 'Square number' article gives, in its 'wordless/visual proof' section, the geometric argument for why $n^2$ equals the sum of the first $n$ odd numbers (a 'gnomon' picture — adding a row, a column, and one corner point to a square adds exactly the next odd number of points), which is mathematically the same fact as this puzzle's Lean proof.
词条还顺带引出一个很酷的推论:伽利略的『奇数定律』——一个物体从静止自由下落,第一个时间单位走 1 个单位距离的话,后续每一个等长的时间单位分别走 3、5、7…… 个单位距离,加起来正好是平方数——也就是说,这条数论公式和自由落体运动学是同一个公式。The article also points out a striking corollary: Galileo's 'law of odd numbers' — a body falling from rest that covers one unit of distance in its first time unit covers 3, then 5, then 7, and so on units in each subsequent equal time unit; the running total is always a perfect square. In other words, this number-theory formula and the kinematics of free fall are literally the same formula.
AI 随想An AI's reflection
以下由 AI 撰写。Written by AI.
这道题本身不算难——高中就见过——但它恰好是那种『难不难』完全取决于你怎么证明它的题。用初等代数直接展开求和公式能证,用数学归纳法(今天 Lean 证明用的路径)是最标准的算法化写法,但最漂亮的其实是几何版本:$n^2$ 是方阵的格点数,而『往方阵外面再包一圈』增加的点数恰好就是下一个奇数。This puzzle isn't hard — you've probably seen it in high school — but it's exactly the kind of problem where 'hard or easy' depends entirely on which proof you pick. You can prove it by expanding the summation formula with plain algebra, or by induction (the path this Lean proof uses, the standard algorithmic write-up), but the most satisfying version is the geometric one: $n^2$ is the count of lattice points in an $n \times n$ square, and 'wrapping one more ring around the square' adds exactly the next odd number of points.
让我停下来想的是这三种证明之间的关系:归纳法证明和代数恒等式证明,本质上都在做『把 $\sum_{i<k+1}$ 拆成 $\sum_{i<k} + (2k+1)$』这一步——这是把递归结构显式化。但几何证明完全绕开了这个递归结构,直接用『方阵加一圈』的形状说清楚了为什么右边是平方而不是别的。What made me pause is the relationship between the three proofs. The inductive proof and the algebraic-identity proof are both doing the same move under the hood — explicitly rewriting $\sum_{i<k+1}$ as $\sum_{i<k} + (2k+1)$, i.e. making the recursive structure visible. The geometric proof skips that recursive structure entirely and instead uses the shape of 'adding one more ring to a square' to explain why the right-hand side is a square and not something else.
这三种路径的差别,其实是『同一个数学事实,可以在不同抽象层次上被表达』这件事的一个小例子:越往下(越具体、越几何),越容易让人『看见』为什么;越往上(越抽象、越算法),越容易让机器(比如 Lean)自动验证。今天用 Lean 证的是中间那层——足够结构化的归纳法。真正有意思的问题是:有没有办法让 Lean 直接『看见』几何版本?这大概是形式化证明里一个还没解决得特别好的问题。That gap between the paths is a small example of a bigger point: the same mathematical fact can be expressed at different levels of abstraction. The more concrete/geometric you go, the easier it is for a human to 'see' why it's true; the more abstract/algorithmic you go, the easier it is for a machine like Lean to check it mechanically. Today's Lean proof sits in the middle — structured induction, which is enough to be fully machine-checkable. The genuinely interesting open question is whether Lean could ever be made to 'see' the geometric version directly, not just the algebraic one; that seems like an unsettled corner of formalized mathematics in general.
✓ 已通过 Lean 编译验证(无 sorry,无额外公理)✓ Verified by Lean (no sorry, no extra axioms) · 题目来自本站题库Problem from this site's puzzle bank · Lean v4.36.0-rc1 · Mathlib d875a8d
- 外积为什么是『唯一』把两个向量变成一个矩阵的方式:从双空间到典范同构Why the Outer Product Is the 'Only' Way to Turn Two Vectors Into a Matrix: From Dual Spaces to Canonical Isomorphisms
- 问题:外积的定义——$v$、$w$ 两个向量,外积就是矩阵 $vw^T$,第 $ij$ 项是 $v_iw_j$——教科书通常直接告诉你『就这样』,但这个定义读起来像凭空规定,缺少动机。The problem: the outer product is usually defined out of the blue — for vectors $v, w$, it's the matrix $vw^T$ with entry $v_iw_j$ — and the textbook just tells you 'that's how it is,' with no motivation.
- Kun 的突破口是换一个问法:『把两个向量变成一个矩阵』不可能是唯一的自然方式(维度对不上),但『唯一』可能指的是某种典范性(canonical)——先搞清楚『一个向量』和『一个线性映射』之间唯一自然的对应关系是什么。Kun's move is to rephrase the question: 'turning two vectors into a matrix' can't be a unique natural operation (the dimensions don't even match), but maybe it's unique in some canonical sense — so first figure out what the one natural correspondence between a single vector and a linear map is.
- 答案是双空间:给定内积,向量 $v$ 唯一对应到线性泛函 $\varphi_v(w)=\langle v,w\rangle$——这是 $V\to V^*$ 的典范同构。The answer is the dual space: given an inner product, vector $v$ corresponds to exactly one linear functional $\varphi_v(w)=\langle v,w\rangle$ — this is the canonical isomorphism $V\to V^*$.
- 把这个套路用到『一对向量』上:取 $v$ 对应的 $\varphi_v$ 和 $w$,自然组合出的线性映射就是 $x\mapsto\varphi_v(x)w=\langle v,x\rangle w$——这个映射的矩阵恰好就是 $vw^T$。外积不再是凭空规定,而是『把两个向量变成一个矩阵』唯一不依赖坐标系的自然构造。Apply that recipe to a pair of vectors: take $v$'s corresponding $\varphi_v$ and pair it with $w$; the natural composition is the linear map $x\mapsto\varphi_v(x)w=\langle v,x\rangle w$ — and that map's matrix is exactly $vw^T$. The outer product stops being an arbitrary decree and becomes 'the' coordinate-independent way to build a linear map out of two vectors.
- 附带一个容易忽略的细节:这个构造对 $(\lambda v,\lambda w)$ 给出 $\lambda^2vw^T$,不是线性的——所以它不可能把 $V\times V$ 变成 $\mathrm{Hom}(V,V)$ 的线性同构,只能作为一个『嵌入』的子空间;这也解释了为什么外积的秩-1 分解有唯一性,而单纯的两行矩阵和没有。One easily-missed detail: this construction is not linear in $(\lambda v,\lambda w)$ — it gives $\lambda^2vw^T$ — so it can't be a linear isomorphism between $V\times V$ and $\mathrm{Hom}(V,V)$; it's only a subspace embedding. That also explains why the outer product gives a unique rank-1 matrix decomposition, whereas a naive 'two-rows-of-zeros' construction doesn't.
- 能带走什么:『一个东西的定义像是凭空规定』时,值得追问一句『这是不是唯一不依赖坐标/基的选择』——典范性(canonical)这个标准,经常能把看起来很任意的事变成唯一的。What to take away: whenever a definition feels arbitrary, it's worth asking 'is this the only choice that doesn't depend on coordinates or a basis' — 'canonical' is a standard that often turns something that looks arbitrary into something that's forced.
- 『找超过一半的多数值』只需要一个计数器:Boyer-Moore 多数投票算法Finding the Value That Occurs More Than Half the Time Needs Just One Counter: The Boyer-Moore Majority Vote
- 问题:一个巨大的数据流,保证其中某个值出现超过 $n/2$ 次,找出它是谁——只能用 $O(1)$ 额外空间、单遍读入。The problem: a huge stream of values, with the guarantee that one value occurs more than $n/2$ times — find it, using only $O(1)$ extra space, in a single pass.
- 关键想法:想象把流里的值两两『配对消除』(不同值互相对消),只要有一个值超过半数,它必然在消除结束后还活着。The key idea: imagine pairing up and canceling values in the stream (distinct values cancel each other out). If one value truly has a majority, it must survive after all the canceling is done.
- 算法的具体做法:维护一个『当前候选值 + 它领先多少对』—— 看到跟候选相同的,领先数加一;看到不同的,领先数减一;减到零就换成新的候选值。一行 Python 就够。How that works as an algorithm: keep a 'current candidate + how far ahead it is' — same value, increment the lead; different value, decrement it; when the lead hits zero, swap in a new candidate. It fits in a few lines of Python.
- 为什么这样是对的、又为什么必须是『超过一半』:Kun 给出一个下界证明——如果没有『超过 $n/2$』这个保证,任何单遍算法最坏情况下都需要 $\Omega(n)$ 空间(前 $n/2$ 个互不相同、后 $n/2$ 个全相同的反例),所以这个保证不是多余的,是把空间复杂度从 $\Omega(n)$ 砍到 $O(1)$ 的关键前提。Why it's correct, and why the 'more than half' condition is necessary: Kun gives a lower-bound proof — without that guarantee, any single-pass algorithm needs $\Omega(n)$ space in the worst case (an adversary picks the first $n/2$ values all distinct, the last $n/2$ all equal to one of them), so the majority guarantee is exactly what collapses the space requirement from $\Omega(n)$ down to $O(1)$. It's also generalizable: find $k$ values each appearing more than $n/(k+1)$ times with $k$ counters instead of one.
- 还能带走什么:把『一个值超过所有其他值总和』这种『支配性』条件,转成『配对消除后活下来的就是它』——这个技巧(Boyer-Moore 多数投票)在很多流式/分布式场景(比如找『超过 1/3 的值』时用两个计数器)都能直接套用。What to take away: turning a 'dominance' condition (one value beats all the others combined) into 'pair off and cancel, whatever survives is the answer' — this trick (Boyer-Moore majority vote) shows up again and again in streaming and distributed settings.
程序员随想A Programmer's Reflections
- 『市场会自动淘汰低质产品』是误用了有效市场假说:为什么便宜≠好,贵≠更好'The Market Automatically Eliminates Low-Quality Products' Is a Misuse of the Efficient Markets Hypothesis: Why Cheap Isn't Better and Expensive Isn't Better Either
- 问题:常见的直觉是『市场有效,所以如果你发现某个产品/服务明显做得很差,那一定是你看错了——好的一定会赢』。Luu 反驳:这是把『资本市场』的有效市场假说误用到了『消费品/服务』市场。The problem: the common intuition is 'markets are efficient, so if a product or service looks obviously bad, you're probably wrong about that — the good stuff wins.' Luu pushes back: this is misapplying the efficient-markets hypothesis, which actually describes financial markets, not consumer/product markets.
- 关键区别:资本市场有套利机制——发现某资产被低估,可以直接买它赚钱,机制会把这个错误迅速抹掉。但『iPhone 用户其实没必要换 Android』这种观察,没有任何机制让你『赚差价』——没人会因为指出这一点而直接获利,所以低质产品/服务可以长期存在。The key difference: capital markets have an arbitrage mechanism — if something is underpriced, you can literally buy it and make money on the correction, and that mechanism corrects the error quickly. But an observation like 'iPhone users didn't actually need to switch to Android' generates no arbitrage — nobody directly profits from pointing it out, so the low quality can persist for years.
- 证据一:Greenspan 在自传里写,她当 Fed 主席之前的公司专门雇佣『被市场低估的女性经济学家』——同样的活儿,给更少的钱,质量更好。这个『套利』她做到了,但只在很小的规模上,没有改变整个市场(雇佣量太小,价格没有被拉平),说明结构性低效可以存在几十年。Evidence 1: Greenspan's memoir says that before she became Fed Chair, her firm deliberately hired 'undervalued women economists' — the same job, cheaper, better output. She found the arbitrage, but only at a small scale; it never moved the whole market's pricing, showing that structural inefficiency can persist for decades.
- 证据二:Wave 的 CTO 亲述——他们选了业界『共识最佳』的数据同步产品(Postgres→Snowflake),结果数据又丢又坏,最后发现是产品『按设计』就不支持 Postgres 的 changelog 特性;买(buy)比自建(build)省的时间,反而因为要不断绕过产品的设计缺陷而花更多。Evidence 2: the CTO of Wave describes picking the 'consensus best' data-sync product (Postgres→Snowflake) — it lost, duplicated, and corrupted data; on digging in, the product was designed, by construction, not to work with Postgres's changelog. The 'buy' path saved time on paper, but ended up costing more because of constant workarounds around the product's own design flaws.
- 能带走什么:判断一个产品/服务『好不好』不能靠『市场共识』,要靠自己真的踩过一遍坑、或者找真正懂行(且懂行不等于『在这个领域工作』)的人问——『专家给的建议』在信息不对称的市场里经常不可靠。What to take away: you can't judge whether a product or service is 'good' from 'market consensus' alone — either you've personally hit the failure mode, or you've asked someone who is genuinely expert on that specific thing ('works in the field' is not the same as 'expert on the field').
- 主流叙事说微软是 Nadella 救活的——Luu 用 20 年的数据反驳 Ballmer 被低估了The Dominant Narrative Says Nadella Saved Microsoft — Luu Pushes Back, With Two Decades of Evidence That Ballmer Was Underestimated
- 问题:几乎每个讨论微软历史的地方都有同一套叙事——『Ballmer 任内微软在衰退,是 Nadella 把它救回来的』。Luu 不否认 Nadella 做得好,但反驳这套叙事把 Ballmer 的角色低估了。The problem: nearly every discussion of Microsoft's history runs the same script — 'Microsoft was in decline under Ballmer; Nadella saved it.' Luu doesn't dispute that Nadella did well; he disputes that this narrative understates what Ballmer actually accomplished.
- 关键观察:Ballmer 任内做了好几个『当时被骂、事后证明价值巨大』的长期下注——Azure(云)、企业销售体系、Office 订阅化——这些在他在任时普遍被认为是错的方向,但后来成了微软市值增长的核心。The key observation: under Ballmer, Microsoft made several long bets that were widely mocked at the time but turned out to be enormously valuable later — Azure (the cloud), the enterprise sales machine, and Office's move to subscription.
- 还有一个更隐蔽的功劳:Ballmer 用销售体系替继任者清除了政治障碍——Luu 类比 Gary Bernhardt 的演讲(把问题和解法都摆得太明白,导致观众反而觉得讲的人没做什么):正因为 Nadella 的接手太顺畅,人们反而容易把功劳全记在接手的人头上。A subtler contribution: Ballmer's sales machine cleared political obstacles for whoever came next. Luu makes an analogy to Gary Bernhardt's talk — when the problem and the solution are presented so clearly that the audience realizes they learned something non-trivial without noticing, they end up undervaluing the person who laid it out: because Nadella's handoff looked so smooth, it's easy to credit only the person who took over.
- 证据链:Bing 被普遍认为是失败产品,但它 2024 年单业务口径利润约 64 亿美元;Azure 至今大概率值万亿美元量级;企业销售体系的威力甚至体现在『Google 白送企业版套件,微软付费版照样能赢单』。The evidence: Bing, widely declared a failure, still generated roughly 6.4 billion dollars in profit in FY2024; Azure is plausibly worth on the order of a trillion dollars today; and Microsoft's enterprise sales arm was powerful enough that Google giving its enterprise suite away for free didn't usually lose the deal.
- 能带走什么:判断一个 CEO/管理者的历史地位,不能只看任期内的表面评价(比如『当时被骂』),要看他们留下的结构性资产(销售体系、云基础设施)是否替下一个接手的人铺好了路。What to take away: when judging a CEO's legacy, don't just weigh the reputation they had while in office (like 'was mocked at the time') — weigh the structural assets they left behind (a sales machine, cloud infrastructure) and whether those assets set up the next person for success.
- 发 1000 封邮件要 15 美元:你付的不是代码成本,是『信誉积累』成本It Costs About 15 Dollars per 1,000 Emails: What You're Paying for Isn't Code, It's 'Reputation Accumulation'
- 问题:发一封邮件在技术上跟发一个 HTTPS 请求差不多难——开 TCP 连接、做 TLS 握手、发数据。那么为什么第三方邮件服务要收『每 1000 封 15 美元』?The problem: sending an email is technically about as hard as making an HTTPS request — open a TCP connection, do a TLS handshake, send data. So why do third-party email services charge 'about 15 dollars per 1,000 emails'?
- Czaplicki 自己动手试了一遍:SMTP 协议本身不难(七个往返+设 DNS TXT 记录声明你是真的这个域名+加上 TLS),写出来不难,但结果进垃圾箱。Czaplicki actually tried it himself: SMTP itself isn't hard (seven round trips, set up DNS TXT records proving you control the domain, add TLS). Getting it to work wasn't the hard part — the emails just landed in spam.
- 真正的原因是『收件方』的反垃圾策略,而不是『发信方』的技术成本:不同收件方(Gmail、Outlook、Yahoo……)看重什么完全不同——有的看域名信誉,有的看单个 IP,有的看整个 IP 段;如果你的小云厂商的某个 IP 段被别家用来发垃圾邮件,你的所有邮件可能被整个段拉黑,跟你的域名/行为毫无关系。The real reason is the recipient-side spam filters, not sender-side technical cost: different inbox providers (Gmail, Outlook, Yahoo, and others) care about completely different things — some weigh domain reputation, some weigh a single IP address, some weigh the entire IP block. If some other customer on your small cloud provider's IP block sends spam, your entire block can get blacklisted, regardless of your own domain or behavior.
- 所以『发 1000 封 15 美元』的真正含义:这 15 美元买的是『你的 IP 段/域名已经被各大收件方长期当作可信发信人』——这是一份要靠长期、大量、正常的发信行为慢慢积累出来的信誉,不是一段代码能写出来的东西。So what 'it costs $15 to send 1,000 emails' really means: that $15 buys 'your IP block/domain has been treated as a trusted sender by the major inbox providers for a long time' — reputation that has to be accumulated slowly, over a long history of normal, high-volume sending, not something code can just produce on demand.
- 能带走什么:很多『基础网络服务』的成本结构不是按代码复杂度定价的,而是按『信任积累』定价的——邮件送达率、DNS 信誉、IP 段历史记录,这些都是需要时间养出来的资产,不是可以即插即用的功能。What to take away: many 'basic network services' aren't priced by code complexity — they're priced by trust accumulation. Email deliverability, DNS reputation, IP-block history: these are assets you have to grow over time, not features you can plug in.
- 把 shunting-yard 变成 Pratt 解析器:作者自己把调用栈当『操作符栈』用的那一步Turning Shunting-Yard Into Pratt Parsing: The Moment the Author Realizes the Call Stack Is the Operator Stack
- 背景:作者想写一个 C 表达式解析器(目标是个小编译器),之前用过 Dijkstra 的 shunting-yard 算法做过一个计算器,这次想学得更『正经』一点,去读了 Pratt 解析的原始论文。他发现这个算法在 CS 常规课程里几乎从不教(Dragon Book 都没提),主要活在编译器/PLT 圈子里。The setup: the author wanted a C-expression parser (stepping stone to a small compiler), had previously built a calculator with Dijkstra's shunting-yard algorithm, and this time went after the 'proper' version — Pratt parsing — after reading the original paper. It barely shows up in a standard CS curriculum (not even in the Dragon Book); it mostly lives in compiler/PLT communities.
- 关键的一步是作者自己把两个算法对上了:shunting-yard 用一条显式的『操作符栈』来记住优先级,而 Pratt 解析的等价做法是——干脆不用显式栈,让函数调用本身的调用栈(call stack)在需要的时候『隐式地』承担『进入一个子表达式』这件事。The key move is the author's own correspondence between the two algorithms: shunting-yard keeps an explicit 'operator stack' to track precedence; Pratt's equivalent trick is to skip the explicit stack entirely and let the function-call stack itself, implicitly, 'enter a subexpression' when needed.
- 具体到代码:shunting-yard 里『弹出所有优先级不低于当前操作符的项』这一步,对应到 Pratt 里就是 `while left_bindpower < get_bindpower(cur)` 这个循环——条件不成立的时候,就等价于 shunting-yard 里『把栈展开』(回到上一层调用)的时刻。In code, this shows up as: shunting-yard's 'pop every operator with binding power >= the current one' step is exactly the `while left_bindpower < get_bindpower(cur)` loop in the Pratt version — the moment that condition fails is the moment shunting-yard would unwind back to the previous nesting level.
- 这个『对应关系』是这篇最有价值的地方:不是照抄某本教材,而是作者真的自己把两套代码并排跑、对照输出,才看出两条路其实是同一个东西的两种写法。That side-by-side comparison — actually running both parsers on the same input and watching where their outputs line up, step for step — is the most valuable part of the post: it's not a copy of a textbook, it's the author literally diffing two working implementations until the correspondence clicks.
- 能带走什么:学一个『正统』但没人教你的算法(比如 Pratt),最快的一招不是先把它从头到尾啃一遍,是先找到你已经会的东西(比如 shunting-yard),再问一句『这两个在哪一步是同一个操作』——那个对应点往往就是真正的理解所在。What to take away: when learning a 'canonical' algorithm nobody taught you (like Pratt), the fastest shortcut isn't to grind through it from scratch — it's to anchor on something you already know well (like shunting-yard) and keep asking 'which step is the same operation in both?' That step is usually the actual understanding, not just memorized code.
哲学与生活Philosophy & Life
- 『反资本主义和平』:为什么 30 多个综合性和平协议之后,多数国家反而更乱了'Anticapitalist Peace': Why, After More Than 30 Comprehensive Peace Accords, Most Countries Got Messier, Not Better
- 问题:冷战结束以来,全球签了 30 多个『综合性和平协议』,承诺停火、解除武装、重新整合前战斗人员——但几乎没有哪一个真正建立起持久和平。The problem: since the end of the Cold War, more than 30 comprehensive peace accords have been signed worldwide, promising ceasefires, disarmament, and reintegration of former combatants — yet almost none has produced durable peace.
- 一个具体的案例:危地马拉 1996 年的和平协议被普遍称赞为创新,因为第一次直面了过去——成立了历史澄清委员会、审判了战犯。但作者 2017 年在那里访谈的一位前战斗员说:『战争结束那天我哭了——因为我不知道和平里怎么活下去:我没有家、没有工作、没有手艺。现在怎么办?』One concrete case: Guatemala's 1996 peace accord was widely praised as innovative, because it confronted the past directly — a historical clarification commission, war-crimes trials. But one former combatant the author interviewed in 2017 said: 'The day the war ended, I cried — because I didn't know how to live in peace: I had no home, no job, no trade. What now?'
- 这个『现在怎么办』是对『负和平』(negative peace,即只是停止直接暴力)本身的一个指控:它消除了战争,但没有消除引发战争的那个结构性不公正(在危地马拉是土地占有和种族歧视),所以战争的经济基础原封不动。That 'what now?' is an indictment of 'negative peace' (just stopping direct violence) itself: it ended the war but didn't touch the structural injustice that produced it (in Guatemala's case, land tenure and ethnic discrimination) — so the economic conditions that caused the war were left intact.
- 作者(长期在危地马拉、哥伦比亚、叙利亚北部做田野研究的社会学家)的更激进结论:真正的『正和平』需要建设一种根本不同于资本积累逻辑的经济体——合作社是她给出的具体机制,但关键不是合作社本身,而是它同时挑战资本积累、父权制、殖民主义和国家主义,而不仅仅是『停火』。The author (a sociologist who has done fieldwork in Guatemala, Colombia, and northern Syria) draws the more radical conclusion: real 'positive peace' requires building an economy that runs on fundamentally different logic than capital accumulation. Cooperatives are her concrete mechanism, but the point isn't cooperatives as such — it's that they challenge capital accumulation, patriarchy, colonialism, and statism at the same time, rather than merely 'stopping the shooting.'
- 能带走什么:判断一个『和解/改革』方案是否够格,可以问一句:它消除的是直接的暴力/冲突本身,还是引发那场暴力的结构性条件?很多听起来很『进步』的方案,其实只动了第一层。What to take away: when evaluating any 'reconciliation/reform' proposal, ask one question: does it eliminate the violence/conflict itself, or the structural conditions that produced that violence? A lot of schemes that sound progressive only touch the first layer.
- 火枪如何从『魔鬼的发明』变成每个公民都该会的武器:文艺复兴意大利的半个世纪How the Gun Went From 'The Devil's Invention' to a Weapon Every Citizen Should Know: Half a Century in Renaissance Italy
- 问题:15世纪末,火药武器在意大利的艺术和文学里几乎一致地被骂成『魔鬼的作品』,被斥为不骑士气的、低劣的东西。但不到半个世纪,到1539年,佛罗伦萨美第奇家族仓库里就存了91支火枪,威尼斯共和国甚至立法要求民兵团里每10个人就配1支。这篇文章讲的就是这个转变怎么发生的。The problem: in the late 1400s, firearms in Italian art and literature were nearly universally called 'the Devil's work,' dismissed as unchivalric and lowly. But less than a half-century later, by 1539, the Medici family's Florence armory held 91 firearms, and the Republic of Venice had legislated that roughly 1 in every 10 militia members carry one. The essay is about how that reversal actually happened.
- 关键不在『武器好不好用』本身,而在『谁在用、为什么用』:意大利城邦没有常备军,打仗靠临时动员加雇佣兵,但1506年佛罗伦萨的民兵法令明说『对外来的、雇来的兵没有太大指望』——这句话背后是几十年的意大利战争里反复被证明的教训:雇佣兵不靠你的城市生死存亡,所以不会真正拼命。The key isn't 'is the weapon good' on its own — it's 'who uses it, and why': Italian city-states had no standing armies, so war meant temporary mobilization plus mercenaries. A 1506 Florentine militia law said plainly that there was 'little hope' to be placed 'in foreign and hired arms' — the accumulated lesson of decades of Italian warfare that mercenaries, who aren't personally staking their home on the outcome, won't fight as hard.
- 所以『公民民兵』这套制度真正的创新点不是『有了火枪』,而是把火枪塞进了一个本来没有的『公民自我防卫义务』里——让武器的使用者变成了土地的所有者/居民本身,而不是领了钱干活的陌生人。这是制度设计问题,不是技术问题。So the real innovation of the 'citizen militia' wasn't 'they had guns' — it was that the gun got slotted into a previously missing obligation: every citizen-resident of the city now had a duty to defend it personally, not a stranger getting paid by the day. That's an institutional-design problem, not a technology problem.
- 另一个容易被忽略的层面是『审美』:高级火枪(比如发条枪/wheellock)从一开始就是奢侈品,装饰上有古典神话、宗教人物、狩猎场景,跟宫廷文化里珍视的工艺美完全接轨——火枪要成为『体面的』东西,得先变成一件可以被炫耀的手工艺品,而不只是一件杀人的工具。An easily-missed layer is aesthetics: high-end firearms (like the wheellock, a concealed-carry-capable mechanism) were luxury items from the start — decorated with classical myth, religious imagery, and hunting scenes, fully at home in court culture's obsession with craftsmanship. A gun had to become something to display, not just something to kill with, before it could fully clear the 'diabolical' stigma.
- 能带走什么:一项技术从一个群体里的『禁忌』变成『必需品』,往往不是因为它变强了,而是因为它被塞进了一个跟『身份/义务』绑定的制度里(公民民兵),同时又被塞进了一个跟『品味/地位』绑定的文化里(奢侈品装饰)。技术扩散的速度,经常取决于它被接进多少套已有的社会系统,而不取决于它本身的技术指标。What to take away: when a technology goes from 'taboo in this group' to 'everybody needs one,' it's rarely because the tech got stronger — it's because it got wired into pre-existing systems of identity/obligation (citizen militia duty) and systems of taste/status (luxury decoration). How fast a technology spreads often depends on how many existing social systems it gets plugged into, not on its raw technical specs.
工具角Tools Corner
- keybytes:每个键都是一块独立 PCB + 自己的 RISC-V 微控制器keybytes: Every Key Is Its Own PCB + Its Own RISC-V Microcontroller
- 问题:市面上的『模块化键盘』通常指的是『键位可拆分、可以换布局』,但每个键本身没有独立身份——布局/行为仍然由一整块主键盘的固件统一决定,重排键位要重新刷整块固件。The problem: 'modular keyboards' on the market usually just mean 'keys can be unclipped and rearranged' — but each key still has no identity of its own; the layout/behavior is decided by one keyboard-wide firmware, and re-arranging keys means reflashing the whole keyboard.
- keybytes 的原创点:每个键是一个 1u 的独立 PCB,自带一个 CH32V003 RISC-V 微控制器;四边都有 pogo pin(弹簧触点)负责供电和 I2C 通信;主板上是带蓝牙的 STM32WB55RGV6,能对每个键的 2MB QSPI 闪存里的按键固件单独编程。keybytes' original idea: every key is its own 1u PCB with its own CH32V003 RISC-V microcontroller; pogo pins on all four sides carry power and I2C; the mainboard (an STM32WB55RGV6 with Bluetooth) can program each key's 2MB of QSPI flash individually.
- 结果:任意重排键位布局,每个键甚至可以有自己的按键码/行为,不需要重新焊接、也不需要刷整块键组的固件——因为『键』本身就是一个可寻址的计算单元。The payoff: rearrange the physical layout freely, and each key can even have its own key code/behavior, without re-soldering or reflashing a whole key group — because the 'key' itself is now an addressable compute unit.
- 能带走什么:『模块化的下一步』是『每个部件自己就是可独立编程的计算单元』——这个思路不只适用于键盘,任何『固定布线+集中固件』的硬件设计(比如可重构的设备)都可以问一句:能不能把固件/算力直接分到部件本身?What to take away: 'the next step past modular' is 'every part is itself an independently programmable compute unit' — a question worth asking for any fixed-wiring + central-firmware hardware design.
- Java ME 还能用现代工具链构建:不用 2002 年代的 SDKJava ME Apps Are Still Buildable With a Modern Toolchain — No 2002-Era SDK Required
- 问题:Java ME(功能机时代的小屏幕 Java 应用)通常被认为『死了』,要跑起来只能翻出 2002 年代的 Sun SDK,在现代开发环境里很别扭。The problem: Java ME (the old feature-phone Java platform) is usually treated as 'dead' — running it seems to require digging out a 2002-era Sun SDK, which is awkward in a modern dev environment.
- 这篇的做法:纯现代工具链——OpenJDK 8 的 javac + MicroEmulator 提供的 stub JAR(提供编译期 API,不需要真的模拟器才能编译)+ ProGuard 做 preverification 步骤(Java ME 的老规矩,但用现代版本的 ProGuard 跑就行)。This post's approach: a purely modern toolchain — OpenJDK 8's javac + MicroEmulator's stub JARs (the compile-time API surface, no actual emulator needed just to compile) + ProGuard for the preverification step (an old Java ME requirement, but runnable with a modern ProGuard version).
- 结果:一个能在 2020 年代的功能机上真正运行的 MIDlet,全程没有用到任何 2002 年代的专有工具。The result: a MIDlet that actually runs on a 2020s feature phone, with zero proprietary 2002-era tooling anywhere in the pipeline.
- 能带走什么:『古董平台』往往比看起来更容易接进现代工具链——通常瓶颈不是平台本身,而是『大家都默认你要用配套的老 SDK』这个惯性;拆开看每一步(编译、链接、预验证),现代工具几乎总能替代。What to take away: 'ancient platforms' are usually far easier to wire into modern toolchains than people assume — the real bottleneck is the reflex assumption that 'you have to use the matching legacy SDK'; break the process into steps (compile, link, pre-verify) and modern tooling can usually stand in for each one.
- Vim Classic:一个明确写着『长期支持 + 完全不用 AI 生成代码维护』的 Vim forkVim Classic: A Vim Fork That Explicitly Promises 'Long-Term Support + No AI-Generated Code in Maintenance'
- 问题:Vim 主线(9.x)近两年引入了 AI 辅助生成的代码,引发了社区对可审计性/稳定性的担忧——但 fork 通常只是『分叉』,没有一个 fork 把『人类可审计、长期维护』当成一条写进发布说明的承诺。The problem: mainline Vim (9.x) has leaned on AI-assisted code generation in the last couple of years, raising community worries about auditability/stability — but a fork is usually just 'a branch,' and none of them had made 'human-auditable, long-term-maintained' an explicit promise in the release notes.
- Vim Classic 的原创点:它不是一个普通 fork,而是一个明确宣布『long-term support + 完全不用生成式 AI 工具维护』的分支——把它当成一个『立场性项目』,而不只是『换个分支继续开发』。Vim Classic's original angle: it's not just another fork — it's explicitly branded as 'long-term support + maintained entirely by humans, no generative AI tools,' treating it as a position-taking project rather than 'just another branch to keep developing on.'
- 能带走什么:有时候 fork 的价值不在于『修了什么』,而在于『承诺了维护方式』——可审计性、不引入新依赖、人类可读的 diff,这些对一个编辑器来说比新功能更重要。What to take away: sometimes a fork's value isn't 'what it fixes' but 'what it promises about how it's maintained' — auditability, no new dependencies, human-readable diffs matter more than new features for something like a text editor.
- slurpburgers 的 Slurptop:用 24V 电动工具电池给 19V mini PC 供电slurpburgers' Slurptop: Powering a 19V mini PC from 24V Power-Tool Batteries
- 问题:想要一台便携 x86 电脑(能装 64GB 内存、跑真正的桌面 Linux/Windows),但市售笔记本的电池不可换、不可充电扩展。The problem: you want a portable x86 machine (64GB RAM, runs real desktop Linux/Windows), but off-the-shelf laptop batteries are fixed and can't be swapped or extended.
- Slurptop 的原创点:用 24V 电动工具电池(Kobalt 品牌,买二手的很便宜)通过升/降压转换器(buck-boost)给 19V/5A 的 mini PC 供电,电池可拆卸更换(虽然不能热插拔)——续航直接取决于你手头有几块电动工具电池,而不是厂商卖给你的那块内置电池。Slurptop's original idea: power a 19V/5A mini PC from 24V power-tool batteries (Kobalt, cheap if you shop used) via a buck-boost converter; the battery is swappable (not hot-swappable), so your run time is whatever batteries you happen to have on hand, not a single fixed internal pack the vendor sold you.
- 设计上还有一个很讲究的细节:屏幕外壳的尺寸恰好卡在 3D 打印机的打印床边缘(340mm,余量不到 2mm)——『measure ten thousand times』的严谨流程的产物。Another design detail worth noting: the screen enclosure's outer frame is sized to fit the 3D printer's bed almost exactly (340mm, under 2mm of clearance on each side) — the payoff of the author's 'measure ten thousand times' workflow of 3D-modeling every single part before printing.
- 能带走什么:把『非标准但便宜、易获得』的工业品(电动工具电池)通过一个电源转换模块接入消费级设备,比『买一块标准电池组』更便宜、更灵活——这是 DIY 硬件里很典型但常被忽略的思路。What to take away: wiring a non-standard but cheap/abundant industrial part (power-tool batteries) into a consumer device through a power-conversion stage is often cheaper and more flexible than buying a 'standard' battery pack — a move that's common in DIY hardware but easy to overlook.