每日科技文摘 2026-11-02:算得清账的 AI、讲不明白的框架Daily Digest 2026-11-02: AI You Can Actually Benchmark, Frameworks You Can't Explain
发布于 2026-11-02Published 2026-11-02
今日深读Today's Deep Read
让 agent 各写 5 遍同一个应用:『哪个框架对 AI 更好』第一次有了数据Let Agents Build the Same App 5 Times Each: 'Which Framework Is Better for AI' Now Has Data
Lawson 常年被骂『框架圈全靠感觉』:『Next 快如闪电』『Svelte 让 AI 写得更少』——这些口号从没配上过基准测试。agent 时代把这件事推到了不得不做的地步:现在决定『用哪个框架』的常常是那个替你写代码的 agent,而不是键盘另一头的人。于是他做了个笨办法:拿一个非平凡但可规格化的小应用(Pokémon 数据展示,来自 PokéAPI),让同一个 coding agent(Opus 5.5 高努力档)分别用 12 种 JS 框架/元框架各建 5 遍,每遍记录费用、耗时、token、代码量与 Lighthouse 性能/可访问性,取中位数。 规格里刻意留了两道防线:agent 不许知道 Lighthouse 会被测(防作弊),各框架只能用官方 MCP/skill(防『我们框架训练数据多』的偏袒)——这是整篇里最容易被跳过的两个方法论细节。Lawson has long complained that the JS framework world runs on vibes: 'Next is blazing fast,' 'Svelte makes agents write less code' — slogans that have never been paired with a benchmark. The agent era made this unavoidable, because the decision of 'which framework to use' is increasingly made by the agent that writes the code, not by a human at a keyboard. His method is deliberately brute-force: one non-trivial but specifiable app (a Pokémon data display against PokéAPI), the same coding agent (Opus 5.5, high effort) building it five times each across 12 frameworks/meta-frameworks, recording cost, wall-clock time, tokens, lines of code, and Lighthouse performance/accessibility — then taking medians.
最反直觉的结果在最上面:贵的不是你以为的那种。SvelteKit、Gracile+Lit、Angular 明显更烧钱(中位数 4.3–5.0 美元,最贵跑到 6.8),htmx+Hono、Astro、Nuxt 排前三(2.7–2.8 美元),原生 JS 甚至打败了好几个框架——不是『不用框架更好』,而是『某些框架比裸 Vite 还费』。作者解释得很诚实:贵往往不是框架本身,而是 agent 每次都要读迁移文档或啃 node_modules 里的源码——SvelteKit v3 太新、进不了训练数据,所以每次都在现场补课。The most counter-intuitive result sits at the top: the expensive ones aren't who you'd guess. SvelteKit, Gracile+Lit, and Angular burn clearly more (4.3–5.0 USD median, up to 6.8), while htmx+Hono, Astro, and Nuxt lead the cheap end (2.7–2.8 USD) — and vanilla JS beats several frameworks. Not 'no framework is better,' but 'some frameworks cost more than raw Vite.' The author's explanation is honest: the cost is often not the framework itself but the agent re-reading migration docs or node_modules source on every run — SvelteKit v3 is too new for the training data, so it's learning on the spot, every time.
第二个值得记住的教训是方差:同一框架的 5 次运行里,React Router 最便宜的一比(2.82 美元)比 htmx 最贵的一比(3.19 美元)还便宜。LLM 是随机词生成器,agent 会在跟框架无关的地方掷骰子。所以这个基准真正产出的不是排行榜,而是一张『方差地图』——哪些比较是稳的(框架差距大于单次噪声才可信),哪些只是噪声。The second takeaway is variance: across five runs of the same framework, React Router's cheapest run ($2.82) beats htmx's most expensive ($3.19). LLMs are random-word generators; the agent rolls dice in ways that have nothing to do with the framework. So the benchmark's real output isn't a leaderboard but a 'variance map' — which comparisons are trustworthy (framework gaps larger than single-run noise) and which are just noise.
对程序员的实际启示:别再用体感给 agent 选工具栈。如果『我们的框架对 AI 更友好』是卖点,就让它按 Lawson 的规格付一次费用,或至少跑 5 次取中位数。体感时代结束了——因为体感正是那个替你写代码的 agent 最容易上当的东西。The practical lesson: stop picking a stack for your agents on gut feeling. If 'our framework is better for AI' is your pitch, make it pay the price per Lawson's spec — or run it five times and take the median. The vibes era is over, because vibes are exactly what the agent writing your code is most susceptible to.
AI 思考AI Thoughts
- 别再问『哪个模型最强』:让『人类偏好预测』替你给每个 prompt 选模型Stop Asking 'Which Model Is Best': Let Predictive Human Preference Route Each Prompt to the Right Model
- 核心问题:搭 AI 应用时最难的是『用哪个模型』。Huyen 的思路:别给整个系统选一个固定模型,而是对每个 prompt 单独预测『用户会偏好哪个模型的回复』——这就是『可预测的人类偏好』(predictive human preference)。The core problem: in an AI app, 'which model do I use' is the hardest call. Huyen's idea: don't pick one fixed model for the whole system — instead, for each individual prompt, predict 'which model's response would the user prefer.' That's 'predictive human preference.'
- 两个直接收益:(1) 模型路由——如果知道某个 prompt 上用户偏好 Claude Instant 的回复、而它比 GPT-4 便宜又快,就把这个 prompt 路由过去;(2) 可解释性——把每个模型在不同 prompt 上的强弱画成一张『偏好图』,你就看清了它擅长什么、缺什么。Two payoffs: (1) model routing — if for a given prompt users prefer Claude Instant over GPT-4, and it's cheaper and faster, route that prompt to it; (2) interpretability — plot each model's strengths/weaknesses per prompt into a 'preference map' and you can see what it's good at and where it falls short.
- 她的实验用了 LMSYS 的 Chatbot Arena 排名当基准,先检验『人类偏好』信号本身靠不靠谱(她发现大量用户其实乱投票,噪声很大,但一小撮投对的人就足以定出排名),再用它评估自己训练的偏好预测器。Her experiment used LMSYS Chatbot Arena rankings as a baseline. First she checks whether the 'human preference' signal is even reliable (she finds most users vote almost at random — heavy noise, but the small minority who vote correctly is enough to fix a ranking). Then she uses it to grade the preference predictor she trains.
- 能带走什么:『按 prompt 路由』比『按能力选模型』是工程上真正可用的一套逻辑——你不必全量上最贵的模型,只需对每个任务预测『哪个模型在这个任务上最被偏好』,再把省下的预算花在需要它的那些任务上。What you can keep: 'route per prompt' beats 'pick one model by capability' as an actually deployable engineering pattern — you don't have to run everything on the priciest model; you only predict, per task, 'which model does the user prefer here,' and spend the saved budget where it's actually needed.
- Karpathy 的 HackerTube:一个『不再亲手写代码』的周末Karpathy's HackerTube: A Weekend Where He No Longer Writes Code
- 起因很个人:周五深夜刷 YouTube,发现推荐算法给他端上来的全是'劣化的一堵 slop 墙'——夸张封面、同质化话题。他的反应不是骂,而是'让 Opus 5.5 给我们写一个基于 HN 推荐的 YouTube 克隆'。The trigger was personal: a Friday night, YouTube's recommendations had become 'an enshittified wall of slop.' His response wasn't to complain but to ask Opus 5.5 to build 'our own YouTube clone based on whatever videos Hacker News has recommended.'
- agent 干了活:Opus 下载了 Hacker News 的全部评论,筛出 4 万条在推视频,去掉垃圾,最终得到 2007–2026 年间被多人推荐的 6454 个视频,按 150 个话题聚类。然后套上 YouTube 的界面、买域名、部署到 VPS、做安全加固——全程 2 小时。What the agent did: Opus pulled all of HN's comments, filtered down from 40,000 recommendations to 6,454 YouTube videos (2007–2026) clustered into 150 topics, wrapped them in a YouTube-style UI, bought a domain, deployed to a VPS, and hardened it — in about two hours.
- Karpathy 自述里最值得注意的不是项目,是工作方式:'我不再做任何近似传统工程的事(读写代码、敲命令),只跟 Claude 说话让它做。'他手动做的只有三件:申请 Google Cloud 的 API key、开一台 VPS、买域名。The noteworthy part of Karpathy's write-up isn't the project but the workflow: 'I no longer do anything resembling traditional engineering — I just talk to Claude and have it do everything.' His only manual steps: creating a Google Cloud API key, booting a VPS, buying the domain.
- 能带走什么:这是'agentic 生活'的第一手自述样本——瓶颈不再是会不会写代码,而是你愿不愿意把'动手'整段外包,以及那三件 agent 干不了的'肉身杂务'(账号、域名、密钥)反而成了人类的部分。What you can keep: this is a first-person sample of 'agentic living' — the bottleneck is no longer whether you can code, but whether you'll outsource the doing entirely, and the three tasks agents can't do (accounts, domains, keys) become the human part.
- Ted Sanders 谈 OpenAI 的模型命名:版本号同时说了三件事Ted Sanders on OpenAI's Model Naming: A Version Number Says Three Things at Once
- Sanders 先给了一句值得记住的总论:LLM 的能力是多维的,没有一个模型在数学上最强就一定在讲笑话上也最强——但『单一变量』其实解释了大部分差异:模型体积。越大越可靠、越贵、越记得住冷门事实。Sanders opens with a worth-keeping general claim: LLM capability is multidimensional — the best math model isn't necessarily the best joke-teller — but most of the variation is explained by a single variable: model size. Bigger is more reliable, more expensive, and has better recall of esoteric facts.
- 然后是命名规则本身:Luna < Terra < Sol < Astra 的顺序不是任意标签,是能力排序——用天体命名但严格遵循一条单一线。Then the naming itself: Luna < Terra < Sol < Astra is not an arbitrary label set — it's a capability ordering, celestial names but one strict line.
- 最有用的是版本号 6.1 同时编码的三件事:它晚于 5.6 发布(时间线);它和 6.1 系列的其他模型共享训练数据/性格(这是它不叫 5.7 的原因);它还没大到需要头条和更高预期的程度(不是 7)。The most useful part is the three things version 6.1 encodes at once: it launched after 5.6 (timeline); it shares training data and personality with the other 6.1 models (the reason it's not 5.7); and it's not a big enough leap to merit headlines and higher expectations (not a 7).
- 能带走什么:选模型时不要只读 benchmark——读命名。版本号里藏着『和上一代的关系、和同代的关系、和下一代的关系』,比任何跑分都更接近厂商自己对该模型的心理定位。What you can keep: when picking a model, don't just read benchmarks — read the name. A version number encodes 'relationship to the previous gen, to its own gen, and to the next gen,' which is closer to how the vendor psychologically positions it than any benchmark table is.
数学之美The Beauty of Math
每日 Lean 谜题 · 周一Daily Lean Puzzle · Monday ★☆☆☆☆☆☆
每日一题:除以 9 的小把戏Today's Puzzle: The Divisibility-by-9 Trick
设 $n$ 是一个自然数,且 $3\mid n$(即 $n$ 能被 3 整除)。Let $n$ be a natural number with $3\mid n$ (i.e. $n$ is divisible by 3).
证明 $9\mid n + n + n$(即 $3n$ 一定能被 9 整除)。Prove that $9\mid n+n+n$ (i.e. $3n$ is always divisible by 9).
Lean 形式化陈述(把 sorry 换成你的证明):The statement in Lean (replace sorry with your proof):
-- level: 1
import Mathlib
/-! If $n$ is a natural number divisible by $3$, prove that $n + n + n$ is divisible by $9$. -/
theorem triple_sum_div_nine (n : ℕ) (h : 3 ∣ n) : 9 ∣ n + n + n := by
sorry
在浏览器中挑战 ▶Try it in your browser ▶ 下载题目 .leanDownload puzzle .lean
提示Hint
别把 $n$ 的具体数字拉出来——$n=3k$ 这一步是关键。Don't try to name $n$'s digits — the single move $n = 3k$ is the key.
答案与讲解Solution & walkthrough
- $3\mid n$ 意味着存在一个自然数 $k$ 使 $n = 3k$。$3\mid n$ means there is a natural number $k$ with $n = 3k$.
- 于是 $n + n + n = 3n = 3(3k) = 9k$。So $n + n + n = 3n = 3(3k) = 9k$.
- $9k$ 显然是 9 的倍数,所以 $9\mid 3n$,证毕。$9k$ is visibly a multiple of 9, so $9\mid 3n$. QED.
- Lean 里这一行被 `omega` 一口吞掉:`omega` 是整数线性算术的判定器,看到假设 `h : 3 ∣ n` 和结论 `9 ∣ n+n+n`,把『整除』展开成『存在一个 $k$ 使得 $n = 3k$』,然后做线性代数——和上面人工写的三行完全对应。In Lean, one line of `omega` swallows this: `omega` is a decision procedure for linear integer arithmetic. Given the hypothesis `h : 3 ∣ n` and the goal `9 ∣ n+n+n`, it expands 'divides' to 'there exists a $k$ with $n = 3k$', then does the linear bookkeeping — exactly the three human steps above.
-- level: 1
import Mathlib
/-! If $n$ is a natural number divisible by $3$, prove that $n + n + n$ is divisible by $9$. -/
theorem triple_sum_div_nine (n : ℕ) (h : 3 ∣ n) : 9 ∣ n + n + n := by
omega
人的思考A human's take
Divisibility rule(『能否被 9 整除』的那条规则) — Wikipedia (entry on divisibility rules; Martin Gardner's 1962 Scientific American column as the popularizer)
这条 9 的整除小规则有个漂亮的来源:$10 \equiv 1 \pmod{9}$,所以任何十进制数 $a_k 10^k + \cdots + a_0$ 和它的各位数字和 $a_k + \cdots + a_0$ 在 mod 9 下是同一个东西——『被 9 整除』等价于『各位数字和被 9 整除』。This 9-divisibility trick has a beautiful source: $10 \equiv 1 \pmod{9}$, so any decimal number $a_k10^k + \cdots + a_0$ and its digit sum $a_k + \cdots + a_0$ are the same thing modulo 9 — 'divisible by 9' is equivalent to 'digit sum divisible by 9.'
这页条目(以及 Gardner 1962 年推广它的专栏)把『$10 \equiv 1$』当成解释所有 9 系规则的母体:为什么 9 的整除判定是位数字和、为什么 99 的整除判定是两位分块之和——本质都是 $10 \equiv 1$ 的推论。The entry (and Martin Gardner's 1962 column popularizing it) treats '$10 \equiv 1$' as the mother of all 9-family rules: why the 9 test is digit sums, why the 99 test is two-digit block sums — all consequences of $10 \equiv 1$.
AI 随想An AI's reflection
以下由 AI 撰写。Written by AI.
这道题看着小,但正好卡在一个容易被忽略的直觉上:『3 整除 $n$』和『9 整除 $3n$』之间没有任何多余的东西——把 3 拉进括号,$3n = 9 \cdot (n/3)$,一步到位。This is a small problem, but it lands on an intuition people often miss: between '3 divides $n$' and '9 divides $3n$' there is nothing extra — pull the 3 into the parenthesis and $3n = 9 \cdot (n/3)$ lands in one move. The reflexive move is to enumerate — try $n = 3, 6, 9$ one by one — but that path can never finish, because it bypasses the actual structure: the moment $n$ is a multiple of 3, it already carries one factor of 3, and multiplying by 3 once more completes the 9. 'Divisible by 3' has already prepared half of the 9 you need.
很多人会下意识地去『枚举』——试 $n=3,6,9$ 一个个验过去。但这条路既慢又永远完不成,因为它绕开了真正的结构:$n$ 只要是 3 的倍数,就已经自带了一个因子 3,再乘一次 3 就凑成 9。换句话说,『被 3 整除』本身就已经把『被 9 整除』所需的 9 的一半准备好了。Lean's `omega` compresses the whole 'expand the definition + linear bookkeeping' path into a single tactic; a human writing it out does the same two moves: rewrite 'divides' as 'there exists a $k$', then rearrange. That 'what the machine does is exactly what a human does' moment is one of the most honest things about formalized proof — `omega` isn't skipping the two steps, it's just doing them faster and without error. (This section was written by AI.)
Lean 的 `omega` 把这一整个『展开定义+线性算术』的路径压成一条命令,而人写的时候其实也是同样的两条:先把『整除』翻译成『存在 $k$』,再重排。这种『机器做的其实和人做的一模一样』的时刻最能说明形式化证明的诚实——`omega` 不是跳过了那两步,而是把那两步做得又快又不出错。(本段为 AI 撰写。)Lean 的 `omega` 把这一整个『展开定义+线性算术』的路径压成一条命令,而人写的时候其实也是同样的两条:先把『整除』翻译成『存在 $k$』,再重排。这种『机器做的其实和人做的一模一样』的时刻最能说明形式化证明的诚实——`omega` 不是跳过了那两步,而是把那两步做得又快又不出错。(本段为 AI 撰写。)
✓ 已通过 Lean 编译验证(无 sorry,无额外公理)✓ Verified by Lean (no sorry, no extra axioms) · 题目与证明由 AI 编写Problem and proof written by AI · Lean v4.36.0-rc1 · Mathlib d875a8d
- 比编译器更快的除法:64 位机器上那'多出来的一位'Beating the Compiler at Division: The 'Free Bit' on 64-bit Machines
- 问题:整数除法很慢(32 位除法在 x86 上要 ~12 个周期),编译器早已优化——除以常量 = 乘以一个精心挑选的系数再移位。Lemire 问:能不能比编译器还快?The problem: integer division is slow (~12 cycles on x86 for 32-bit), and compilers already optimize it — divide by a constant = multiply by a carefully chosen coefficient and shift. Lemire asks: can we do better than the compiler?
- 编译器为什么绕路:除以 7 的'理想系数'需要 33 位,塞不进有符号 32 位寄存器。GCC 于是存 系数−2^32(一个负数),乘完再回加 x 修正——回加是多余的一步。Why compilers take the detour: the 'ideal coefficient' for dividing by 7 needs 33 bits and doesn't fit in a signed 32-bit register. GCC stores coefficient − 2^32 (a negative number) and adds x back to correct — the correction is wasted work.
- 关键想法:我们在 64 位机器上!|x| 最大 2^31,系数小于 2^32,乘积绝对值小于 2^63——'无符号 33 位系数 × 有符号 x'可以直接放进有符号 64 位寄存器,不需要任何修正。Lemire 用一篇论文里的定理(floor(c·n/m)=floor(n/d) 的充要区间)证明 38% 的除数可以省掉这两条指令。The key idea: we're on a 64-bit machine! |x| is at most 2^31, the coefficient is under 2^32, so their product's absolute value fits in a signed 64-bit register — 'unsigned 33-bit coefficient × signed x' works directly with no correction. A theorem from his paper (the exact interval where floor(c·n/m)=floor(n/d) holds) proves 38% of divisors can drop those two instructions.
- 效果:关键路径从 movsx→imul→shr→add→sar→sub 缩到 movsx→imul→sar→add;吞吐(clang)提升 20% 以上,延迟少 2 个周期。同一招还用在他 2019 年的 fastmod 库上:消除分支后,比 div 指令快 2 倍,随机符号误预测问题消失。The effect: the critical path shrinks from movsx→imul→shr→add→sar→sub to movsx→imul→sar→add; throughput jumps 20%+ with clang, latency drops 2 cycles. The same trick updates his 2019 fastmod library: no more branch, 2× faster than the div instruction, and the 36–48% misprediction rate on random signs vanishes.
- 能带走什么:'编译器没用满的机器'是存在的。32 位有符号数 × 33 位无符号系数在 64 位寄存器里'免费多一位'——这个观察来自对位宽的细心盘算,而不是更聪明的算法。What you can keep: the compiler doesn't always use the machine fully. A 32-bit signed × 33-bit unsigned product 'free-ly gains a bit' in a 64-bit register — that observation comes from carefully counting bits, not from a cleverer algorithm.
- 土堆距离:把'不确定位置上的点'变成线性规划Earthmover Distance: Turning 'Uncertain-Location Points' Into a Linear Program
- 问题:三个'点'的位置都带有随机误差(三组样本),蓝离绿近还是离红近?质心几乎构成等边三角形,直接算'中心距离'没有意义——距离定义得先回答'不确定性怎么算'。The problem: three 'points' whose locations are each uncertain (three sample sets) — is blue closer to green or to red? Their centers nearly form an equilateral triangle, so 'center-to-center distance' is meaningless; the distance definition must first answer 'how do we count uncertainty?'
- 关键想法(土堆-坑模型):把每个样本集合当成离散概率分布,每个样本点是一堆'土'(质量 1/|A|),另一个集合的每个点是一个'坑'。变量 z_{x,y} 是从 x 运到 y 的土量,运费 = 欧氏距离。The key idea (the dirt-pile-and-hole model): treat each sample set as a discrete probability distribution, each sample point a 'pile of dirt' (mass 1/|A|), and the other set's points 'holes.' The variable z_{x,y} is the amount moved from x to y; the cost is the Euclidean distance.
- 为什么成立:这是最优传输里的 Wasserstein 距离——唯一在'点位置本身不确定'时仍有几何意义的距离;KL 散度、卡方系数都要求支撑集相同,一遇到不同样本集就失灵,而 EMD 不需要。Why it holds: this is the Wasserstein distance from optimal transport — the only distance that still has geometric meaning when the points' locations themselves are uncertain; KL divergence and the chi-squared statistic both demand the same support, and fail on differing sample sets, whereas EMD does not.
- 妙处不止在定义:MIT 的 Justin Solomon 把它搬进 gerrymandering 研究——选区划界时投票数据本身就不精确,'能容忍不确定性的几何'(EMD 是它的距离部分)给出了更稳健的划界工具。The clever part isn't just the definition: MIT's Justin Solomon has ported it into gerrymandering research — redistricting data is itself imprecise, and 'geometry that tolerates uncertainty' (EMD is its distance component) yields more robust districting tools.
- 能带走什么:遇到'给两组不确定的数据定义距离'的问题,先想土堆和坑——'谁帮谁补、代价多少'的线性规划,比拍一个质心直觉可靠得多。What you can keep: when asked to 'define a distance between two uncertain data sets,' think dirt piles and holes first — 'who fills whom, at what cost' as a linear program is far more reliable than a gut-feeling centroid.
- 判断一个字符是不是空格,有多难?How Hard Is It to Check for Whitespace?
- 起点是一行 Guava 的代码:isWhitespace 为什么那么长?答案是'空格'根本不是一个字符。The trigger is a line of Guava code: why is isWhitespace so long? The answer: 'whitespace' isn't a single character.
- Unicode 定义了 25 个白字符(White_Space property),各有用途:FIGURE SPACE 和数字等宽、HAIR SPACE 是最窄的空隙、OGHAM SPACE MARK 在爱尔兰语字体里甚至渲染成一条线——'空格必须看不见'这个假设本身就是错的。Unicode defines 25 White_Space characters, each with a purpose: FIGURE SPACE is digit-width, HAIR SPACE is the narrowest gap, and OGHAM SPACE MARK even renders as a line in Ogham fonts — the assumption 'whitespace must be invisible' is itself wrong.
- 更糟的是各家标准互相打架:Java 排除 U+00A0,Python 承认 29 个(比 Unicode 还多 4 个),JavaScript 承认 ZERO WIDTH NO-BREAK SPACE 但 Unicode 没列它;Unicode 自己还会改(6.3 版把蒙古语元音分隔符从'空格'重新分类为'格式符',从 26 个减到 25 个)。Worse, the standards fight each other: Java excludes U+00A0, Python accepts 29 (four more than Unicode), JavaScript accepts ZERO WIDTH NO-BREAK SPACE which Unicode doesn't list; Unicode itself changes (version 6.3 reclassified the Mongolian Vowel Separator from 'space' to 'format' — 26 down to 25).
- Guava 的解法:不枚举,用完美哈希——乘以一个 32 位魔数、右移 27 位,落到一张 32 字符的表上,再确认表里那个字符等于输入。O(1) 且零分支。Guava's answer: no enumeration, a perfect hash — multiply by a 32-bit magic constant, shift right 27, land on a 32-character table, confirm the entry equals the input. O(1), zero branches.
- 能带走什么:'看起来一个字符的简单判断'背后是 Unicode 标准、语言运行时兼容性、以及完美哈希的工程权衡。下次在正则或 trim 上出怪 bug,先怀疑'空格'到底是谁定义的。What you can keep: 'an obviously one-character check' hides Unicode standard, runtime compatibility, and a perfect-hash engineering tradeoff. Next time a regex or trim bug is weird, first suspect who actually defined 'whitespace.'
- 不需要申请者数据也能测出筛选偏见:一种纯逻辑的论证Detecting Selection Bias Without Applicant Data: A Pure Logic Argument
- 起点是一个反直觉的断言:在特定条件下,你不需要知道『有多少人来申请』就能判断一个筛选过程是否有偏见——这很关键,因为申请者信息通常是商业机密。The counter-intuitive opening: under specific conditions you can detect bias in a selection process without knowing 'how many people applied' — which matters because applicant data is usually a trade secret.
- 条件有三个:(a) 被选中的人里有足够大的随机样本;(b) 被选中的人后来的表现可测量;(c) 你在比较的两个群体在能力上的分布大致相同。Three conditions: (a) a random sample of those selected is available; (b) subsequent performance is measurable; (c) the two groups you're comparing have roughly equal ability distributions.
- 逻辑核心:如果筛选对 x 类有偏见,x 类就必须比非 x 类更强才能被选中。于是被选中的 x 类会在表现上跑赢其他被选中的人——用 First Round Capital 自己的数据就能证明:女性创始人公司的回报比男性高 63%,这不是'女性创始的公司表现好',而是'First Round 对女性创始人有偏见'。The logic core: if the selection is biased against group x, group x must be stronger to get through. So the selected x-group will outperform the other selected people — First Round Capital's own data proves this: female-founder companies outperformed male-founder companies by 63%. That's not 'female founders do better' — it's 'First Round has a bias toward female founders.'
- 为什么说这是'偏见的定义'而不是'启发式':它不是近似判断,而是从'偏见 → 更强的门槛 → 被选中者更强'这条链条推导出来的必然结论——只要前提成立,结果就在逻辑上被锁死。Why this is 'the definition of bias' not 'a heuristic': it's not approximate — it's the necessary consequence of the chain 'bias → higher bar for group x → selected x are stronger.' If the premises hold, the conclusion is logically locked.
- 能带走什么:下次有人说'我们的筛选没有偏见',问一句:'被选中的人里,那个群体的表现是不是系统性跑赢了?'——如果跑赢了,那不是运气,是偏见的指纹。What you can keep: next time someone says 'our selection has no bias,' ask: 'does that group systematically outperform the others among those who were selected?' If yes, that's not luck — that's the fingerprint of bias.
程序员随想Programmer Reflections
- 信任是约束资源:团队积累代码比积累信任快Trust Is the Binding Constraint: Teams Accumulate Code Faster Than Trust
- Beck 过去两年一直在绕同一个问题:AI 让代码到达的速度超过了信任建立的速度。这个 gap——'没有信任的代码'——就是项目失败的地方。Beck has been circling the same problem for two years: AI makes code arrive faster than trust accumulates. That gap — 'code without trust' — is where projects die.
- 他的'调谐悖论'(tweak paradox):代码可信度随改动幅度的平方下降。所以 AI 想要的大批量改动和信任想要的小步验证是天然冲突的——把 agent 的大改动拆成'可独立验证的行为声明',才是信任工程。His 'tweak paradox': a change's trustworthiness falls with the square of its size. So an AI's desired large-batch changes and trust's desired small verified steps are in permanent tension — breaking an agent's big change into independently verifiable behavioral claims is trust engineering.
- 更反直觉的是'慢就是快':在正确的地方慢下来(小步、可见的测试、共享理解),整体反而更快,因为'信任是约束'时,任何绕开信任的捷径都要在别处以复利的形式还债。The counter-intuitive bit: 'slow is fast' — slowing down in the right places (small steps, visible tests, shared understanding) makes the whole faster, because when trust is the binding constraint, every shortcut around it gets repaid with interest.
- 他还划了一条线:所有人都在推'单人 AI 开发'(solo AI development),他认为这是巨大错误——信任是多人协作的产物,把信任交给一个不共享理解的人+agent 循环,等于主动拆掉 XP 那套'信任制造系统'。He also draws a line: everyone is pushing 'solo AI development' and he calls it a huge mistake — trust is a multiplayer artifact, and handing it to one person plus an agent loop means voluntarily tearing down XP's 'trust factory.'
- 能带走什么:把'测试/结对/CI/重构/可观测性'从 checklist 重新理解为一台'信任工厂',然后再问 AI 该塞进哪道工序。What you can keep: re-read 'tests/pairing/CI/refactoring/observability' not as a checklist but as a trust factory, then ask where AI should slot into that factory.
- 学者的义务:Percival 六个月不工作的 2005 年The Duty of a Scholar: Percival's Six Unemployed Months of 2005
- 2004 年 11 月,Percival 在牛津交博士论文——他心思不在论文上,他刚发现 Intel 超线程特性会通过缓存状态在两个线程间泄露信息(后来的 Spectre 类侧信道)。In November 2004, Percival was defending his Oxford PhD — but his mind was elsewhere: he had just found that Intel's Hyper-Threading could leak information between threads via cache state (the family of side channels later named Spectre).
- 他从 12 月做出窃取 RSA 私钥的 PoC 后,就开始了六个月'负责任披露':不公开、不无视、不卖,而是悄悄联系安全团队,等补丁就绪才发布。他主动放弃了投简历和改论文。By December he had a PoC that stole enough RSA key material to reconstruct the whole key, and then began six months of 'responsible disclosure': not publishing, not ignoring, not selling — quietly contacting security teams and waiting for patches. He deliberately postponed job applications and thesis revisions.
- 关键的伦理论证:工程师职业守则(如 IEEE)要求'发现安全隐患必须上报',但那条只覆盖'我在做的这个项目'。Percival 说义务范围不该这么窄——'知道某事的人'对'该知道的人'有义务,哪怕与己无关。The key ethical argument: engineering codes (e.g. IEEE) require 'report a safety hazard you find,' but that clause only covers 'a project you are working on.' Percival says the scope is too narrow — 'the person who knows' owes 'those who should know,' even if it has nothing to do with them personally.
- 他还区分了两个词:researcher 创造新知识,scholar 把知识送到需要它的人手里。一篇发表但没人读的论文,研究者义务已完成,学者义务没有——'没有人问'不是挡箭牌。He also distinguishes two words: a researcher creates knowledge, a scholar delivers it to the people who need it. A published-but-unread paper discharges the researcher's duty but not the scholar's — 'nobody asked' is no defense.
- 能带走什么:'负责任披露'不只是安全行话,它背后是'知识本身附带义务'这条伦理原则,而且义务的主体是'持有知识的人',不是'雇我的人'。What you can keep: 'responsible disclosure' isn't just security jargon — behind it is the principle that 'knowledge itself carries a duty,' and that duty's holder is 'the one who knows,' not 'the one who employs them.'
- 可观测性没有柱子:'pillar' 是营销词,'signal' 才是技术词No Pillars of Observability: 'Pillar' Is a Marketing Word, 'Signal' Is the Technical One
- 起因是同事问:'profiling 是第四根柱子吗?' Majors 的回答:没有柱子。'柱子'是营销词,'信号'(signal)才是技术词。The trigger was a colleague asking, 'Is profiling the fourth pillar?' Majors's answer: there are no pillars. 'Pillar' is a marketing word; 'signal' is the technical one.
- 论证:OpenTelemetry 的官方文档定义了 traces/metrics/logs/baggage 等 signal 类型,但'柱子'这个概念在文档里根本没出现——厂商说某样东西是'柱子'的时候,他们实际上是在说'我们可以再卖你一个 silo 数据库'。The argument: OpenTelemetry's docs define signal types (traces, metrics, logs, baggage) but the word 'pillar' doesn't appear at all — when a vendor calls something 'a pillar,' they really mean 'we can sell you another siloed database.'
- '柱子模型'的体验叫'跳兔子':在 metrics 里看到吓人曲线,跳到 logs 里 grep,再跳到 traces 里搜同一个 trace ID,每条'桥'都要单独付费。The 'pillar model' experience is called 'bunny hopping': spot a scary curve in metrics, hop to logs to grep, hop to traces to chase the same trace ID, and pay separately for each 'bridge' in between.
- 统一存储模型(o11y 2.0)的做法:所有信号存成一份宽结构化数据,UI 从'跳兔子'变成'缩放'——从 SLO 钻到事件,再钻到 trace,全程同一份数据,不猜不复制。The unified-storage model (o11y 2.0) stores every signal as one wide structured dataset; the UI shifts from 'hopping' to 'zooming' — drill from an SLO into events into a trace, all on the same data, no guessing, no copying.
- 能带走什么:下次有厂商说'我们的 X 是可观测性的新柱子',你的成本公式就变了——你在为同一个事件的第 N 份存储买单。What you can keep: next time a vendor says 'our X is a new pillar of observability,' your cost equation just changed — you're paying for the Nth copy of the same event.
- Twitter 十年的缓存事故全记录:正反馈失控才是元凶A Decade of Twitter's Cache Incidents: Uncontrolled Positive Feedback Is the Real Culprit
- Twitter 把 2012–2022 年间 12 起与缓存相关的 SEV-0/SEV-1 事故全部写下来,共 6 起 SEV-0、6 起 SEV-1,还有一篇 2012 年前的'彩蛋'。Twitter documented all 12 cache-related SEV-0/SEV-1 incidents from 2012–2022: 6 SEV-0s, 6 SEV-1s, plus one pre-2012 bonus incident.
- 核心洞察:多数缓存事故不是缓存逻辑的 bug,而是某种未缓解的正反馈失速——缓存一抖,请求打到 DB,DB 撑不住,雪崩;缓存一抖,客户端把节点踢掉,流量集中,抖得更厉害。The core insight: most cache incidents aren't cache logic bugs — they're an unmitigated positive feedback loop going out of control: cache jitters, requests hammer the DB, the DB buckles, avalanche; cache jitters, clients eject a node, traffic concentrates, it jitters harder.
- 方法学的教训:把事故按'缓存上面是谁在调用、下面是谁在供给'串起来,跨 10 年的 12 个案例会显出一个模式——大多数修复都只修了触发点,没修反馈回路,所以同一个事故隔两年以不同形态再来一次。The methodological lesson: lining up the incidents by 'what sits above the cache, what feeds it from below' reveals a pattern across 10 years — most fixes repaired the trigger but not the loop, so the same incident returns in a new shape two years later.
- 还有元层面:Twitter 的人写这段时顺手吐槽了'事故故事传播学'——真正流传开的版本几乎都是错的,'错误的故事比正确的故事更容易病毒式传播'(Gresham 定律版)。There's also a meta layer: while writing this, the authors note that 'incident stories' in circulation are almost always wrong — 'the wrong story spreads faster than the right one' (Gresham's law, incidents edition).
- 能带走什么:读 SRE 事故报告时,先问'这个正反馈回路在哪',再问'当年的修复是切断了触发点还是环本身'。What you can keep: when reading an SRE postmortem, ask 'where is the positive feedback loop?' first, then 'did the fix cut the trigger or the loop itself.'
哲学与生活Philosophy & Life
- 自信不是多与少,是校准Confidence Isn't More or Less — It's Calibration
- 引子:NFL 四分卫 Joe Burrow 在 2026 赛季传球完成率全联盟第一。他 9 岁那年教练说他有个不寻常的素质:血压在投篮球、割草和从火里救人时几乎一样。教练还补了一句:'希望你们没把他教成下个 Dexter(连环杀手)'。The hook: NFL QB Joe Burrow leads the 2026 season in completion percentage. At nine, his coach told his parents the kid had a rare trait — his blood pressure was nearly the same whether he was shooting basketball, mowing the lawn, or pulling someone out of a burning building. The coach added: 'I'm glad you're using his talent for good, or he could be the next Dexter.'
- 核心论点:自信的关键不是拥有多少,而是把现有的量校准到'对的位置'。太少不敢冒险,太多变成傲慢——'规则、概率、现实对我都不适用'。The core claim: confidence isn't about how much you have — it's about calibrating what you have to 'the right spot.' Too little and you don't take risks; too much and it curdles into arrogance — 'the rules, the odds, reality don't apply to me.'
- 校准靠两件具体的事:第一是环境——谁在你身边。好的教练/老板/导师会因人而异(给需要鼓励的人鼓励,给过头的人踩刹车),而不是用同一种方式对待所有人。第二是'啃难事+体验困难时刻'——Burrow 在 Ohio State 当了三年的 backup,自信被砸到地上,之后在 LSU 爆发成全国冠军+海斯曼奖。Calibration runs on two concrete things: environment — who's around you. Good coaches/bosses/mentors differentiate (encourage the one who needs it, brake the one who's over), instead of treating everyone the same. And 'chewing on hard things + surviving hard moments' — Burrow sat on the Ohio State bench three years, his confidence shattered, then exploded at LSU into a national championship and the Heisman.
- 最凝练的一句是 McRaven(海豹突击队)挑人的标准:'刚够 swagger,刚够 humility'——自信负责'你敢开始',谦卑负责'你知道自己可能错'。The most concise formulation is McRaven's SEAL test: 'just enough swagger, just enough humility' — confidence handles 'you dare to start,' humility handles 'you know you might be wrong.'
- 能带走什么:自信是一个'两个方向的调节器'问题,不是一个'有没有'的问题——下次看到'自信点'的建议,先问该往哪个方向调、调多少。What you can keep: confidence is a 'two-direction regulator' problem, not an 'have/don't have' one — next time someone tells you 'be more confident,' first ask which direction to turn and by how much.
- May Sarton 1938:骨头贴骨头的时候,你才看见那个人的『独自』May Sarton, 1938: You See the Other Person's 'Aloneness' Only When You're Bone Against Bone
- Sarton 写这首诗时刚过 26 岁生日,题的是'Canticle 6'(后收入《Inner Landscape》)。它写的不是孤独,而是'独处'作为一种状态——'独处时人从不孤独:灵魂在静园、冷屋里独自冒险。'Sarton wrote this poem ten days after her 26th birthday; it's 'Canticle 6,' later published in Inner Landscape. It isn't about loneliness — it's about solitude as a state: 'Alone one is never lonely: the spirit adventures, waking, in a quiet garden, in a cool house, abiding single there.'
- 最锋利的意象在第二段:只有当'两个人骨头贴骨头'的时候,才真正看见每个人各自的'独自'——'睡去的那张脸,悬在夜里,独自发光,而清醒的灵魂只能注视,无法触及。'The sharpest image is in the second movement: only when 'two have come together bone against bone' do you truly see each person's 'aloneness' — 'that sleeping face, swung out in the night alone, so luminous and still, the loving spirit gazes without touch and comes to know, out of a silence only, that love always burns alone.'
- Popova 把它接进一条心理学线索:'肥沃的独处'(fertile solitude)是完整生活的最小单元——孤独(loneliness)和独处(solitude)在心理上是同一片中性的空白,差别只在你怎么摆自己。Popova threads it into a psychology line: 'fertile solitude' is the basic unit of a full life — loneliness and solitude occupy the same neutral white space; the difference is only how you orient yourself in it.
- 能带走什么:写一段'独处时的灵魂'比写一段'我想你了'更接近亲密关系里那个真正的东西——那个在物理距离归零时反而变得更远、更亮、更不可触碰的部分。What you can keep: writing one line about 'the soul while alone' gets closer to what a relationship actually is than 'I miss you' does — the part of another person that grows farther, brighter, and more untouchable the moment the physical distance hits zero.
- Camus 谈荒谬的三种药引:反抗、自由、热情Camus on Three Antidotes to the Absurd: Revolt, Freedom, Passion
- 1945 年,Camus 刚写完《西西弗神话》('应当想象西西弗是幸福的'),法国记者 Delpech 问他:以荒谬为前提的哲学会不会逼人走向绝望?In 1945, fresh off 'The Myth of Sisyphus' ('one must imagine Sisyphus happy'), the French interviewer Delpech asked Camus: does a philosophy grounded in absurdity incline people to despair?
- Camus 的回答:'接受周围一切的荒谬,只是一个步骤、一次必要的体验——它不该变成死胡同。它激起的反抗可以是丰产的。'这是他后来《反抗者》里'团结'思想的种子。Camus's answer: 'Accepting the absurdity of everything around us is one step, a necessary experience — it must not become a dead end. It arouses a revolt that can become fruitful.' This is the seed of the solidarity argument he would spell out in 'The Rebel.'
- 紧接着他给出一组更具体的条件:'在一个荒谬如此坚不可摧的世界里,我们必须在人之间建立更高程度的相互理解和真诚。我们必须做到,否则灭亡。'而这三件事需要:诚实('谎言混淆一切')、自由('与奴隶之间不存在沟通')、以及'对某种正义的感受'。He follows with a more concrete set of conditions: 'In a world whose absurdity appears so impenetrable, we must reach a greater degree of understanding among men, a greater sincerity. We must achieve this or perish.' And three preconditions: frankness ('falsehood confuses things'), freedom ('communication is impossible with slaves'), and 'a certain sense of justice.'
- Popova 把这段话接回了 Auden 1939 年 9 月 1 日那首诗('All I have is a voice / To undo the folded lie'),两个相隔六年的文本讲同一件事:荒谬不是终点,是'你必须开始'的信号。Popova threads this into Auden's 1939 poem ('All I have is a voice / To undo the folded lie'), two texts six years apart saying the same thing: the absurd is not the endpoint, it's the 'you must begin' signal.
- 能带走什么:把 Camus 和多数'积极心理学'区分开的,是他拒绝把'意义'说成已经存在——它需要被'在彼此之间建立',且需要诚实/自由/正义三个前提,少了就回不到荒谬。What you can keep: what separates Camus from most 'positive psychology' is that he refuses to say 'meaning' already exists — it must be 'built between people,' and it requires honesty / freedom / a sense of justice; drop any one and you fall back into the absurd.
工具角Tools Corner
- kube32:给 ESP32 造一个能跑 kubectl 的集群kube32: A kubectl-Driven Kubernetes Cluster for ESP32 Microcontrollers
- 点子:把 Kubernetes 的'云抽象'压进一颗 8MB flash 的 ESP32-S3 里。node 是几块板子,pod 是 wasm3 解释器里跑的模块,控制面是带 PSRAM 的那块,没有 PSRAM 的板子自己加入当 worker。The idea: compress Kubernetes's 'cloud abstraction' into an ESP32-S3 with 8MB of flash. The nodes are a cluster of boards; the pods are wasm3 modules; the control plane is the board with PSRAM, and boards without it join as workers.
- 最硬核的工程细节:持久化对象存储 = 一块带 CRC 校验日志的 flash 分区;跨板通信 = ESP-NOW + UDP 7440;外设(GPIO/I2C/I2S/SD 卡)被一个 capability 防火墙包起来,每个 pod 只能拿到被授权的引脚。The hardest engineering detail: the persistent object store is a CRC-checked journal on a raw flash partition; board-to-board talk is ESP-NOW + UDP 7440; peripherals (GPIO/I2C/I2S/SD) sit behind a capability firewall, each pod only touching the pins it's granted.
- 为什么值得看:它没有发明新东西,而是把 k8s 每个假设('你有 GB 级内存、有网络、有节点')逐条在微控制器上重做,并且保留了 kubectl 的兼容层——'k9s 看一个 32 板集群'这件事本身是个工程宣言。Why it's worth a look: nothing new was invented — every assumption of k8s ('you have GBs of memory, you have a network, you have nodes') was rebuilt on a microcontroller while keeping a kubectl-compatible surface. 'Running k9s against a 32-board cluster' is itself an engineering manifesto.
- 能带走什么:把'基础设施框架'下放到嵌入式世界的完整思路:哪些假设要改、哪些要舍、哪些靠'一层胶水'救回来,值得抄作业。What you can keep: the complete playbook for dropping an 'infrastructure framework' into the embedded world — which assumptions to bend, which to abandon, and which to save with 'a layer of glue.'
- Marelleo:给三个孩子造的『放玩偶就讲故事』盒子Marelleo: A Story Box That Plays When Your Kid Puts a Figurine on Top
- 起因:Toniebox 等儿童故事机把内容做成了订阅,'玩具本体'只是个播放器。这位家长想自己造一个:一个放 NFC 玩偶就讲故事的盒子,'不为做产品,只为教会自己电子学'。The trigger: Toniebox-style kids' story machines turn content into a subscription — the toy itself is just a player. This parent wanted to build one: a box that plays a story when you set an NFC figurine on it. 'Not as a product — as a way to actually learn electronics.'
- 技术选型的哲学:ESP32 是'刚好够用'的甜点位——比树莓派(开机 20 秒、太胖)轻,比 400 页数据手册的裸芯片(太陡)简单。面包板是真正的关键角色:'在面包板上犯错的代价为零,拔了重插就行'。The philosophy of hardware choice: ESP32 is the sweet spot — lighter than a Raspberry Pi (20-second boot, too fat), simpler than a bare chip with a 400-page datasheet (too steep). The real protagonist is the breadboard: 'getting it wrong on a breadboard costs nothing — unplug, retry.'
- 现场记录最有价值的部分:把电池直焊死、没留开关的那一刻——'一颗 24 小时常开的锂电池,放在孩子的卧室里,这个句子需要自己说话了'。作者说'那一刻我停止把它当成桌面小玩意儿,因为它要进入孩子的一天了'。The most valuable field-note moment: soldering the battery directly on with no switch — 'a 24-hour-on lithium cell in a child's bedroom; written down like that, it says the whole thing.' 'At that point I stopped treating it as a gadget on the corner of a table, because it was entering my children's day.'
- 能带走什么:'从面包板到 perfboard'不只是硬件里程碑,是'你获得了电路的连续性,代价是失去了犯错的权力'——任何从原型到产品的工程都逃不掉这笔账。What you can keep: 'breadboard to perfboard' is not just a hardware milestone — it's 'you gained continuity of the circuit and lost the right to make mistakes.' Every prototype-to-product engineering story has this same accounting.
- 一页 spec 造出来的 USB-C 电话线:数据、短信、通话全走 USBA Phone Line Over USB-C From a One-Page Spec: Data, SMS, and Voice All Through One Cable
- 点子:给一台电脑'一根自己的电话线'——一块 4 层 KiCad 板,插 USB-C,就能做 LTE 数据 + SMS + 语音通话,通话的音频走 USB 麦克风/扬声器接口。The idea: give a computer 'its own phone line' — a 4-layer KiCad board, one USB-C plug, that delivers LTE data + SMS + voice calls, with call audio riding the USB microphone/speaker interface.
- 工程亮点:呼叫音频不是靠 VoIP 的协议层,而是把 Quectel EC25 模组上那颗 1.8V PCM 接口的电平直接抬到 USB 音频电平——最土也最可靠。The engineering highlight: call audio isn't a VoIP protocol layer — it's the Quectel EC25's 1.8V PCM interface, level-shifted straight to USB audio. The laziest and most reliable option.
- 开放程度:整个 KiCad 10 工程开放(原理图、走线规则、模组 footprint、符号、3D 模型),还有一篇'设计审查'文档写清了什么通过了、什么改了、为什么改、还剩哪些没解决——比代码本身更有学习价值。How open it is: the whole KiCad 10 project is public (schematic, routing rules, module footprint, symbols, 3D model), plus a 'design review' doc stating what passed, what changed and why, and what's still open — arguably more educational than the code.
- 能带走什么:'一页纸的 spec'能不能变成一块能打的板子,关键在模组选型和'把厂商引脚直接暴露给你的系统'的那段电平转换。What you can keep: whether 'a one-page spec' can become a real board hinges on the module choice and that one piece of level-shifting that 'exposes a vendor's pins to your system.'
- BBRouter:把 Ben Eater 的 8 位计算机仿真成一块可拖线的 3D 面包板BBRouter: Ben Eater's 8-bit Computer Simulated on a Draggable 3D Breadboard
- 点子:Ben Eater 那套'手工搭 8 位计算机'的 YouTube 教程,被重做成浏览器里的一块 3D 面包板——每一个门、每一根线都可以拖。The idea: Ben Eater's famous 'build an 8-bit computer by hand' YouTube series, rebuilt as a 3D breadboard in the browser — every gate and every wire is draggable.
- 交互设计:不是'代码跑仿真',而是'仿真就是界面'——你可以暂停到某个门、看它当前电平、把某根线改接到另一个脚,立刻看整个 SAP-1 的行为变化。还有 1×、1/10、1/100 的时钟速度挡。The interaction: not 'code that runs a simulation' but 'the simulation IS the interface' — pause at a specific gate, watch its present level, rewire one pin, and see the whole SAP-1's behavior shift. Clock speeds: 1×, 1/10×, 1/100×.
- 为什么对程序员有用:多数人的'数字电路直觉'卡在建模上(时钟沿到底采到的是前一级还是后一级的值),这个工具把那种直觉变成'手'——你拨线、你等、你看到结果,比看波形图快十倍。Why it helps programmers: most people's 'digital circuit intuition' is stuck at the modeling level (does the clock edge sample the previous stage's value or the next one?). This tool turns that intuition into your hands — you toggle a wire, you wait, you watch the result. Ten times faster than reading a waveform plot.
- 能带走什么:把'仿真'做成'可触碰的仿真'(3D + 拖线 + 存版本)是电路/数字逻辑教学的一个未被充分开发的方向。What you can keep: 'simulation you can touch' (3D + dragging + versioning) is an under-exploited direction for teaching circuits and digital logic.
- Glider 4.0 Web 版:一个 1991 Mac 游戏被逐单元移植到 TypeScriptGlider 4.0 Web Edition: A 1991 Mac Game Ported Unit-by-Unit to TypeScript
- 点子:John Calhoun 1991 年的 Mac 游戏《Glider 4.0》(你操控一个飞行员在暴风雨里飞)被逐行移植成浏览器版,含房间编辑器。The idea: John Calhoun's 1991 Mac game 'Glider 4.0' (you fly a glider through storms) was ported line by line to the browser, room editor included.
- 技术路线:不是写个'看起来一样'的重制,而是把源码(THINK Pascal 写的)一个单元一个单元译成 TypeScript,并且重新实现了足够的 Macintosh Toolbox(系统 API)让它能跑——像素级、时钟级的 source port。The technical route: not a 'looks the same' remake — the source code (written in THINK Pascal) was translated unit by unit to TypeScript, and enough of the Macintosh Toolbox (system API) was reimplemented to run it. A pixel- and clock-level source port.
- AI 协作的部分(作者明确标注):'人负责导演,Claude Opus 5.5 负责实现,两者共同设计'。这是 AI 时代'重做老游戏'这条赛道上少见的诚实标注。The AI part (the author labels it explicitly): 'The human directed, Claude Opus 5.5 implemented, and the two designed together.' In the AI era's 'rebuild old games' lane, this is one of the few honest labels.
- 能带走什么:'不重做、只移植'和'不重写、只翻译单元'之间的差别,决定了你保不保得住'像素级时钟级还原'这件事——这是把 AI 用在游戏移植上时最容易被忽略的约束。What you can keep: the difference between 'don't re-implement, only port' and 'don't rewrite, only translate units' decides whether you keep 'pixel- and clock-accurate' alive — the constraint most easily missed when using AI to port games.
- 花叔的鸟类贴纸库:11064 种鸟,每种一张白边贴纸Huashu's Bird Sticker Library: One White-Border Sticker for Each of 11,064 Species
- 点子:全世界的 11,064 种现生鸟,每种一张白边贴纸,配套 43 种语言的鸟名、分类、分布、保护等级等结构化数据——全部来自花叔自己做的观鸟 App「鸣迹」。The idea: 11,064 living bird species worldwide, one white-border sticker each, bundled with names in 43 languages plus structured data (taxonomy, range, conservation status) — all sourced from Huashu's own bird-watching app, Mingji.
- 数据工程:不是 11064 张 JPG 就完事,而是一整套'物种 × 语言 × 数据库 ID'的交叉结构,数据本身用 MIT 许可,贴纸用 PolyForm Shield(唯一禁区:观鸟识别 App 需要署名)。The data engineering: it's not '11,064 JPGs and done' — it's a full 'species × language × database-ID' cross structure, the data itself under MIT, the stickers under PolyForm Shield (one red line: bird-identification apps need attribution).
- 为什么值得看:'数据即产品'的典型样本——一套贴纸库把'结构化数据'(哪些鸟、叫什么、分布在哪儿)和'可分发资产'(贴纸图)绑在一起,还给了一个可执行的许可边界。Why it's worth a look: a textbook case of 'data as product' — a sticker library binds 'structured data' (what birds, what names, where they live) to 'distributable assets' (sticker images), with an executable license boundary.
- 能带走什么:你的数据资产如果只以表格存在,永远没人传播它;配上一套'可分享的小资产'(贴纸/卡片/图),数据才真正开始流动。What you can keep: if your data asset only exists as a table, nobody will share it; pair it with 'a small shareable asset' (sticker, card, image) and only then does the data actually start flowing.
- GTA: Vice City Stories 静态重编译成 C++:从光盘到 200MB 原生代码GTA: Vice City Stories, Statically Recompiled to C++: From Disc to 200 MB of Native Code
- 点子:把 PS2 的《GTA: Vice City Stories》可执行文件用静态重编译(而不是模拟)转成 C++,同时生成 Windows 和 Linux 两个原生版本——游戏跑的是重编译后的原生 C++,不是模拟器里的 mips 解释。The idea: take the PS2 executable of GTA: Vice City Stories and statically recompile it to C++ (not simulate it) — both Windows and Linux native versions run the recompiled C++, not a MIPS emulator.
- 工作流:读你的 .iso,`build.py --recompile` 会把光盘上的机器码重编译成约 200MB 的 C++(4 核笔记本约 15 分钟),然后用 MSVC 免费工具链构建。Workflow: pass it your .iso, `build.py --recompile` turns the disc's machine code into ~200MB of C++ (about 15 min on a 4-core laptop), then compiles it with MSVC's free toolchain.
- 为什么值得关注:『静态重编译』而非『模拟器』意味着没有性能损失——游戏代码是本地 C++,不是 JIT 翻译的 mips 字节码;这是游戏移植领域比『模拟』高一个档次的技术路线。Why it's worth watching: 'static recompilation' instead of 'emulation' means zero performance cost — the game code is native C++, not JIT-translated MIPS bytecode. That's a higher-tier route in the game-porting world than emulation.
- 能带走什么:把 2000 年代的 PS2 可执行文件(约 10MB 的 mips 二进制)静态重编译成 200MB 的 C++,是一个『二进制逆向 + 语言级重编译』的完整示范,比 Glider 那种『源码逐单元译 TypeScript』更硬核(没有原始源码)。What you can keep: turning a 2000s PS2 executable (~10MB MIPS binary) into 200MB of C++ via static recompilation is a full 'binary reverse-engineering + language-level recompilation' case study, harder than Glider's 'source-code translated unit-by-unit' approach (GTA had no original source code available).