#clojure logs

2008-08-21

19:02ppjtHi all
19:02ppjtQuick question about user.clj & the classpath
19:04ppjtIn 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:09drewrppjt: What's in it?
19:10ppjtFunction defs, a macro def
19:10ppjtIn the user ns
19:10drewrPut (throw (Exception. "user.clj!")) in there and see if it gets triggered when you start the JVM.
19:12drewrYou could also do (.getProperty System "java.class.path") from the REPL to see if the classpath is what you think it is.
19:13ppjtdrewr: on the latter, user.clj is in the same dir as the Clojure jar, but I'll check
19:13drewrThe dir that clojure.jar is in is not necessarily in the classpath.
19:14drewrThat just proves that .../path/to/clojure.jar is in the classpath.
19:14ppjtYou're right, but mine is -- I invoke clojure like `java clojure.lang.Repl`
19:15ppjtJust threw the exception -- didn't take; thanks for the suggestion, though
19:16drewrIf the exception got thrown, then user.clj is being read.
19:16drewrYour code in the file isn't doing what you think is perhaps.
19:16drewrs/think is/think it is/
19:16ppjtRight, it didn't get thrown is what I meant
19:16drewrOh.
19:17drewrSo does java.class.path contain the directory that user.clj is in?
19:19ppjtFunny, when I grab the classpath property from System, I only get the current dir (".")
19:20drewrNow grab user.dir and make sure it's right.
19:26ppjtdrewr: Gotta run; thanks
19:58ericthoris there a way to type hint java arrays for variadic functions?
20:29ericthorif (+ 1) returns 1 and (merge {}) returns {} should not (union #{}) return #{} and not throw an error? Any thoughts?
22:52Chousersounds good to me. :-)