#clojure log - Aug 21 2008

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

19:02 ppjt: Hi all

19:02 Quick question about user.clj & the classpath

19:04 In short, when the docs say that Clojure will load a file named "user.clj" that's on the classpath, "classpath" just means the Java classpath, correct? I ask because I have a user.clj on my classpath & it doesn't seem to be picked up

19:09 drewr: ppjt: What's in it?

19:10 ppjt: Function defs, a macro def

19:10 In the user ns

19:10 drewr: Put (throw (Exception. "user.clj!")) in there and see if it gets triggered when you start the JVM.

19:12 You could also do (.getProperty System "java.class.path") from the REPL to see if the classpath is what you think it is.

19:12 * ppjt goes to try...

19:13 ppjt: drewr: on the latter, user.clj is in the same dir as the Clojure jar, but I'll check

19:13 drewr: The dir that clojure.jar is in is not necessarily in the classpath.

19:14 That just proves that .../path/to/clojure.jar is in the classpath.

19:14 ppjt: You're right, but mine is -- I invoke clojure like `java clojure.lang.Repl`

19:15 Just threw the exception -- didn't take; thanks for the suggestion, though

19:16 drewr: If the exception got thrown, then user.clj is being read.

19:16 Your code in the file isn't doing what you think is perhaps.

19:16 s/think is/think it is/

19:16 ppjt: Right, it didn't get thrown is what I meant

19:16 drewr: Oh.

19:17 So does java.class.path contain the directory that user.clj is in?

19:19 ppjt: Funny, when I grab the classpath property from System, I only get the current dir (".")

19:20 drewr: Now grab user.dir and make sure it's right.

19:26 ppjt: drewr: Gotta run; thanks

19:58 ericthor: is there a way to type hint java arrays for variadic functions?

20:29 if (+ 1) returns 1 and (merge {}) returns {} should not (union #{}) return #{} and not throw an error? Any thoughts?

22:52 Chouser: sounds good to me. :-)

Logging service provided by n01se.net