Settings

Theme

Bun.Image

bun.com

36 points by chakintosh a month ago · 15 comments

Reader

furyofantares a month ago

This looks like one of the better pieces of LLM-output documentation I've seen. It's bad technical writing, but better than most of what I've seen come out of an LLM.

---------------

Pre-empting the "how can you tell", here's some of the tells.

> The API is shaped after Sharp:

Constantly using "shaped" and "shape" is becoming an LLM-ism, much more common than in human writing.

> The constructor accepts a path, bytes, or a Blob — including Bun.file() and Bun.s3().

> The format is sniffed from the bytes — extensions and Content-Type are ignored.

Repeatedly formatting statements as X: Y, X — Y, or [b]X[b] Y is also an LLM-ism.

> Don’t pass user-controlled strings directly to the constructor — that’s an arbitrary-file-read primitive.

> When passing a TypedArray/ArrayBuffer, don’t mutate it while a terminal is pending — decode runs off-thread and borrows the bytes.

Doing so by leading with what-it's-not / what-not-to-do is even more of an LLM-ism.

  • solenoid0937 a month ago

    The other big problem with LLM documentation is that it tends to drift from the code, because agents forget to update it. Then later agents sometimes reference the documentation, sometimes reference the code, and get confused.

    For agent written code I now default to no documentation and explanatory function signatures, it works better for me at least.

    • michaelmior a month ago

      Humans also tend to forget to update documentation and the same confusion happens. I don't think it's really a new problem.

      • solenoid0937 a month ago

        I agree, I think for agents though, documentation does more harm than good. When I'm writing code with an agent I tell it to skip documentation entirely (reading or writing it) and it leads to more accurate outcomes.

        When agents write most of our code, I question if we will still even need documentation.

        • michaelmior 25 days ago

          I think that's a fair take. I think we definitely still need specs that describe the desired behavior as an artifact. But documentation describing the implementation definitely feels less important.

    • diath a month ago

      I just have a rule in AGENTS.md that any additions, removals or modifications to the public facing APIs should update the corresponding API documentation, works fine for me (assuming both sit in the single workspace).

wxw a month ago

> The API is shaped after Sharp: construct from an input, chain transforms, pick an output format, then await a terminal method.

(https://sharp.pixelplumbing.com/)

Good! I like the pipeline workflow.

simonw a month ago

I really like this. Having image manipulation as a core standard library feature rather than an optional package makes complete sense to me for a web development platform in 2026.

It's not like image manipulation is a poorly understood problem or a fast-moving field.

nfredericks a month ago

Nice to see lots of LLM-generated text

onesingleblast a month ago

Glad to see that Bun is doing something that Java has been doing since 1998.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection