That's fantastic, love the ability to inspect each state and see it as a whole running in real-time. I remember seeing a C64 simulator that showed the memory/cpu state - but this goes beyond that.
Started with the excellent MIR compiler, and I wrote much of the class/string/json/dict, exceptions and AI made the generics,ownership tracking, and safety checks/traps. Added some go
The memory model is mixed, I ended up using arenas for dictionaries and adding a full ownership checking / safety checking compiler stage.
It's purely for the joy of making something interesting.
Oh wow, interesting project... I've also been working on a "better c" for a few years, and while it was originally a JIT language (using jitasm), I recently switch to MIR, but since I already had my own lexer/parser/etc stack, I ended up changing it to basically lower everything into a node_t compatible AST tree and handing that off directly to c2mir, bypassing its parser.
That's incredible! I see you ran into many of the same MIR issues and limitations I did. I pulled several fork patches and wrote a thread local stack extension.
I'll definitely check it out and see what I could do. I added two compiler stages - a decent memory ptr ownership tracker and midopt compiler optimizer you could likely use without many changes that improved performance 35% over c2mir.
Similar story for myself. It was long and tedious for my mental model to go from Basic, to Pascal, to C, and finally to ASM as a teen.
My recent experience is the opposite. With LLMs, I'm able to delve into the deepest parts of code and systems I never had time to learn. LLMs will get you to the 80% pretty quick - compiles and sometimes even runs.
Thank you! Yes, right now we are using Qwen for the LLM. They also released a super fast TTS model that we have not tried yet, which is supposed to be very fast.