We use a "HOME" reference in our
quite complex software and I think
we do not qualify as n00bs...

Any root symbol that can help derive
locations is just common sense to
us. It's not used internaly in our code
(Clojure/Java/Ruby)
but it's obviously a simple way
to bootstrap our apps and establish
a common ground in the supporting
scripts we use.

It helps structuring the file space were
all our components reside in dev test
and prod.

Honestly, by the time this thread ends
on that simple and obvious matter,
Clojure 1.5 will be released...


Luc P.

Sent from my iPod

On 2010-06-30, at 17:48, Greg <g...@kinostudios.com> wrote:

However, I don't see it helping newcomers to Clojure significantly

With respect, I'm a newcomer to Clojure, and the CLOJURE_HOME convention would help me significantly. :-)

I think something that needs to be acknowledged is that "newcomers" and "n00bs" are not necessarily idiots, they're just new to the platform, and they're coming from places where, as Brian pointed, they're used to there being a central location for things (PYTHON_HOME, ANT_HOME, etc.).

Lieningen or maven don't really fit with this approach as they treat
the clojure platform as just another library dependency.

Yet Maven has a MAVEN_HOME. :-)

Even if Leiningen/Maven ignore CLOJURE_HOME, that's fine, it certainly doesn't hurt to adopt CLOJURE_HOME as a convention for scripts that currently hard-code clojure.jar's location, or download it themselves, wasting space and adding confusion. When that happens it's hard to know what version of Clojure these scripts are running, and it makes it unwieldy then to interface it with your own code. A problem, I think, that doesn't just affect newcomers to Clojure.

and I'm not sure this is something we should really try and hide.

CLOJURE_HOME doesn't hide anything, it's set by the user after all.

Cheers,
Greg

On Jun 30, 2010, at 5:17 PM, Rick Moynihan wrote:

On 30 June 2010 21:14, Brian Schlining <bschlin...@gmail.com> wrote:


May I propose as a possible remedy CLOJURE_HOME. CLOJURE_HOME is the
absolute path of a directory containing clojure.jar and possibly
clojure-contrib.jar. Scripts should check if it's defined and use it instead of hard-coded paths, as an example, here's my clj script (in newLISP):

On the face of it this seems like a good idea, however it doesn't
really fit with the models used by tools such as leiningen, mvn or the JVM. At best a CLOJURE_HOME initiative can only expect to work within
its own world of clj scripts etc.

I can't speak for leiningen but many (most?) launcher script in the Java world use this as a standard convention. If you look through the launcher
scripts for maven, groovy, scala, ant, etc you will see environment
variables JAVA_HOME, M2_HOME (for Maven 2), GROOVY_HOME, SCALA_HOME and
ANT_HOME.

This is true.  And I agree that where scripts are used this technique
can be useful.  And in this regard it's a good convention.

However, I don't see it helping newcomers to Clojure significantly, as
the classpath issues people face are the deeper issue.  Also teaching
newcomers that this is the convention isn't really true, as tools like
Lieningen or maven don't really fit with this approach as they treat
the clojure platform as just another library dependency.

Clojure doesn't yet have a standard launch script.  In the past I've
argued that it'd be nice if it had one, though I now feel lein/mvn are
better tools for this job.  That said, having a clj launch script can
be useful, and might ease the out of box experience, but again the
true launcher will always be the java JVM executable, and I'm not sure
this is something we should really try and hide.

R.

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

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

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