Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-30 Thread Brent Millare
Thanks, that was insightful. To recap, subclassloader is a optimization to reduce the startup time of launching a new clojure instance from leiningen. In addition, I learned that computing the classpath was conducted in clojure code. I see now that the bash script is just a bootstrapping tool to

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-29 Thread Brent Millare
Can someone please elaborate on this subclassloader process? Although the design for leiningen is architecturally simple and understandable and thus easy to extend, I'm still quite unfamiliar with the java way. I believe a little documentation on this aspect can make a significant improvement in

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-29 Thread Alex Osborne
Brent Millare brent.mill...@gmail.com writes: Can someone please elaborate on this subclassloader process? Although the design for leiningen is architecturally simple and understandable and thus easy to extend, I'm still quite unfamiliar with the java way. I believe a little documentation on

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-13 Thread Meikel Brandmeyer
Hi, On Thu, Mar 11, 2010 at 01:32:36PM -0800, Phil Hagelberg wrote: Historically this has been because calculating the classpath couldn't be done in Clojure itself since it needed to be done before the JVM booted. Having to figure this kind of thing out in a shell script or in elisp is a

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-12 Thread Cyrus Harmon
I'm confused. Why do we need symlinks or copies at all? Why can't we just tell clojure where it's supposed to find a given projects dependencies? I'm sure the answer involves some mumbo-jumbo about classpath and what not, but surely there has to be a better alternative than whatever

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-12 Thread Stuart Halloway
Oh, and on a related note, I hate being forced into the src, test, lib heirarchy... Let me put my files where I want them to go. Whatever happened to the lancet build system from Stuart Holloway's book? That seemed to make sense to me. I think there is a big benefit in consistent directory

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-12 Thread Richard Newman
I'm confused. Why do we need symlinks or copies at all? Why can't we just tell clojure where it's supposed to find a given projects dependencies? I'm sure the answer involves some mumbo-jumbo about classpath and what not, but surely there has to be a better alternative than whatever

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-11 Thread Alex Osborne
Richard Newman holyg...@gmail.com writes: Whatever happened to engineers building a decent solution out of a sense of pride, or even making the most basic half-assed attempt to conserve resources? I take your points but I think we may just have different priorities of what to conserve, so we

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-11 Thread Per Vognsen
The way to go is definitely symlinks or hard links, not classpath hijinks. The only problem is that Java's filesystem API has no support for links, so you'll probably need to use OS-specific command line calls. Not too bad though. -Per On Thu, Mar 11, 2010 at 11:07 AM, Brent Millare

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-11 Thread Per Vognsen
Instead of symlinks you can use hard links like every decent DVCS does for clone-style branches. Hard links are supported on NTFS, HFS, and all the Unix file systems on wide use. They are transparent to users of the file system, so you can easily make tarballs of hardlinked jars, etc, without any

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-11 Thread Per Vognsen
If you use a DVCS like Mercury or Bazaar that mainly uses clone-style branching then it can become significant. The jars are build artifacts and so ignored by the repository and not subject to the DCVS's hard-link-based sharing. Penumbra is a small project and it already has 12 megabytes of jars

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-11 Thread Phil Hagelberg
On Wed, Mar 10, 2010 at 10:24 PM, Meikel Brandmeyer wrote: On Mar 11, 5:07 am, Brent Millare wrote: Since leiningen downloads everything to a local repo, can't we do away with copies and use symlinks if they are supported by the filesystem? I feel there should be an option for this. Why not

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-10 Thread evins.mi...@gmail.com
On Mar 4, 7:33 am, Jan Rychter j...@rychter.com wrote: I haven't hacked on new Clojure stuff for the past two months or so. Now, having updated my repositories, I find that everybody just dropped ant and moved to leiningen. I tried to make sense of things, but can't. I must be missing

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-10 Thread Brent Millare
Since leiningen downloads everything to a local repo, can't we do away with copies and use symlinks if they are supported by the filesystem? I feel there should be an option for this. -Brent On Mar 4, 1:59 pm, David Nolen dnolen.li...@gmail.com wrote: On Thu, Mar 4, 2010 at 10:19 AM, Stuart

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-10 Thread Meikel Brandmeyer
Hi, On Mar 11, 5:07 am, Brent Millare brent.mill...@gmail.com wrote: Since leiningen downloads everything to a local repo, can't we do away with copies and use symlinks if they are supported by the filesystem? I feel there should be an option for this. Why not adding the files from the repo

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-10 Thread Alex Osborne
Brent Millare brent.mill...@gmail.com writes: Since leiningen downloads everything to a local repo, can't we do away with copies and use symlinks if they are supported by the filesystem? I feel there should be an option for this. What benefit does this have aside from a tiny saving in disk

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-10 Thread Richard Newman
What benefit does this have aside from a tiny saving in disk space? Not that tiny when you multiply it across the dozens of projects on your hard drive. repos $ du -hc $(ls */lib/*.jar) | fgrep total 291Mtotal Add to that the size of the Maven repo itself. Symlinks are nice. * you

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-10 Thread Alex Osborne
Richard Newman holyg...@gmail.com writes: What benefit does this have aside from a tiny saving in disk space? Not that tiny when you multiply it across the dozens of projects on your hard drive. repos $ du -hc $(ls */lib/*.jar) | fgrep total 291M total Cost (on standard disks): 5 cents.

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-10 Thread Richard Newman
repos $ du -hc $(ls */lib/*.jar) | fgrep total 291Mtotal Cost (on standard disks): 5 cents. Sorry, that's tiny. It's even less than 0.5% of the small SSD I have in my laptop. Seriously, this is just premature optimization. You're seriously fine with every single Leiningen-based

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Glen Stampoultzis
On 5 March 2010 17:22, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Mar 5, 1:03 am, Felix Breuer fe...@fbreuer.de wrote: I agree that Windows is a second class citizen as far as clojure tools go. Oh please stop that. I have a stable setup of Gradle + Clojuresque + VimClojure on

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Meikel Brandmeyer
Hi, On Mon, Mar 08, 2010 at 01:44:44AM +1100, Glen Stampoultzis wrote: It seems (from my limited observations) that most of the Clojure developers are Linux/Mac people so it's understandable that Windows isn't currently as well supported by all tools. Windows has a fairly big share, I think.

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Mike K
On Mar 4, 4:32 pm, Glen Stampoultzis gst...@gmail.com wrote: Getting swank-clojure going in Windows is also a pain.  To install it the recommended way via ELPA you need to patch the ELPA source code first.  This isn't documented at the swank-clojure site either. For others who are struggling

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Mike K
Is anyone familiar with running Maven (and possibly Polygot Maven) on Windows? Does it pretty much work as expected? The learning curve for Maven looks steeper than for Leiningen, but if it makes up for it with better documentation and being better-behaved, then it may be worth it. Mike --

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Mark Nutter
On Sun, Mar 7, 2010 at 10:40 AM, Meikel Brandmeyer m...@kotka.de wrote: So your point boils down to emacs and lein don't work on Windows. I don't know about emacs, but at least for leiningen there is some activity at that front (cf. Rob's response). So I still think: if you have trouble with

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Phil Hagelberg
On Sun, Mar 7, 2010 at 7:57 AM, Mike K mbk.li...@gmail.com wrote: On Mar 4, 4:32 pm, Glen Stampoultzis gst...@gmail.com wrote: Getting swank-clojure going in Windows is also a pain.  To install it the recommended way via ELPA you need to patch the ELPA source code first.  This isn't

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-06 Thread James Reeves
On Mar 6, 5:58 am, Phil Hagelberg p...@hagelb.org wrote: If you're using git, this should be avoided. git is remarkably bad at storing binary data. I seem to recall that recent versions of Git have improved significantly in this area. However, there's still the fundamental problem that changing

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-06 Thread Brian Schlining
If you're using git, this should be avoided. git is remarkably bad at storing binary data. I seem to recall that recent versions of Git have improved significantly in this area. However, there's still the fundamental problem that changing the dependencies increases the size of the

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Martin DeMello
On Fri, Mar 5, 2010 at 12:34 PM, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Mar 5, 7:47 am, Martin DeMello martindeme...@gmail.com wrote: One huge drawback I've found with clojure (which it doubtless inherited from Java) is that you need an actual jarfile in your classpath, not just the

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Laurent PETIT
2010/3/5 Meikel Brandmeyer m...@kotka.de: Hi, On Mar 5, 1:03 am, Felix Breuer fe...@fbreuer.de wrote: I agree that Windows is a second class citizen as far as clojure tools go. Oh please stop that. I have a stable setup of Gradle + Clojuresque + VimClojure on Windows. Furthermore, all

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Stuart Sierra
On Mar 4, 1:59 pm, David Nolen dnolen.li...@gmail.com wrote: If Lein evolves to to handle dependencies of dependencies and intelligently generates the classpath based on these dependencies (instead of copying files around) what advantage does Maven really have? Maven supports a wide range of

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Ramakrishnan Muthukrishnan
On Fri, Mar 5, 2010 at 9:47 PM, Stuart Sierra the.stuart.sie...@gmail.com wrote: Yes, the Maven configuration model isn't pretty, but if you follow the conventions it works.  Polyglot Maven will obviate the need to write I didn't know about Polyglot. Thanks. Looks like a very nice tool.

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread James Reeves
On Mar 5, 11:17 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: Maven supports a wide range of development/deployment models already. Whatever you want to do (including compile/test/run Clojure code) there's a plugin for that.  Why recreate all this functionality in Leiningen? Most of

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Phil Hagelberg
On Thu, Mar 4, 2010 at 5:52 AM, Stuart Halloway stuart.hallo...@gmail.com wrote: Some needs I see: (0) More point releases of key libs (or some other solution to the snapshots problem) Agreed. (1) Unify around the project structure imposed by lein, and/or Yes, but it should be noted this

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Stuart Halloway
(2) Improve the project structure imposed by lein, if it is broken in some specific way. (Maybe add a well-known config file for adding elements to the classpath?) People have asked for this, but I have yet to hear a good use case for it. Mostly it's been requested by people who don't

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Neill Alexander
I'll add my 2 cents worth. I've come from a Java development background to Clojure. A couple of years ago our company migrated from Ant to Maven. At first I really really hated it. I found it difficult to make it do what I wanted it to do. Nowadays, though, it is my build tool of choice. The

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Rick Moynihan
On 5 March 2010 18:49, Stuart Halloway stuart.hallo...@gmail.com wrote: (2) Improve the project structure imposed by lein, if it is broken in some specific way. (Maybe add a well-known config file for adding elements to the classpath?) People have asked for this, but I have yet to hear a

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Brian Schlining
As I'm one of the people that's requested this feature... I'll add my reason too: (3) Managing proprietary libraries and API's that you are developing or using... Yes you can throw these into your own maven repo, but then you also need to manage, configure and secure a server (when

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Phil Hagelberg
On Fri, Mar 5, 2010 at 2:38 PM, Rick Moynihan rick.moyni...@gmail.com wrote: (1) getting ./config on the classpath so I can keep properties files, json config, whatever, separate from code and lib This is actually what the resources/ directory is for. (2) having more than one kind of tests,

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Phil Hagelberg
On Fri, Mar 5, 2010 at 3:56 PM, Brian Schlining bschlin...@gmail.com wrote: (3) Managing proprietary libraries and API's that you are developing or using...  Yes you can throw these into your own maven repo, but then you also need to manage, configure and secure a server (when working in a

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Stuart Halloway
Hi Jan, My 2c: Leiningen is an important step, but there is still plenty to do. My workflow: I am developing multiple Clojure libraries and applications, with some of the dependencies changing daily. Whenever I want to make a change, I: In the project being changed: git tag a new version

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Stuart Halloway
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. lein deps copies dependencies into the project's lib directory. Various other lein commands assume lib/*.jar is on the classpath, and if

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread mac
The .m2 folder is a Maven 2 convention. Leiningen uses Maven internally. .m2 contains your local repository - the single standard place where stuff gets downloaded to. When doing lein deps in a project folder any dependencies are downloaded to your local repo first (unless you already had the

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Stuart Sierra
On Mar 4, 8:52 am, Stuart Halloway stuart.hallo...@gmail.com wrote: My 2c: Leiningen is an important step, but there is still plenty to do. Oh yeah. Some needs I see: (0) More point releases of key libs (or some other solution to the   snapshots problem) Yes! (1) Unify around the project

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Konrad Hinsen
On 04.03.2010, at 14:33, Jan Rychter wrote: It seems that leiningen assumes that you are building an application. It downloads all dependencies and can build an uberjar for you. That's great, but what if what I have is a bunch of libraries, all being developed and modified? That's my

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Praki Prakash
Lein could be a step in the right direction, but I wonder how it will manage to evolve given the complex tools it uses internally. I have also seen a weird issue in my code base which has two classes derived from java.lang.Exception. If I do a clean and try compile, I get an error saying that

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Meikel Brandmeyer
Hi, On Thu, Mar 04, 2010 at 07:11:59AM -0800, Praki Prakash wrote: I have also seen a weird issue in my code base which has two classes derived from java.lang.Exception. If I do a clean and try compile, I get an error saying that my.package.MyException class not found. My workaround is, set

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread James Reeves
On 4 March 2010 10:19, Stuart Sierra the.stuart.sie...@gmail.com wrote: As many of you know, I've always been tepid on lein.  I'd rather go with Maven whole-hog, because that offers the most robust model for incorporating Java libraries. Out of interest, what scenarios does Maven account for

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread David Nolen
On Thu, Mar 4, 2010 at 10:59 AM, Konrad Hinsen konrad.hin...@fastmail.netwrote: Right, but its imperfections have bothered me often enough. For once, if you have different applications that require different versions of the same library, you are in for a major headache. Python setuptools and

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread David Nolen
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

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Konrad Hinsen
On 4 Mar 2010, at 19:38, David Nolen wrote: Imperfections meaning it's perfectly broken :) That's why tools like virtualenv exist for Python. I'd say it's New Jersey style: good enough for 90% of the users, but indeed fundamentally broken. Konrad. -- You received this message because

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Chris Perkins
On Mar 4, 8:33 am, Jan Rychter j...@rychter.com wrote: I haven't hacked on new Clojure stuff for the past two months or so. Now, having updated my repositories, I find that everybody just dropped ant and moved to leiningen. How do people deal with this? I don't have any good answers for you;

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Glen Stampoultzis
On 5 March 2010 04:39, Chris Perkins chrisperkin...@gmail.com wrote: The situation is worse on Windows, where I can't even get leiningen to work at all. Luckily I'm only working on one clojure project, so I just copy clojure.jar and clojure-contrib.jar into my project's lib directory, as

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Antony Blakey
On 05/03/2010, at 5:29 AM, David Nolen wrote: On Thu, Mar 4, 2010 at 10:19 AM, Stuart Sierra the.stuart.sie...@gmail.com wrote: As many of you know, I've always been tepid on lein. I'd rather go with Maven whole-hog, because that offers the most robust model for incorporating Java

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Brian Schlining
If Lein evolves to to handle dependencies of dependencies and intelligently generates the classpath based on these dependencies (instead of copying files around) what advantage does Maven really have? The tools (e.g. Archiva, Nexus et al), documentation, IDE support, integration with

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Felix Breuer
I am also on Windows and have struggled a good deal with Leiningen (I would like to avoid wrangling classpaths myself as far as possible). I finally got Leiningen to run, but some features like lein swank still elude me (though this is a problem of swank-clojure and not of Leiningen). I agree that

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Meikel Brandmeyer
Hi, On Mar 5, 1:03 am, Felix Breuer fe...@fbreuer.de wrote: I agree that Windows is a second class citizen as far as clojure tools go. Oh please stop that. I have a stable setup of Gradle + Clojuresque + VimClojure on Windows. Granted setting up VimClojure on Windows is tricky due to Vim and

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Martin DeMello
On Thu, Mar 4, 2010 at 7:03 PM, Jan Rychter j...@rychter.com wrote: 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

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Meikel Brandmeyer
Hi, On Mar 5, 7:47 am, Martin DeMello martindeme...@gmail.com wrote: One huge drawback I've found with clojure (which it doubtless inherited from Java) is that you need an actual jarfile in your classpath, not just the directory containing the jarfile. With newer Java versions you can

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Rob Wolfe
On 5 Mar, 01:03, Felix Breuer fe...@fbreuer.de wrote: I am also on Windows and have struggled a good deal with Leiningen (I [...] On 5 Mrz., 00:32, Glen Stampoultzis gst...@gmail.com wrote: On 5 March 2010 04:39, Chris Perkins chrisperkin...@gmail.com wrote: The situation is worse