Hacker News new | past | comments | ask | show | jobs | submit login
Leiningen 1.2 Released (Clojure build tool & more) (github.com/technomancy)
43 points by ihodes on July 18, 2010 | hide | past | favorite | 12 comments



  * Don't allow "new" task to create *jure names.
I'm not able to verify this ATM, but does this mean libraries with names ending in -jure are strictly disallowed? Granted there's probably plenty of mylibjure sort of names out there now, but this change would be quite bold.


No, you got it right. Got tired of the puns.

You can work on projects with names like that, you just can't use the "new" task to generate them. The official workaround is to generate a skeleton with a different name and rename it, or to use Leiningen 1.1.0. Awkward, but hey--it's an edge case. =)


Wow, that's a pretty bold executive decision to force people to come up with more creative names. Not that I disagree with it, though.


Nipping in the bud Clojure's version of Java's coffee puns, before it's too late?


I love that you reference "Leiningen vs. the Ants" in the name. Etymology meets entomology!


I use ant to build my Clojure stuff. Why should I prefer Leiningen (did I spell that correctly?)


If you use ant and it doesn't drive you crazy, it may be that your project just has very simple needs. If you read through the tutorial (http://github.com/technomancy/leiningen/blob/master/TUTORIAL...) and don't find anything in there you need then that's great; you should consider yourself lucky.

The main thing you miss out on with ant is dependencies. Not only does Leiningen make it easy to depend upon other libraries, it also makes it easy to publish your library so others can depend on it. It's an ecosystem thing.

If that's not a big deal for you then the only advantage Leiningen could offer would be having one fewer violation of Greenspun's Tenth law in your life.


What put me off leiningen a while a go is the mention of Maven. I'm not going to touch anything related to Maven because at some point something will go wrong and I will be thrown into Maven hell. Maven is evil. It's the EJB of build management.

Also, I think that build management and generally dependency/package management is done completely wrong. The principle seems to be to manage large numbers of fine-grained, versioned, recursive dependencies. I don't think this will ever work well. The inherent complexity of that idea is always going to leak. We need to question the idea that modularity is always good.


I think you're probably right in the end, but a) what we've got is better than nothing (although it might be a big old dead end), and b) it doesn't look like there's a better option for building on other peoples' work.


(1) simple, declarative project descriptions in clojure

(2) straightforward swanking

(3) dependency resolution

e.g.,

  $ lein new scratch/itch
  $ cd itch
  $ emacs project.clj
  ... // add swank-clojure deps
  $ cat project.clj
  (defproject scratch/itch "1.0.0-SNAPSHOT"
              :description "FIXME: write"
              :dev-dependencies [[swank-clojure "1.2.1"]]
              :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"]
                             [org.clojure/clojure-contrib "1.0-SNAPSHOT"]]
  )

  $ lein deps
  $ lein swank
    user=> Connection opened on local port  4005
    #<ServerSocket ServerSocket[addr=localhost/127.0.0.1,port=0,localport=4005]>


I like two things about Leiningen. One, it provides a spectacularly simple hook into SLIME. Before "lein swank", the Clojure+Emacs+SLIME experience left much to be desired. Two, Leiningen handles dependency management, including transitive dependencies, quite well.

If you don't need or care for either of those things, you can probably stick with Ant.


In addition, leiningen has a nice plugin system to allow others to augment it. I found one last week which allows you to build clojure.org-esqe API docs [1]. I don't use ant often though, so it may well have similar capabilities. In general, I imagine leiningen as a combo(-ish) between Ruby's rake and gem.

[1] http://tomfaulhaber.github.com/autodoc/




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: