News for hackers. Stuff that matters.
Re:State of Clojure Survey 2019 Analysis by jakebasile on Wednesday February 06, 2019 @01:52PM (#19098348)
I've said it before and I'll say it again, the industry can rip Clojure from my cold, dead hands. It's unfortunate that people in this thread seem to down on the language, but the only possible way I would stop using it is if I literally cannot earn income with it. It is by far the most pleasant language I've ever used, I feel at home writing it, and it improves the quality of my work.
Re:State of Clojure Survey 2019 Analysis by stcredzero on Wednesday February 06, 2019 @07:17PM (#19101680)
I've said it before and I'll say it again, the industry can rip Clojure from my cold, dead hands. It's unfortunate that people in this thread seem to down on the language, but the only possible way I would stop using it is if I literally cannot earn income with it.

Some superstitious people would say, don't tempt fate by saying that out loud!

It is by far the most pleasant language I've ever used, I feel at home writing it, and it improves the quality of my work.

Very familiar. Be sure to diversify. (Ex Smalltalker here.)

Re:State of Clojure Survey 2019 Analysis by kamaal on Friday February 08, 2019 @02:55AM (#19112307)
>>Very familiar. Be sure to diversify. (Ex Smalltalker here.)

Very true. Coming from a Ex Perl programmer.

Though Perl is still around and you can solve problems using it for everyday work. But you will hard pressed to find a job that requires you writing or maintaining Perl code.

Re:State of Clojure Survey 2019 Analysis by jakebasile on Wednesday February 06, 2019 @08:00PM (#19101950)
Good thing I'm not the least bit superstitious!

And yeah, like I said elsewhere I know my way around Python quite well and it's impossible to write a lot of Clojure and not know Java too. If both of those end up dying along with Clojure down the line then I'll be in a bad spot. :)

Re:State of Clojure Survey 2019 Analysis by SlightRespect on Thursday February 07, 2019 @10:31AM (#19105758)
Yeah, it's bad luck to be superstitious
Re:State of Clojure Survey 2019 Analysis by euccastro on Thursday February 07, 2019 @04:13AM (#19104010)
Nah, you'll be fine.
Re:State of Clojure Survey 2019 Analysis by _t0du on Wednesday February 06, 2019 @02:14PM (#19098639)
I am not disagreeing nor challenging you; I'm happy you like it and I think you should keep using it since you enjoy it so much. My question is: Wouldn't the same be said by most programmers with a high degree of proficiency with a language? What sets Clojure apart from Haskell or Scala or Elixir or Erlang? Do you have a high degree of proficiency with something else?

Clojure is the language that I have always wanted to learn, but the benefits never seemed very apparent. I'm hoping your response will make them clear.

Re:State of Clojure Survey 2019 Analysis by jakebasile on Wednesday February 06, 2019 @03:22PM (#19099441)
Some experienced devs might say the same thing if they've also found a language that just clicks with them as I have.

Clojure is a locus of things I really, really like and I have no reason to change despite the recent FUD around it. Namely: Lispiness, dynamic typing, functional programing, immutability, lean pragmatic design, and it runs on the JVM. I haven't seen anything that compares to it in these regards that also has the community support that Clojure has (great projects like Leiningen, Lacinia, and so on).

I've tried Haskell but felt I was fighting the compiler due to the static typing (I hate static typing). It also felt like it was designed for eggheads and not people like me just doing a job. Scala feels like it doesn't know what it wants to be when it grows up. Elixir and Erlang are neat but I haven't had a chance to really try them out, but Elixir's choice to emulate Ruby-like syntax is unfortunate.

That said, I do have a high degree of proficiency with Python, which shares dynamic typing and kinda-functional programming with Clojure. Python was my language of choice for years before I finally gave Clojure a try, and I haven't really looked back. The poor handling of the Python 3 switch really soured me to Python.

I also did a good chunk of Go, but the static typing and syntax weirdness just killed it for me. Amusingly, Go seems to have a similar "ivory tower" approach to language design to Clojure - which indicates that type of management isn't really a problem for me.

Re:State of Clojure Survey 2019 Analysis by Gene_Parmesan on Wednesday February 06, 2019 @08:06PM (#19101976)
My question for you would be, why Clojure over, say, Racket? Is it just the JVM?

I personally prefer Racket because of the ease with which you can use it to hack on itself. Macros are no stranger to LISPs, but Racket goes beyond by having the entire system around it built to accommodate language design and modification.

Want to use dynamic typing? Just use #lang racket. Want to use static type checking? Use #lang typed/racket. Reactive programming is there with #lang frtime. And that's before we even consider things like Scribble.

As an aside, I totally agree with you on Elixir. Erlang is wonderful for what it's built for. Elixir's choice to use Ruby syntax, however, ruins Elixir for me -- and it's not because I hate Ruby. I actually like Ruby a fair deal. Instead, it's because using Ruby syntax makes it more difficult (for me) to truly and fully think in the paradigm. Erlang/Elixir are nothing like Ruby. Making the syntax Ruby-like just obfuscates what's actually going on in the system. (I find similar issues whenever I try to program using imperative chunks in, say, F# or Scala.) Just my two cents.

Re:State of Clojure Survey 2019 Analysis by jakebasile on Wednesday February 06, 2019 @09:48PM (#19102518)
The answer is just that I haven't gotten around to trying Racket. I've eyed it now and then but I've never done anything serious with it. It does seem to be the closest match for me barring Clojure.

That said, the JVM is a huge part of why I like Clojure. Because of the mountains of corporate code written in Java there is an insane amount of pretty high quality (if extremely object oriented) code available for it. I can find a library for basically any third party tool I'd want to use and if someone hasn't written a Clojure wrapper for it yet I can whip one up pretty quickly most of the time.

Re:State of Clojure Survey 2019 Analysis by euccastro on Thursday February 07, 2019 @04:41AM (#19104116)
And sometimes I can do fine with no wrapper at all. Not only there's a lot of JVM code available, but interfacing with it is pretty quick, straightforward and smooth compared to wrapping C (or, god forbid, C++) from any Scheme I tried. I found that's very important. You can have lots of code theoretically available for wrapping, but there's more of an impedance mismatch between C and Scheme (think continuations/TCO, garbage collection, type conversion, and the fact that some tools in Racket/Scheme ecosystems will be blind to what happens in C land) so in practice it's a lot more work.
Re:State of Clojure Survey 2019 Analysis by euccastro on Thursday February 07, 2019 @04:59AM (#19104177)
Besides the JVM part, this is my take on it: as a language, Racket defines a vast possibility space, which is a superset of that defined with Clojure. You could implement Clojure (barring the JVM) quite naturally in Racket, while the other way around would be impractical. Now, Clojure is a pretty sweet spot in that design space, and someone else has done the immense work to carve it out, define it, implement it, and foster a sizable community around it.
Re:State of Clojure Survey 2019 Analysis by peatmoss on Thursday February 07, 2019 @10:18AM (#19105682)
I played around with Erlang back when people rediscovered it the last go around in ~2006, and I didn’t think the syntax was crazy, so I’ve never gotten too excited to learn Elixir. Lisp Flavored Erlang (LFE) on the other hand looked cool.

But Racket... oh, Racket. Every time I get to write Racket, I feel like it’s the past, present, and future.

I do like some of the immutable collection abstractions in Clojure, and I like that there’s always a library in Java that’ll allow me to mostly still write Clojure. But Racket is definitely my language sweet spot.

Re:State of Clojure Survey 2019 Analysis by kjsbfkjbf on Thursday February 07, 2019 @10:12AM (#19105643)
Do you have any resources to start with Racket? I did it in first year but I haven't really seen (or searched too hard for!) materials that explain how I'd use it in production.
Re:State of Clojure Survey 2019 Analysis by peatmoss on Thursday February 07, 2019 @10:21AM (#19105700)
This book was nice, and the author is earnestly trying to build a commercial-usage community around Racket:

https://serverracket.com/

EDIT: Oh, but just getting started:

- How to Design Programs 2nd edition (new to programming or structured reasoning about programs)

- Racket Guide (new to Racket)

- Racket Docs (for reference)

The docs are pretty great, but IMO there’s an opportunity for people to blog about production use cases.

Also, I dream of something like R’s tidyverse being written for Racket... maybe by me, but ideally by someone smarter and better.

Re:State of Clojure Survey 2019 Analysis by kjsbfkjbf on Thursday February 07, 2019 @11:49AM (#19106394)
I've luckily read HtDP already for school. :)

I'll check out serverracket!

Re:State of Clojure Survey 2019 Analysis by rtpg on Thursday February 07, 2019 @12:16AM (#19103180)
I don't think Racket includes the immutable data types that Clojure does?
Re:State of Clojure Survey 2019 Analysis by disconcision on Thursday February 07, 2019 @12:33AM (#19103249)
I don't know what exactly Clojure has but Racket/base has immutable lists, vectors, hash maps, and structs. (As well as mutable versions). Most default data structures are immutable.
Re:State of Clojure Survey 2019 Analysis by ilovecaching on Wednesday February 06, 2019 @10:09PM (#19102662)
Regarding Haskell, the type system is really the main feature of the language, not the paradigm. Haskell allows you to program in the type system (using some popular extensions) and simply derive all your code from your types. I highly recommend Type Driven Development with Idris as an intro the absolutely crazy things you can do with a powerful type system.

The issue with dynamically typed FP is that FP is essentially about functions as mathematical objects, and there's really nothing mathematical about dynamic typing. Primarily, static types act as a proof, and because we're talking functions in the mathematical sense, you can actually reason about your program in the normal way.

Haskell is for eggheads though. What I really like is Rust, which feels like you're using Haskell and C at the same time. It's both powerfully low level and powerfully high level, and extremely pragmatic.

All that said, it sounds like you're super passionate about clojure, and I hope no one rips it out of your hands. I know what it's like to play the language wars games, and I wish you and all our fellow brethren the best of luck.

Re:State of Clojure Survey 2019 Analysis by jimbokun on Wednesday February 06, 2019 @06:20PM (#19101197)
"Elixir and Erlang are neat but I haven't had a chance to really try them out, but Elixir's choice to emulate Ruby-like syntax is unfortunate."

Of the languages you mention, Elixir seems to me like the closest experience to Clojure. Of this list:

"Lispiness, dynamic typing, functional programing, immutability, lean pragmatic design, and it runs on the JVM."

Only missing "Lispiness" and "runs on the JVM".

As for "Ruby-like" syntax, this sounds like people not trying Lisp because "too many parentheses".

Re:State of Clojure Survey 2019 Analysis by jakebasile on Wednesday February 06, 2019 @08:01PM (#19101956)
I've definitely had my eye on Elixir for a while, just haven't had a need or a real itch to try it yet.

It'd be hard to give up my precious parentheses though.

Re:State of Clojure Survey 2019 Analysis by ilovecaching on Wednesday February 06, 2019 @10:10PM (#19102675)
One of the authors of erlang also invented lisp flavored erlang, (LSP) and it's just as good as regular erlang.
Re:State of Clojure Survey 2019 Analysis by peatmoss on Thursday February 07, 2019 @10:30AM (#19105748)
LFE (I think you were the victim of autocorrect):

http://lfe.io/

Re:State of Clojure Survey 2019 Analysis by jimbokun on Thursday February 07, 2019 @01:26PM (#19107174)
"It'd be hard to give up my precious parentheses though."

Yeah, that's the "Lispiness".

Elixir does have macros, but I still don't think any macro system is as powerful or user friendly without S-expressions.

It's kind of the last step of a language becoming just another Lisp.

Re:State of Clojure Survey 2019 Analysis by alexbanks on Wednesday February 06, 2019 @05:53PM (#19100973)
Interesting. I asked mostly because I've hopped around a lot, trying to find that one language that just clicks with the way my brain works. Java, Javascript, Go, Scala, Ruby, Rust, Python...they all had things about them that kinda clashed with the way I intuited problems and attempted to solve them. I've instead tried to rescope my thinking into "I'm the problem, I should try to follow the language's idioms to find solutions."

Of the languages that I've enjoyed, I've spent the most time in Go. I've kind of just hitched my wagon to it, regardless of whether I like it or not.

Re:State of Clojure Survey 2019 Analysis by ken on Thursday February 07, 2019 @08:10AM (#19104945)
Different person here, but here goes.

> Wouldn't the same be said by most programmers with a high degree of proficiency with a language?

Perhaps for some, but not for me. Clojure is by far my favorite language, despite not being one that I'm most proficient in -- maybe not even my top 5 right now.

> What sets Clojure apart from Haskell or Scala or Elixir or Erlang?

For one thing, I've never written a (non-trivial) program in any of those other languages. :-)

Based on just what I've heard: Elixir and Erlang sound like good languages, and they're next on my list to learn, and I might well feel the same about them. For Scala, the one thing I've heard consistently is that it's incredibly complex, which is the opposite of one of the main reasons I like Clojure, so it's unlikely I would feel the same about it.

> Do you have a high degree of proficiency with something else?

Yes, I've earned money for writing assembly, C, C++, Java, C#, Python, Ruby, Tcl, Common Lisp, Objective-C, Swift, JavaScript, and probably a couple others I'm forgetting at the moment. Even after a couple years in those other languages, when I felt I was getting pretty good, I never felt like any of them were a great model of computation.

> Clojure is the language that I have always wanted to learn, but the benefits never seemed very apparent. I'm hoping your response will make them clear.

Writing a program in a language like C# or Swift or Python, to me, means taking 100 random pieces of kit (which look like the inside of Anders'/Chris's/Guido's head) and being creative enough to find a way to assemble them into something that works like I want today. None of them ever matches the problem space very well, so I have to pick how to compromise the design, and guess what axis of flexibility I'll want in the future. Next week when my requirements change, I learn that I often picked wrong, so now I have to redo part of it. The syntax is complex. Managing state is complex. Decomposing problems into reusable pieces is hard. Developing a new version of a program usually means rewriting methods I've already written (for new features, additional genericity, etc), and I personally find that frustrating. I want to finish things, once. I like it when languages let me extend built-in types with methods I think they ought to have had in the first place, but I'm also annoyed that I have to write these at all.

When I first tried Clojure, almost everything felt natural right away. The syntax is pretty simple -- just complex enough, beyond classic Lisp, to make common data structures (list/array/dict/set) easy to type. Learning Clojure mostly consisted of learning their new names for functions -- either functions I already knew, or which I guessed would probably exist (and always did). Remarkably, I usually find that the easiest way to solve any given problem in Clojure happens to result in functions which are already generic and composable and reusable. Once written, I very rarely have to touch a Clojure function again, either for correctness or modularity. (The obvious exception is the front-end, which is a thin simple layer that is easy to change.)

I can pretty much guess how I think something ought to work in Clojure, and it does. The work is not figuring out how to map my problem to the syntax of the language (and then having to maintain that state and those invariants), but simply writing some simple functions (map data to data) to transform the format I have to the format I need.

Re:State of Clojure Survey 2019 Analysis by finalfantasia on Wednesday February 06, 2019 @11:32PM (#19103017)
I was passively introduced to Clojure when I joined my current team at my current company a few years ago. After spending 5 years in a humongous, horribly-maintained Java code base, and a short period of time with a new-ish Scala code base that was littered with code written in almost all kinds of programming paradigms (procedural, object-oriented, and functional) and then being intimidated by the incidental complexity of the language itself prior to this transition, I was frustrated to realize the cruel fact that I had to learn another JVM language that feels even “weirder” and more “complicated” than Scala. At first, I had similar questions as you have now: “What makes this ‘ugly’ language so special that one of our smartest team leads preferred it to, say, Scala, Go, or Rust?” It was not until I watched one [1] of “Rich Hickey’s Greatest Hits” [2] did Clojure finally “click” with me. It’s all of those principles that were applied and the values that were upheld when Rich Hickey designed this elegant language. I cannot reiterate all of them here. Go watch those talks and give this language a serious try. You might end up falling in deep love with it just as I did. :-)

[1] https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hi...

[2] https://changelog.com/posts/rich-hickeys-greatest-hits

Re:State of Clojure Survey 2019 Analysis by nlplingo on Wednesday February 06, 2019 @11:51PM (#19103080)
I’d love to see more languages that could do this:

Repl driven development (100x productivity boost, especially with immutability, fp and expression oriented language)

Focus on data and data transformations (without classes, types and other clutter including syntax)

Concurrency (from simple state management with atoms to CSP and STM)

Libraries (this is where JVM really shines)

Unfortunately I couldn’t find anything even close to Clojure.

Re:State of Clojure Survey 2019 Analysis by euccastro on Thursday February 07, 2019 @05:07AM (#19104202)
OTOH, it's fortunate that the people that like those things get one obvious place to meet.
Re:State of Clojure Survey 2019 Analysis by valw on Thursday February 07, 2019 @02:09AM (#19103580)
I've had a relatively high degree of proficiency with other languages by several accounts, including Java, Scala, and JavaScript. Yet I've observed empirically that I am usually much more productive in Clojure for the sort of programs I write (high-level software: web apps, components of information systems, data plumbing, etc.). This is well I ended up adopting Clojure professionally: after failing repeatedly to reproduce this productivity in more popular alternatives.

Regarding the benefits, for me it's the practical benefits of interactive development and the simplicity of everything in the Clojure ecosystem, which allow me to focus.

Of course, I would encourage everyone to be open to alternatives to Clojure!

Re:State of Clojure Survey 2019 Analysis by ilikehurdles on Wednesday February 06, 2019 @02:25PM (#19098799)
I personally don’t have a great answer for you because I haven’t used the other languages much or at all. If you’re able to watch someone really effective at repl driven development, I think you’re able to see how that sets productivity in the language apart.
Re:State of Clojure Survey 2019 Analysis by akhilcacharya on Wednesday February 06, 2019 @02:50PM (#19099098)
Are there any good screencasts for this?
Re:State of Clojure Survey 2019 Analysis by piercebot on Wednesday February 06, 2019 @04:06PM (#19099945)
Bruce Hauman has given a few good talks about how you can use tools like Figwheel to bring a REPL-like development experience to web development.

You can watch him live-code the game 2048 in the screencast where he introduces DevCards[0]. Notice that the video came out 4 years ago!

One thing that really drew me to Clojure is that it seems to be a nexus of really good ideas that have trickled out into the larger community. If Clojure was where all the smart kids ate their lunch, maybe if I ate lunch with them too (so to speak), some of their smarts might rub off on me :)

[0]: https://vimeo.com/97078905

Re:State of Clojure Survey 2019 Analysis by MuffinFlavored on Wednesday February 06, 2019 @02:39PM (#19098956)
I feel the exact same way (s)he does about node.js and I 100% would never want to write Clojure. So to your point, yes. Using the language I know well enough to make money with is awesome. Other languages don't entice me because I can already do everything I need to well with what I currently have.
Re:State of Clojure Survey 2019 Analysis by jacobolus on Wednesday February 06, 2019 @03:13PM (#19099343)
> feel the exact same way (s)he does about node.js [...] can already do everything I need to well with what I currently have

This is a provincial take. That is, “do everything I need to” is strongly limited by what a person currently knows. If you don’t have at least moderate amounts of experience with alternative ways of thinking, it’s impossible to know what you are missing. There are many things which are needlessly complex, slow, brittle, unproductive, ... in any particular programming environment, and javascript is one of the more limiting choices IMO.

Ideally, students would be exposed to a broad range of approaches and tools in school to build a strong foundation, but in practice this often doesn’t happen, and the folks I know who reliably build the best systems are the ones who spend a decent fraction of their time learning new tools and ideas throughout their careers, many entirely self taught.

Re:State of Clojure Survey 2019 Analysis by goatlover on Wednesday February 06, 2019 @05:24PM (#19100717)
Probably because you don't need to do things that Node isn't well suited for. If you did, then other languages which did those things well would become useful to you.
Re:State of Clojure Survey 2019 Analysis by MuffinFlavored on Wednesday February 06, 2019 @07:53PM (#19101916)
Do you have any examples?
Re:State of Clojure Survey 2019 Analysis by ilovecaching on Wednesday February 06, 2019 @10:17PM (#19102707)
You can make any language do anything if you have days/months/years of free time, but NodeJS isn't suitable for systems programming. Imagine trying to write a tcp load balancer or interface with Linux specific kernel APIs from Javascript. It's not a great choice for a CLI tool since there's inherent startup time for JITed VM based language. It doesn't scale well for CPU bound thread pool applications like image processing, etc.

So there are lots of places where it doesn't make any sense at all or it's just a very, very poor choice for a particular task.

Re:State of Clojure Survey 2019 Analysis by goatlover on Thursday February 07, 2019 @12:07AM (#19103151)
Some more would be statistical (R, Matlab, SPSS), gaming outside the web (C, C++, Java), scientific computing (Python, Fortran, Julia), supercomputing simulations (Fortran, C++, C), embedded devices (C, C++, Rust), server farms (C++, Go, Java), financial (Java, Cobol, J/K), to name three PLs in each category that come to mind.

There is a big world of computing outside of apps and websites.

Re:State of Clojure Survey 2019 Analysis by MuffinFlavored on Thursday February 07, 2019 @10:59AM (#19105995)
Clojure would be a bad choice for pretty much all of those as well, right? Or is it interchangeable with Java?
Re:State of Clojure Survey 2019 Analysis by puredanger on Thursday February 07, 2019 @11:51AM (#19106408)
People use Clojure for all of those. From the rationale (https://clojure.org/about/rationale), Clojure "endeavors to be a general-purpose language suitable in those areas where Java is suitable".
Re:State of Clojure Survey 2019 Analysis by juskrey on Thursday February 07, 2019 @02:58AM (#19103755)
The same. It also pushes me to try doing things on my own because narrow job offerings can't last forever.

And I am glad Clojure has a lot of such fanatic proponents.

Re:State of Clojure Survey 2019 Analysis by lastofus on Wednesday February 06, 2019 @02:39PM (#19098949)
Out of curiosity, what kind of apps do you work on day to day?
Re:State of Clojure Survey 2019 Analysis by jakebasile on Wednesday February 06, 2019 @03:13PM (#19099337)
Currently I work on stream processing for enterprise applications, e.g. email archiving / auditing.
Re:State of Clojure Survey 2019 Analysis by ataturk on Wednesday February 06, 2019 @04:11PM (#19099998)
I'm glad you're still earning income from it. It was my favorite of the JVM alt-languages, but it just seemed to have died around 2015 with all the others.

I say "died" but I know that people still write in Scala and Groovy, but how many new projects are you seeing in those languages?

At one point I set out to find work doing Clojure, but not much turned up in my locale. I did one professional project at a former company and only got the green light for using Clojure because it was basically a throw-away in a couple years when a new business process was coming in anyways.

Good luck to you, but it's not a niche I would want to be in. You have to mold yourself to the market, not the other way around (usually).

Re:State of Clojure Survey 2019 Analysis by fulafel on Thursday February 07, 2019 @07:12AM (#19104699)
I think 2015 was the year that Node started getting popular on the backend at the expense of some of the JVM technologies, but Clojure fortunately runs well on that platform too.
Re:State of Clojure Survey 2019 Analysis by iLemming on Friday February 08, 2019 @03:37AM (#19112458)
> You have to mold yourself to the market

F# and Clojure are notably ranked as the highest paid languages for the past 2-3 years in a row. Trust me - market is shifting towards FP and Clojure one of the best choices.

Re:State of Clojure Survey 2019 Analysis by kgwxd on Friday February 08, 2019 @02:07PM (#19117595)
COBAL is a high paying language too :) It's possible Clojure pays well for the same reason, hopefully not.
Re:State of Clojure Survey 2019 Analysis by iLemming on Sunday February 10, 2019 @10:13PM (#19131788)
I can easily speculate that not for the same reasons. F# and Clojure are the most payed languages because today they are the most used FP languages in fintech sector.
Re:State of Clojure Survey 2019 Analysis by platz on Wednesday February 06, 2019 @10:02PM (#19102620)
What others died in 2015?