zlacker

[return to "Anthropic acquires Bun"]
1. Jarred+cy[view] [source] 2025-12-02 20:28:51
>>ryanvo+(OP)
I work on Bun.

Happy to answer any questions

◧◩
2. losved+TH[view] [source] 2025-12-02 21:16:33
>>Jarred+cy
I'm sort of surprised to see that you used Claude Code so much. I had a vague idea that "Zig people" were generally "Software You Can Love" or "Handmade Software Movement" types, about small programs, exquisitely hand-written, etc, etc. And I know Bun started with an extreme attention to detail around performance.

I would have thought LLM-generated code would run a bit counter to both of those. I had sort of carved the world into "vibe coders" who care about the eventual product but don't care so much about the "craft" of code, and people who get joy out of the actual process of coding and designing beautiful abstractions and data structures and all that, which I didn't really think worked with LLM code.

But I guess not, and this definitely causes me to update my understanding of what LLM-generated code can look like (in my day to day, I mostly see what I would consider as not very good code when it comes from an LLM).

Would you say your usage of Claude Code was more "around the edges", doing things like writing tests and documentation and such? Or did it actually help in real, crunchy problems in the depths of low level Zig code?

◧◩◪
3. dgrosh+2c1[view] [source] 2025-12-03 00:35:18
>>losved+TH
I'm not sure about exquisite and small.

Bun genuinely made me doubt my understanding of what good software engineering is. Just take a look at their code, here are a few examples:

- this hand-rolled JS parser of 24k dense, memory-unsafe lines: https://github.com/oven-sh/bun/blob/c42539b0bf5c067e3d085646... (this is a version from quite a while ago to exclude LLM impact)

- hand-rolled re-implementation of S3 directory listing that includes "parsing" XML via hard-coded substrings https://github.com/oven-sh/bun/blob/main/src/s3/list_objects...

- MIME parsing https://github.com/oven-sh/bun/blob/main/src/http/MimeType.z...

It goes completely contrary to a lot of what I think is good software engineering. There is very little reuse, everything is ad-hoc, NIH-heavy, verbose, seemingly fragile (there's a lot of memory manipulation interwoven with business logic!), with relatively few tests or assurances.

And yet it works on many levels: as a piece of software, as a project, as a business. Therefore, how can it be anything but good engineering? It fulfils its purpose.

I can also see why it's a very good fit for LLM-heavy workflows.

◧◩◪◨
4. smj-ed+eg1[view] [source] 2025-12-03 01:15:04
>>dgrosh+2c1
I can't speak as much about the last two examples, but writing a giant parser file is pretty common in Zig from what I've seen. Here's Zig's own parser, for example[1]. I'm also not sure what you mean by memory unsafe, since all slices have bounds checks. It also looks like this uses an arena allocator, so lifetime tracking is pretty simple (dump everything onto the allocator, and copy over the result at the end). Granted, I could be misunderstanding the code, but that's the read I get of it.

[1] https://codeberg.org/ziglang/zig/src/commit/be9649f4ea5a32fd...

◧◩◪◨⬒
5. dgrosh+BP1[view] [source] 2025-12-03 07:37:43
>>smj-ed+eg1
As it happens, the commit I linked fixes a segfault, which shouldn't normally happen in memory-safe code.
[go to top]