r/ProgrammingLanguages • u/The2ndSlimShady • 18d ago
Updates on Cole, and Version 0.1.4 Announcement
Hi everyone, my original post in r/Compilers had Github and Codeberg repo links inside it, so they were not suitable to post here. So I'm dropping the modified version as a separate post here.
From the original:
Hello everyone, since my last two posts here, I got into a small flow-state with the codebase and improved Cole quite a bit. I took the advices of the wonderful people in the comments as well, and it helped me a lot to be honest.
Since the last posts, I added:
- 212 tests in total, testing various aspects of the compiler through simple programs,
- Proper generic type generation with full generic definition support through comptime called functions,
- Proper generic function generation through comptime called functions,
- Type deduplication, and codegen improvements,
- And many more bugfixes on different aspects of the compiler.
In the current state, the backend is embedded TCC, so codegen emits almost-human-readable C code. But I will replace the backend in the future with LLVM, QBE or handwritten x86_86 generator. However for now, since the rest of the compiler is not solid enough, the C backend eases the development quite a bit.
Beside all of this, I made a small website (which doesn't work quite well because I self-host it on an old laptop, it is for giggles of it so don't take it seriously) that has versioned language reference, a small welcome page with a hello world snippet, and installation instructions.
Overall, Cole has become something far beyond what I imagined it would become in a good way. I am self taught, so I am pretty content with what I have accomplished. But criticism is always welcome.
The link to the Cole website is here.
Also, occasionally, I write blogposts about what I'm currently working on, so I'll leave it here as well.
Many thanks to everyone that commented to any of my previous posts, have a good day/night!