News for hackers. Stuff that matters.
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.