On Thu, Mar 4, 2010 at 8:33 AM, Jan Rychter <j...@rychter.com> wrote:
> Also, I now have at least six clojure jars in ~/.m2 (huh?!), along with > a collection of other assorted stuff. I don't want to use any of these > clojure jars, I have a checked out git repo with clojure and this is the > only code I want to run. Also, swank-clojure insists on having its own > clojure jar in ~/.swank-clojure (why?). > Except the libraries you're consuming with Lein might require specific versions of Clojure and not the bleeding edge. > I used to have a bunch of directories with git repos. I would update > those, run ant to gather code into jars, fiddle with the classpath in my > custom-crafted clj script, symlink things around. It was about as bad as > with Common Lisp. But now things got worse -- I no longer feel in > control of anything. Some things won't build, lein tells me about > "artifacts" (huh?!), things get installed in weird places. My clj script > that gets run by SLIME form Emacs can't find libraries that leiningen > downloaded. > In my experience haven gone through everything you've described Lein has made things at least an order of magnitude simpler. You no longer have to do things by hand. Even better you can use other people's libraries in a much more straightforward manner. Case in point Penumbra, an OpenGL library for Clojure. To get Penumbra to work w/o Lein you need to: a) get the Penumbra library from source b) get the LWJGL 2.2.2 jars and native libraries c) know how to set your class path to point to not only the jars but to the correct native libraries for you particular platform/architecture. This is nightmarish to say the least. Now with lein to use Penumbra you only have to remember 3 commands lein deps lein native-deps (I added this) lein swank (just slime-connect from Emacs) For most libraries it's just, lein deps, lein swank. As a more general observation, I think that a large part of Perl's and > Python's success was a unified way of dealing with libraries. There > are certain directories where you can drop libraries and expect them to > work (be found). There is ONE way of running the VM (one script, blessed > by the language creator). Then on top of that there is CPAN, which plugs > into that, downloading dependencies and dropping libraries into those > well-known directories. It isn't perfect, but it works, and is > predictable. > As has been said "one place" presents serious problem for anything beyond the simplest libraries with only trivial dependencies. I'm not saying lein is the end all be all. But it removes a fairly serious pain point for Clojure - managing your classpath and using other people's libraries. David -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en