#clojure logs

2008-02-17

00:20jh06omg
00:21jh06I am having the hardest time with the Java classpath
00:21jh06I have three jars in a single folder
00:21jh06and I've set my CLASSPATH=jar1:jar2:jar3; but Java continues to give me errors when I try to invoke one of the classes from the jars
00:25jh06ha
00:25jh06after having problems for an hours, the first time I complain about it on IRC I get it to work...
21:47ericthor_what do you think is a good strategy for dealing with invariants for function arguments when you want to provide meanful error messages (clojure idiomatic of course)
21:47ericthor_consider:
21:47ericthor_ (defn go-left
21:47ericthor_ [{item :item {left :left up :up right :right :as path } :path}]
21:47ericthor_ (cond (= top path) "error - left of top called"
21:47ericthor_ (nil? left) "error - left of first"
21:47ericthor_ :else (struct loc left (struct node left up (:right item)))))
21:48ericthor_here I'm destructuring the arguments (amazing by the way) and i have a couple of conditions to check for where I want to fail...i guess throw an exception