Live coding session with Boris Cherny and Jarred Sumner
频道: Claude
视频: https://www.youtube.com/watch?v=DlTCu_pNDHE
原文语言: en
统计: 共 99 轮
[1:02]
Please welcome to the stage head of Claude [music] Code of Anthropic, Boris Churnney, and creator of fun at Anthropic, Jared Sumner. [music] Hello. All right. So, this is a developer conference. We're going to be doing a little bit of talking, but mostly we're just be like coding.
有请 Anthropic 的 Claude Code 负责人 Boris Cherny [音乐],以及 Anthropic 的 Bun 作者 Jarred Sumner 上台。[音乐] 大家好。好的。这是一场开发者大会,我们会稍微聊几句,但大部分时间就是直接写代码。
[1:31]
So, this is for the developers in the room. I'm going to start by talking a little bit about how uh how bun uses cloud code to to build and and maintain bond and also kind of how our setup uh works and because it's kind of a a slightly more advanced setup than uh what's common today.
这是给在座开发者准备的。我先讲一讲 Bun 是怎么用 Claude Code 来构建和维护 Bun 的,以及我们整套配置是怎么运作的——因为我们这套配置比现在大多数人用的要稍微进阶一些。
[1:55]
Um but first I'm going to get a few agents running to just fix some GitHub issues. Uh this is classic Jared doing work during a talk. Um so so in buns repo uh every time somebody submits an issue uh we have a cloud bot automatically run and try to reproduce the issue.
不过首先,我要先跑几个 agent 去修一些 GitHub issue。这就是典型的 Jarred——演讲的同时还在干活。在 Bun 的仓库里,每当有人提交一个 issue,我们就有一个 Claude 机器人自动运行,去尝试复现这个 issue。
[2:16]
So you can see this person has uh this this side effects and this is like one of the most recent issues. Um and and we can see that Robun which is our our our bot uh uh went and managed to reproduce the issue uh and submitted a PR automatically.
你可以看到,这个人遇到了某种副作用问题,这是最近的 issue 之一。我们能看到 RoboBun——也就是我们的机器人——成功复现了这个 issue,并且自动提交了一个 PR。
[2:34]
Um and and this PR is like it has uh it all these PRs always have tests. Um it's one of the actual hard requirements before it can submit a PR. Um uh and so so the challenge here is like does this code look correct?
这个 PR 是带测试的——所有这些 PR 都一定带测试。这是它提交 PR 之前的一个硬性要求。所以这里的难点在于:这段代码看起来对不对?
[2:52]
Um and one of the things we do to to check that is does the test fail in the previous version of bond and pass uh in the in this debug branch. And it the bot actually can't submit a PR without that uh being the case.
我们检查的方式之一是:这个测试在 Bun 的旧版本里是否会失败、而在这个调试分支里是否能通过。如果不满足这个条件,机器人根本没法提交 PR。
[3:10]
And so this is just to make sure you understand. So this is like every single issue that goes up in the bun issue tracker, you have Robo Bun automatically try to reproduce it before anyone looks at it.
我再确认一下大家理解了:在 Bun 的 issue tracker 里,每一个上报的 issue,都会先由 RoboBun 自动尝试复现,然后才轮到人去看。
[3:20]
Yeah. And this saves a lot of time because we have so many open GitHub issues. Um it it really moves the challenge from is from just fixing and debugging the issue to is this the right thing to merge?
对。这省了大量时间,因为我们有非常多未关闭的 GitHub issue。它实际上把难点从「修复和调试 issue」转移到了「这个东西该不该合并」。
[3:32]
Like is this the right fix? Um how how good is it? Is it is this doing like a 100% of yours? Is it like 10%. We can go to the insights uh uh and go to contributors and then if we go uh last three months uh uh and this is specifically to main we can see that Robbun is now a bigger contributor to Bun than I am [laughter] and that's with merging not all of its PRs for sure.
比如,这是正确的修复吗?质量怎么样?它完成了你 100% 的工作,还是只有 10%?我们可以打开 Insights,进到 Contributors,选最近三个月,专门看 main 分支——可以看到,RoboBun 现在对 Bun 的贡献量已经超过我了 [笑声],而且这还是在它的 PR 并没有全部被合并的情况下。
[4:00]
You can see we have a lot of PRs open right now. Um the the challenge is really how do we know can we merge the PR? Um, and that's the tests. Um, and then the other thing that's really interesting about this is uh uh we have automatic code review bots that that run.
你能看到我们现在有很多未合并的 PR。真正的难点是:我们怎么知道这个 PR 能不能合并?答案是靠测试。另一个很有意思的地方是,我们还有自动跑的代码审查机器人。
[4:16]
Um, and then they're going back and forth. So like Code Rabbit leaves a comment and then Roboun leaves a comment and then they go back and forth and they and Code Rabbit did the [laughter] I love this.
然后它们会来回交流。比如 CodeRabbit 留一条评论,RoboBun 回一条,它们就这样来回拉锯,CodeRabbit 还……[笑声] 我太喜欢这个了。
[4:39]
And it also marks the comments as resolved when it's done. Um, and you you can see they actually went a lot like there's a lot of back and forth here. There's like 30 comments or something. And so you're using like a combination of agents.
而且处理完之后它还会把评论标记为已解决。你能看到它们其实来回了很多轮——这里大概有 30 条评论。所以你是在组合使用多个 agent。
[4:50]
So this is like code review. This is like quad code review and then also code rabbit and like you're using them together. Yeah. And I I think basically like code rabbit is is good for like kind of stylistic issues and things that are like make sure that it follows the cloud MD and then the the cloud code review is really good at here's this really subtle edge case that would have taken me like 30 minutes of reading all the code and having all the context to to like figure out and and so so it's really good at surfacing bugs that you you need the full context to really understand.
这就是代码审查——这里有 Claude 的代码审查,还有 CodeRabbit,你是把它们一起用的。对。我觉得基本上,CodeRabbit 擅长风格类问题,比如确保代码遵守 CLAUDE.md;而 Claude 的代码审查特别擅长发现那种非常微妙的边界情况——那种我得花 30 分钟读完所有代码、掌握全部上下文才能搞明白的问题。所以它特别擅长把那些需要完整上下文才能真正理解的 bug 给挖出来。
[5:22]
Um, and I think basically it's it's really hard to to actually have all this automation without having code review that is in the loop with the with claude there replying or replying is like very performative but like at like fixing um and that's also a big part of like what used to take so much time uh when like why PRs would take so much time to merge is because you'd have to like like check out the branch locally, fix a lint error, then run the llinter locally, then push it back up.
我觉得,如果没有 Claude 参与到回路里的代码审查,这整套自动化其实很难真正跑起来——它不只是「装样子地回复」,而是真的在修。这也是过去耗时巨大的一大块原因:以前 PR 之所以要花那么久才能合并,是因为你得在本地 checkout 那个分支、修一个 lint 错误、再在本地跑一遍 linter,然后再推回去。
[6:04]
And there's all this switching cost that's constantly there. And so when you So I think this is like an especially good use case for for LLMs because otherwise like it just takes up so much time to to ship and and I guess like especially for the bun codebase because it's like it's systems code.
这中间一直有大量的上下文切换成本。所以我觉得这是 LLM 一个特别合适的应用场景,否则光是要把东西 ship 出去就得花掉大量时间——我想对 Bun 的代码库尤其如此,因为它是系统级代码。
[6:21]
It's, you know, it's very easy to repro issue and then see if the issue is fixed because this is kind of back to what we were talking about before with like this kind of verification loop. It's all systems code.
它很容易复现 issue,然后验证 issue 是否被修好了——这又回到我们之前聊的那个「验证回路」。它全是系统级代码。
[6:32]
So, it's really like a test case on a particular architecture and you can essentially like repro or verify anything. Yeah, that's one of one thing that makes it easier in buttons codebase is because it's a a CLI tool.
所以它本质上就是某个特定架构上的一个测试用例,你基本上能复现或验证任何东西。对,Bun 代码库里有一点让这件事更容易,就是它是一个 CLI 工具。
[6:46]
um because uh we don't need to run a browser to test things, but you can also just like have something set up to like take a screenshot or record a video or those sorts of things. Um in Bun's case, we don't need that, at least not yet.
因为我们测试东西不需要跑浏览器。当然你也可以配置一些东西去截图、录视频之类的。在 Bun 的场景里我们暂时还不需要那些,至少现在还不需要。
[6:57]
Uh uh there's a couple things we could do that for like we have some front end stuff that would be nice. Um but yeah, I think this is like the the direction that I think is really interesting is because it saves so much time.
有几个地方我们可以那么做,比如我们有些前端的东西那样做会不错。但总之,我觉得这个方向特别有意思,因为它能省下太多时间了。
[7:13]
Um and this is not this is something that like this is specifically for bun but the more generalizable thing when because most products are not open source um uh is like instead of an issue maybe the starting point is like a customer support ticket.
这套东西是专门针对 Bun 的,但更可推广的一点是:因为大多数产品并不是开源的,所以起点也许不是一个 issue,而是一张客户支持工单。
[7:27]
So like you could you could imagine automatically uh h passing customer support tickets to a cloudbot to then go and try to reproduce the issue and then submit a PR and then uh having code review go back and forth.
你可以想象,把客户支持工单自动转交给一个 Claude 机器人,让它去尝试复现问题、提交 PR,然后让代码审查来回拉锯。
[7:39]
Um, and that's where I think for a lot of companies it becomes a lot more impactful because it just saves so much developer time. We should think of some kind of name for this pattern. It's like adversarial code review or or something like that.
我觉得对很多公司来说,这就是它影响力大得多的地方,因为它省下了太多开发者的时间。我们应该给这种模式起个名字,比如「对抗式代码审查」之类的。
[7:55]
Yeah, I don't know. Um, but I do think like there's also a few other things about this that's uh like the if you just do this then it doesn't quite work. the very first step you need is to like make sure the development environment is set up.
嗯,我也说不好。但我确实觉得这里面还有几件事——如果你只是简单地这么做,其实不太行。你需要的第一步,是确保开发环境配置好了。
[8:14]
Um like I I think this has been talked about before but like uh like cloud MD is uh very important um because otherwise it's going to just submit PRs that don't quite make sense for you to merge. Um so like we very much emphasize in buns codebase that it runs this special command to do the build.
这一点我觉得之前也讲过,但 CLAUDE.md 真的非常重要,否则它就会提交一些你看了根本不想合并的 PR。所以在 Bun 的代码库里,我们特别强调让它跑一个专门的命令来做构建。
[8:32]
Um and this both builds and runs the command. So it like forwards the arguments. Um because that's also one confusing thing is like uh because bun has to be compiled uh you want to make sure that it's running the actual changes and not like a debug build that's like stale.
这个命令既会构建、也会运行——它会把参数透传过去。因为这里有个容易搞混的点:Bun 是需要编译的,你得确保它跑的是真正改动后的版本,而不是某个已经过期的 debug 构建。
[8:45]
Um we also go into a lot of detail about how to run tests, how to write tests, um where to put the test, um uh and a lot of like here's how here's all the issues that we've run into previously. Like basically the the pattern here is like every time that you find yourself repeating something it should probably go in cloud MD because the the question now is like how do you make it maintainable to have lots of claws running all the time and uh and to do that it needs to be written down.
我们还非常详细地写了怎么跑测试、怎么写测试、测试该放哪里,以及大量「我们之前踩过的所有坑」。基本上这里的模式是:每当你发现自己在重复某件事,它大概率就应该写进 CLAUDE.md。因为现在的问题变成了——怎么让「同时一直跑着大量 Claude 实例」这件事可维护?要做到这点,就必须把它写下来。
[9:24]
It needs to be documented. Um so like a really small detail is like we we check the we have it like to make sure that claude sees the error message uh we make it print the air message before uh the like less informative uh conditions.
它需要被文档化。举个很小的细节:为了确保 Claude 能看到错误信息,我们让它把错误信息打印在那些信息量较少的内容之前。
[9:38]
So, so this is sort of like you have quad write a test and then the test is bad or something about it doesn't work and then you see this kind of repeated like once or twice and then you just tell Quad add it to the quad MD so that every time in the future when you write a test you do it correctly the first time.
这有点像:你让 Claude 写一个测试,测试写得不好、或者有什么地方不对,你看到这种情况重复出现一两次之后,就直接告诉 Claude「把这条加进 CLAUDE.md」,这样以后每次写测试,它第一次就能写对。
[9:59]
Yeah. So this is like uh like compound engineering. It's kind of this. Um and then also it's helpful to like give it an overview of where all the folders are like what all like how the code is laid out.
对,这就有点像 compound engineering(复利式工程)。差不多就是这个意思。另外,给它一份「所有文件夹在哪、代码整体怎么组织」的概览也很有帮助。
[10:09]
Um, and like about dependencies. Um, uh, uh, another thing I think is interesting is like making sure that it can read your CI errors and like build logs. like you want to you want to set up the agent to be able to be able to read the code like to do the full loop of make of like writing the code testing the code works checking CI monitoring CI um and uh uh reading all the errors so that way by the time it gets to a person everything is like set up like the ideal is that you read the code and you you have very clear indications that you can be high confidence to merge it And the only way for that to be true is if it is set up for success.
还有依赖关系。另一件我觉得有意思的事,是确保它能读到你的 CI 错误和构建日志。你希望把 agent 配置成能读代码、能跑完整个回路——写代码、测试代码能不能跑通、检查 CI、监控 CI、读完所有错误——这样等它交到人手上时,一切都已经就位。理想状态是:你读一遍代码,就有非常清楚的信号让你高度确信可以合并它。而要做到这一点,唯一的办法就是把它配置成「为成功而设」。
[11:01]
It's interesting. I remember when we when we first met, you were talking about like your vision of like everyone being able to run hundreds of agents in parallel and how that would work. And I feel like I didn't really get it at the time.
挺有意思的。我记得我们第一次见面时,你就在讲你的愿景——每个人都能并行跑上百个 agent,以及那会是什么样子。我感觉我当时其实没真正理解。
[11:10]
Although now like every night I I'm I'm running like hundreds of agents every single night. And I feel like now I'm finally there. But this is a thing that you've been thinking about for a long time. So it feels like this is sort of like the setup in order to be able to kind of scale up agents way more like you need the self-verification so that agents can run autonomously.
但现在我每天晚上真的会跑上百个 agent。我感觉自己终于到那个状态了。而这是你思考了很久的事情。所以感觉这套配置就是为了能把 agent 规模扩大得多得多——你需要自我验证机制,agent 才能自主运行。
[11:27]
Yeah. Like this has gone through many iterations in buns codebase. Um we previously just had a discord bot where I could just at mention the bot and it would spin up a container. Um uh it didn't have like the CI stuff.
对。这套东西在 Bun 的代码库里经历了很多次迭代。我们以前只是有一个 Discord 机器人,我 @ 一下它,它就会拉起一个容器。那时候它还没有 CI 那一块。
[11:39]
It didn't have uh the code review stuff. Um, and it's so much better now, especially with like Opus 47. Um, uh, uh, it's all this stuff is getting so much better. Um, oh yeah, we can also check on how, uh, how it's going.
也没有代码审查那一块。现在好太多了,尤其是有了 Opus 4.7。这一切都在变得好得多。哦对,我们也可以看看现在进展怎么样了。
[12:00]
It looks like it created a PR, the first one. Um, uh, and it wrote tests. Um, so maybe while we look at this, I'm curious for like just to get a show of hands for people in the room, like as people think about their development process, raise your hand if it looks something like this where you have like a bunch of terminal windows or desktop tabs and you're kind of pasting in issues.
看起来它创建了一个 PR,是第一个。而且它写了测试。趁我们看这个,我想顺便举手统计一下在座各位——想想你们自己的开发流程,如果你的流程是这样的:开一堆终端窗口或桌面标签页,然后手动把 issue 粘进去,请举手。
[12:21]
Okay, so that's like maybe half of people. And then what if it looks like Roboun or something more like that where it's like closing the loop a little more? It's like the next level of abstraction starting to get there.
好,大概一半的人。那如果你的流程更像 RoboBun 那样、把回路闭合得更多一些呢?那就是下一层抽象,开始往那个方向走了。
[12:37]
Yeah, I think it's like it's not surprising because I think model capabilities are just getting there. Like I think 47 is the first model where it's really felt like it's able to do this. And in the past maybe you could do it with like a bunch of scaffolding like you just throw a bunch of tokens at it and it can kind of work.
对,我觉得这并不意外,因为模型能力刚好到这个程度了。我觉得 4.7 是第一个真正让人感觉「它能做到这件事」的模型。过去你也许能靠一堆脚手架做到——就是往里塞一大堆 token,它勉强能跑。
[12:49]
But now it's like efficient enough. You can actually do this dayto-day. Yeah. Um let's see. So the first PR is there. Uh let's see if it did any others. Uh okay. It did two PRs. Um uh this looks very plausible.
但现在它已经足够高效了,你真的可以每天都这么干。对。我们来看看。第一个 PR 在这儿。看看它还做了没有别的。好,它做了两个 PR。这个看起来很靠谱。
[13:10]
It's cool. And this like this before after is this like do you tell it to do that or sometimes it does it? Um uh it's it's pretty good about knowing like when it should do that like when it's like a string formatting thing.
挺酷的。这个「改动前后对比」是你让它这么做的,还是它有时会自己做?它挺擅长判断什么时候该这么做,比如遇到字符串格式化这类东西的时候。
[13:23]
Mhm. Um uh it's also it also kept like bun style of the label which is good because node style is slightly different. Um let's see does this change look good? Um yeah. Uh mostly what I'm thinking right now is uh it it's it did this.
嗯。它还保留了 Bun 风格的标签,这很好,因为 Node 的风格略有不同。我们看看这个改动行不行。嗯,行。我现在主要在想的是——它做了这个。
[13:48]
This is good because like you don't want to write one bite at a time. You want to write uh in in chunks um and then it used uh saturation uh to to but I don't like that or like it shouldn't have to do that.
这个不错,因为你不会想一次只写一个字节,你想成块地写。然后它用了饱和处理来……不过我不太喜欢那个,或者说它本来不该需要那么做。
[14:05]
Does anyone here actually know Zigg sort of I feel looking at this code and and you can see it followed the patterns from the from the cloud MD await using and then that that pattern of of uh reading all the pro like resolving all the promises at the same time and so like what's your workflow like when you when you see something like this are you usually going in and like commenting or are you just going to wait for like code review to come in and and drop a comment?
这里有人真的懂 Zig 吗?我看着这段代码……你能看到它遵循了 CLAUDE.md 里的模式,用了 await using,还有那个「同时 resolve 所有 promise」的模式。那你的工作流是怎样的——当你看到这样的东西时,你通常会自己进去留评论,还是会等代码审查进来留评论?
[14:35]
Um, usually it depends on that like how complicated it is. Um, in this case, I'll usually I'll wait for like this one is actually pretty simple. I feel pretty high confidence that if the test pass then uh I would probably merge this.
通常取决于它有多复杂。这种情况下我一般会等——这个其实挺简单的。我相当有信心,只要测试通过,我大概率就会合并它。
[14:46]
Um but I still would wait for uh the code review for for at least for the cloud code review one to run um uh just in case because what I really like about that is it will find things that like from from that aren't in the diff that are like from tracing the control flow.
但我还是会等代码审查——至少会等 Claude 那个代码审查跑完,以防万一。因为我特别喜欢它的一点是:它能找到那些不在 diff 里、要靠追踪控制流才能发现的问题。
[15:06]
um which is what you want when it's like a human reviewing it is like somebody who has a lot of context who who can think what are all the edge cases that this might run into and and the signal to noise ratio is pretty good.
这正是你想要的——就像让一个人来审查时,你想要一个有大量上下文、能想清楚「这会遇到哪些边界情况」的人。而且它的信噪比相当不错。
[15:22]
It's something maybe like 10% of the time it's wrong like that's and and for like how that used to be like with other code review products that we've tried it was like basically you had to ignore most of what it said.
大概只有 10% 的时候它是错的。而我们之前试过的其他代码审查产品,基本上你得无视它说的大部分内容。
[15:33]
Um it's pretty cool. How how long how long has something like this worked? Is it like a latest model thing or like have you had like like Robo Bun or this kind of like automated repro automated fixing like this whole pipeline?
挺酷的。这样的东西能跑起来有多久了?是最新模型才有的事,还是说 RoboBun、这种「自动复现、自动修复」的整条流水线,你已经有一阵子了?
[15:48]
Like how how long has that been actually possible? We can probably like see this in a chart somewhere. Um that's kind of a lot of commits but I think that's that might not be on main. That might be that the the Rust thing.
这件事真正变得可行有多久了?我们大概能在某个图表里看到。这提交数量挺多的,但我觉得那可能不在 main 分支上,那可能是 Rust 那个事。
[15:59]
Um uh uh yeah I heard bun is going to be written in Rust soon. Is that I don't know. We're there's a I just have a quad running and we'll see what happens. Um uh but you can see like the the the volume of commits there.
对,我听说 Bun 很快要用 Rust 重写了。是这样吗?我也不知道。我就是挂了一个 Claude 在跑,看看会发生什么。但你能看到那边的提交量。
[16:20]
It's like kind of lower and then it it's it's definitely gotten up a lot and then it's gone up a lot. Uh now really the bottleneck is like do I feel good about merging this? Am I confident that its changes are correct?
一开始比较低,然后明显涨了很多,又涨了很多。现在真正的瓶颈是:我对合并这个东西放心吗?我有信心它的改动是对的吗?
[16:33]
And that's new because it used to be like the code wasn't good enough. What do you think? What do you think is left like like what's it going to take before well like is there like a missing tool or like a missing model capability or model version or something for you to kind of feel like Robban can fully close the loop.
这是个新情况,因为以前是代码本身还不够好。你怎么看?你觉得还差什么——还需要什么,才能让你觉得 RoboBun 可以完全把回路闭合?是缺某个工具,还是缺某种模型能力、某个模型版本之类的?
[16:53]
Issue comes in and then like fix goes out automatically. I think it needs a little bit more uh it needs it takes a lot of time to verify the changes are correct. M um this was kind of already true like when it's a person pushing up a PR.
Issue 进来,修复就自动出去。我觉得它还差一点点——验证改动是否正确要花很多时间。这一点其实在「由人来推 PR」的时候就已经成立了。
[17:04]
Um uh but I think the the challenge is like how do we make it how do we make sure to communicate sufficient proof that the changes are correct. Um or making it easier to like roll back things. Um that's I think those are kind of the two directions.
但我觉得难点在于:我们怎么确保能传达出「足够的证据」来证明改动是正确的;或者让回滚变得更容易。我觉得这大概是两个方向。
[17:29]
But I think like for the majority of like simple issues, we should probably be pressing merge a lot more. And the bottleneck now is actually like CI and like making sure that uh like like the and and having like fully running the code like the the making sure all the test stuff works.
但我觉得对于大多数简单的 issue,我们其实应该更多地去按下「合并」。现在的瓶颈其实是 CI——是确保代码完整跑起来、确保所有测试都正常。
[17:49]
M um but I think it's like basically there for like and the large projects are still non-trivial but also I've been doing some pretty large PRs lately with with cloud mostly with in the not as much with Robo Bun but with like cloud code um like uh we recently added support for uh a built-in image processing library to bond.
但我觉得对小项目基本已经到位了,大项目仍然不简单。不过我最近也用 Claude 做了一些挺大的 PR——主要不是用 RoboBun,而是用 Claude Code。比如我们最近给 Bun 加了一个内置的图像处理库支持。
[18:14]
I could probably pull up the PR. Um, uh, and that was Claude. Um, uh, and also we did a bunch of follow-up PRs, too. Uh, yeah, it's like it's interesting because I think like when I look at different people using quad code, everyone is like at a kind of different level of like sophistication or kind of like adoption of this.
我大概可以把那个 PR 调出来。那是 Claude 做的。我们后面还做了一堆后续的 PR。对,这挺有意思的,因为我观察不同的人用 Claude Code,每个人在「精通程度」或者说「采用深度」上都处在不同的层次。
[18:35]
And I think for me the hardest thing is the model changes very often. So I have to like constantly reune and kind of recalibrate to what it can do. And like as an engineer, it's hard cuz it's like a very weird technology.
我觉得对我来说最难的是模型变得很频繁。所以我得不断地重新调整、重新校准对「它能做什么」的认知。作为工程师这挺难的,因为它是一种非常奇怪的技术。
[18:44]
It's like the first technology I've used that's like that. And I I sort of feel like this is actually the way that you do it is ahead of how the quad code team does it for quad code itself. And to me like that that like the way the quad code team does it is actually very automated.
它是我用过的第一种这样的技术。我有点觉得,你做这件事的方式,其实比 Claude Code 团队自己开发 Claude Code 的方式还要超前。在我看来,Claude Code 团队的做法其实已经非常自动化了。
[18:57]
But this is like even further ahead. This is like almost like full liftoff like full fully closed loop. Like in the last two weeks we've added an HTTP3 server to bun. Uh there's a PR for an HTTP2 server.
但你这个还要更超前。这几乎就像是「完全起飞」、完全闭合的回路。比如过去两周里,我们给 Bun 加了一个 HTTP/3 服务器,还有一个 HTTP/2 服务器的 PR。
[19:08]
There's uh fetch support for HTTP 3 and HTTP2. Um there's this image processing API. There's the ongoing Rust rewrite which may not ship. Uh uh uh that that's like the most ambitious one I've done so far.
还有对 HTTP/3 和 HTTP/2 的 fetch 支持。还有这个图像处理 API。还有正在进行中的 Rust 重写——它不一定会真的发布。那是我到目前为止做过的最有野心的一个。
[19:26]
Uh and I done is too strong of a word because it's very much not done. Uh uh so and so even something like this like this is like a benchmark. So Claude ran this benchmark for you. Yeah, Claude ran this benchmark.
「做过」这个词用得太重了,因为它远远还没做完。所以,连这样的东西——这是一个基准测试。所以 Claude 帮你跑了这个基准测试。对,这个基准测试是 Claude 跑的。
[19:38]
Uh I gave it like a this ran on like a separate like uh on like a Linux box. Um uh yeah and it and I was like make it faster than sharp and that's basically what I did. Um I gave it like a few ideas like oh you could try like read this code in JavaScript core to like figure out the how to like avoid cloning the type array when it's not strictly necessary.
我给了它……这是在一台单独的 Linux 机器上跑的。对,我跟它说「让它比 Sharp 更快」,我基本上就做了这么点事。我给了它几个思路,比如「你可以去读一下 JavaScriptCore 里的这段代码,搞明白怎么在并非严格必要时避免克隆 TypedArray」。
[19:59]
Um, but like it it then went and did it and figured it out. Um, uh, and like uh, yeah, it's pretty crazy honestly because it was these this wouldn't none of this would have worked uh, several months ago.
但它就真的去做了,并且把它搞定了。说实话挺疯狂的,因为这些东西在几个月前根本都跑不起来。
[20:23]
Yeah. I I feel like like within like within anthropic like within an AI lab, you call this kind of thing hill climbing. And this is this idea that like if you give the model some sort of metric and then you give it a way to verify its result, you can just make it iterate and keep going and keep going until it hits that metric.
对。我觉得在 Anthropic 内部、在一个 AI 实验室里,我们把这种事叫做 hill climbing(爬山)。它的思路是:如果你给模型某个指标,再给它一个验证结果的方法,你就能让它不断迭代、一直跑一直跑,直到它达到那个指标。
[20:36]
Um, and this is something like 47 I think is uniquely good at. And I think it's something really underutilized because I think it's the first model that's actually very good at that. And if you just give it a target, you give it a way to like improve the performance and you give it a way to measure, it'll just like keep going until until it's done if you let it go in auto mode.
我觉得这是 4.7 格外擅长的一件事。而且我觉得它被严重低估了,因为它是第一个真正很擅长这件事的模型。只要你给它一个目标、给它一个提升性能的途径、再给它一个衡量的办法,如果你让它在 auto mode 里跑,它就会一直跑到把事情做完为止。
[20:53]
Yeah. And we can also see like uh this is another case where like the code review comments was really really helpful because like there was like in this PR there's like 100 comments or something uh and it's just going and fixing everything.
对。我们也能看到——这又是一个例子,代码审查的评论真的非常非常有用。比如这个 PR 里大概有 100 条评论,它就一条条地去把所有问题都修掉。
[21:10]
Um uh uh like it goes on for a while and in the meantime you're just working on something else. Yeah, I was this was not like my the thing I was 100% focused on. I was maybe like 10% focused on this. I was doing like five things at once.
它会跑上好一阵子,而这期间你就去忙别的事。对,这件事并不是我 100% 专注在做的,我大概只有 10% 的注意力在上面,我是同时在做五件事。
[21:23]
Um uh uh and this definitely wasn't possible like 6 months ago. Um 3 months ago like this is like very recent that this is doable. Okay. So how how are our sessions doing? Yeah. So we have one PR there.
这在 6 个月前绝对做不到。3 个月前也不行——这件事能做到是非常近期的事。好,那我们那几个会话怎么样了?对,那边有一个 PR 了。
[21:47]
There's almost another PR coming up it looks like pretty soon. Um uh this one is should be the trickiest one. Uh um it mostly looks good though. Um like the or like it looks plausible based on this these changes.
看起来很快又要出一个 PR 了。这一个应该是最棘手的。不过它大体上看起来还行。从这些改动来看,它看起来挺靠谱的。
[22:05]
I wouldn't exactly do it this way, but I think that's we need like a better more optimized way to do this because that's a lot of checks. Um and and looking looking at your setup here, so you're using you mostly use CLI.
我不会完全这样做,但我觉得我们需要一种更好、更优化的方式来做这件事,因为这里有很多次检查。看你这边的配置——你主要是用 CLI。
[22:15]
Yeah. And um do you always use auto mode for permissions? Auto? Yeah. And then before that I used dangerously skip permissions. Um [laughter] no you guys can delete stuff if you do that. I don't I think I'm not supposed to recommend that.
对。那权限你一直用 auto mode 吗?auto?对。在那之前我用的是 --dangerously-skip-permissions。[笑声] 不行,你们用那个是会删掉东西的。我……我觉得我不该推荐那个。
[22:37]
Um but I think it's just not fun to wait for Claude to like press approve because then you just like go off and do something else and then it's just been sitting there. So that's why auto mode is really good because it's actually like a real way to fix that instead of just like trusting.
但我觉得,等着给 Claude 按「批准」实在不爽,因为你一转身去做别的事,回来发现它就一直干等在那儿。所以 auto mode 真的很好,因为它是一个真正能解决这个问题的办法,而不只是「全靠信任」。
[22:55]
And I I also noticed like the the input like the little composer it's stuck to the bottom of the screen. So you're using no flicker mode. Yeah, I'm using no flicker. Honestly, I think we should just like make that the default because it's so much better.
我还注意到那个输入框——那个小小的 composer——固定贴在屏幕底部。所以你在用 no flicker mode。对,我用的是 no flicker。说实话我觉得我们干脆该把它设成默认,因为它好太多了。
[23:03]
Um like you can see I can scroll really fast and like like you could scroll fast before but like sometimes there would be a flicker and now there's not. Um, have have folks tried no flicker mode for CLA?
你能看到我可以飞快地滚动。以前你也能滚得快,但有时会有闪烁,现在没有了。在座有人试过 Claude 的 no flicker mode 吗?
[23:21]
Yeah, a few people. So, it's like we launched it on April Fools. So, you can think it [laughter] in hindsight it came across as a joke a little bit, but if you actually do quad code, no flicker equals 1 quad.
有,几个人。我们是在愚人节那天上线它的。所以你可能会以为它 [笑声]……现在回头看,它当时确实有点像个玩笑,但如果你真的去用 Claude Code,把 no flicker 设成 1 就对了。
[23:30]
So, just like set that environment variable, we totally rewrote the renderer that's running in the CLI. So, it's using virtualized scrolling, virtualized selection. And so what this means is like constant memory usage, constant CPU usage, and also some nice stuff like uh like if Jared types, he can actually like click around the composer.
所以你只要设一下那个环境变量就行。我们彻底重写了 CLI 里跑的渲染器,所以它现在用的是虚拟化滚动、虚拟化选择。这意味着内存占用恒定、CPU 占用恒定,还有一些不错的特性,比如 Jarred 打字的时候,他真的可以在 composer 里点来点去。
[23:51]
And so you can actually click and mouse events work, which is pretty crazy for a terminal. So I'm just also having it monitor the PR. Um, and you can see it's uh it ran some commands and then it's going to go to sleep for 20 minutes and wake back up.
你真的可以点击,鼠标事件是生效的——这对一个终端来说挺疯狂的。所以我也让它顺便监控这个 PR。你能看到它跑了一些命令,然后它会睡 20 分钟再醒来。
[24:04]
Um, 20 minutes is probably a little bit too long, but it's okay. Um uh oops. And what's that? Is that like using like a loop or something? I think so. Uh uh. Uh yeah. And then it's let's see how else is it doing.
20 分钟可能有点太长了,不过没关系。哎呀。那是什么?那是用了某种循环吗?我想是的。对。然后我们看看它别的地方进展如何。
[24:24]
And then the other ones are still uh apparently it fixed an extra bug as well. Uh uh. Okay. So we got Okay, so it's been what? It's been like 20 minutes or so. 25 minutes and we got one. How many PRs have we gotten?
其他几个还在跑——看起来它还顺手多修了一个 bug。好。所以我们已经……过了多久了?大概 20 分钟了吧。25 分钟,我们拿到一个了。我们一共拿到几个 PR 了?
[24:38]
Two. Uh, three PRs. Three PRs. That's not bad. Yeah. And I think we'll get a fourth one once it finishes running the tests. And then in the meantime, Robo is still running and kind of like generating even even more PRs.
两个。呃,三个 PR。三个 PR,不错。对。我觉得等它把测试跑完,我们还会拿到第四个。同时,RoboBun 还在跑,还在生成更多的 PR。
[24:56]
Yeah. Every time somebody submits an issue, it it tries to reproduce it. Yeah. I I kind of feel like every like the the way quad code makes you think is every time there's a new bottleneck, you have to kind of automate that bottleneck and then there's always some other bottleneck after and you kind of move on to that and like it started like writing code was the bottleneck and now it's no longer the bottleneck and then like verification and running tests that was like the bottleneck and it's no longer the bottleneck and now there's like a deeper layer of verification maybe that maybe that's it.
对,每当有人提交一个 issue,它就尝试复现。对。我有点觉得,Claude Code 促使你思考的方式是这样的:每当出现一个新瓶颈,你就得把那个瓶颈自动化掉,然后总会冒出另一个瓶颈,你再去攻它。一开始「写代码」是瓶颈,现在它不再是瓶颈了;然后「验证、跑测试」是瓶颈,现在它也不再是瓶颈了;现在大概是更深一层的验证——也许那就是当前的瓶颈。
[25:25]
What do what do you think are the bottlenecks remaining? It's definitely this deeper layer of verification. Um I feel like the bottleneck after that is going to be like planning like what should we do, what should we not do and what is the right way to fix this.
你觉得还剩哪些瓶颈?肯定是这个更深一层的验证。我感觉再往后的瓶颈会是「规划」——我们该做什么、不该做什么,以及修复这件事的正确方式是什么。
[25:40]
Um and like ideally Claude would be smart enough or like we could trust Claude enough to to merge the PRs by itself. Um and I think like in a in certain projects you could pro probably do that um and just have that be automatic completely.
理想情况下,Claude 会聪明到——或者说我们会足够信任 Claude——让它自己去合并 PR。我觉得在某些项目里,你大概已经可以这么做了,让它完全自动化。
[26:00]
Um, I think Bun is not yet or like it's not yet there for Claude or sorry for for Bun. Um, but I think it'd be really cool if if like we had the tooling uh for us to feel confident enough to do that. So So like right now Robbo it doesn't like build features.
我觉得 Bun 还没到——对 Bun 来说还没到那个程度。但我觉得,如果我们有那种工具,能让我们有足够的信心那么做,那会非常酷。所以目前 RoboBun 是不做功能开发的。
[26:13]
It it doesn't do like feature requests yet. It it that's true. Yeah, it doesn't do feature requests but it we do also use it sometimes. We we so we can also uh uh appmentntion it in either discord or slack and it will like try to implement the feature.
它暂时不处理功能需求。确实是这样。对,它不处理功能需求,但我们有时也会用它。我们也可以在 Discord 或 Slack 里 @ 它,它就会尝试去实现那个功能。
[26:31]
Um uh so sometimes when people are like hey bun is missing this thing um then I just at mention the bot and maybe like an hour later there's a PR. Um a bunch of times I've somebody's like tweeted at me something like this can you fix this bug or whatever and that's basically what I do.
所以有时候别人说「嘿,Bun 少了这个东西」,我就直接 @ 那个机器人,大概一个小时后就有一个 PR 了。有很多次,有人在 Twitter 上 @ 我说「能修一下这个 bug 吗」之类的,我基本上就是这么干的。
[26:49]
Um, and then I reply with a link to the PR. Um, should we add a Robbo account on Twitter? Um uh and I think like so like it can do feature requests, but I'm I'm hesitant for it to implement literally everything anybody asked for in a GitHub issue cuz that's kind of a lot cuz in some ways it's it's kind of crazy to put something like an image processing library inside a bun, but like we talk about engineering taste and there's like an element of taste that goes into that.
然后我就回复一个 PR 的链接。我们要不要给 RoboBun 开个 Twitter 账号?我觉得,它是能处理功能需求的,但我对「让它把任何人在 GitHub issue 里要求的所有东西都照单实现」这件事有顾虑,因为那有点太多了。某种程度上,把图像处理库这种东西塞进 Bun 里,本身就有点疯狂——但我们一直在谈「工程品味」,这里面是有品味成分的。
[27:21]
you felt like that's a good idea and like we're not sure yet if Quad is at the point where you would also think this is a good idea but you know at some point in the future it'll get there maybe it's starting to get and I do think that like PRs become suggestions like having uh like not merging PRs used to be like you feel bad if you don't merge like a co-orker's PR uh because like they put work into that but you don't have to feel bad when it's like claude Um uh so like if the PR is wrong or or or or for for or whatever reason then you can just not merge it.
你觉得那是个好主意,而我们还不确定 Claude 是否已经到了「会和你一样认为这是个好主意」的程度——但你知道,未来某个时刻它会到那一步,也许已经开始接近了。我确实觉得 PR 正在变成「建议」。以前不合并一个同事的 PR,你会有负罪感,因为他们投入了工作;但当它是 Claude 的时候,你就不必有负罪感。所以如果一个 PR 是错的,或者出于任何别的原因,你直接不合并就行。
[27:59]
And uh but it does mean that like the like the the bar for uh what you merge is like should should it be there because I think that's also a difference with with when it's like people because with people you want you don't want people to feel bad about their like lost work.
但这也意味着,你「该合并什么」的门槛——它本来就应该立在那里。因为我觉得这也是和「跟人打交道」的一个区别:和人打交道时,你不希望别人因为白费的工作而难受。
[28:21]
Um, so sort of in some ways it does actually end up raising the bar for what you decide to merge. Yeah, it's interesting how like as the bottlenecks move, the dynamics change a little bit. It's sort of like having to trust each other, having to trust people on the team.
所以某种程度上,这其实反而抬高了你决定合并什么的门槛。对,挺有意思的——随着瓶颈的转移,这里面的动态也跟着变了一点。这有点像「彼此信任」「信任团队里的人」。
[28:36]
This kind of changes a little bit. Now it's a little bit more about like do we have the right automation and like do we trust automation like as as a group? Yeah. So I think we're almost at time. Is there any like maybe one last thing we want to we want to show people where we can kind of check in on kind of like the progress that we've made?
这件事稍微变了一点。现在它更多地变成了:我们有没有正确的自动化?以及我们作为一个团队,信不信任这套自动化?对。我觉得我们时间差不多了。有没有最后一件想给大家展示的东西——让我们回头看看我们已经取得的进展?
[28:55]
Um I don't think so. Uh uh yeah, it's it's still going one last onto that fourth PR and it's going back and forth like found a bug and then fixed a bug. Uh looks like it's about to submit the PR now. Okay, let's wait for this one.
我觉得没有了。对,它还在跑——正在攻最后那第四个 PR,来来回回地:发现一个 bug,然后修掉一个 bug。看起来它现在就要提交 PR 了。好,我们等等这一个。
[29:16]
Love to have one more. This is like the cool thing about auto mode. It's like in auto mode I can let like cloud runs like for hours and hours at a time. Like I run it almost every night. I'll just have a bunch of quads running in auto mode.
真希望能再多一个。这就是 auto mode 很酷的地方。在 auto mode 里,我可以让 Claude 一连跑好几个小时。我几乎每天晚上都这么跑,就挂一堆 Claude 在 auto mode 里跑着。
[29:25]
And I was like before this it just didn't work cuz it always got stuck at some kind of permission request. And that was crazy. Like this entire thing was one prompt and and that just ran for 30 minutes.
在这之前它根本跑不通,因为它总会卡在某种权限请求上。这挺夸张的——这整件事就是一个 prompt,然后它就一口气跑了 30 分钟。
[29:34]
Yeah. This is all I said. Okay. So, it's pushing at it's about to submit the PR. That sounds like the right fix, too. This has been an issue that's been open for a long time. Okay. And we got a PR Yeah, we can go to this issue and we can see how many up votes it has.
对。我说的就这么多。好,它正在推送,马上要提交 PR 了。这个修复听起来也对。这是一个开了很久的 issue。好,我们拿到一个 PR 了。对,我们可以打开这个 issue,看看它有多少个赞。
[30:18]
- Yeah, it's kind of a lot. Cool. Maybe we can pause there. Um, but to me, this is just like such a cool vision of where engineering is going, I think, for everyone in this room. And, you know, we're going to see this first.
20 个。对,挺多的。酷。我们大概可以就到这儿。但对我来说,这真的是一幅很酷的图景——工程未来的走向,我觉得对在座每个人都是。而且你知道,我们会最先看到这一切。
[30:35]
we're going to have to figure it out first and then everyone else is going to have to figure this out. So, you know, like we were talking about this morning, just excited to be on this journey together.
我们得先把它摸索明白,然后其他所有人也都得把它摸索明白。所以,就像我们今天早上聊的那样,很高兴能一起踏上这段旅程。
[30:42]
And like you can see, we haven't figured everything out yet. Um, but I think like the mode that we're in is just constantly experimenting, constantly trying to to see what the next bottleneck is so we can solve it.
你也能看到,我们还没把所有事情都搞明白。但我觉得我们现在所处的状态,就是不断地实验、不断地去找下一个瓶颈是什么,好把它解决掉。
[30:57]
It's very exciting. This is so cool. Like this stuff. [applause] Cool. All right. Should I like Yeah, you can weave it. Come on, bro.
这非常令人兴奋。这太酷了,这些东西。[掌声] 酷。好的。我要不要……对,可以收尾了。来吧,兄弟。