Hacker News new | ask | show | jobs
by fallat 1733 days ago
It looks like so much Rust code to generate the simplest of 6502 code. No thanks.
2 comments

Did you look at chirp8-engine, or only chirp8-c64? The value add is not in the parts that interface with the C64 internals; probably using C for that would make for nicer code. But I wanted to push as much into Rust as I could in the short amount of time I spent on this.

The real advantage of using Rust is in the actual program logic. E.g. the instructions are decoded into an algebraic datatype (in https://github.com/gergoerdi/chirp8-engine/blob/7623353a8bf0...) and then that is consumed in the virtual CPU (https://github.com/gergoerdi/chirp8-engine/blob/7623353a8bf0...). Rust's case-of-case optimization takes care of avoiding the intermediate data representation at runtime.

No thanks indeed, but I completely agree with this sentiment from the article:

> It is worth pointing out that the amazing thing about chirp8-c64 is not how well it works, but that it works at all.