An episode of C++ Weekly in which Jason Turner shows modern C++14 compiling to the Commodore 64's 6502. It demonstrates writing efficient high-level code for 8-bit hardware.
Why Hacker News points people here: Cited as an example of using modern C++ on 8-bit hardware.
“I'd recommend watching this CppCon talk [1] about compiler optioning.”
Talk on compiler optimizations explaining why recompilation loses information.
Full comment
I'd recommend watching this CppCon talk [1] about compiler optioning. It isn't just that recompilation is hard, or that it is difficult for humans to do. At a fundamental level, the information is not there at all, because the compiler can make very impressive optimizations. Machine learning can deal with weak signals, but it can't deal with no signal. [1] this video
Cites itvoltagex_Oct 2016
“which definitely builds on some of Matt's work”
C++ code targeting the Commodore 64.
Full comment
Your second link reminded me of this video (which definitely builds on some of Matt's work). link - C++17 for the Commodore 64. Probable language warnings for my other suggestions: * Rescuing Prince of Persia from the Sands of Time link (was this talk ever given elsewhere?) * And You Shall Know Me By My Trail of Documentation - link * The History and Evolution of Computer Viruses - link
Cites itpjmlpMar 2025
“C++14 For The Commodore 64”
Example of using C++ on 8-bit hardware.
Full comment
It is a return to the age when we had BASIC and Z80/6502 Assembly, and yes doing memcpy/strcpy all over the place instead of having proper arrays and strings is that bad. At very least, C++. "C++14 For The Commodore 64" this video