3 ms·
I haven't seen the "words of code" metric before, and some cursory web searching doesn't reveal much. Is there a standard? Just split on the given language's pu
by vollmond 5y ago
I haven't seen the "words of code" metric before, and some cursory web searching doesn't reveal much. Is there a standard? Just split on the given language's punctuation/delimiters?
- caiusdurling 5y agoI wondered that too, then figured you'd want to exclude non /[a-z0-9]/I characters. They answer what it means and provide the command used to figure it out in the first FAQ: https://tinyssh.org/faq.html https://tinyssh.org/faq.html
- turminal 5y agoI remember first seeing it somewhere on cr.yp.to, where it was counted with some regex that did something like splitting it on some delimiter-like characters.
- kilroy123 5y agoIt's also interesting to see 'Postquantum crypto'.
- formerly_proven 5y agoJust use wc, it's close enough. $ wc void main(int argc, char **argv) { printf("Hi, I'm %s\n", argv[0]); } 1 11 70 lines words chars $ tr '()[]{}*+.>,";'"'"- ' ' | wc void main(int argc, char **argv) { printf("Hi, I'm %s\n", argv[0]); } 1 13 70