#clojure logs

2008-04-18

09:00bstephensonNewbie-ish question: I have written a cloure module that runs from the command line: java -cp clojure.jar clojure.lang.Repl MyCoolCode.clj -- C:\Interesting\Directory . The code works and does console output as required, however, at the end I stay in the Repl, and must hit Control C to get back to the command line. Is there a preferred way in clojure to exit the entire program and get back to the command prompt.
09:01rhickeyuse clojure.lang.Script instead of clojure.lang.Repl
09:42bstephensonhad to reboot for a rare (!) Apple software update. Thx for the answer on command-lines. Much help
10:49cgrandIf I need to locally bind a multimethod (eg a with-method macro) am I doing something wrong? (given there's no support in boot.clj for this, I'm doubting)
12:04rhickeycgrand: hard to say universally, but you'll have to anticipate that by defining your method in terms of an ordinary function, which you can then dynamically rebind
14:03ChouserThe exception question in the group is interesting. I can get the class of a proxy, but I can't use it in a catch clause.
14:05ChouserAnd even if I were to create a macro that produced try/catch clauses with the proxy's classname inserted, Clojure doesn't seem to be able to resolve that class name.
14:05rhickeyall proxies of the same list of classes/interfaces are of the same class
14:07ChouserBut I have to provide an actual class name for (catch Foo), right? I can't do (catch (class foo) ...)
14:10rhickey(get-proxy-class Exception)
14:10rhickeyclojure.lang.Proxy__14485
14:10rhickeybut the classloader hierarchy won't let you find it
14:10rhickeyuser=> clojure.lang.Proxy__14485
14:10rhickeyjava.lang.ClassNotFoundException: clojure.lang.Proxy__14485