cosmin / IClojure

A better Interactive REPL for Clojure
http://www.iclojure.com
Eclipse Public License 1.0
115 stars 11 forks source link

(map vec :keyword) crashes iclojure #20

Closed lxmonk closed 11 years ago

lxmonk commented 12 years ago

[user@host]$ iclojure log4j:WARN No appenders could be found for logger (com.offbytwo.class_finder.ClassFinder). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Clojure 1.4.0

IClojure 1.1.1-SNAPSHOT -- an enhanced Interactive Clojure ? -> Introduction and overview of IClojure's features ?symbol -> Print documentation for symbol ??symbol -> Show source of function or macro %d symbol -> Describe Java class (show constructors, methods and fields) %f class -> find all classes matching this name (supports globs) %f class package -> like the above, but restrict search to the given package

user[1]: (map vec :a) Exception in thread "main" java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword at clojure.lang.RT.seqFrom(RT.java:494) at clojure.lang.RT.seq(RT.java:475) at clojure.core$seq.invoke(core.clj:133) at clojure.core$map$fn465.invoke(core.clj:2426) at clojure.lang.LazySeq.sval(LazySeq.java:42) at clojure.lang.LazySeq.seq(LazySeq.java:60) at clojure.lang.RT.seq(RT.java:473) at clojure.core$seq.invoke(core.clj:133) at clojure.core$print_sequential.invoke(core_print.clj:46) at clojure.core$eval1962$fn1963.invoke(core_print.clj:140) at clojure.lang.MultiFn.invoke(MultiFn.java:167) at clojure.core$pr_on.invoke(core.clj:3266) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.RT.print(RT.java:1717) at clojure.lang.RT.printString(RT.java:1696) at com.offbytwo.iclojure.repl.IClojureRepl.print(IClojureRepl.java:134) at com.offbytwo.iclojure.repl.IClojureRepl.loop(IClojureRepl.java:154) at com.offbytwo.iclojure.Main.main(Main.java:63)

[user@host]$  # we're back at the shell, since Iclojure exited unexpectedly. the repl does:

user=> (map vec :a) IllegalArgumentException Don't know how to create ISeq from: clojure.lang.Keyword clojure.lang.RT.seqFrom (RT.java:494)

user=> ;; we're still inside the REPL..

lxmonk commented 12 years ago

some more experimenting, hint that this might be map-related (the function map):

user[9]: (seq :k)

java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword RT.java:494 clojure.lang.RT.seqFrom RT.java:475 clojure.lang.RT.seq core.clj:133 clojure.core/seq (Unknown Source) user/eval5574 Compiler.java:6511 clojure.lang.Compiler.eval Compiler.java:6477 clojure.lang.Compiler.eval IClojureRepl.java:117 com.offbytwo.iclojure.repl.IClojureRepl.eval IClojureRepl.java:152 com.offbytwo.iclojure.repl.IClojureRepl.loop Main.java:63 com.offbytwo.iclojure.Main.main

IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword ;; still inside the repl

user[10]: (map seq :k) Exception in thread "main" java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword at clojure.lang.RT.seqFrom(RT.java:494) at clojure.lang.RT.seq(RT.java:475) at clojure.core$seq.invoke(core.clj:133) at clojure.core$map$fn465.invoke(core.clj:2426) at clojure.lang.LazySeq.sval(LazySeq.java:42) at clojure.lang.LazySeq.seq(LazySeq.java:60) at clojure.lang.RT.seq(RT.java:473) at clojure.core$seq.invoke(core.clj:133) at clojure.core$print_sequential.invoke(core_print.clj:46) at clojure.core$eval1962$fn1963.invoke(core_print.clj:140) at clojure.lang.MultiFn.invoke(MultiFn.java:167) at clojure.core$pr_on.invoke(core.clj:3266) at clojure.lang.Var.invoke(Var.java:419) at clojure.lang.RT.print(RT.java:1717) at clojure.lang.RT.printString(RT.java:1696) at com.offbytwo.iclojure.repl.IClojureRepl.print(IClojureRepl.java:134) at com.offbytwo.iclojure.repl.IClojureRepl.loop(IClojureRepl.java:154) at com.offbytwo.iclojure.Main.main(Main.java:63)

user@host $ # back to the shell