News for hackers. Stuff that matters.
Re:CC500: a tiny self-hosting C compiler by jaytaylor on Saturday November 08, 2014 @02:11AM (#8576270)
Does 767 LoC / 17KB really get to be considered tiny? I mean, sure, it's small and efficient.. but there are other contenders to consider, such as Fabrice Bellard's [0] tiny obfuscated self-hosting c-compiler in under 500 lines.

How can we unambiguously distinguish between what qualifies for the classification of a "tiny" c-compiler versus just a "small" one?

[0] http://www.bellard.org/otcc/otcc.c

Re:CC500: a tiny self-hosting C compiler by boomlinde on Saturday November 08, 2014 @07:04AM (#8576623)
> How can we unambiguously distinguish between what qualifies for the classification of a "tiny" c-compiler versus just a "small" one?

We don't care about an unambiguous distinction.

Re:CC500: a tiny self-hosting C compiler by vidarh on Saturday November 08, 2014 @10:51AM (#8577188)
767 LoC of code including comments describing the grammar. Strip out the comments and you're already do to 600. Move opening brackets and a other very few steps, and you get it down to 560. Getting this below 500 lines should be fairly trivial.

So if your comparison is the completely unreadable otcc, then I'd say yes, this qualifies.

Re:CC500: a tiny self-hosting C compiler by wlievens on Saturday November 08, 2014 @02:56AM (#8576317)
If you compare it to the gargantuan that is an actual production compiler, it sure is tiny.
Re:CC500: a tiny self-hosting C compiler by userbinator on Saturday November 08, 2014 @10:55AM (#8577203)
The distinctions are quite arbitrary since there currently isn't anything like a size-competition for compilers, but if forced to make categories, I'd consider <1kLoC to be "tiny" and <10kLoC "small".

In contrast, GCC is nearing 10MLoC - 4 orders of magnitude difference - and its C parser alone is >10kLoC: https://github.com/gcc-mirror/gcc/blob/master/gcc/c/c-parser...

Re:CC500: a tiny self-hosting C compiler by huegh on Saturday November 08, 2014 @02:42AM (#8576306)
I propose the tinyness of a compiler is directly proportional to the number of comments spontaneously arguing it isn't.
Re:CC500: a tiny self-hosting C compiler by EGreg on Saturday November 08, 2014 @11:44AM (#8577379)
That means it can be gamed