Show HN: C# 15 on a Commodore 64 [video] youtube.com · 2 points · 0 comments · H...

@show

Show HN: C# 15 on a Commodore 64 [video] youtube.com · 2 points · 0 comments · HN thread

TL;DR A Show HN post linking to a YouTube video demonstrating a C# 15 program running on a Commodore 64. The author says the demo uses records, unions and pattern matching, is compiled ahead of time to native 6502 code, has no VM or GC, and the whole game with SID music is 37 KB. The linked GitHub project, zero-csharp, is a compiler setup that builds small native C# programs without the .NET runtime or garbage collector.

  • The demo is a Commodore 64 game using records, unions and pattern matching, compiled ahead of time to native 6502 code, per the post.
  • The author states there is no VM and no GC, and the whole game including SID music is 37 KB.
  • The linked repo zero-csharp targets Linux, macOS, Windows, WebAssembly, DOS on a 386, UEFI and Commodore 64, built on bflat's zero mode.
  • On the C64 the same bitcode is rewritten for 16-bit addresses and compiled by llvm-mos, per the project README.
  • The project trades away the garbage collector, catchable exceptions, reflection, async/await and most of the base class library, using arenas for memory instead.
  • The video page text as captured contains only YouTube footer links, so the video content itself could not be read.

Links in the post

  • OnurGumus/zero-csharp: A tool that compiles C# to small native programs with no .NET runtime or garbage collector, with samples for many targets including the Commodore 64.

Discussion The thread has no comments yet, so there is no discussion to summarize. The post has 2 points and no replies at the time of capture.

#csharp #commodore64 #retro #nativeCompilation #gamedev