I got some problem with swank. The idea is i want to setup an swank-server so i can connect to my project in emacs (to the running, build application)
But i already get a problem with the use swank (full source at http://github.com/TobiasRaeder/iCipher/blob/master/src/iCipher.clj) (ns iCipher (:gen-class :extends robocode.Robot) (:use '(swank.swank))) (defn start-remote-repl [] "Starts a repl on the server so we can connect to it via emacs" (start-server ".slime-socket" :port 4005 :encoding "utf-8")) if i try to compile this using ant build (source at http://github.com/TobiasRaeder/iCipher/blob/master/build.xml) I get this neat stacktrace java.lang.Exception: Unable to resolve symbol: start-server in this context (iCipher.clj:8) at clojure.lang.Compiler.analyze(Compiler.java:4340) at clojure.lang.Compiler.analyze(Compiler.java:4286) at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:2767) at clojure.lang.Compiler.analyzeSeq(Compiler.java:4498) at clojure.lang.Compiler.analyze(Compiler.java:4325) at clojure.lang.Compiler.analyze(Compiler.java:4286) + alot more it might be that I'm doing something horribly wrong but i dont know what so any help is really appreciated. If i use (ns iCipher (:gen-class :extends robocode.Robot)) (use '[swank.swank]) it compiles but i couldn't find any documentation on (use '[ ]) so an explanation why a doesn't work and what exactly b does. To derive this post a bit already, with the (use '[]) it compiles and robocode starts (remember to run it with -DNOSECURITY=true and to include clojure.jar and swank-clojure.jar in the classpath of robocode if you wanna try) When i launch a game with iCipher in it i get this exception and the robot dies. Somehow i can't find the problem for this exception. If anyone could help out aswell i'd be really gratefull. Caused by: java.lang.IllegalStateException: -main already refers to: #'awesome.iCipher/-main in namespace: awesome.iCipher at clojure.lang.Namespace.reference(Namespace.java:86) at clojure.lang.Namespace.refer(Namespace.java:114) at clojure.core$refer__4407.doInvoke(core.clj:2863) at clojure.lang.RestFn.invoke(RestFn.java:411) at clojure.lang.AFn.applyToHelper(AFn.java:165) at clojure.lang.RestFn.applyTo(RestFn.java:133) at clojure.core$apply__3588.invoke(core.clj:480) at clojure.core$load_lib__4992.doInvoke(core.clj:4198) at clojure.lang.RestFn.applyTo(RestFn.java:143) at clojure.core$apply__3588.invoke(core.clj:480) at clojure.core$load_libs__5008.doInvoke(core.clj:4209) at clojure.lang.RestFn.applyTo(RestFn.java:138) at clojure.core$apply__3588.invoke(core.clj:482) at clojure.core$use__5032.doInvoke(core.clj:4287) at clojure.lang.RestFn.invoke(RestFn.java:409) at awesome.iCipher__init.load(Unknown Source) at awesome.iCipher__init.<clinit>(Unknown Source) ... 20 more Best regards, Tobias Raeder -- 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