Clojure

The Top 100 Clojure Libraries in 2016

What are the top Clojure libraries used by projects on Github? Based on analyzing over 30,000 leiningen dependencies

One of the most helpful things to look into when choosing which libraries to include in your project is just how popular they are. While actual functionality is the main issue at hand, getting a sense of which libraries are used the most for the problem you’re trying to solve is a quick hack to make sure you’re on track.

Following our recent research around Java, we’ve looked into the 9,208 most popular Clojure repositories on Github (out of 15,214) and pulled out their project.clj leiningen dependencies. This left us with over 30,000 data points on 3,790 different dependencies. From Rich Hickey, to other top community contributors, we’ve crunched it all to create a top 100 list.

Let’s take a closer look at the results.

The Top 20 Clojure Libraries in 2016

clojure
The full list is available right here

The Top 5 Picks

#0 Ring – While it’s not actually on top of the chart, this is only because there are quite a few ways to use Ring to build web applications. If we were to combine them all, they’d go on #1. Which, leads us to Compojure.

#1 Compojure Once you have Ring set up, and you’re looking into a routing library, Compojure is the undisputed champion with a dependency in 14.7% of the projects we looked into.

#2 clojurescript 12.4% of Clojure projects actually use clojurescript, the Clojure to Javascript compiler. Because… well… it’s not Javascript. Enough said. 17 of the top 100 libraries are related to clojurescript.

#3 core.async The library designed to support async programming in Clojure is used by 9.4% of the repositories tested. core.async is one of the main reasons to choose Clojure.

#4 clojure-contrib The deprecated clojure-contrib is still used by 8.3% of Github’s top Clojure projects. Today it is no longer being maintained since Clojure now has a set of separate libraries for each functionality that contrib used to include, rather than its previous monolithic nature. Many of which are included in this top 100 list, under org.clojure.

#5 clj-http (and clj-time at #8) – Similarly to the top libraries in Java, clj-http, the wrapper for Apache HttpComponent, and clj-time, the wrapper for joda-time, take the spots at the top.

Additional Highlights from the Top 20 List

Cheshire is #1 for JSON, used in 6.5% of the projects – If you want to parse JSON, or just like Alice in Wonderland references, cheshire is the top pick for you. Other JSON libraries that made it to the list are org.clojure/data.json at #11, ring-clojure/ring-json at #24 and clj-json, the Jackson wrapper, at #92.

Rendering HTML in Clojure? Use Hiccup – Not much of a wiggle room here. Hiccup at #6 is the only way to go from the top 100 list.

Enlive – A templating library for Clojure. Enlive lets you create HTML templates and manipulate them using CSS like selectors.

Environ – A super simple way to manage environment variables.Fun fact: Compojure, Ring, Hiccup and Environ, are all developed by James Reeves, aka weavejester.

A Few More Top 100 Entries Worth Mentioning

#21 Reagent A minimalistic ClojureScript interface to React.js. Om’s library in at #32.

#40 overtone Collaborative programmable music. Yes.

#50 slingshot Enhanced try and throw for Clojure leveraging Clojure’s capabilities. Throw unthrowable things.

#64 prone Better exception reporting for Ring.

Hello Clojure

At Takipi, we’ve just recently added support for Clojure, and are excited to see more and more Clojure users coming onboard. Takipi is Java micro-agent that lets you know when and why code breaks in production. It shows you the complete source, call stack and state (variable values at moment of error) for every exception and log error or warning.

It’s time to look beyond log files, check it out.

tale2

Takipi’s Error Analysis Dashboard – variable values overlaid on the actual code at every frame in the stack – See a live demo

The Groundwork

For starters we’ve pulled out the top Clojure projects from Github by stars. On the second step we extracted the ones who use leiningen, and got 9,208 repositories. Now that we had thousands of project.clj at hand, we pulled out all the dependencies in them, which got us to 30,019 data points, about 3,790 unique libraries.

To make the analysis easier, we’ve processed the stats for the top 100 libraries by the number of Github projects they appear in. The full list is available right here and you’re welcome to take a look and make sure we didn’t miss any interesting insights!

Final Thoughts

Clojure will soon celebrate its 10th birthday and it’s amazing to see how the community, the libraries, and the tooling ecosystem has grown around it. Hundreds of companies are using Clojure in production and we can’t wait to see where it goes next.

Reference: The Top 100 Clojure Libraries in 2016 from our JCG partner Alex Zhitnitsky at the Takipi blog.

Alex Zhitnitsky

Alex is an engineer working with OverOps on a mission to help Java and Scala developers solve bugs in production and rid the world of buggy software. Passionate about all things tech, he is also the co-founder & lead of GDG Haifa, a local developer group. Alex holds a B.Sc from the Technion, Israel's Institute of Technology.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button