News for hackers. Stuff that matters.
Re:Elements of Clojure by jfaucett on Thursday March 17, 2016 @05:15PM (#11307667)
"really wish I had the time to learn Clojure."

I would say don't bother. The language is a nice lisp (nice simplifications, great immutable ADTs, edn, pretty good async libs, etc), but the ecosystem tooling is still miserable IMHO - this is coming from someone who has worked around 6-12 months on a couple of clojure projects, so I'm not a die hard expert but I've worked enough with it to build with/have used clojurescript,clojure,java bindings,leiningen/boot,clojars etc.

I really wanted to like clojure. The idea that I could run my code on the JVM and in the browser is alluring. And, I would add, if you like using mvn or ant or gradle or in general the java way of doing things, you will probably think leiningen is good enough.

But I have zero tolerence for annoying/unnecessary headaches, and so I can't take it, and don't program any of my projects in it.

What do I consider good? Well an analogous project is Mix for Erlang/Elixir, and I think its an excellent example of what I wish leiningen were. Anyone can learn Mix in about 10 minutes, you can easily use it for erlang & elixir projects, I have had zero problems and stuff just works. This is not the case with leiningen, which makes building and deployments unnecessarily complicated in clojure.

I don't see clojure getting mainstream until someone starts concentrating more on the user experience in the tooling, though this may be more of a java/jvm originated problem, still it affects your whole experience while using clojure.

Re:Elements of Clojure by afhammad on Thursday March 17, 2016 @05:40PM (#11307847)
As much as I love Clojure and even more so ClojureScript, I would have to agree with you on this. To add to what you said, another big pain point for me is starting new projects. Although I wouldn't say don't spend any time learning the language, especially if you are new to functional languages, you can learn a lot from Clojure.
Re:Elements of Clojure by jfaucett on Thursday March 17, 2016 @06:36PM (#11308190)
"Although I wouldn't say don't spend any time learning the language"

Yes, I can see your point. And there are some really good innovations clojure has made I think - specifically the immutable data types are really beyond compare, anyone wishing to learn more about immutable data structs should definately read their source in clojure its clear and understandable.

Still, if anyone wants to learn what lisp is all about. I'd just recommend common lisp (clisp or sbcl) for getting the special forms, repl, and beauty of macros bits. It also means you don't have to know anything about java to get the key concepts of a lisp, which is less overhead overall.

Regardless of common lisp or clojure, I'd always recommend anyone listen to Rich Hickey's talks on clojure, they are very good, especially his talks about values, composition, and simplicity. (http://www.infoq.com/author/Rich-Hickey)

Re:Elements of Clojure by desbo on Friday March 18, 2016 @05:09AM (#11310658)
I recently started my first Clojure/ClojureScript project using the Reagent template for Leiningen[1]. It gives you Ring/Compojure/Hiccup on the backend for simple routing and views, and Reagent with a client-side routing framework on the frontend. It took me 10 minutes to get it running and figure out what the different components were doing. I'm sure ultimately I'll roll my own setup but this is a good way to get going if you're new.

1: https://github.com/reagent-project/reagent-template

Re:Elements of Clojure by base698 on Thursday March 17, 2016 @08:45PM (#11308992)
I generally see it as getting way better and the improvements over 3 years back are unreal. Figwheel with ClojureScript and Cider for plain ole'clojure make it pretty awesome developer experience. I just built a small project and finished it in half the time it would have taken in my normal tools.
Re:Elements of Clojure by weavejester on Thursday March 17, 2016 @07:49PM (#11308651)
Could you give an example where Mix is superior to Leiningen or Boot? Or where you've had problems doing something that in Mix was much easier?
Re:Elements of Clojure by bachback on Thursday March 17, 2016 @05:36PM (#11307813)
the tooling is way superior to common LISP, since it can leverage the huge Java ecosystem. Clojure tooling - it's basically a jar, so if you know how to use Java, you can always fall back to that. ayes, if you want a fully integrated stack with Clojurescript it takes considerable time. I spent that time and it beats everything I know hands down. if you want to code like everyone else, use something else. if you want to 10-100x productivity gains long-term then spend the time. http://paulgraham.com/avg.html
Re:Elements of Clojure by Guthur on Thursday March 17, 2016 @06:54PM (#11308310)
Checkout this series and quicklisp and then with a straight face say tgat clojure experience is better http://malisper.me/2015/07/07/debugging-lisp-part-1-recompil...

I have used both professionally and find the dev tooling for clojure very immature. Debugging tools is not a modern feature yet clojure jas very little

Re:Elements of Clojure by base698 on Thursday March 17, 2016 @09:55PM (#11309291)
http://endlessparentheses.com/cider-debug-a-visual-interacti...

The cider debugger is one of the best I've seen. I've been able to stop, inject code and create a test case for failing tests.

Cursive has similar functionality as well if you are afraid of emacs becoming a lifestyle :)

Re:Elements of Clojure by raspasov on Friday March 18, 2016 @06:57AM (#11310955)
I completely disagree.

I don't have experience with Elixir/Erlang/Mix but I've heard great things about them.

One thing I'm sure though is that Leiningen and all its guides are second to none - read them https://github.com/technomancy/leiningen/blob/master/doc/TUT... .

Here's how your start a project with Leiningen:

lein new app

Here's how you build the whole project:

lein uberjar

Here's how you run your Clojure app:

java -jar my-clj-project.jar

Re:Elements of Clojure by s_kilk on Thursday March 17, 2016 @05:37PM (#11307819)
Agreed. I've been doing Clojure (on and off) for about 4-5 years now and the tooling is as bad as it's ever been. Compared to Elixir/Mix it's downright embarrassing.

Incidentally, I've been putting more effort into Elixir/Erlang recently, I honestly see more of a future there (for me) than in Clojure.

Clojure was definitely a mind-expanding language for me though, no regrets learning it.

Re:Elements of Clojure by tragic on Friday March 18, 2016 @05:11AM (#11310668)
I love both languages, but I don't see the tooling in one as vastly superior to the other. Elixir certainly has Clojure completely licked in terms of compile times; also the Mix command-line workflow is just simpler (no messing around with project.clj vs profiles.clj vs ~/.lein/profiles.clj and god knows where else).

On the other hand, Clojure REPL workflow (although some assembly is required) is phenomenal. Clojurescript is a serious option on the client. And for runtime-level tools (profilers etc), you have the whole Java/JVM ecosystem, which is simply bigger, for better or worse, than the Erlang equivalent.

So for my money, it's definitely a two horse race.

Re:Elements of Clojure by devty on Thursday March 17, 2016 @08:23PM (#11308848)
i've been fairly happy with Leiningen but have no experience using mix - i'm curious to know what you really liked about mix that leinigen doesn't have.
Re:Elements of Clojure by klibertp on Friday March 18, 2016 @05:51AM (#11310761)

    $ time lein --help
    ...
    lein --help  2,16s user 0,49s system 141% cpu 1,880 total

    $ time mix help
    ...
    mix help  0,51s user 0,51s system 129% cpu 0,789 total
This difference compounds and it gets rather annoying quite fast.
Re:Elements of Clojure by thom on Friday March 18, 2016 @07:38AM (#11311078)
What are you doing the requires constant relaunches though?
Re:Elements of Clojure by AlwaysBCoding on Thursday March 17, 2016 @05:40PM (#11307851)
You're definitely right, and from my experience the community has no interest in actually making the developer experience better. It's one of those "the first step to fixing the problem is admitting you have a problem" situations and for the most part the Clojure community can't even admit how bad their tooling is, they'd rather shift blame to the users and pretend that if you can't figure it out it means you're not smart enough to be using it.

I find Clojure is a lot more approachable if you start with Clojurescript / Reagent and go from there. You don't need to be running Clojure on the backend to make use of how awesome Clojurescript is, and it's about 10x more approachable.

Re:Elements of Clojure by weavejester on Thursday March 17, 2016 @06:25PM (#11308110)
"You're definitely right, and from my experience the community has no interest in actually making the developer experience better."

Where did you get this impression? The State of Clojure 2015 survey indicates that the Clojure developers are very interested in making the developer experience better, particularly around error messages, startup time and documentation.

I cannot recall seeing a single Clojure developer suggest that Clojure's tooling is good enough. However, it is a lot better than it was.

Re:Elements of Clojure by ane on Friday March 18, 2016 @03:10AM (#11310359)
I've used Mix a bit and I didn't immediately see something that was so far ahead of Leiningen. Though I would say SBT is much closer in functionality.