4 ms·
For those not familiar with Leiningen: it is a command-line tool that handles management of project settings, build settings, dependencies, deployments, debug c
by jballanc 14y ago
For those not familiar with Leiningen: it is a command-line tool that handles management of project settings, build settings, dependencies, deployments, debug console, packaging...and a whole bunch more. It is trivially extendable, and a large number of plugins already exist. If you're familiar with Ruby, it's the equivalent of the "rake", "gem", "rails", and "cap" commands all rolled into one. In short, in this programmer's opinion, Leiningen is reason enough on its own to go and learn Clojure!
- codewright 14y agoI mostly hack in Python, but jballanc is not exaggerating when he says Leiningen is reason enough to learn Clojure. It makes cabal and sbt look really bad. I would slaughter a goat for a Leiningen equivalent in Scala or Haskell. Go has a solid enough ecosystem already that it isn't really needed.
- wheaties 14y agoI wonder just how hard it would be to take it and extend it for Scala. Just my musing 'cause I'm learning Ruby atm and plan on learning one of Prolog, Haskell, or Clojure next.
- codewright 14y ago>I wonder just how hard it would be to take it and extend it for Scala. That would be insanely compelling.
- xeqi 14y agohttps://github.com/technomancy/lein-scalac https://github.com/technomancy/lein-scalac could be a starting point.
- technomancy 14y agoThe main problem here is that scalac is pretty slow, so you want to leave up the compiler process and just trigger an incremental compile. Last I heard this functionality was tightly coupled to SBT and not available independently. But for simpler projects it might be OK.
- BruceM 14y agoIn recent months, they've made this available as "zinc" or something and it has been integrated with Maven.
- cgag 14y agoIf you go with Clojure, you could cover learning logic programming using the core.logic (https://github.com/clojure/core.logic https://github.com/clojure/core.logic) library instead of Prolog.
- edwinnathaniel 14y agoI never used Scala but I'd be surprised if Maven support for Scala is at minimum.
- qznc 14y agoIs there are a more extensive article around somewhere, which describes the advantages of Leiningen? Looking at the documentation it does not look that great.
- kinleyd 14y agoIn a nutshell: All you have to do is download a little script called lein. You run it to get a skeleton project set up. Add whatever libraries/dependencies you need for the project, including the Clojure version, in the project.clj script. Then start the repl using lein ($ lein repl), and Bob's your Uncle - leiningen manages everything after that. No complicated tool chain set up, not even any need to rely on the package installers on your OS (and the usually outdated versions they provide). I couldn't help you with an article that tells all, but that was a really compelling story for me.
- threedaymonk 14y ago> If you're familiar with Ruby, it's the equivalent of the "rake", "gem", "rails", and "cap" commands all rolled into one. You can add "rvm"/"rbenv" to that list, as it manages Clojure versions, too.
- jballanc 14y agoHeh, I was going to add that, but that's actually a feature of Clojure itself, and not just Leiningen. What version of Clojure you're using just depends on which Clojure jar you've loaded into the JVM, so managing Clojure versions is not different than managing versions of any other library. (Another thing that Clojure has gotten really, really right.)
- edwinnathaniel 14y agoYou should also add "bundler" along those Ruby tools (as if I'm not mistaken, bundler deals with fetching the dependencies). Leiningen is like Maven :D