On Mon, 28 Mar 2011 08:46:20 -0700 (PDT)
ultranewb <pineapple.l...@yahoo.com> wrote:
> On Mar 28, 1:15 pm, Mike Meyer <m...@mired.org> wrote:
> > Question: how did you find the library you were going to use?
> 
> By looking at the documentation for the system.  I guess I was mostly
> referring to libraries which come with the system.  I think your
> comments are more about using third party libraries or other libraries
> not included with the system.  But heck, at this juncture I'm just
> trying to use plain Clojure!  Just seems to me that I should be able
> to type some code in an editor within an IDE (not the REPL), push some
> button called "run" or "compile and run" or "build and run" or
> whatever, and get it to run.  But nope.  None of those major projects
> I tried (NetBeans, IntelliJ, etc) will do this, or at least I couldn't
> get them to do it.

Yup, you're right  - that was sort of my point. I think I got the
level you asked for with emacs by installing all the "clojure" ports
in the FreeBSD ports tree (I wouldn't normally mention those, but
you're familiar with them). 

The reason I'm not sure that I had that level is that you're asking
for a less than best-practice solution when using a language with a
repl. The first step after writing the code isn't to run the program,
it's to try loading it in the repl. Once that works without errors,
switch to the repl and start running the function(s) you just wrote
with a variety of arguments to test them. So I don't want "run file",
I want "load region" and "load defn". When I want to test the entire
program, I tend to switch to a shell and run it in a new instance of
the JVM, just to make sure the results aren't tainted by cruft left in
the JVM during the development process.

> About libraries not included with the main system, one poster here
> spoke of how Racket does things.  I use another programming language
> which does a similar thing.  It has a "package manager" (called
> pacman) built right into the IDE.  I haven't had a need to use it much
> (the default language comes with a ton of stuff already working) but
> apparently this pacman thing goes out onto the internet, downloads the
> package you select, installs it in the right location, then does all
> the "dependency garbage" for you.

Many modern languages have such package managers. Being an emacs
person, I don't look for them to be integrated into the IDE. Clojure
is a long way from that: I don't know of any tools that will fetch
requirements for a library when they fetch the library, or a way to
search the standard library repositories other than using a web
browser.

Consider this a features request for cake/leiningen:
1) A task to search clojars.
2) A task take a name from #1 and add the appropriate data to project.clj.
3) Extend the "deps" task to install libraries required by any dependency.

> Reminds me, btw, of installing ports on FreeBSD.  There's an automated
> thing I've used many times that just goes out, grabs what you need,
> and installs it.  I'm not saying it's the same thing as what we are
> talking about here (maybe it is, maybe it isn't), but it sort of
> reminds me of it, anyway.

As far as I can tell, that's the original dependency-handling package
manager. I think SGI may have had a proprietary one earlier, but it
predates the other open source package managers, and most proprietary
ones required you to install other required packages by hand.

And yeah, that's pretty much what we're talking about, tweaked to deal
with project-level things instead of system-level things.

         <mike
-- 
Mike Meyer <m...@mired.org>             http://www.mired.org/consulting.html
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

-- 
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

Reply via email to