3 ms·
> Is it over-engineering to use a static 16-entry perfect hash of file name extensions to filter out the five supported languages? It's patently absurd. I also
by js2 4y ago
> Is it over-engineering to use a static 16-entry perfect hash of file name extensions to filter out the five supported languages?
It's patently absurd. I also like the ATOMIC_RADD for populating the line count:
https://github.com/skeeto/scratch/blob/5129fd45153999924334c5a989216e98cb5e1098/misc/watc.c#L210 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).