Hi all, I'm new to clojure and I've just been trying to get the ants demo from the video lectures to work. I presume I've done something wrong because I get a screen full of errors when I load in the ants.clj file (pasted below). I tried copying and pasting the code in bit by bit (if I paste too much in one go I get errors), and the errors come from the definition of setup (lines 58 to 70). I also get errors from the definition of panel (lines 283 to 287) which I've also pasted below. Can anyone tell me what I've done wrong? I got clojure from the sourceforge .zip file download, and I installed the Java 6 update 10 JDK from the link on the 'getting started' page, and I'm running it from a cmd prompt on windows XP SP2.
Thanks Rob. ================================================================= D:\Downloads\clojure\clojure_20080916>java -cp clojure.jar clojure.lang.Repl Clojure user=> (load-file "../ants.clj") java.lang.IllegalArgumentException: recur arg for primitive local: G__2315 must be matching primitive clojure.lang.Compiler$CompilerException: ants.clj:61: java.lang.IllegalArgumentE xception: recur arg for primitive local: G__2315 must be matching primitive at clojure.lang.Compiler.analyzeSeq(Compiler.java:3865) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3848) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.analyze(Compiler.java:3671) at clojure.lang.Compiler.access$100(Compiler.java:37) at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java: 734) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3858) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3848) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.analyze(Compiler.java:3671) at clojure.lang.Compiler.access$100(Compiler.java:37) at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java: 3384) at clojure.lang.Compiler$FnMethod.parse(Compiler.java:3231) at clojure.lang.Compiler$FnMethod.access$1200(Compiler.java: 3142) at clojure.lang.Compiler$FnExpr.parse(Compiler.java:2766) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3856) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3848) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.access$200(Compiler.java:37) at clojure.lang.Compiler$DefExpr$Parser.parse(Compiler.java: 343) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3858) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3848) at clojure.lang.Compiler.analyze(Compiler.java:3698) at clojure.lang.Compiler.analyze(Compiler.java:3671) at clojure.lang.Compiler.eval(Compiler.java:3895) at clojure.lang.Compiler.load(Compiler.java:4196) at clojure.lang.Compiler.loadFile(Compiler.java:4163) at clojure.lang.RT$3.invoke(RT.java:289) at user.eval__2290.invoke(Unknown Source) at clojure.lang.Compiler.eval(Compiler.java:3891) at clojure.lang.Repl.main(Repl.java:75) Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: recur arg for primitive local: G__2315 must be matching primitive at clojure.lang.Compiler$RecurExpr.emit(Compiler.java:3598) at clojure.lang.Compiler$BodyExpr.emit(Compiler.java:3414) at clojure.lang.Compiler$IfExpr.emit(Compiler.java:2264) at clojure.lang.Compiler$BodyExpr.emit(Compiler.java:3414) at clojure.lang.Compiler$LetExpr.emit(Compiler.java:3542) at clojure.lang.Compiler$BodyExpr.emit(Compiler.java:3414) at clojure.lang.Compiler$LetExpr.emit(Compiler.java:3534) at clojure.lang.Compiler$BodyExpr.emit(Compiler.java:3414) at clojure.lang.Compiler$LetExpr.emit(Compiler.java:3542) at clojure.lang.Compiler$BodyExpr.emit(Compiler.java:3414) at clojure.lang.Compiler$LetExpr.emit(Compiler.java:3542) at clojure.lang.Compiler$BodyExpr.emit(Compiler.java:3411) at clojure.lang.Compiler$FnMethod.emit(Compiler.java:3255) at clojure.lang.Compiler$FnExpr.compile(Compiler.java:3013) at clojure.lang.Compiler$FnExpr.parse(Compiler.java:2807) at clojure.lang.Compiler.analyzeSeq(Compiler.java:3856) ... 34 more Caused by: java.lang.IllegalArgumentException: recur arg for primitive local: G_ _2315 must be matching primitive at clojure.lang.Compiler$RecurExpr.emit(Compiler.java:3593) ... 49 more user=> ========================================================== user=> (def panel (doto (proxy [JPanel] [] (paint [g] (render g))) (.setPreferredSize (new Dimension (* scale dim) (* scale dim))))) java.lang.IllegalArgumentException: No matching method found: .setPreferredSize java.lang.IllegalArgumentException: No matching method found: .setPreferredSize at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java: 44) at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java: 28) at user.fn__2524.invoke(Unknown Source) at clojure.lang.AFn.applyToHelper(AFn.java:182) at clojure.lang.AFn.applyTo(AFn.java:175) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:2589) at clojure.lang.Compiler$DefExpr.eval(Compiler.java:282) at clojure.lang.Compiler.eval(Compiler.java:3896) at clojure.lang.Repl.main(Repl.java:75) --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---