3 ms·
Merely passing by to note an entire compiler, editor, IDE and OS implemented in under half that many LOC. http://www.projectoberon.net/ http://www.projectobero
by lproven 3y ago
Merely passing by to note an entire compiler, editor, IDE and OS implemented in under half that many LOC.
http://www.projectoberon.net/ http://www.projectoberon.net/
- Rochus 3y agoThe modules in this site indeed are less than 10kSLOC (about 9070 SLOC), but we have to consider that in Oberon - in contrast to C - usually many statements are written on the same line; there seem to be at least two statements in each line; three to four statements seem to be common. So you can multiply the SLOC by at least two when comparing with a common C program. And I neither would call it an IDE, since it lacks most features which we associate with IDEs since the late nineties (e.g. no source-level debugger, no syntax coloring or cross-referencing, etc.).
- lproven 3y agoFair. :-) It was a somewhat facetious comment, TBH.
- muth02446 3y agoCwerg tries to hit a different sweet spot: It has an intentionally bigger LOC/complexity budget to allow for more features and better performance. Instead of having the whole system be understandable by a single person, each major component should be. In fact the 10kLOC applies to the frontend and each backend separately which I think is fair as most compiler writers use off the shelf backends like QBE, LLVM or even C.
- lproven 3y agoAll right. I am no expert in compilers, but how does it compare to, say... • TinyC – https://bellard.org/tcc/ https://bellard.org/tcc/ • Small-C – https://en.wikipedia.org/wiki/Small-C https://en.wikipedia.org/wiki/Small-C • Smaller C – https://github.com/alexfru/SmallerC https://github.com/alexfru/SmallerC …?
- buescher 3y agoOr, for that matter, the original 70's K&R compiler, right? It's probably at the right size for exploring some language ideas.
- muth02446 3y agoThe title omits a crucial word. Cwerg aims to be the best c-like language that can be implemented in 10kLOC. Obviously, best is highly subjective but I want to improve on C not just re-implement it.