ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
67% Positive
Analyzed from 472 words in the discussion.
Trending Topics
#lines#code#emulator#spectre#commits#write#original#more#compiler#still

Discussion (7 Comments)Read Original on HackerNews
Over 900 commits and 400k loc to Spectre in less than 3 weeks has me thinking this is all AI.
This is a rewrite of an emulator I wrote in Nim called Cemu, you can find the original over at https://gitlab.com/navid-m/cemu, it adds several features to the original version, including CPU speed changing with Y and H keys and a better control mapping, since the CHIP-8 ASDF controls were cumbersome for game ROMs like space invaders. It was also done as a practice to test the language for more practical applications that would involve external C libraries, in this case SDL2.
The rewrite was a good stress test for a few areas of the compiler I hadn’t exercised before, like FFI ergonomics, global handling and tooling ergonomics. Most of the core emulator logic stayed fairly close to the original, though the surrounding infrastructure (input handling, rendering loop, and timing) is cleaner and more robust now.
Overall, it’s still a fairly small project, but it served its purpose well in validating that the language can handle something more substantial, while also exposing a few rough edges that need smoothing out.
I'll address the AI claim too since you added that sneakily after I responded, I don't know where you got the number of lines from, but chances are you're taking into account the sxc.ssa file, which is just the auto-generated QBE SSA bootstrap file from the compiler, used by the install.sh script so that people can install the compiler from source without needing a prebuilt binary for their platform. No, it's clearly not AI, and if you're hellbent on saying it is, I challenge you to write any Spectre code with AI, the AI will be useless.
On that topic, I don't think GP was referring to that fact that you wrote the CHIP-8 emulator via AI, but rather that the Spectre compiler (the original Rust version) was written/augmented with AI.
Looking at the very first commits, after you've added the initial source code, there are a bunch of commits with many lines changes within the span of several minutes. Assuming not AI, I'm curious about that. Do you really just write code that quickly? Or was this a project not tracked by git originally, and you made a bunch of commits to set up some form of history for your recent changes?
This is true, some people do react this way. But I've noticed its far more pronounced if people try to hide the AI usage for code.
AI prose is always looked down on, I feel dirty after having read it.