Speaking for myself only, I wasn't coming from Ruby either, and these classpath issues just don't exist at all in the main languages in which I've done serious work. (Let's see... Fortran, APL, Pascal, C, Franz Lisp, Interlisp-D, Zeta Lisp, Common Lisp, Scheme, Breve/Steve... but only dabbled occasionally in Java, mostly via Processing that hides this.) In all of these environments, or at least the way I used them, there were some preset places where resources would be found, and anything else that I wanted it to find I would specify with a path string (ideally relative to the working directory). I know there are good reasons for doing things differently, but the Clojure/Java way wasn't obvious to me. At first I had some trouble even getting my code to find contrib, and more recently I had to figure out about.dotted.names and their meaning with respect to directory structures, in order to get require to find a second clj file. It's not complicated, but it's also not obvious to everyone first coming to Clojure.
-Lee In C or Common Lisp (or (fortran, pascal, assembly, common lisp, scheme, On Jun 28, 2010, at 5:41 PM, cageface wrote: > On Jun 28, 12:16 pm, Martin DeMello <martindeme...@gmail.com> wrote: >> It depends. I found the concepts pretty easy, since I have done a lot >> of functional programming, but when I was new to clojure I had a truly >> horrible time figuring out the various classpath issues needed to get >> things working. > > What is it about the classpath in particular that people find > difficult? Is it that different from things like PYTHONPATH or > RUBYLIB? The main differences I can see are: > > 1. you don't have to worry about PYTHONPATH for a while with a > standard install, although the day will come > 2. you have to understand the difference between class files and jars > (PATH vs PATH/*) > > One thing I've done to make this easier is to create a clj script > that, like Python and Ruby, adds the current directory to the > classpath so you can just drop a .jar or .class file into a directory > alongside your .clj script and it will find it. > > In some ways I actually find java .jar files easier to deal with than, > say, Ruby libs. With ruby libs (outside of a package manager) I have > to understand how to configure and build and install the library. With > a .jar file I just drop it in my ~/jars directory and I'm done. > > -- > 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 -- Lee Spector, Professor of Computer Science School of Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http://hampshire.edu/lspector/ Phone: 413-559-5352, Fax: 413-559-5438 Check out Genetic Programming and Evolvable Machines: http://www.springer.com/10710 - http://gpemjournal.blogspot.com/ -- 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