3 ms·
I'm getting pretty tired of this false advertisement. This is not a C compiler. It doesn't have many crucial features required to compile most larger C programs
by rowanG077 3y ago
I'm getting pretty tired of this false advertisement. This is not a C compiler. It doesn't have many crucial features required to compile most larger C programs. I do have to say it's impressive what they have squeezed into 512 byte.
- humanrebar 3y agoAgreed. It's a cool project, but it's a compiler for a DSL that is a subset of C.
- jjtheblunt 3y agoI wonder how long until some LLM filters fraudulent titles wrt the article contents
- distcs 3y ago> This is not a C compiler. This is technically true! What is posted here is not a C compiler. It is an implementation of a subset of C. I'd prefer that the title honestly mentions that like: A compiler for a subset of C that fits in the 512 byte boot sector. It is still a remarkable feat. But honestly, when I read the original title I was in complete disbelief that someone could implement a whole C compiler in 512 bytes. But with the new context that it is a subset of C (not the whole C), the initial great surprise is gone. It is still very impressive though.
- Brian_K_White 3y agoOr even, interpreter. It compiles and executes on the fly, in ram, function by function. It doesn't even compile the whole input but just a bit and immediately executes that bit before moving to the next bit, and doesn't save the compilation result anywhere. To me, that's an interpreter. So it's a c subset interpreter. And a very cool thing. This is not a denegration or critique at all, just terminology. I think it's perfectly fine for a bootstrapper to be a drastic subset. They all already are drastically limited in countless other ways anyways like not knowing how to use any of the crazy hardware, networking, etc. A forth bootloader is a full turing language that can eventually do anything, but it itself can do almost nothing initially besides use bios-provided features and start interpreting code which then provides more functionality.
- jcul 3y agoTo be fair, the first sentence states that it supports a subset of C. >SectorC is a C compiler written in x86-16 assembly that fits within the 512 byte boot sector of an x86 machine. It supports a subset of C that is large enough to write real and interesting programs. The post title could include this, but perhaps it's a little verbose. In any case, agreed it's impressive to fit it in 512 bytes!
- tomjakubowski 3y agoi'm sorry to nitpick but it's the second sentence which mentions it only supports a subset, not the first sentence. and the first sentence calls it a "C compiler" without qualification
- jcul 3y agoAh yes you're correct, I should have said first paragraph.
- deleted 3y ago[deleted]
- userbinator 3y agoIt's closer to B than C.