跳到正文
原文
Hacker News· sunshowers·· 2 小时前精选AI 评分52

Anthropic Scion 被指与 Mononoke 设计高度雷同

Anthropic's Scion is heavily inspired by Mononoke

AI 导读

sunshowers 在博文中指出,Anthropic 近日介绍的版本控制系统 Scion 在"derived data"等设计上与其在 Meta 时期参与构建的 Mononoke 高度雷同,但 Anthropic 仅将 Sapling 列为"hard-won lessons",完全未提及 Mononoke。

推荐理由

作者以 Mononoke 核心开发者身份对比 Scion 与 Mononoke 的设计思路,提醒行业关注 LLM 辅助设计中的归属问题。

正文 · AI 翻译

在 Hacker News 上讨论。

昨天,Anthropic 在这里 描述(归档链接)了他们新的版本控制系统 Scion 如何使用一个叫做"派生数据"的概念,来让 blame 这类操作更加高效:

A changeset records only what’s changed, so on its own, it can’t quickly answer questions like who last edited a line or which commits affected a file. To answer those, Scion builds additional data structures from the changesets, including dedicated structures for file blame and path history and skip lists for the commit graph. We call everything that isn’t directly part of the changeset “derived data,” and we compute it all through one generic mechanism. Each type of derived data is defined recursively, so its value for a changeset is computed from its values for that changeset’s parents. This mechanism has three benefits. First, we can easily add a new type of derived data when a new data structure would make some operation faster. Second, for each type, we can choose whether to compute it eagerly or defer the work, so we avoid materializing data we don’t need. And third, because the client never sees the internals of these data structures, we can optimize them without changing the client. We’ve added new types of derived data many times as the system has grown, such as new indices for performing copy detection or path-based file search.
Anthropic 如何描述 Scion 的派生数据。

这是 2022 年我在 Oxide 求职材料中描述的,我参与构建的 Mononoke 源代码控制服务器如何使用一个叫做"派生数据"的概念,来让 blame 这类操作更加高效:

Derived data. While Bonsai changesets work great for pushes, they work less well for things like diffs. Git diff commit1..commit2 is an O(n log n) operation where n is the number of changed files – with Bonsai changesets, you’d have to look at every single commit between commit1 and commit2 to compute the list of files changed. For a large repository this can be orders of magnitude slower (and compounds the pointer-chasing problem). To solve this, we moved the diff-friendly representation to being derived data (i.e. an index). The server creates a separate Merkle DAG with a Git-like tree/blob model, with pointers back to Bonsai changesets as required. Note that: Derived data can be computed and stored asynchronously, outside of the main critical section. The pointers between commits and trees are flipped around. With the Git data model, the text of a commit contains the hash of the root tree. With the Bonsai model, the text of the root tree contains the hash of the commit that introduced it. This gave us the ability to build out other derived indexes for whatever other operations we wanted. For example, git blame is quite slow on large git repositories, requiring a traversal of the entire repository (not just commits that touch the file). With Mononoke, we built out a blame-friendly index where each version of each file was a separate node in the Merkle DAG, with its parent set to the previous version of the file, and with pointers back to Bonsai changesets. This meant that blames became O(number of commits that touch the file) rather than O(number of commits in the repository). Over time, the team has added more indexes to handle specific use cases, and Mononoke now has 8 separate indexes. Adding a new index is a relatively cheap operation that doesn’t involve any fundamental changes to data structures.
我如何描述 Mononoke 的派生数据。

我认为模仿的程度远远超出了仅仅有相似的洞见1。Sapling 仅被致谢为"来之不易的经验",而 Mononoke 完全没有被提及,这已近乎抄袭。这篇文章给人的感觉是 Anthropic 在宣称这些都由 Claude 设计,但事实是我们在 Meta 的(卓越的)团队提出了这些洞见,Claude 在近十年后才忠实地加以应用。(在为 Mononoke 和 Sapling 调研时,我们也参考了大量先前的成果,从 Google 的 SrcFS 到数据库中的预写日志。)

我很高兴我们团队在 2017-18 年提出的愿景如此强大且持久——当你逆流而行时,你总是不太确定自己所做的究竟是天才之举还是疯狂之举,而我认为 Mononoke 的设计经受住了时间的考验。需要明确说明的是,我并不介意 Anthropic 复制 Mononoke 的设计。(这也是我们选择开源的原因之一——通过传播好的想法来造福人类。)

但随着大语言模型继续辅助设计新系统,它们很可能会大量索引现有的设计。Mononoke 是 开源 的,并且存在于每个大语言模型的训练集中。如果你向 Opus 5.5 或 GPT-6 Astra(感谢 Matthew Fowle)询问相关的先前成果,它们都会立刻指出与 Mononoke 的相似之处。

给予前人以应有的认可,如今比以往任何时候都更容易——也更重要。不再有借口了。


  1. 关于一个具有相似洞见但存在许多关键设计差异的系统示例,请参阅 Vicent Marti 关于 Cursor 的博客文章。 ↩︎

来源:Hacker News · sunshowers.io