8 ms·
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 an
by _sdegutis 9y ago
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.
- _halgari 9y agoWell, 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.
- bpicolo 9y agobrew install leiningen -> lein repl does exactly that
- _sdegutis 9y agoLeiningen has been incredibly painless: $ brew install leiningen $ lein repl That's literally all it took.
- systems 9y agoI 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
- _sdegutis 9y agoSorry 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.
- puredanger 9y agoAs I mentioned at length in my prior answer, this was not the primary driver.
- emmelaich 9y ago``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.
- puredanger 9y agoPreviously, there was no brew formula for clojure and there was a hardcoded pointer to leiningen. When the clojure formula was added, that was removed.
- thomastjeffery 9y agoSo long as you have leiningen installed. That isn't always trivial.
- hk__2 9y ago> 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.
- thomastjeffery 9y agoWhat 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.
- emidln 9y agoleiningen also updates itself.
- mnm1 9y agoSure it is: you can just download and run the script they have on their site: https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein https://raw.githubusercontent.com/technomancy/leiningen/stab... or for windows: https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat https://raw.githubusercontent.com/technomancy/leiningen/stab...
- billfruit 9y agoInstalling 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.
- adambard 9y agoNot only this, but also things like `clj myscript.clj` are, I think, useful to beginners.
- raspasov 9y agoThat's very cool, yes!
- puredanger 9y agoThe 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.
- oneweekwonder 9y ago/r/atwoodslaw/[0] [0]: https://www.reddit.com/r/atwoodslaw/ https://www.reddit.com/r/atwoodslaw/
- geofft 9y agoCan you explain the relevance of your comment / the idea you're trying to convey?
- oneweekwonder 9y agoThe 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.
- charrington 9y agoThe new "clj" CLI tool is not a javascript tool. It is for Clojure, not Clojurescript.
- cljuser 9y agoBecause lein is bloated, breaks constantly, and is absolutely overkill if all you want is a REPL and some deps from Maven.
- hk__2 9y ago> Because lein is bloated, breaks constantly Mind expanding on that? My 4-years experience using Leiningen has been great so far.
- raspasov 9y agoYea, 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.
- Scarbutt 9y agoIt cannot fetch jars from maven though, you still need lein for that.
- puredanger 9y agoIt can fetch jars from Maven.
- Scarbutt 9y agoAs in download dependencies automatically for you?
- puredanger 9y agoYes, just like lein.
- thomastjeffery 9y agoLast 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.
- Zak 9y agoI 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.
- thomastjeffery 9y ago> 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.
- gw 9y agoIn 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/ https://sekao.net/lightmod/