Hacker News new | ask | show | jobs
by dolbydc 3714 days ago
Aaron, how are you counting the SLOC? I am not doing a simple `wc -l` on all clj files in our project. I am looking for lines that include either closing parenthesis or closing brackets. It isn't exact. A better count would be to count the # of forms.

I get 17k in your project with find . -name ".clj" | xargs wc -l but 8k if I run 'find . -name ".clj" | xargs egrep "[)\]]" 2> /dev/null | wc -l'.

If I just run `wc -l` on our project I get 35k lines.

8k SLOC is still a pretty impressive size project considering the audit of several open source projects that I did were mostly below 8k SLOC.

3 comments

I develop Cursive - it's closed source, but it's around 31k LOC Clojure, 23k Java and 5k Kotlin, all as counted by cloc. I'm not sure what's up with your find command, but that reports 5k LOC in Cursive, it's definitely more than that. Straight wc -l reports 74k.

I'm pretty sure my code has more bugs than yours, though :-)

Anyway, very interesting presentation, thanks - it's great to see a project like this in a space I wouldn't have expected it. I'm very surprised (and pleased) to know that Clojure is on Boeing's approved language list - I'd love to know how that came about.

BTW this is the largest Clojure project I've heard about: https://twitter.com/hlship/status/631935954039652352. That's a pure Clojure project.
I used sloccount-clojure to count lines, but before running it I made one change so that it would include .cljc files.

Then I summed both robinson and zaffre (0.4.0 branch) seeing as they both used to be part of the same project and have only recently been separated.