News for hackers. Stuff that matters.
Re:Why I'm Productive in Clojure (2013) by ronnier on Sunday October 22, 2017 @02:05AM (#15525407)
I’ve already seen large scale clojure projects being rewritten to something average devs can maintain. Don’t expect much more growth out of this language in terms of new projects written in clojure.
Re:Why I'm Productive in Clojure (2013) by macroexchange on Sunday October 22, 2017 @03:06AM (#15525551)
Clojure is great for beating the averages, see: http://www.paulgraham.com/avg.html

Clojure growth is just fine. If average devs have to add something there is Java. In our experience maintenance of Clojure code is orders of magnitude better than average languages (Python, Java, etc). Yes, object orientation in large organizations leads to the most unimaginable mess. People mostly get paid for unproductive behaviour. Clojure is great for startups where you can do things right.

Re:Why I'm Productive in Clojure (2013) by zubairq on Sunday October 22, 2017 @07:00AM (#15526167)
I agree with this. It was this Paul Graham essay that made me use Clojure/Lisp in the first place :)
Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @12:03PM (#15527405)
You might also be interested in the story of SISCOG (http://www.siscog.eu/upload/GESTAO-DE-LISTAS/News/PDF/eclm-2...) - a massive transport infrastructure system designed in Common Lisp. I'm sure Clojure would have been chosen if it was developed today.
Re:Why I'm Productive in Clojure (2013) by flavio81 on Sunday October 22, 2017 @01:03PM (#15527732)
Thanks for this post!

>I'm sure Clojure would have been chosen if it was developed today.

Clojure was already available in 2013. The paper shows they made use of the CLOS object-oriented system, which is a key feature of Common Lisp.

Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @01:16PM (#15527806)
2013 is just the publication date. The document cites an implementation of their London Underground system which has been in production since 2008 and a another within the Dutch rail system dating back to 1998.
Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @03:11AM (#15525566)
Ten years ago (appoximately) I read an article about how PHP was dying, thanks in part to many new languages cropping up. But I see PHP mentioned all the time here on HN, and the PHP meetups in my area are frequent and popular, and major companies run on PHP.

For decades, there have been rumors about the death of dynamic languages in general. And yet the decades pass and not only do those languages continue to flourish, but others come along and get popular too.

Clojure just turned 10 years old and I see no signs of it slowing down. They did consolidate their 2 major conferences in the States into just one annual conference, so there's that (which may not mean anything). But I am in a large city and companies keep appearing and starting up with Clojure as their key language.

With Clojure, it's an oddball because it is very simple and very powerful. Oftentimes, simple languages are not so powerful, and powerful languages are not so simple. But with Clojure, you can very easily get yourself into the situation of having extremely dense logic in just a few lines, where another language might easily take 10x (or more) lines to accomplish the same. This leads to code that can indeed be difficult to read later, especially if you are on a team and others must help maintain it. The Clojure community has come up with some excellent solutions to this problem, most recently the Clojure.spec library which is gaining wide adoption, which not only makes such "cleverness" easier to understand when reading it, but also makes a codebase automatically testable with property generators, which is a major feature. But your point about readability is always going to exist with a language like Clojure if it isn't written with a team in mind. That doesn't take away from its power though, in my opinion.

However, there is one particularly indispensable tool that Clojure offers that I have not seen anything to meaningfully compete with for productivity, and that's ClojureScript. Writing a front end with Reagent or even the alternative libraries is such a major win over everything else I've tried. I've worked a bit with Elm, Typescript, Reason, Bucklescript -- I am so spoiled by the extremely fast turnaround and easy interaction with very powerful features like React in Clojurescript that I don't see anything on the horizon that will come close to replacing that workflow for now. Perhaps some day something will come along to shine an even brighter light on how front ends can be developed, but for now, ClojureScript remains one of the most significant contributions to the software industry in many, many years.

Re:Why I'm Productive in Clojure (2013) by user5994461 on Sunday October 22, 2017 @07:20AM (#15526230)
PHP has a massive following. It was basically the only language for the web 1-2 decades ago, everything had to be written in PHP. Of course, it cannot be extinguished since the existing sites will drag on forever.

Clojure never had much usage on real world projects. It cannot be extinguishes as it never took of.

Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @07:58AM (#15526392)
> It cannot be extinguishes as it never took of.

I'm not sure what you mean by "never took off" but thousands of developers around the world, myself included, have made their living just writing Clojure code for many years. So, it has certainly taken off for them. And there are many, many companies using it all over the world. I live in a town of about half a million people, so not super big, and there are about 12 companies primarily operating on a Clojure codebase.

Re:Why I'm Productive in Clojure (2013) by user5994461 on Monday October 23, 2017 @08:00AM (#15532482)
A drop in the ocean compared to the hundreds of thousands of developers who make a living in PHP, C, java or python. You know, the major languages.
Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @11:55AM (#15527332)
I'm genuinely intrigued. Which town is that?
Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @05:26PM (#15529034)
A lovely place in Western Europe.
Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @09:17AM (#15526680)
Tell that to Amazon, Apple, Boeing, and Walmart. Just a few big companies using Clojure today.
Re:Why I'm Productive in Clojure (2013) by darksaints on Sunday October 22, 2017 @10:32AM (#15526998)
I don’t know about the others, but the Amazon claim is basically useless. It’s like claiming “As seen on NBC” when it was a Sunday 4am mention on a Sioux City affiliate. Maybe one in 500 teams (optimistically!) uses Clojure. Many of the Clojure code bases I saw while there were either deprecated or were functionally zombie services.

Amazon also uses Fortran, Assembly, Awk, Mosel, VBA, K, and Bash, but nobody is going around claiming they have much usage on real world projects.

Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @11:24AM (#15527187)
Amazon was specifically using Clojure for the online checkout system, and the team bragged a few years ago how the system survived black friday without a hickup.

Walmart is using Clojure for their checkouts as well https://www.youtube.com/watch?v=av9Xi6CNqq4

Boeing is using it in the onboard control systems for the 737 Max https://www.youtube.com/watch?v=iUC7noGU1mQ

It's not some obscure microservice that some intern wrote over the weekend, these companies are using the language for critical applications, and the feedback from these companies is positive.

Re:Why I'm Productive in Clojure (2013) by darksaints on Sunday October 22, 2017 @11:48AM (#15527302)
The online checkout system isn’t a single service. I personally worked with the Delivery Promise service for a short time, and that service was composed of 8 different services...and that was just to calculate when we promised arrival to the customer during checkout. As in, they were just a single component of hundreds called during checkout. At the very least, none of those 9 services used Clojure.

If anybody led you to believe that their team did “online checkout”, but didn’t care to explain how small of a cog they were in an extremely complex system composed of hundreds of services, then you were grossly misled.

Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @12:05PM (#15527415)
I linked a talk from Walmart that explains exactly how they're using Clojure. I don't think I'm misrepresenting anything here.
Re:Why I'm Productive in Clojure (2013) by darksaints on Sunday October 22, 2017 @12:20PM (#15527489)
You absolutely are. You name dropped Amazon as some sort of proof that Amazon is used at scale, completely misrepresenting the scope of usage. Simply put, Clojure at Amazon is an insignificant and inconsequential symptom of a massive service oriented architecture with tens of thousands of software developers across four continents making independent decisions on how to write their tiny services.
Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @03:35PM (#15528495)
I think anything that's part of the sales chain can't be dismissed as insignificant. Just because Amazon uses other technologies, that doesn't diminish its importance.
Re:Why I'm Productive in Clojure (2013) by jb1991 on Sunday October 22, 2017 @05:36PM (#15529087)
I can appreciate your desire to share the good news about Clojure adoption, but I don't think the language is in need of defense. It's used a lot all over the place, and you shouldn't feel the need to convince others of that. Because even if it weren't used hardly anywhere, it would still be a great tool for those of us who do use it. That it is in fact in use in a lot of places, regardless of its specific role, is just a nice added bonus.

If someone doesn't want to use it for this reason or that, it's their loss not ours. Those who need to find Clojure eventually will, because there is nothing else like it.

Re:Why I'm Productive in Clojure (2013) by taloft on Sunday October 22, 2017 @04:50PM (#15528856)
The Boeing video says Clojure is used for maintenance systems, not control systems. That’s an important distinction. Maintenance systems can go offline and the aircraft still flies fine. The critical control software is not written in Clojure from what I could tell.
Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @05:29PM (#15529049)
Critical software is rarely written in anything except languages with explicit memory control, usually C++, and usually with very strict guides. There is a famous programming guide for flight control systems in particular that discusses how to properly use C++ for maximum safety during flight. It includes things like never allocating memory after take-off.

You wouldn't want Clojure, Java or any languauge with GC running in a pacemaker either. Those are all also very important distinctions.

Re:Why I'm Productive in Clojure (2013) by user5994461 on Monday October 23, 2017 @08:17AM (#15532571)
The majority of critical software is C, sometimes it's C++ or Ada instead.

C++ actually proved difficult to adopt over C. The language is too difficult and the tooling is too poor. It's too hard to run a static analysis or prove 100% code coverage.

Re:Why I'm Productive in Clojure (2013) by hellofunk on Monday October 23, 2017 @03:37PM (#15536282)
I'm not sure what your evidence is for this, but I find C++ to be used far more widely than C in nearly all the companies I interact with that do critical low level work. And there is indeed plenty of information in the industry about flight control software in particular in C++. It's also very popular for embedded work, because C++ allows you to offload quite a bit of work to compile time that can only be done in C at runtime. And I've attended talks for security systems in C++ specifically because of control over exceptions and how to track unexpected events, which is something security professionals are very interested in.

With regards to tooling, the windows visual studio experience for C++ is widely counted as one of the best development setups in the industry for any language. I know lots of people working in other languages that envy what C++ developers get.

Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @10:39AM (#15527021)
I agree with you that it's not necessary or meaningful to "name drop" companies that use some X technology as an indication of its worth. Languages and tools don't need a massive following by enterprise to be incredible and revolutionary. It's like a really good movie that didn't have a large audience but was nonetheless really awesome for those who did see it. That's a lot like how I think Clojure is.
Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @11:54AM (#15527321)
PHP, while very popular, has never been the only language for the web. A decade ago it was competing with Ruby on Rails, Django and Java. Two decades ago Perl was the dominant web development language.
Re:Why I'm Productive in Clojure (2013) by j_m_b on Sunday October 22, 2017 @12:38PM (#15527601)
I second the statement about ClojureScript. It makes developing in Javascript so much nicer and cleaner. With so much work these days being "full-stack", the combination of Clojure/Clojurescript is Clojure's killer feature for me.
[dead]
Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @08:19AM (#15526477)
> Edit: prove it otherwise.

> Edit2: it's not me who needs to prove lisp is useful. At least, be honest with yourselves.

This is one of the great fallacies among the naive in their logic.

For example: I know for a fact that you never wear underwear. I don't have to prove this, because it is a fact. If you don't agree, then it is up to you to prove otherwise.

See how that reasoning works?

Thank goodness the criminal justice system in most Western nations doesn't rely on that logic.

Re:Why I'm Productive in Clojure (2013) by junke on Sunday October 22, 2017 @07:55AM (#15526381)
> Edit: prove it otherwise.

Make wild claims, then expect others to do the hard work.

Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @07:59AM (#15526394)
> It's mostly used with webprogramming which is the easiest domain out there.

I had to laugh out loud at that one.

Re:Why I'm Productive in Clojure (2013) by kibwen on Sunday October 22, 2017 @06:18AM (#15526021)
Eh, I don't use Clojure, but I don't think that a lack of a high growth rate is that big a deal. By my unscientific estimate, languages only need about 20,000 active OSS contributors to have a healthy OSS ecosystem, and that's easier to achieve than ever given the growth in the absolute number of programmers. As long as the growth of the language outpaces the attrition rate, it can thrive just the same.
Re:Why I'm Productive in Clojure (2013) by aaron-lebo on Sunday October 22, 2017 @08:32AM (#15526521)
I've never heard this expressed, but it makes a lot of sense. Wonder what that actual number would be and the best way to measure it?
Re:Why I'm Productive in Clojure (2013) by kibwen on Sunday October 22, 2017 @10:09AM (#15526894)
My estimate is based on CPAN, which, in the early 2000s, was already lauded for offering an extensive, high-quality ecosystem despite having "just" 20,000 packages (contrast modern NPM, which claims >500k). Hence I consider this the lower bound of an ecosystem which can be reasonably expected to provide foundations, if not pre-made solutions, for anything you might expect to do in the course of general purpose programming. And it seems reasonable to assume that one maintainer per package is enough to sustain such a system.
Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @11:48AM (#15527298)
Clojure hit 20,000 recently according to clojars.org . So that's it - we're where Perl was in 2001. Makes me feel all fuzzy inside as Perl was my first love.
Re:Why I'm Productive in Clojure (2013) by sheepmullet on Sunday October 22, 2017 @02:57AM (#15525529)
What exactly do average devs struggle with?

Who is making these decisions to rewrite?

It would be great if we can see a before and after comparison.

Clojure is a pretty simple language. Ive taught it to junior devs with only Java experience and they learn it within a few weeks without any major problems.

Re:Why I'm Productive in Clojure (2013) by weego on Sunday October 22, 2017 @05:38AM (#15525908)
It's a business struggle. You're not going to hire Clojure devs. You're just not.

So every hire will be a cost to cross train through language as well as get used to the codebase. And a lot of more seasoned devs are very binary about lisps. I personally wouldn't work at a place that wanted me to do Clojure over Scala/Java/Kotlin.

I worked at a globally known media company that were primarily a Scala company and they had made a handful of applications from people with Scala experience a year at best. The churn of every skilled dev leaving being replaced by someone very green is a horrible opportunity cost even for a large business.

Re:Why I'm Productive in Clojure (2013) by emidln on Sunday October 22, 2017 @07:02AM (#15526174)
I'm a sometimes hiring manager and often a team lead on Clojure projects. I have never had an issue hiring someone who wanted to work in Clojure. It's much harder finding devs worth hiring than finding devs who have immunity to the terrible parens allergy.

Even training devs isn't an issue. C#, Java, Python, PHP, C, JavaScript, and Ruby developers have had an easy time being productive on the first day because of how high level the language is. Projects tend to be very domain-driven, and a decent editor config let's people get started right away. Within a week of reading code and a tutorial on syntax, I have a perfectly reasonable dev on my team making meaningful contributions to maintenance and feature development. Locality, immutability, and brevity make for an exceptionally fast on boarding experience even when the dev had never used clojure or a lisp before.

Re:Why I'm Productive in Clojure (2013) by TeMPOraL on Sunday October 22, 2017 @06:11AM (#15526000)
Basically: companies are looking for cheapest programmers they can find. That involves using the stacks most popular on the market.

(I remember my boss at one of my previous jobs literally saying to me "you know, we could let you write that in something more advanced, like Ruby or Python, but then when I'll be hiring, I'll have to pay 2x to a Ruby programmer than I have for a PHP programmer, so PHP it is".)

Re:Why I'm Productive in Clojure (2013) by pdimitar on Sunday October 22, 2017 @06:32AM (#15526059)
...And you and I both know they are ignoring the much bigger long-term cost and prefer to go for short-term savings. And I think most programmers know how well does that end, historically.

Shortsightedness is not a new invention.

I have plenty of anecdata for when I invested in a better tech fit without asking anybody and it always ended up great. EVERY. SINGLE. TIME. I got a few slaps on the wrist because managers don't like not controlling how you breathe but even they were forced to admit that I saved them money in the mid- and long-term.

I am getting old and cynical and quite frankly I never ask business people questions I know the answer to anymore. I also don't go fanboy mode about languages and tech anymore. If I find a better alternative for something that keeps bleeding my employer's money and human resource with no end in sight, I'll switch it over on both technical and long-term cost-saving merit.

To hell with anyone who disagrees. My stance these days is -- "I know both programming and some business. You only know business. I am better equipped to make the decision than you."

Re:Why I'm Productive in Clojure (2013) by platz on Sunday October 22, 2017 @12:16PM (#15527470)
the problem might be you could make a decision that is advantageous for you but not for the company
Re:Why I'm Productive in Clojure (2013) by TeMPOraL on Monday October 23, 2017 @01:32AM (#15530932)
Yes. But if you're paying top dollar to hire a trained professional, and then refuse to trust them in their area of expertise, you're wasting money. You should either start hiring cheap staff and micromanage them, or learn to resolve your trust issues and instead focus on things you're presumably a specialist at, which is setting incentives so that hired professionals always have company's best interest in mind.

--

Related: I sometimes wonder just how much money companies lose on trust issues. Even with regular people, I often see companies spending money doing everything imaginable to make it as difficult as possible for workers - on which, too, they spend money - to do their jobs.

Re:Why I'm Productive in Clojure (2013) by pdimitar on Monday October 23, 2017 @05:22AM (#15531827)
They lose much more than money. Rumors start going around; 99% of the cities in the world aren't THAT big that rumors aren't a thing -- they are. People start distrusting the company, it gets a reputation of "only work there if you're in danger of living on the street", qualified people recommend only their lower-qualified friends (or simply opportunists), etc.

It only goes downhill for these companies and they lack the maturity and intelligence to recognize they brought it upon themselves and maybe start trying to turn things around.

Oh well, screw them.

Re:Why I'm Productive in Clojure (2013) by pdimitar on Sunday October 22, 2017 @04:01PM (#15528640)
I stated that my decision has benefited the companies so not sure what you're trying to say.

Fine, it wasn't 100% clear: "it ended up being great every single time". By saying that I didn't mean that I got tingles in my stomach for using some tech, I am saying that I helped an employer stop bleeding money and human resources in a black hole.

Re:Why I'm Productive in Clojure (2013) by submeta on Sunday October 22, 2017 @07:25AM (#15526245)
It's not only the price, but also availability. In 2010 I had to choose a technology stack for a new project (in Germany). Personally I would have loved to choose Rails. It was very promising and solved many repeating patterns of web dev in a very systematic way. But: I didn't know one single Ruby/Rails dev. Back then not too many startups used Rails in Germany; the most prominent one was Soundcloud. On the other hand I knew many PHP devs, although none of them had programmed in a web framework before, rather they were using their own set of self-developed solutions for various things, Smarty for templating, no ORM, etc. Their approach was way inferior. But nonetheless I decided to choose PHP + the Symfony framework. It was a good decision. Because I had access to PHP devs, I could hire PHP devs, give them enough time to get familiar with the Symfony framework. But most importantly: I could hire them easily in Germany and yes, they did not cost a fortune.

Today I would love to start a project in Elixir/Phoenix (or more realistically: Python/Django), but I don't know any Elixir devs in Berlin. And I don't know too many web devs using Django in Berlin. Again if I had to build a static website, I would choose PHP (+ Laravel framework). And if it was a dynamic web app, I'd choose Node+React. It's all about availability and feasibility.

Edit: punctuation

Re:Why I'm Productive in Clojure (2013) by pdimitar on Sunday October 22, 2017 @11:19AM (#15527170)
Several assumptions I feel are wrong:

(1) You keep saying you didn't know technology X or Y devs in Berlin. Sorry to partially derail but why is remote forbidden in your organization? I mean, you're pointing at a limitation that's rather easy to overcome.

(2) Bigger developer availability == good for business, you claim. That's very 50/50, neither side of this argument is anywhere remotely universally correct. "If all you know are hammers all problems look like nails". I've had PHP devs ruin near-perfect projects in teams where I was working. Their reliance on the arcane-but-overall-working comparison operator alone introduced at least 150 bugs over a year.

Bigger dev pool != better for business. It just helps you treat people like replaceable cogs in a bigger machine. That's not the same thing at all.

(3) Known tech != quick onboarding. You yourself pointed out your new hires needed to learn Symfony. And you claim to be interested in Elixir and Phoenix. Well, for one thing, Elixir is extremely easy to learn as a language; secondly, it's OTP (the Erlang / Elixir concurrency framework) that's hard.

So what you said could absolutely apply to Elixir. The language is learned extremely quickly and then people have to spend some time getting to know a framework. It's the same everywhere really.

I feel your comment was putting too much weight on local physical availability of programmers and that's the wrong metric to use when assessing new (and possibly better) tech.

Re:Why I'm Productive in Clojure (2013) by submeta on Monday October 23, 2017 @05:01AM (#15531741)
The project had a very tight budget. That's why relocating devs from across Germany / Europe was not an option.

Also, even if the funding was better: One important aspect is: What if key developers (in that fancy new technology) leave the project? How fast can you find new devs? If it is a widespread technology (say: Node/Express + React) there is no risk. But think of hiring Erlang developers in your region.

I like Scheme (and it's influence on JS), I love functional programming, I like Ruby a lot, I really love Elixir. I like Python and Django a lot. But when it comes to setting up a project there are many aspects that determine my decision for technology. Some very important ones: What are my tech alternatives to tackle a problem? How wide spread is that technology in my region? How fast can I hire talented people in that tech?

I do acknowledge that a small team of good Python+Django devs for instance can work more efficiently than a team of PHP devs who don't appreciate software engineering qualities (not saying that there aren't really profound PHP devs out there, but many PHP devs who don't have profound software engineering qualities). There are only three real alternatives for web dev in Germany (if you have a tight budget): PHP based, Node/Express+React/Angular or Ruby/Rails based. I wouldn't even consider Python/Django, and forget about Elixir/Phoenix.

Re:Why I'm Productive in Clojure (2013) by pdimitar on Monday October 23, 2017 @10:10AM (#15533263)
I was not talking about relocating developers to Germany.

I was talking about you bringing in remote Elixir talent. It's not so hard nowadays, the dev base is growing.

Re:Why I'm Productive in Clojure (2013) by platz on Sunday October 22, 2017 @12:19PM (#15527482)
Known tech is quicker onboarding. Not all business have the capacity to train devs on new Lang's, but if your company does have that extra capacity then sure, no problem.
Re:Why I'm Productive in Clojure (2013) by pdimitar on Sunday October 22, 2017 @04:00PM (#15528632)
You ignored my point but I'll still repeat -- onboarding new language is relatively quick (several days). Onboarding new frameworks for languages people know is much slower.

So no, I disagree. Known language is not quicker onboarding for a framework. You'll save 4-10 workdays out of the several dozens needed for one to become an expert in a framework.

Re:Why I'm Productive in Clojure (2013) by TeMPOraL on Monday October 23, 2017 @01:40AM (#15530964)
IMO framework + codebase. Even if we're talking about companies using off-the-shelf frameworks and not something homemade, the project using that framework uses it in its own, peculiar and usually undocumented way, and figuring that out is even more difficult than figuring out the framework. This cost is present in pretty much every software job.
Re:Why I'm Productive in Clojure (2013) by pdimitar on Monday October 23, 2017 @04:14AM (#15531570)
Absolutely.

It grinds my gears to hear that legend over and over -- "new language is very risky and slow to adopt!", even though a lot of us know that the language itself is the lowest barrier of all.

On top of framework and codebase I'd also add organizational or team coding style. It becomes a bloody mess pretty damn quickly. I've personally spent 6 months being onboarded in a very finely tuned and hacked to oblivion Rails project -- a technology I knew pretty damn well at the the time -- and then it took me 3 weekends to get my own Elixir / Phoenix project off the ground... and for it be useful in business terms as well.

So these "new language risks" are vastly overstated and are simply an excuse for dogmatic people to not act in the project's best interest.

Re:Why I'm Productive in Clojure (2013) by kamaal on Monday October 23, 2017 @01:49AM (#15530993)
>>That involves using the stacks most popular on the market.

This is one of the most unforgettable lessons I've learned in life-- 90% of the dev hiring market is between 4 languages: Java, Python, Javascript and C.

Beyond this it barely matters how awesome your language is. The manager at the other end is optimizing for per person cost, and trying to hire as many people as he/she can.

Re:Why I'm Productive in Clojure (2013) by erichmond on Sunday October 22, 2017 @09:41AM (#15526785)
We've hired 3 so far. Actually had entirely too many good applications to choose from (25+?).

Leaving this comment so people who may read this and get scared off understand that it's definitely not the case.

Re:Why I'm Productive in Clojure (2013) by jwr on Sunday October 22, 2017 @02:19PM (#15528142)
> It's a business struggle. You're not going to hire Clojure devs. You're just not.

My company has both a) hired a number of Clojure developers, and b) a number of developers who were good programmers, so switching to Clojure was not a problem.

In general, I noticed that you either hire average programmers (in which case Clojure/ClojureScript could be a problem), or good programmers. Good programmers have no problem with Clojure, regardless whether they know it or not.

Leaving this here because people might think the above comment is universally true. It isn't.

Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @09:20AM (#15526690)
My team has been using Clojure for over 7 years now, We have never had a problem hiring people. You can take somebody who has no Clojure experience, and get them writing useful code literally in a couple of weeks.

Meanwhile, Scala is a much more complex language, and training somebody on it will be a lot more challenging.

Re:Why I'm Productive in Clojure (2013) by saosebastiao on Sunday October 22, 2017 @10:50AM (#15527058)
I was productive in Scala far faster than I was when I learned Clojure. To be completely fair, I was newer at programming when I learned Clojure, and knowing Clojure definitely helped me learn Scala, so there’s something to be said for Clojure for sure.

But if I had to take an average Java programmer and teach them a new language choosing between Clojure and Scala, I’d choose Scala hands down. The gap in semantics is so much closer, and concepts and libraries are so much more easily translatable. And it is entirely possible to be productive with Scala while knowing <50% of the language.

Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @11:19AM (#15527173)
Scala is a huge language, and many experienced developers have trouble using it effectively. You might learn a subset of Scala that works for you, but sooner or later you'll have to work with code written by others in a style that might be completely foreign. From what I've seen, Scala code ranges anywhere from Java syntax sugar to Haskell fanfic with libraries like scalaz.

Meanwhile, my team regularly hires coop students, and we never had to spend more than a couple of weeks training them to be productive in Clojure. Hiring and training people is simply not a real world problem when it comes to Clojure.

Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @12:33PM (#15527567)
If semantic similarity to Java and translatability to Java libraries are your main criteria surely Kotlin is a much better option than Scala? Kotlin is also much easier to learn than Scala.
Re:Why I'm Productive in Clojure (2013) by saosebastiao on Sunday October 22, 2017 @12:47PM (#15527655)
Indeed, if you merely want a better java, Kotlin is now the better choice (especially considering the superior tooling). But the limitation is that Kotlin tops out as a better java.

With Scala you can start out in better java territory and go from there to wherever you want. I personally don’t use any of the pure functional libraries, but I still greatly benefit from the strongly and strictly typed but flexible type system. In the 50k+ lines on my most recent project, I can count the number of bugs that escaped the type checker with one hand.

Re:Why I'm Productive in Clojure (2013) by christophilus on Wednesday October 25, 2017 @10:07PM (#15555824)
I'm the exact opposite. I liked Scala, but Clojure is much simpler, and I found myself much more productive in Clojure. Anecdotal evidence cuts both ways.
Re:Why I'm Productive in Clojure (2013) by tensor on Sunday October 22, 2017 @03:03PM (#15528342)
If you are looking for 100+ developers who already know it, maybe you'll have trouble. But it's absolutely not an issue hiring 20s of developers quickly. I work at company company whose done just this. Felt it important to put this counter example, even though many others have already.
Re:Why I'm Productive in Clojure (2013) by sheepmullet on Sunday October 22, 2017 @09:02AM (#15526616)
> It's a business struggle. You're not going to hire Clojure devs. You're just not.

How big of a problem this is depends on the team and the company.

I've worked on plenty of medium (30+ dev) projects with <10% yearly turnover and for these teams learning Clojure is practically no cost.

I've also worked on teams with 70%+ yearly turnover and teaching anyone anything was a waste of time.

Media companies tend to be on the higher turnover side and I wouldn't recommend Scala or Clojure.

Re:Why I'm Productive in Clojure (2013) by VLM on Sunday October 22, 2017 @01:46PM (#15527959)
"70%+ yearly turnover" Much higher than the food store I worked at as a student, long ago. If success is impossible because of high turnover, surely the language will not matter. Ironically, it is possible if there are management problems causing extreme turnover, then Clojure would be a strong advantage for management as a scapegoat.

I was on a major automation project where mgmt nailing down the specifications across four existing departments procedures took over a year... hard to imagine devs working less than a year making sense of it.

Re:Why I'm Productive in Clojure (2013) by Sevrene on Sunday October 22, 2017 @07:16AM (#15526218)
> Who is making these decisions to rewrite?

Anecdotal evidence incoming: For any rewrite it's always the developer. Every time. It might sometimes be the manager's decision to do it, but it's always instigated by a developer.

Re:Why I'm Productive in Clojure (2013) by always_good on Sunday October 22, 2017 @02:04PM (#15528072)
The hard part about Clojure is the editor tooling, like learning Paredit and how to evaluate code in the buffer. And then training yourself to actually do it.

It's similar to training someone to use Vim in that it's quite a different tooling set and workflow they're probably used to. I think that's the main barrier.

The language itself is pleasantly simple. And tools like Paredit make it one of the most pleasant languages to write. It's just hard for someone to appreciate Clojure until they put in the work to credentialize in its tooling.

Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @03:45PM (#15528550)
I recommend taking a look at parinfer as well https://shaunlebron.github.io/parinfer/
Re:Why I'm Productive in Clojure (2013) by whalesalad on Sunday October 22, 2017 @06:56AM (#15526155)
I can confirm this 100%. I've had to work with some really really bad Clojure software that is unbelievably hard to maintain. This is not a fault of the language, but just more proof that no language is a magic bullet.
Re:Why I'm Productive in Clojure (2013) by blain_the_train on Sunday October 22, 2017 @07:57AM (#15526388)
I would imagine one reason for this is because the real complexity of a project has nothing todo with the programming. It has to do with evolving the business. Were on our 3rd re-write of our business, but the codebase still has legacy systems from the first two drafts. No language can save you from that.
Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @09:15AM (#15526670)
I love it when people make a mess because they didn't really understand the problem initially, then rewrite it in something else and give all credit to the new technology they happened to be using.

When you rewrite a project it's always going to be a lot better, because you have a much better understanding of the problem being solved having done that once already.

Re:Why I'm Productive in Clojure (2013) by hellofunk on Sunday October 22, 2017 @09:44AM (#15526798)
Indeed, on anything serious I write it at least twice. Of course, using Clojure makes this easy since there is usually not a lot of code to rewrite. But after you get into something, you know details about what is needed that you simply cannot adequately predict beforehand in a lot of circumstances.
Re:Why I'm Productive in Clojure (2013) by imhoguy on Sunday October 22, 2017 @02:14PM (#15528117)
True, but only with small projects. Once initial creators of rather complex project leave then the mess begins. No language will save you from changing requirements, egos or best practices. Will your rewrite of inherited 200KLOC "is always going to be a lot better"?
Re:Why I'm Productive in Clojure (2013) by vemv on Sunday October 22, 2017 @07:15AM (#15526213)
My thoughts exactly.

There are many ways to use Clojure, the laziest one of course being the least maintainable. No language can subsitute engineering principles, years of experience, empathy etc.

I wrote a few hints of what I consider maintainable here -> https://blog.vemv.net/maintainable-clojure-beyond-aesthetics...

Re:Why I'm Productive in Clojure (2013) by blain_the_train on Sunday October 22, 2017 @07:36AM (#15526284)
>Rails project has less functions, and with a far more predictable structure.

This is probably true if your building a very very generic small webapp. In which case, maybe use rails if it's the stack your good at.

However, as the complexity of the system grows, the less will easily fit in mvc. When that happens, pushing all the complexity into mvc will make it harder to understand, not easier.

Re:Why I'm Productive in Clojure (2013) by whalesalad on Sunday October 22, 2017 @01:14PM (#15527798)
You can do anything you want with rails. You’re not coupled to mvc. At the end of the day it’s a rack app and it’s ruby. Go wild.
Re:Why I'm Productive in Clojure (2013) by blain_the_train on Sunday October 22, 2017 @03:15PM (#15528409)
You are coupled to mvc, that's the upside to a framework.
Re:Why I'm Productive in Clojure (2013) by whalesalad on Sunday October 22, 2017 @10:27PM (#15530254)
That is not true at all. You have Rails at your disposal but if you want to break free of that and use simple ruby classes and handle request/response on your own -- you are very much free to do that.

Perfect example is running Sinatra inside of Rails: https://jacobbednarz.com/posts/sinatra-in-rails

Again: ultimately you have a Rack (ruby, https://rack.github.io) webserver interface that has a Rails app mounted inside of it.

"Rails" is just some code that is running. You can choose to defeat certain parts of it, mount other stuff on the Rack server, turn rails off entirely and just use Activerecord, etc...

I do it all the time.

Re:Why I'm Productive in Clojure (2013) by vemv on Sunday October 22, 2017 @07:42AM (#15526314)
Sure, I wasn't defending Rails as a generally better solution.

The quoted statement tends to be true regardless!

Re:Why I'm Productive in Clojure (2013) by blain_the_train on Sunday October 22, 2017 @09:09AM (#15526638)
> Don’t expect much more growth out of this language in terms of new projects written in clojure.

Why would an average dev not be able to maintain a clojure code base? I'm going to guess what you really mean is a average dev that doesn't know clojure. In which case the argument your really making is that its hard to find "clojure devs". Which I think runs contrary to the numbers which suggest many more people wanting to work in clojure then can find jobs. This piece seems to echo that sentiment: https://juxt.pro/blog/posts/clojure-job-market.html

I think by and large companies probably struggle to find clojure devs in there immediate area. Which is why i see all the clojure jobs either

A) remote B) in big cities

So its possible that companies could get great devs for less if they just allowed for remote.

Nothing backed up here by hard evidence, but worth considering that the language might not really be the only factor here.

Re:Why I'm Productive in Clojure (2013) by imhoguy on Sunday October 22, 2017 @02:29AM (#15525451)
Could you elaborate more on that, please? I wonder what are challenges of Clojure in large scale or legacy projects. I already know finding devs with Clojure/FP as core skill is harder than e.g. Java devs. But I have also seen Java projects being rewritten to PHP for similar reason so... just curious the other arguments about rewrite.
Re:Why I'm Productive in Clojure (2013) by zubairq on Sunday October 22, 2017 @03:02AM (#15525540)
I started again to rewrite my project from clojure as can be seen on my Github repository (https://github.com/zubairq/gosharedata/) but the problem was NEVER Clojure. By writing Clojure for 5 years it made me a better Javascript programmer I would say!
Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @09:12AM (#15526660)
If a dev can't work with Clojure, I'd be pretty suspect about their coding ability in general. I have yet to work with somebody who couldn't pick it up in a few weeks or so.
Re:Why I'm Productive in Clojure (2013) by mmargerum on Sunday October 22, 2017 @03:21PM (#15528436)
I’ve been doing c, c++, and objC for over 20 years and am just getting started with Clojure. Sure, it’s easy to understand the basics of clojure in a few weeks but it’s going to take me a while to stop thinking imperstively and objected oriented. Mutating everything is programmed in me at this point. I think it’s going to take me months to get decent at Clojure if not a year. I’m sold in the ideas but it’s not easy if you have been doing imperative style programming . I’d bet it’s almost easier for a novice to pick up Clojure
Re:Why I'm Productive in Clojure (2013) by yogthos on Sunday October 22, 2017 @03:38PM (#15528518)
It's different when you're learning on your own and when somebody is teaching you. If you're a company hiring new developers, then you already have people familiar with the language to ramp them up. When we hire new people, we do some pairing, and we do code review on pull requests for features.

I also agree that it's sometimes easier for novices to pick up the language. I've seen students become productive faster than people with a lot of background in imperative style.

Re:Why I'm Productive in Clojure (2013) by mmargerum on Sunday October 22, 2017 @03:43PM (#15528544)
Right. I think my experience is actually hurting me in this case. Laziness is blowing my mind a little bit too. I’m writing run! A lot in the repl
Re:Why I'm Productive in Clojure (2013) by sd34 on Sunday October 22, 2017 @12:49PM (#15527666)
If a dev is dumb enough to advocate clojure, I'd be pretty suspect about their coding ability in general. I have yet to work with a decent programmer who liked it.
Re:Why I'm Productive in Clojure (2013) by dang on Monday October 23, 2017 @02:57AM (#15531230)
We've banned this account for trolling. Please don't create accounts to do that with.

Programming language flamewars (one of the hotter circles of hell) are off topic here, as are all flamewars.

Re:Why I'm Productive in Clojure (2013) by new_account5648 on Sunday October 22, 2017 @07:11AM (#15526207)
I'm trying to evaluate clojure for standard enterprise applications. But I haven't seen anything on how to model entities and relations without a database:

   Entities:Person, Insurance, Car
   Relationships:
   Insurance--hasHolder-->Person(m:1)
   Insurance--insures-->Car(1:m)
   Car--hasPrimaryDriver-->Person(1:1)
   Person--drives-->Car(m:n).
   Additional constraint: hasPrimaryDriver(C,P) => drives(P,C).
The domain has cyclic relationships, hence I cannot model it as a tree. If everything is immutable, I have to update all entities that reference each other when replacing one?! What's the standard clojure way to implement it?
Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @12:21PM (#15527501)
I don't quite understand your question. Isn't entity relationship modelling an abstraction over the database rather than something separate? In Clojure raw SQL with something like HugSQL is more idiomatic than anything resembling an ORM though you can try to use Clojure as a simpler way of accessing Java classes, in which case all the usual suspects are available.
Re:Why I'm Productive in Clojure (2013) by refset on Wednesday October 25, 2017 @04:58PM (#15554205)
This would do the trick: https://github.com/tonsky/datascript
Re:Why I'm Productive in Clojure (2013) by jasim on Sunday October 22, 2017 @12:15PM (#15527461)
This was one of the questions (unarticulated at the time) that kept me away from value-based (immutable) programming for a long time.

The answer is straight forward: you use unique identifiers instead of references. A lot of your code would become similar to how you write SQL queries. You always use `id` to cross-reference entities. You can use whatever enumerable functions are in the language - List.find, Map.find etc.

Now if you want to mutate a leaf node inside a tree, well that question is itself invalid. You can't "mutate" a "value". Can you say mutate the number 12? Or the letter 'B'? Imagine every complex data-structure was atomic like this: the array [1,2,3] always remain [1,2,3]. You can't mutate it because it is one single value; you can get information from inside it, but that doesn't mean you can go and change it. If you do want to change it, then you "transform" it into a new value. So instead of using `array.push` in Javascript, you'd use `array.concat` which provides a new value. Or even better you always use the rest operator `{...oldHash, someKey: newValue}`.

This also means your complex, large tree structure is a "value". You can't mutate it. You can however transform it into a new value. So if your leaf node has to change, then it means what you now have is an entirely new value. The old value still exist; any variables that pointed to the old value still point to that, because, duh, values don't change. Rich Hickey has articulated all this really well in his talk "The Value of Values" (https://github.com/matthiasn/talk-transcripts/blob/master/Hi...)

You'd now be rightly vary of the space-time implications of copying over large sets of data everytime you want it changed a tiny bit. This is solved in functional languages by using structural sharing. When you get a new tree value with just one node changed, the runtime would actually share most of the tree structure, and newly create just the one we want changed. It'll update the reference pointer of the root node, and the entire path that goes from the root till the leaf that changed. This means if you do a shallow comparison between the new tree value and the old tree value, you'll immediately know they're different. You can also safely assume that the entire path till the changed leaf has a new reference and you can do quick shallow comparisons.

This is however an optimization and implementation detail. We're able to do this because structural sharing still allows us to keep the semantic model of everything is value for all practical purposes yet have the benefits of immutability.

OCaml lets you do both though - it supports the imperative place-oriented way of programming and value-oriented programming. It encourages value-oriented programming through its syntax and runtime library, but when you need it (for performance reasons), it is there for you.

Re:Why I'm Productive in Clojure (2013) by zengid on Sunday October 22, 2017 @02:29AM (#15525449)
What domain were these projects in? What was the 'average' developer unable to grok?
Re:Why I'm Productive in Clojure (2013) by quickthrower2 on Sunday October 22, 2017 @02:37AM (#15525470)
They can't grok how they will get a higher paid job after once they reset the "years' experience" clock on their chosen stack.
Re:Why I'm Productive in Clojure (2013) by Heliosmaster on Sunday October 22, 2017 @03:34AM (#15525630)
There's no worse student than the one that thinks he doesn't have anything to learn anymore...
Re:Why I'm Productive in Clojure (2013) by cutler on Sunday October 22, 2017 @11:44AM (#15527285)
Examples?