News for hackers. Stuff that matters.
Re:State of Clojure Survey 2019 Analysis by nepeckman on Wednesday February 06, 2019 @01:44PM (#19098251)
I'll offer a different take: Clojure is settled. It found its niche: a small/medium group of experienced professionals who like its practicality and power. There's a comment somewhere else in this section that Clojure devs are more experienced on average than JVM devs. I'd like to add another stat from the State of JS survey[0] that went out a while back. Developers who used ClojureScript had the highest salaries and most years of experience when compared to other compile-to-js languages.

This narrative makes intuitive sense to me. Clojure is not the most beginner friendly language. It goes harder on functional programming concepts than the popular scripting languages, which is a bit of a learning curve. The cultural tendency to prefer smaller scoped libraries to broader frameworks means puts more cognitive load on the developer, who has to decide which libraries to use and how to wire them up. But this is a positive attribute for a more experienced developer, who might have strong opinions on how an application should be structured.

[0] https://2018.stateofjs.com/

Re:State of Clojure Survey 2019 Analysis by garamond97 on Wednesday February 06, 2019 @02:58PM (#19099199)
> Clojure is settled. It found its niche: a small/medium group of experienced professionals who like its practicality and power.

Agreed. I'll add though that the problems with Clojure are soft ones. Here's my summation:

* it's business- and Java-friendly. Enterprise-focused.

* it's quite beautiful, though steeped in Java-isms

* its license is GPL-incompatible

* it's not a community-focused language and project; it's Cognitect's [edit: Rich's] project which they're graciously sharing with us.

That last one (IMO, the last two items) is a problem. For example:

* docstrings. Real improvements from the community?

* Lein? The clear winner, and yet for the longest time there was no mention of it in the getting-started guide on clojure.org, and then Boot was created. And then clj. NIH?

* It took ages until they began accepting PR's for their docs.

* I don't know the status of improving error messages. They've been complained about for years.

Clojure is Cognitect's [edit: Rich's] industrial-strength enterprise-ready Java-replacement and they sell consulting services for that. That's what Clojure is for and it's very good at that. It's also a seductively beautiful language, but if you're expecting a community-driven project with grassroots adoption and support, you're going to be disappointed.

Re:State of Clojure Survey 2019 Analysis by puredanger on Wednesday February 06, 2019 @03:15PM (#19099375)
Just a clarification, Clojure copyrights etc are owned by Rich Hickey, not Cognitect. Cognitect pays for all of the core development team salary, infrastructure, etc.

docstrings - we apply many docstring fixes in every release.

NIH - are we literally never supposed to try to make anything new? Doesn't this non-argument apply to literally the creation of every language, library, and tool? This is silly. clj has different (quite clear) goals than Lein or Boot and both doesn't do things they do (like builds) and does things they do not (like git deps).

We have been accepting PRs for docs on the site for 3 years. Who cares how long it took before we started doing that if we're doing it now? Wouldn't it be more productive to praise for what you like than crap on how someone used to do something you didn't like?

Isn't it a good thing that Clojure is such as productive tool that it can support a consulting company that can afford to pay decent salaries so the core team can continue working full time on Clojure making it even better? This is a good thing. I suppose we can also ignore the hundreds of tickets, patches, and contributors to the language, many of whom have nothing to do with Cognitect or their consulting, as that's more convenient for this line of reasoning.

Do you think Clojure would be in a better place today if it did not have this support from a company willing to champion it? How often has that been a successful strategy for languages?

Re:State of Clojure Survey 2019 Analysis by garamond97 on Wednesday February 06, 2019 @04:01PM (#19099902)
> Wouldn't it be more productive to praise for what you like than crap on how someone used to do something you didn't like?

My apologies; I don't mean to insult. Thanks for the reply. My point is that it says something about what the core team thinks is important. Glad to hear that the team has been accepting doc PR's for years now.

> Isn't it a good thing that Clojure is such as productive tool that it can support a consulting company that can afford to pay decent salaries so the core team can continue working full time on Clojure making it even better?

I think we're arguing at cross-purposes. Certainly Clojure is a productive environment. But I'm interested in community-focused projects. These projects often have less corporate adoption than projects like Clojure. I was disappointed with Clojure, but not because it lacked a company championing it (it has one), not because it lacked corporate adoption (it doesn't), and not because there's anything in particular wrong with the language (I think it's an excellent language) -- by those metrics Clojure is certainly successful.

I'm amazed when people complain that they can't get their boss on board with introducing Clojure into their enterprise Java project. That appears to me to be exactly the market Clojure is targeting and succeeding in, when employed there.

Re:State of Clojure Survey 2019 Analysis by puredanger on Wednesday February 06, 2019 @06:50PM (#19101453)
From inside the core team, I feel entirely community-focused. I spent a good chunk of last year working on improving many aspects of error messages, the top community complaint in surveys. Currently I'm spending time working on spec and trying to guide external (community!) work on clj for Windows, also two things highly mentioned in the survey. I spent all day today answering dozens of questions in HN, reddit, slack, mailing lists, jira issues, github issues, etc. Not even sure how it's possible to be more focused on the community than I am.
Re:State of Clojure Survey 2019 Analysis by cutler on Wednesday February 06, 2019 @06:23PM (#19101216)
Clojure on the JVM with Clojure libraries is one thing. Clojure with Java interop is quite another. Though a fine Lisp in itself, Clojure's identity is somewhat schizophrenic, hosted as it is on a platform designed for mutable OOP. This is the main reason most Java shops would never touch Clojure.
Re:State of Clojure Survey 2019 Analysis by kickopotomus on Wednesday February 06, 2019 @05:58PM (#19101013)
I personally believe that it is this sort of attitude that is driving some people away from Clojure. You could have easily structured your comment to be constructive instead of being defensive. The issue is not so much that people don't like how Clojure is managed, it is more so the lack of transparency and the (rather unprofessional) way that Cognitect (Rich) handles criticism and input from the community.

I get it. Clojure is Rich's gift to the world and he will do with it as he see's fit. That's all well and good but make that clear so that people thinking about checking out Clojure know it up front.

Re:State of Clojure Survey 2019 Analysis by puredanger on Wednesday February 06, 2019 @06:34PM (#19101311)
I don't get how you go from my comment to that. I literally talk to people all day long, every day, about what we should be doing in Clojure. The idea that this is "Rich's gift" and we're not taking input from others is just wrong.

http://insideclojure.org now has weekly journals detailing everything we're doing in Clojure dev if you're interested.

Re:State of Clojure Survey 2019 Analysis by jimbokun on Wednesday February 06, 2019 @06:25PM (#19101237)
"clj has different (quite clear) goals than Lein or Boot and both doesn't do things they do (like builds) and does things they do not (like git deps)."

I think the build tool is the part of the tool chain where you most want a single project to rally behind. You want everyone building artifacts and expressing dependencies the same way.

Unless they all work the same at that level?

Re:State of Clojure Survey 2019 Analysis by mr_custard on Wednesday February 06, 2019 @04:24PM (#19100137)
> it's quite beautiful, though steeped in Java-isms

Trying to understand what you mean here. I write a lot of ClojureScript as well as Clojure and I'm not seeing Java influences in there at all.

Could you expand upon your comment a little more?

Re:State of Clojure Survey 2019 Analysis by pr0tonic on Wednesday February 06, 2019 @02:36PM (#19098924)
Clojure is not the most beginner friendly language.

I really disagree here. My first job out of college was at a Clojure shop and it has been the easiest language I've ever learned. There is a small hurdle of switching to lisp syntax when all you've ever used is C style languages, but that's about it. I also find frameworks more effort to learn than pulling in a small library that does the one thing I need.

Re:State of Clojure Survey 2019 Analysis by nepeckman on Wednesday February 06, 2019 @02:44PM (#19099011)
I can really only speak from my personal experience here. I learned Clojure on my own time in college, and it took some time for me to understand how to deal with things like immutability, laziness, and pure functions. After I did finally 'get' it, I was unable to convince any of my classmates that the initial effort was worth it. I love the language and its opinions, but JavaScript (another language I learned on my own time) was probably 10x easier.
Re:State of Clojure Survey 2019 Analysis by jimbokun on Wednesday February 06, 2019 @06:30PM (#19101270)
"I learned Clojure on my own time in college, and it took some time for me to understand how to deal with things like immutability, laziness, and pure functions."

I suspect much of that time was spent "unlearning" habits from procedural languages.

I know Carnegie Mellon now teaches functional programming as the introductory course, and only introduces advanced topics like "mutability" later. I think that sequence makes it easier for beginners to reason about what their program is going to do and experience less frustration.

Re:State of Clojure Survey 2019 Analysis by hombre_fatal on Wednesday February 06, 2019 @04:18PM (#19100078)
One thing that makes Clojure hard for beginners is the tooling.

For example, consider how a beginner can write Ruby and Python in notepad.exe while a lisp would be insufferable (and a common, awful first experience for that reason). Also, some of its best features, like cider/nrepl and Paredit, are hidden behind yet more tooling and keyboard shortcuts.

It's certainly a filter.

Re:State of Clojure Survey 2019 Analysis by kamaal on Friday February 08, 2019 @04:24AM (#19112667)
>>It's certainly a filter.

Absence of that filter is the reason almost all of the programming crowd today is locked into advanced beginner mode all life.

Re:State of Clojure Survey 2019 Analysis by dragandj on Wednesday February 06, 2019 @04:39PM (#19100299)
Is there one single beginner that starts their programming journey with notepad.exe? I've never seen a single one, and I see hundreds of them each year.
Re:State of Clojure Survey 2019 Analysis by WillPostForFood on Wednesday February 06, 2019 @05:00PM (#19100517)
Notepad++? Textmate? Look at the first paragraph of the first chapter of Chris Pine’s Learn to Program.

Now that you've gotten everything setup, let's write a program! Open up your favorite text editor and type in the following:

puts 1+2 Save your program (yes, that's a program!) as calc.rb (the .rb is what we usually put at the end of programs written in Ruby). Now run your program by typing ruby calc.rb into your command line. It should have put a 3 on your screen. See, programming isn't so hard, now is it?

Re:State of Clojure Survey 2019 Analysis by goatlover on Wednesday February 06, 2019 @05:28PM (#19100750)
Why not just start at the REPL or with a Notebook? Having an interactive environment seems like it would be easier to learn the language. Then they can move to a code editor when they're ready for writing more complex programs.

It's this sort of thing that probably drives the likes of Alan Kay crazy when even learning a language isn't interactive by default.

Re:State of Clojure Survey 2019 Analysis by WillPostForFood on Thursday February 07, 2019 @12:04AM (#19103139)
I agree, but there is also something conceptually useful in learning early that a program is code saved in a text container that is then either compiled or interpreted.
Re:State of Clojure Survey 2019 Analysis by fiddlerwoaroof on Friday February 08, 2019 @03:17AM (#19112382)
The clojure equivalent isn't much worse:

   (println (+ 1 2))
Then

    clojure calc.clj
Re:State of Clojure Survey 2019 Analysis by notduncansmith on Thursday February 07, 2019 @12:53AM (#19103340)
There’s mine? I used Notepad to create my first Windows .bat file (in fact, it was rather a juvenile piece of malware that opened notepad.exe thousands of times), which was the first programming I ever did. I later went on to use Notepad to modify files for a desktop game and write my first PHP and Ruby scripts. Now I write software professionally (including, but not limited to, Clojure) using a Mac :)
Re:State of Clojure Survey 2019 Analysis by puredanger on Wednesday February 06, 2019 @04:55PM (#19100460)
I did!
Re:State of Clojure Survey 2019 Analysis by borge on Thursday February 07, 2019 @06:50AM (#19104620)
I used notepad when I first started learning PHP.