
Clojure 2014 Year in Review - fogus
http://stuartsierra.com/2015/01/02/clojure-2014-year-in-review
======
zeroDivisible
For everybody who wants to start Clojure, I know that there are loads of good
resources, but the best one which I had found is this online MOOC:

[http://iloveponies.github.io/120-hour-epic-sax-
marathon/](http://iloveponies.github.io/120-hour-epic-sax-marathon/)

Teaches you TDD in Clojure and "forces" you to use git / Github / Travis to
test your code.

Highly recommended.

edit: style.

~~~
JBiserkov
I highly recommend this course as well.

I believe the official link is
[http://mooc.cs.helsinki.fi/clojure](http://mooc.cs.helsinki.fi/clojure)

------
jeremiep
This is great! Glad to see more Clojure adoption in the corporate world. It's
definitely well deserved!

I used it only once at work to develop a stress test for a Java based game
server. It was great fun to build, worked like a charm and ended up taking
less than a thousand lines of code to implement the communications, bots and
their execution scripts.

Furthermore, the company just bought a copy of The Joy of Clojure and there's
already a bunch of my coworkers interested in reading it. Good times!

~~~
virmundi
A word of advice with Joy of Clojure: take up meditation. That book is
surprisingly dense. I had to research topics ever few paragraphs. It is not a
beginners books. Rather pair it with Clojure for the Brave and True. Combined
the language comes alive.

[https://www.google.com/url?q=http://www.braveclojure.com/&sa...](https://www.google.com/url?q=http://www.braveclojure.com/&sa=U&ei=_PCmVKeDGoS1ggTSs4SIBw&ved=0CAwQFjAA&usg=AFQjCNHwREuT-
zFOIgs3_qMP0MGHnqITuA)

~~~
jeremiep
Good advice! The book is definitely dense and packed with useful information.
I didn't read Clojure for the Brave and True yet, I'll add it to my reading
list, thanks!

However, I found it easier to digest than Let Over Lambda which was a real
mind bender for me a few years ago. Being a LISP fan before learning about
Clojure definitely made learning it much, much easier. It also made me
appreciate the language early on for its impressive beauty, elegance and
simplicity.

------
mikerichards
The amount of traction that Clojure is getting in companies like Walmart,
Amazon, and elsewhere is surprising and impressive.

Great work Clojure community.

------
mikerichards
Are we beginning to see the tipping point where mainstream corporates are
starting to question whether traditional OO is the right way to go?

Not to start a flame war, but it seems that Clojure/Rich's strong anti-OO
stance is almost a selling point of the language.

IMHO, OO just put some lipstick on the procedural pig.

~~~
seanmcdirmid
Clojure is continuing the LISP subculture that has existed for a long time,
nothing new here.

OO will continue to be successful for accessibility reasons, and it's demise
will continue to be predicted to have arrived.

~~~
twic
I think you're right about OO's continued survival. I also think mikerichards
is right that OO is just technicolor procedural programming. Moreover, i think
these two things are related: OO is immortal in part because it's
straightforward and obvious, just like procedural programming.

But i don't think Clojure is _just_ continuing the (equally immortal!) LISP
subculture. I think LISP is growing by recruiting people from OO-ish languages
like Java, Python, and Ruby, rather than from existing LISPs. This is the
first time in a long time that a LISP has done that. It's also the first time
in a long time that a LISP has got even this glimmer of mainstream use. pg
wrote 'Beating the Averages' in 2001 [1], and even after that, everyone
_still_ thought LISPers were freaks. But announce you're using Clojure in
production today, and nobody bats an eye.

[1] [http://www.paulgraham.com/avg.html](http://www.paulgraham.com/avg.html)

~~~
seanmcdirmid
The advantage of OO has always been its accessible constructs and abstractions
that mirror how we talk about things linguistically. Nouns are just sticky
that way. It isn't a big delta over procedural programming, and you can find
object systems in many C programs written before OOP was even a word. Heck,
even Clojure has its own object systems; they just often call them entities
rather than objects (what is an entity? well, its an object, but not the
object you are used to). I think our current OO abstractions suck, but the
paradigm is OK, especially when considered in the abstract (go back to the
treaty of Orlando to see how diverse objects can be!). And the biggest pushers
of objects in the early day were CLOS people like Richard P Gabriel, and CLOS
(edit: Flavors actually as lipsm points out) gave us mixins, which are a
pretty advanced OO construct (though RPG argues the mixins that got adopted in
OO languages were not the ones CLOS intended).

People were using LISP in production in the 90s as an advantage, but then they
were also using Smalltalk or Objective C also (ironically often in the same
places...on Wall street). A new generation is discovering LISP while learning
other languages first, but the phenomena is the same: OO was just less popular
in the past and so they would come from C or Perl instead of Java.

[edit: not sure why you were downvoted, I thought your post was completely
reasonable]

~~~
mikerichards
_The advantage of OO has always been its accessible constructs and
abstractions that mirror how we talk about things linguistically. Nouns are
just sticky that way._

But I only see that argument giving an advantage to some weird language that
doesn't have structures. In C, Pascal, COBOL, you have "objects"....you just
don't have any methods attached to them.

 _And the biggest pushers of objects in the early day were CLOS people like
Richard P Gabriel, and CLOS (edit: Flavors actually as lipsm points out) gave
us mixins, which are a pretty advanced OO construct (though RPG argues the
mixins that got adopted in OO languages were not the ones CLOS intended)._

I'd argue that methods and data don't belong together (like in CLOS), but
don't have the inclination to argue it right now. I'll just say it's never
felt natural to me, and actually hurts reusability.

~~~
seanmcdirmid
> In C, Pascal, COBOL, you have "objects"....you just don't have any methods
> attached to them.

When I encoded my own objects in C, I definitely had v-tables (though I didn't
know they were called that at the time).

> I'd argue that methods and data don't belong together (like in CLOS), but
> don't have the inclination to argue it right now.

It is difficult not to put behavior and data together while still having
encapsulation (it is still possible). It makes much more sense for functional
programming since values lack identities (they are completely defined by their
structure), but objects have state that need to be protected for sanity
reasons.

~~~
bad_user
Yeah, but your argument is kind of circular - we put behavior and data
together because we need encapsulation and we need encapsulation because
objects have an identity that needs protection, yet those objects need an
identity because we are putting behavior and data together, in combination
with mutability of course.

Also encapsulation happens quite well in languages that do not have the
"private" or "protected" keywords. In Javascript encapsulation happens by
closures and local scoping. In Python it happens by convention. Also, take
most software developed ever in an OOP style and you'll find plenty of
examples of leaky encapsulation (i.e. APIs that leak restricting
implementation details), starting with the popular Iterator. IMHO, the best
abstractions I know come from languages that are not OOP at all.

I'd also argue that the encapsulation you're talking about doesn't have much
to do with OOP in general, only with a particular flavor of it. But that's the
problem in all conversations about OOP - take any 2 random people and they'll
have different opinions about what OOP is.

For me OOP is about subtyping or more specifically a form of ad-hoc
polymorphism that's solved at runtime. It's very convenient for modeling
certain kinds of problems for sure - graphical UIs are the best example, or a
browser's DOM and even die-hard detractors would find it hard to argue that a
Monoid isn't a Semigroup, or that a Set shouldn't be a Function. In fact,
objects in OOP do not necessarily need an identity, in which case they are
just values, yet you can still put that polymorphism to good use.

But then OOP as implemented and used in mainstream languages is truly awful,
being no wonder that people still consider C with half-baked object systems as
being something acceptable.

~~~
seanmcdirmid
Objects require encapsulation because they have something (mutable state and
sensitive data) to protect. Also, I hope its obvious that with identity, you
get mutability automatically (just use an immutable map as in Clojure!), and
you can't really have meaningful mutability beyond global variables without
identity.

Of course, encapsulation can occur at module boundaries, and even when
programming with objects, a notion of "internal, package private, or
friendship" is often useful. But it is pretty well acknowledged in the PL
community that Javascript does encapsulation in the worst way possible
(something OOP and FP people can actually agree on).

> But that's the problem in all conversations about OOP - take any 2 random
> people and they'll have different opinions about what OOP is.

Most people focus on laundry list of pet or hated features when defining OOP,
but to me, its all about the objects and if you are thinking in terms of
objects in your design. So...

> For me OOP is about subtyping or more specifically a form of ad-hoc
> polymorphism that's solved at runtime.

I think these are very useful when thinking in terms of objects, but that
features like this do not "define objects" but rather that "working with
objects make these features desirable." Since you mention it...

> In fact, objects in OOP do not necessarily need an identity, in which case
> they are just values, yet you can still put that polymorphism to good use.

I would say subtyping is useful for values, but not that anonymous value have
somehow become objects since you are manipulating them with subtyping! If I
have two values, say 42 and 42, they are the same value no matter how they
were computed, stored, retrieved, and so on. They cannot have state (since you
can't have state without identity), the different 42s are indistinguishable.
In fact, since values are defined solely by their structure, other forms of
subtyping might be considered over nominal, like structural, and you might
want to abstract over them using type classes. But the reasoning is math-like
equational, you aren't really doing OOP at that point from even a design
perspective (this is my position, of course it is wide open to debate in the
community).

I like C# since it provides both values and objects, and they are adequately
separated even if some subtyping still applies to values. But when I am
manipulated structs, my design perspective has shifted away from objects; I
don't think of them as objects.

> being no wonder that people still consider C with half-baked object systems
> as being something acceptable.

Back in the 90s, we didn't have much else, C++ still wasn't very trusted; Java
was very new. Or if you are referring to C++ and Objective C today, I really
couldn't disagree with that.

~~~
bad_user
> _I like C# since it provides both values and objects_

I don't think the distinction is so clear cut. An immutable List is a value,
because it is clearly defined by its structure, yet you need heap-allocated
values in C# (so objects) because you need pointers. An immutable List would
also implement various interfaces, like Iterable, so polymorphism is useful as
well.

I also forgot to say that the polymorphism that we get with OOP is NOT enough.
Static languages also need generics and all languages also need type-classes
or something similar. Type-classes are different and useful for different use-
cases than OOP, because the dictionary is global per class and not per
instance. And if it is solved at compile time, like in Haskell or Scala, it
also has some performance benefits.

Clojure's protocols for example are pretty neat and get pretty close to type-
classes.

------
coding4all
I've been writing Clojure almost exclusively for 3 or 4 years and it's just
amazing. Core.async, Quil, Om, Chestnut, ClojureScript, ClojureScript + Apache
Cordova, and I could go on forever.

~~~
geophile
Just learning Clojure now. Would you do us newbies a favor and say a few words
about the projects you mention: what they do, why we should look into them?
There is much to learn, so a shove in the right direction(s) would be useful.

~~~
coding4all
Core.async is an official Clojure and ClojureScript library that takes
channels from the Go language and adds them to Clojure in a much nicer way.

[http://clojure.com/blog/2013/06/28/clojure-core-async-
channe...](http://clojure.com/blog/2013/06/28/clojure-core-async-
channels.html)

 _All of the operations are expressions (not statements)

_ This is a library, not syntax

 _alts! is a function (and supports a runtime-variable number of operations)

_ Priority is supported in alt

\--

Quil is a Clojure and ClojureScript library for creating interactive drawings
and animations using Processing
([https://en.wikipedia.org/wiki/Processing_%28programming_lang...](https://en.wikipedia.org/wiki/Processing_%28programming_language%29)).

\--

Om is actually an interface to Facebook's React. Ironically, the terminology,
and the feature set of Om has little, if any, resemblance to React. Om
specifically transforms Clojure data so that it can be represented in a way
that React can uderstand.

In the Clojure world, we build on top of React and stay away from anything
that resembles JavaScript and it's behavior. React provides a virtual DOM and
we just use Clojure to talk to the rendering engine.

[https://gist.github.com/runexec/6efb322f29fc790a98a1](https://gist.github.com/runexec/6efb322f29fc790a98a1)

\--

Chestnut allows live coding in the browser. This means all changes are visible
without having to reload the page.

2 Minute video of Om using Chestnut.
[https://www.youtube.com/watch?v=gI3fJKmvgq4](https://www.youtube.com/watch?v=gI3fJKmvgq4)

[https://github.com/om-cookbook/om-cookbook](https://github.com/om-
cookbook/om-cookbook)

\--

Apache Cordova is the Apache License version of Adobe PhoneGap. ClojureScript
compiles to highly optimized JavaScript already, so you can make mobile apps
using ClojureScript and Apache Cordova.

~~~
elwell
> ClojureScript + Apache Cordova

I've been interested in this mixture recently. I use PhoneGap quite a bit.
Currently my favorite combination is Sencha Touch Framework with CoffeeScript.
IMO, this is a really simple way to develop mobile apps. Do you know of any
open source examples of ClojureScript + Apache Cordova?

~~~
estefan
How's the performance with Sencha & PhoneGap? I've made several apps (with
Angular, Ionic & Ember) and the performance has always varied from bad to
utter shit.

~~~
elwell
Sencha Touch is the most performant mobile framework that I've experienced. I
will admit that it takes some time to get acquainted with Sencha Touch
intricacies. If you pay no attention to resource control (primarily: how many
elements you are creating without destroying them) you can get a bad
experience. Of course, we're talking about apps that don't require a lot of
non-traditional components. I think this route is the best choice for fast
prototyping of cross-platform mobile apps. And, I think it's the ideal choice,
unless you have a large enough team and budget to code out native versions for
you target platforms. Here is an example of an app I did for a startup I was
working on. It uses CoffeeScript + Sencha + PhoneGap + some custom native
plugins for PhoneGap.

[https://github.com/celwell/wesawit-
st2-app](https://github.com/celwell/wesawit-st2-app)

When you start to veer away from a top-notch framework like Sencha Touch, you
can run into a lot of performance issues that a good framework would take care
of for you. For example, your scrollable components should probably be using
CSS translate3d() to make use of hardware accelerations; and myriad other
tricks.

~~~
estefan
Thanks. I might give phonegap one last try with Sencha.

------
dmix
Not mentioned in the article but most interesting to me this year is how these
guys are "building a bank from scratch in Brazil with Datomic and Clojure":
[https://www.youtube.com/watch?v=7lm3K8zVOdY](https://www.youtube.com/watch?v=7lm3K8zVOdY)

The future looks bright for the language, especially with applications like
this.

------
zubairq
Clojure is awesome. However I don't want it to become too popular, as then
those who do currently use it will lose all our magical powers if everyone has
access to it :)

------
thom
Are people finding it easy/easier to fill clojure positions?

~~~
JackMorgan
My team which uses Clojure recently decided to grow. I regularly attend a
local Clojure focused Meetup, and it is very easy to find interested
developers there. The Meetup, which meets in Philadelphia, has over 150
members, so at least there is a large number of people interested.

------
147
I'd like to add that I'm starting a Clojure job next Monday at a "boring"
company that you would never think would have a heavy reliance on Clojure. I
think that there's a demand for Clojure developers that is unmet. I keep
getting recruiters and etc. messaging me about Clojure.

~~~
checksum404
Citi?

~~~
147
Nah, it's at a company called RentPath. They own Rent.com, Apartment Guide,
etc. I'll be a remote engineer.

~~~
tsm
Apartment Guide gave me a mug at Clojure/West last year...I was a little
surprised that they were so invested in Clojure that they were sending
multiple devs with boxes of swag to a Clojure conference. The devs I talked to
also said they weren't very experienced with Clojure yet.

------
JBiserkov
Microsoft/Nokia is using Clojure to power the web services behind MixRadio.

~~~
neilprosser
I'm from MixRadio and we're actually about 40 engineers, not all doing
Clojure. Pretty much all of our new micro-service work is done using Clojure.
Not sure how many others in wider Microsoft/Nokia.

Edit: making it clearer.

~~~
nickik
I know that the Nokia Map people in Berlin use clojure.

------
gengstrand
I am surprised that no one here has yet mentioned Clojure in connection with
Big Data. At OSCON 2014 ( see
[http://glennengstrand.info/analytics/fp](http://glennengstrand.info/analytics/fp)
), I was first introduced to Cascalog which allows you to write Hadoop map
reduce jobs in Clojure. Both Cloudera and Hortonworks support it.

------
dominotw
I am not sure I would use RedMonk Index as popularity measure.

Most people who I see using clojure are bored ruby programmers and they bought
their open source culture with them to clojure.

Clojure is not even in top 50 on TIOBE index
[http://www.tiobe.com/index.php/content/paperinfo/tpci/index....](http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html)

~~~
puredanger
Red Monk's inputs are at least numbers based on tracks left by actual
programmers and not meaningless search results.

The "index" is calculated
([http://www.tiobe.com/index.php/content/paperinfo/tpci/progra...](http://www.tiobe.com/index.php/content/paperinfo/tpci/programminglanguages_definition.html))
by searching the 25 highest ranked web sites on Alexa which have a search box
and meet some basic criteria then magically weighting them as follows:

\- Google - 7.7% \- YouTube - 7.4% \- Baidu - 7.1% \- Amazon - 6.8% \- Google
India - 6.5% \- Yahoo Japan - 6.2% \- Hao123.com - 5.8% \- Google Germany -
5.5% \- Microsoft Bing - 5.2% \- Google Japan - 4.9% \- Google UK - 4.6% \-
AliExpress - 4.3% \- Alibaba - 4.0% \- Amazon Japan - 3.7% \- Google Brazil -
3.4% \- 360.cn - 3.1% \- Google Italia - 2.8% \- Amazon Germany - 2.5% \-
Google Spain - 2.2% \- Amazon UK - 1.8% \- Google Mexico - 1.5% \- Google
Canada - 1.2% \- Google Ad Services - 0.9% \- Amazon China - 0.6% \- Google
Poland - 0.3%

I might buy that a general internet or e-commerce search might tell you one
(low-signal, high-noise) piece of data about popularity. Some of these sites
seem highly questionable to tell you anything meaningful. Garbage in / garbage
out.

I think use of more specific numbers from sites like Stack Overflow or GitHub
seems far more likely to give you relevant information.

------
davexunit
Since Clojure adoption is picking up, what about convincing management to use
other Lisps now? Clojure is okay, but I much prefer Scheme (Guile, Racket,
Chicken, etc.).

~~~
new2scheme
Between Guile, Chicken and other *nix Schemes which would you recommend for
general scripting and admin task automaton? Which has a more expansive library
ecosystem? I found that Clojure isn't the best fit for thEse tasks because of
the start-up time and the JVM dependency.

~~~
davexunit
Have you read [http://wingolog.org/archives/2013/01/07/an-opinionated-
guide...](http://wingolog.org/archives/2013/01/07/an-opinionated-guide-to-
scheme-implementations) ? It might help you weigh your options and make a pick
that best suits your preferences. I don't think you could go wrong with Guile
or Chicken. I use Guile pretty much exclusively and it has a good POSIX API,
so I write scripts in Scheme instead of Bash or Perl or whatever.

------
puredanger
We maintain a growing list of companies using Clojure here -
[http://clojure.org/companies](http://clojure.org/companies)

