Here are some more: (which I'm getting from my old gist from here https://gist.github.com/3895312 after I recheck those and tell you only the ones relevant to this subject)
1. This one has to do with namespace expected format for :import https://groups.google.com/d/msg/clojure/JCwpbqbrHUE/m1Fx13Ye6JkJ that still persists with clojure {:major 1, :minor 5, :incremental 0, :qualifier "RC2"} and lein 2. What I didn't state there was that the project.clj needs one or both of the following lines: :main dood.core :aot :all else lein compile won't compile those and they only trigger on lein run (if :main is present) or lein repl that is to have the top-level forms executed (thanks xeqi) In addition to that, if you use this line instead: (:import '(nl.bitwalker.useragentutils.UserAgent)) you get this error: c:\1\dood>lein compile Compiling dood.core Exception in thread "main" java.lang.ClassNotFoundException: quote.(nl.bitwalker .useragentutils.UserAgent), compiling:(core.clj:1) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3387) at clojure.lang.Compiler.compile1(Compiler.java:7035) at clojure.lang.Compiler.compile1(Compiler.java:7025) at clojure.lang.Compiler.compile(Compiler.java:7097) at clojure.lang.RT.compile(RT.java:387) at clojure.lang.RT.load(RT.java:427) at clojure.lang.RT.load(RT.java:400) at clojure.core$load$fn__4890.invoke(core.clj:5415) at clojure.core$load.doInvoke(core.clj:5414) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5227) at clojure.core$compile$fn__4895.invoke(core.clj:5426) at clojure.core$compile.invoke(core.clj:5425) at user$eval7.invoke(NO_SOURCE_FILE:1) at clojure.lang.Compiler.eval(Compiler.java:6511) at clojure.lang.Compiler.eval(Compiler.java:6501) at clojure.lang.Compiler.eval(Compiler.java:6477) at clojure.core$eval.invoke(core.clj:2797) at clojure.main$eval_opt.invoke(main.clj:297) at clojure.main$initialize.invoke(main.clj:316) at clojure.main$null_opt.invoke(main.clj:349) at clojure.main$main.doInvoke(main.clj:427) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Caused by: java.lang.ClassNotFoundException: quote.(nl.bitwalker.useragentutils. UserAgent) at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at dood.core$loading__4784__auto__.invoke(core.clj:1) at clojure.lang.AFn.applyToHelper(AFn.java:159) at clojure.lang.AFn.applyTo(AFn.java:151) at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3382) ... 26 more Compilation failed: Subprocess failed Which is actually much closer to the real error you want to see, when compared to the other two errors. Because it's telling me that's expecting a class in the place of that '(...) form ie. not a list/vector. ----------------------------------- 2. " dorun clojure.core Argument Lists: [coll] [n coll] Documentation: When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil. " ,(dorun (map println '(1)) nil) ; no error on this one nil ;the following are ok: ,(dorun (map println '(1))) 1 ,(dorun 12 (map println '(1 2 3))) 1 2 3 => ,(dorun 1 (map println '(1 2 3))) 1 2 nil => ,(dorun 0 (map println '(1 2 3))) 1 nil ----------------------------------- 3. ,(quote 1 2 3) 1 Ignores 2 3, without any notifications. same thing with "var" instead of "quote" => ,(var defn for 3) #'clojure.core/defn ----------------------------------- 4. files that have UTF BOM at the beginning yield the following error c:\1\dood>lein compile Compiling dood.core Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: ? in this context, compiling:(dood/core.clj:1) at clojure.lang.Compiler.analyze(Compiler.java:6281) at clojure.lang.Compiler.analyze(Compiler.java:6223) at clojure.lang.Compiler.compile1(Compiler.java:7030) at clojure.lang.Compiler.compile(Compiler.java:7097) at clojure.lang.RT.compile(RT.java:387) at clojure.lang.RT.load(RT.java:427) at clojure.lang.RT.load(RT.java:400) at clojure.core$load$fn__4890.invoke(core.clj:5415) at clojure.core$load.doInvoke(core.clj:5414) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.core$load_one.invoke(core.clj:5227) at clojure.core$compile$fn__4895.invoke(core.clj:5426) at clojure.core$compile.invoke(core.clj:5425) at user$eval7.invoke(NO_SOURCE_FILE:1) at clojure.lang.Compiler.eval(Compiler.java:6511) at clojure.lang.Compiler.eval(Compiler.java:6501) at clojure.lang.Compiler.eval(Compiler.java:6477) at clojure.core$eval.invoke(core.clj:2797) at clojure.main$eval_opt.invoke(main.clj:297) at clojure.main$initialize.invoke(main.clj:316) at clojure.main$null_opt.invoke(main.clj:349) at clojure.main$main.doInvoke(main.clj:427) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.AFn.applyToHelper(AFn.java:163) at clojure.lang.Var.applyTo(Var.java:532) at clojure.main.main(main.java:37) Caused by: java.lang.RuntimeException: Unable to resolve symbol: ? in this conte xt at clojure.lang.Util.runtimeException(Util.java:170) at clojure.lang.Compiler.resolveIn(Compiler.java:6766) at clojure.lang.Compiler.resolve(Compiler.java:6710) at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6671) at clojure.lang.Compiler.analyze(Compiler.java:6244) ... 26 more Compilation failed: Subprocess failed sample here: https://github.com/quil/quil/commit/d0312f0f119db066a8d613dec8803571b92bea39 ------------------ That's all I got for now, other stuff from my aforementioned gist do not apply to this subject, although I believe it's idiomatic clojure coding which leads to such cryptic error messages and hard to track down bugs ie. when not passing the right form/parameters. I think it's idiomatic clojure coding to not check for all possible variants that could happen (but keep in mind that I haven't coded anything in clojure and i'm a noob). But having more checks is probably not much fun to code and some people don't like to add code to protect the user(dev) from itself not to mention this would incur some kind of performance penalty also. On Thu, Jan 24, 2013 at 8:27 PM, Michael Klishin < michael.s.klis...@gmail.com> wrote: > There is a discussion about Clojure error messages and how > specifically they can be improved on clojure-dev: > https://groups.google.com/forum/?fromgroups=#!topic/clojure-dev/9zjXebUMgzk > > Because poor error messages primarily trip newcomers to the language, > I am a bit surprised to see this issue discussed on the closed > mailing list said beginners cannot join [quickly or at all]. > > So, if you have something specific to say on the topic, say it here. > -- > MK > > http://github.com/michaelklishin > http://twitter.com/michaelklishin > > -- > -- > 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 > > > -- I may be wrong or incomplete. Please express any corrections / additions, they are encouraged and appreciated. At least one entity is bound to be transformed if you do ;) -- -- 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