It's pretty cool how the author uses LLVM as an example of a big codebase, then uses "10X that" as the requirement for how many directories and so on to support.
It's pretty cool how the author uses LLVM as an example of a big codebase, then uses "10X that" as the requirement for how many directories and so on to support.
It's at least somewhat obscure, in the sense that adding support for another language becomes quite involved.
It would be interesting to micro-bench this code against something more naïve that just strcmp()s the extension against a list of known strings, or something.
It's patently absurd. I also like the ATOMIC_RADD for populating the line count:
https://github.com/skeeto/scratch/blob/5129fd45153999924334c...
This entire program is too clever by half, while still not doing a "correct" source line count (it just counts new lines).