SectorC: A C Compiler in 512 bytes

(xorvoid.com)

30 points | by valyala 2 hours ago

3 comments

  • xorvoid 8 minutes ago
    I may be the author.. enjoy! It was an absolute blast making this!
    • veltas 0 minutes ago
      This is very nice. I'm currently writing a minimalist C compiler although my goal isn't fitting in a boot sector, it's more targeted at 8-bit systems with a lot more room than that.

      This is a great demonstration of how simple the bare bones of C are, which I think is one reason I and many others find it so appealing despite how Spartan it is. C really evolved from B which was a demake of Fortran, if Ken Thompson is to be trusted.

  • riedel 19 minutes ago
    Beautiful, but make sure to quickly add 2023 to the title.

    Discussed at the time: https://news.ycombinator.com/item?id=36064971

  • sanufar 11 minutes ago
    The way hashing is used for tokens and for making a pseudo symbol table is such an elegant idea.