- 主题:ai写完浏览器,现在写编译器了
claude 为了压力测试,用agent team写了c编译器:Building a C compiler with a team of parallel Claudes
在接近2000次Claude Code会话和2万美元的API成本后,这个智能体团队产出了一个10万行代码的编译器,能够在x86、ARM和RISC-V架构上构建Linux 6.9。
--
FROM 221.217.140.*
不错不错。。
有没有开源出来看看代码质量?
我之前就说过,AI 浪潮最大的红利就是把各种软件都低成本地复制一遍。
【 在 chunhui 的大作中提到: 】
: claude 为了压力测试,用agent team写了c编译器:Building a C compiler with a team of parallel Claudes
: 在接近2000次Claude Code会话和2万美元的API成本后,这个智能体团队产出了一个10万行代码的编译器,能够在x86、ARM和RISC-V架构上构建Linux 6.9。
--
FROM 27.149.78.*
显然有
【 在 hgoldfish 的大作中提到: 】
: 不错不错。。
: 有没有开源出来看看代码质量?
: 我之前就说过,AI 浪潮最大的红利就是把各种软件都低成本地复制一遍。
: ...................
--
FROM 221.217.140.*
博客
www dot anthropic dot com/engineering/building-c-compiler
编译器代码
github /anthropics/claudes-c-compiler
--
FROM 61.51.229.*
人类构造这样的编译器,花费是多少呢?
【 在 chunhui 的大作中提到: 】
: claude 为了压力测试,用agent team写了c编译器:Building a C compiler with a team of parallel Claudes
: 在接近2000次Claude Code会话和2万美元的API成本后,这个智能体团队产出了一个10万行代码的编译器,能够在x86、ARM和RISC-V架构上构建Linux 6.9。
--
FROM 116.1.3.*
我也刚找到了。
用 RUST 实现的,可能 RUST 真的是 AI 时代的编程语言。
【 在 z16166 的大作中提到: 】
: 博客
: 编译器代码
: ...................
--
修改:hgoldfish FROM 27.149.78.*
FROM 27.149.78.*
Rust表达能力和C++一样,但是解决了C++的几个重要痛点,限制比C++多(避免五花八门的编程范式,比如多线程必须sync/send),能编译通过基本上没太大问题,
而且用AI写,就不存在人类码农面临的Rust学习曲线问题,就是适合。
【 在 hgoldfish 的大作中提到: 】
: 我也刚找到了。
: 用 RUST 实现的,可能 RUST 真的是 AI 时代的编程语言。
:
--
修改:z16166 FROM 61.51.229.*
FROM 61.51.229.*
要是有更好的专门针对 AI 进行设计的语言就更好了。
把 scala 这种语言简化一下,估计会比 rust 好吧。
【 在 z16166 的大作中提到: 】
: Rust表达能力和C++一样,但是解决了C++的几个重要痛点,限制比C++多(避免五花八门的编程范式,比如多线程必须sync/send),能编译通过基本上没太大问题,
: 而且用AI写,就不存在人类码农面临的Rust学习曲线问题,就是适合。
--
修改:hgoldfish FROM 27.152.129.*
FROM 27.152.129.*
没得比,Rust可以搞bare-metal
【 在 hgoldfish 的大作中提到: 】
: 要是有更好的专门针对 AI 进行设计的语言就更好了。
: 把 scala 这种语言简化一下,估计会比 rust 好吧。
:
--
FROM 61.51.229.*
我测试了,这个编译器本身只要38秒就编译出来了,在我的Ubuntu虚拟机里。
happy@Ubuntu:~$ git clone git@github.com:anthropics/claudes-c-compiler
Cloning into 'claudes-c-compiler'...
remote: Enumerating objects: 30912, done.
remote: Total 30912 (delta 0), reused 0 (delta 0), pack-reused 30912 (from 1)
Receiving objects: 100% (30912/30912), 11.51 MiB | 3.67 MiB/s, done.
Resolving deltas: 100% (20199/20199), done.
happy@Ubuntu:~$ cd claudes-c-compiler/
happy@Ubuntu:~/claudes-c-compiler$ dir
BUILDING_LINUX.txt Cargo.toml DESIGN_DOC.md LICENSE README.md current_tasks ideas include projects src
happy@Ubuntu:~/claudes-c-compiler$ cargo build --release
Compiling ccc v0.1.0 (/home/happy/claudes-c-compiler)
Finished `release` profile [optimized] target(s) in 37.89s
happy@Ubuntu:~/claudes-c-compiler$ cat > hello.c << 'EOF'
#include <stdio.h>
int main(void) {
printf("Hello from CCC!\n");
return 0;
}
EOF
happy@Ubuntu:~/claudes-c-compiler$ ./target/release/ccc -o hello hello.c
happy@Ubuntu:~/claudes-c-compiler$ ./hello
Hello from CCC!
happy@Ubuntu:~/claudes-c-compiler$
--
FROM 61.51.229.*