News for hackers. Stuff that matters.
Re:I wrote a CHIP-8 emulator in my own programming language by pizza_man on Sunday April 19, 2026 @04:04PM (#47827221)
I'm not really big on blogging, but I'll write a summary of what I did, since this post seems to have gained some attention.

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.

Re:I wrote a CHIP-8 emulator in my own programming language by hotpotat on Sunday April 19, 2026 @05:49PM (#47827930)
Unfortunately we’re in the phase where even if you write things yourself, be it prose with em dashes or code with velocity, you’re given a demerit. And, if you are using AI, the work is still treated as less valuable, even if it brings value.
Re:I wrote a CHIP-8 emulator in my own programming language by girvo on Sunday April 19, 2026 @06:03PM (#47828051)
> And, if you are using AI, the work is still treated as less valuable, even if it brings value.

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.

Re:I wrote a CHIP-8 emulator in my own programming language by onlyrealcuzzo on Sunday April 19, 2026 @07:09PM (#47828543)
Haters have always been hating.

There's nothing new under the sun.

They just have different buzzwords to hate.

Re:I wrote a CHIP-8 emulator in my own programming language by jadedtuna on Sunday April 19, 2026 @05:54PM (#47827972)
I'm not sure where the grandparent got 400k lines from. Perhaps total number of lines modified? I'm seeing about 115k lines, with 88k from sxc.ssa as you mentioned. Still 27k lines of code in <3 weeks is a lot, so it isn't terribly surprising that GP would assume AI given current day and age.

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?

Re:I wrote a CHIP-8 emulator in my own programming language by drunken_thor on Monday April 20, 2026 @06:15AM (#47832303)
His spectre language is fully bootstrapped and written in spectre so his suggestion that you try to get an AI to write spectre stands for both the chip-8 emulator and the language itself. He is very obviously a prolific programmer with a very keen focus.
Re:I wrote a CHIP-8 emulator in my own programming language by flykespice on Sunday April 19, 2026 @06:59PM (#47828454)
Im curious, did you write a new project in a whole new language because you grew tired of Nim somehow?

Asking as someone considering nim as C/C++ replacement