News for hackers. Stuff that matters.
Re:Clojure 1.9 is now available by _sdegutis on Friday December 08, 2017 @03:40PM (#15881853)
Why focus on command line tools? There's already Leiningen which does an amazing job, and Boot for the few use-cases Leiningen doesn't take care of. Creating another CLI seems very strange.
Re:Clojure 1.9 is now available by puredanger on Friday December 08, 2017 @03:47PM (#15881901)
The new tools.deps.alpha and command line tools are focused differently. They are specifically for creating classpath and launching Clojure programs, so do not cover use cases of building or deploying artifacts - for that you should still use a build tool like Leiningen or Boot. (But those tools may actually be able to use tools.deps.alpha.)

However, tools.deps.alpha doesn't restrict itself to a Maven-artifact-only dependency system. It supports an open system of coordinate and provider types of which Maven is one, but also local (no-artifact) dependencies, local jars, and eventually others as well (like using projects directly from Github). All of that vision is not done yet but it will enable many new capabilities.

Clojure is a language that runs code from Clojure source files. It does not inherently require "building" or "deploying" anything. Those are useful tools to interoperate with the Java ecosystem, but we should not limit ourselves to only that means of program building.

Re:Clojure 1.9 is now available by _halgari on Friday December 08, 2017 @03:43PM (#15881873)
Well, for the first time since the langauge was created you can now do `brew install clojure`, and then `clj` on the commandline and get a repl. I would have loved something that painless when I was learning Clojure.
Re:Clojure 1.9 is now available by _sdegutis on Friday December 08, 2017 @03:46PM (#15881890)
Leiningen has been incredibly painless:

    $ brew install leiningen
    $ lein repl
That's literally all it took.
Re:Clojure 1.9 is now available by systems on Friday December 08, 2017 @04:16PM (#15882111)
I agree, but it does take a while to figure out that leiningen exist

And then you learn that not everyone use leiningen ... and things become a bit more confusing than necessary for some people, especially beginners

Re:Clojure 1.9 is now available by _sdegutis on Friday December 08, 2017 @04:41PM (#15882301)
Sorry but this whole conversation is a stretch. Anyone who looks into Clojure finds out about Leiningen. The official clojure.org even mentions it. No it's more than a stretch, it's rationalizing.
Re:Clojure 1.9 is now available by puredanger on Friday December 08, 2017 @05:35PM (#15882694)
As I mentioned at length in my prior answer, this was not the primary driver.
Re:Clojure 1.9 is now available by emmelaich on Friday December 08, 2017 @11:55PM (#15884372)
``brew search clojure`` used to find leiningen; not sure why not now.

In fact it used to find leiningen instead of clojure; possibly clojure didn't exist as a brew tap before.

Re:Clojure 1.9 is now available by puredanger on Saturday December 09, 2017 @02:23PM (#15887534)
Previously, there was no brew formula for clojure and there was a hardcoded pointer to leiningen. When the clojure formula was added, that was removed.
Re:Clojure 1.9 is now available by billfruit on Saturday December 09, 2017 @09:10AM (#15885857)
Installing leiningen is not trivial on all platforms (Eg: Windows).Even on Linux distro repos may contain older versions of leiningen that subtly break things. Perhaps it would be better if leiningen is part of closure distribution rather than existing as separate entity.
Re:Clojure 1.9 is now available by thomastjeffery on Friday December 08, 2017 @06:41PM (#15883090)
So long as you have leiningen installed.

That isn't always trivial.

Re:Clojure 1.9 is now available by mnm1 on Friday December 08, 2017 @08:11PM (#15883542)
Sure it is: you can just download and run the script they have on their site: https://raw.githubusercontent.com/technomancy/leiningen/stab...

or for windows: https://raw.githubusercontent.com/technomancy/leiningen/stab...

Re:Clojure 1.9 is now available by hk__2 on Friday December 08, 2017 @06:56PM (#15883185)
> So long as you have leiningen installed.

I’m not sure I understood your comment. Parent’s code block has two lines: the first one installs Leiningen; the second one starts its repl.

Re:Clojure 1.9 is now available by thomastjeffery on Friday December 08, 2017 @07:04PM (#15883225)
What I meant is, so long as you have an updated version of leiningen readily available.

This is just another layer in the toolchain to contend with, and since Clojure is built on the JVM, the toolchain is already quite bloated.

Re:Clojure 1.9 is now available by emidln on Monday December 11, 2017 @12:08AM (#15895271)
leiningen also updates itself.
Re:Clojure 1.9 is now available by bpicolo on Friday December 08, 2017 @03:45PM (#15881887)
brew install leiningen -> lein repl does exactly that
Re:Clojure 1.9 is now available by adambard on Friday December 08, 2017 @06:02PM (#15882883)
Not only this, but also things like `clj myscript.clj` are, I think, useful to beginners.
Re:Clojure 1.9 is now available by raspasov on Saturday December 09, 2017 @10:58PM (#15889801)
That's very cool, yes!
Re:Clojure 1.9 is now available by thomastjeffery on Friday December 08, 2017 @06:53PM (#15883164)
Last time I looked into Clojure, I found myself frustrated that I was expected to install leiningen, Java, etc. and get it all working together before I could write any code.

I like to know how a toolchain works, how libraries are linked, etc. I don't want to rely on "magic" that can be incompatible with alternative "magic".

Clojure didn't provide a good low-level interface, and I ended up giving up on it for that reason alone.

Now that there are some minimal command-line tools, I think I'll give it another look.

Re:Clojure 1.9 is now available by Zak on Friday December 08, 2017 @07:10PM (#15883261)
I used Clojure before leiningen existed. It's very possible to run Clojure from the command line without it, to specify classpaths yourself, to manage dependencies by hand, even to build an executable JAR.

There's not much documentation for doing that stuff though, because (almost) nobody wants to do that. It's painful.

Re:Clojure 1.9 is now available by thomastjeffery on Friday December 08, 2017 @07:28PM (#15883360)
> There's not much documentation for doing that stuff though, because (almost) nobody wants to do that. It's painful.

That is what I encountered when I first tried to learn Clojure.

I essentially gave up at that point. Installing the JRE is enough of a pain on its own.

Re:Clojure 1.9 is now available by gw on Friday December 08, 2017 @09:07PM (#15883828)
In case it helps, my app actually bundles an entire Clojure environment (including the JRE) so you don't need anything else installed:

https://sekao.net/lightmod/

Re:Clojure 1.9 is now available by cljuser on Friday December 08, 2017 @04:44PM (#15882327)
Because lein is bloated, breaks constantly, and is absolutely overkill if all you want is a REPL and some deps from Maven.
Re:Clojure 1.9 is now available by raspasov on Friday December 08, 2017 @09:53PM (#15883996)
Yea, I literally have never had a problem with leiningen breaking. All people that I know that use Leiningen are also in general very happy with it. Curious what lein-specific problems you've ran into.
Re:Clojure 1.9 is now available by hk__2 on Friday December 08, 2017 @07:00PM (#15883207)
> Because lein is bloated, breaks constantly

Mind expanding on that? My 4-years experience using Leiningen has been great so far.

Re:Clojure 1.9 is now available by Scarbutt on Saturday December 09, 2017 @02:05PM (#15887398)
It cannot fetch jars from maven though, you still need lein for that.
Re:Clojure 1.9 is now available by puredanger on Saturday December 09, 2017 @02:09PM (#15887431)
It can fetch jars from Maven.
Re:Clojure 1.9 is now available by Scarbutt on Saturday December 09, 2017 @06:02PM (#15888696)
As in download dependencies automatically for you?
Re:Clojure 1.9 is now available by puredanger on Sunday December 10, 2017 @05:21PM (#15893801)
Yes, just like lein.
Re:Clojure 1.9 is now available by oneweekwonder on Friday December 08, 2017 @03:48PM (#15881914)
Re:Clojure 1.9 is now available by geofft on Friday December 08, 2017 @03:52PM (#15881951)
Can you explain the relevance of your comment / the idea you're trying to convey?
Re:Clojure 1.9 is now available by oneweekwonder on Friday December 08, 2017 @04:21PM (#15882149)
The parent found it strange that a js cli was needed as well. I pointed at atwoodslaw as a reason why duplicate tools can be found.

I must note, I like clojure for its cross vm support. One lisp to rule them all.

Re:Clojure 1.9 is now available by charrington on Friday December 08, 2017 @06:34PM (#15883049)
The new "clj" CLI tool is not a javascript tool. It is for Clojure, not Clojurescript.