Kyle Nowak

hacker extraordinaire


Clojure Open-Source Code Metrics

I have assembled a file called massive.clj. It is 325k lines worth of concatenated open source Clojure code, every .clj from the top 50 most starred Clojure projects according to Github (excluding Clojure itself).

Let’s roll with some stats to understand some basic metrics of the most-used Clojure code, shall we?

Metric Count
File count 2,359
Line count 325,153
Lines of code* 275,690
Comment lines 23,266
SLOC 252,424
Top-level forms 15,550
Total amount of forms 477,000
  • without whitespace, without parentheses-only lines

In general, we have 1:11 code-to-comment ratio, average of 138 total lines per file (out of them, 107 lines are code). The longest file is 8,065 lines (a huge config of UIKit bindings in the Clojure-C project), the longest non-config file is clojure.typed‘s test.core at 4,573 lines and the longest non-config, non-test file is charts.clj in

Continue reading →