logoalt Hacker News

nxobjectyesterday at 7:42 PM2 repliesview on HN

That's a bit of an extraordinary claim: what did Claude do about the important non-Pascal parts: the resource fork and the 68k assembly?


Replies

jeffrallentoday at 11:57 AM

I've had a chance to review the code now. It used HTML/CSS/JS for the UI, and calls into the Go/wasm code where the filters are implemented.

When a filter is implemented half in Pascal (setup and loop over the rows) and half in assembly (each row) Claude did it all in Go, but the structure in Go is the same: one entry point for setup and iterating on rows, and one function (ported from the assembly) to process each row.

(As for the resource fork, it just reimplemented the UI in HTML. There's not enough info in the transcript of it's thinking to know if it read the resource file and understood it, or if it used a general understanding of what was in Photoshop, from training data, to do it.)

My mind is blown. I keep trying to find evidence that it just copied this from someplace, but I can't see how.

jeffrallenyesterday at 7:49 PM

Look I understand it's crazy, but it took one small prompt and I came back a half hour later expecting it to have given up, but instead I saw exactly what you'd expect to see in my browser.

Here is the prompt I gave it:

"Use wasm and go and a 68000 emulator to get the Photoshop 1.0.1 software at https://d1yx3ys82bpsa0.cloudfront.net/source/photoshop-v.1.0... to run correctly. You should not require an operating system, instead implement the system calls that Photoshop makes in the context of wasm. Because Go compiles to wasm, you might try writing some kind of translator from the pascal to go and then compile for wasm. Or you might be able to find such a thing and use it."

You can give it a try yourself, or contact me for a private link to it (see the CHM license for why I can't make it public).