This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-22
Channels
- # admin-announcements (25)
- # beginners (60)
- # boot (277)
- # cider (5)
- # cljs-dev (3)
- # cljsrn (2)
- # clojure (82)
- # clojure-art (15)
- # clojure-berlin (2)
- # clojure-boston (1)
- # clojure-italy (40)
- # clojure-russia (118)
- # clojurebridge (1)
- # clojurecup (1)
- # clojurescript (82)
- # component (3)
- # cursive (31)
- # datavis (9)
- # datomic (39)
- # editors (1)
- # editors-rus (9)
- # emacs (15)
- # hoplon (50)
- # ldnclj (2)
- # leiningen (4)
- # off-topic (9)
- # om (123)
- # re-frame (28)
- # reagent (7)
- # vim (1)
- # yada (3)
Could anyone recommend a good test library in Clojure? expectations-mode seems not suitable for emacs.
@lambeta: I like the combination of clojure.test for examples and test.check for generative testing. Both should work with ciders test runner for clojure.test.
any good resource on how to expose a clojure library to java while providing an idiomatic interface?
@danstone: I agree with @lambeta moreover if you need to cross the border between CLJ and CLJS, cljs.test
is very good as well and you can share the same tests between the server and client sides as well
@spacepluk: If you want idiomatic Java, including types and JavaDoc, the best way is to write interfaces or stub classes in Java and implement them in Clojure.
@stuartsierra thanks, I'll do that
but I have a problem (http://stackoverflow.com/questions/34401358/error-formating-date-in-clojurescript) that points that my project is using 0.3.0
in ~/.m2/repository/com/andrewmcveigh/cljs-time I have 2 folders, 0.3.0 and 0.3.14 if I delete 0.3.0 and try to run the project again i get: Retrieving com/andrewmcveigh/cljs-time/0.3.0/cljs-time-0.3.0.pom from clojars
is there a way to compile clojure files with arbitrary filename extensions?
(motivation is to have a different extension for files that are compiling to css using garden)
(def m {:a :foobar :a :c})
- does anyone know why this returns "Unmatched delimiter: )" rather than something like "duplicate key"? It's obviously wrong, but curious what happens here behind the scenes.
user=> (def m {:a :foobar :a :c}) IllegalArgumentException Duplicate key: :a clojure.lang.PersistentArrayMap.createWithCheck (PersistentArrayMap.java:70) RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:221)
when the reader fails mid-expression, it doesn't try reading until the end of the expression (there might be no end!)
hmm, I'm trying to call java functions from clojure in a mixed project and I'm getting CompilerException java.lang.RuntimeException: Unable to find static field
the classes are there though, and I even get autocompletion in the repl, any idea?
@spacepluk: Are you trying to refer to a Java function as if it were a Clojure function? For example, you would get that error if you did this:
(map Integer/parseInt ["1" "2" "3"])
But this will work:
(map #(Integer/parseInt %) ["1" "2" "3"])
@solicode: I'm just trying to call a static function without parameters (after importing) something like (Test/test)
@spacepluk: that usually means you got the arity wrong
Hey all…I’m getting a strange error any time I include the “cheshire” library (either explicitly or through an indirect inclusion). Anybody seen this / know what to do? https://www.refheap.com/3c9dec3860f34758c0b945934
For the lazy: java.lang.IllegalAccessError: tag does not exist, compiling:(cheshire/generate_seq.clj:1:1)
Looks like a version conflict in some library that Cheshire depends on.
Or maybe somehow you have 2 different versions of Cheshire on the classpath.
According to lein deps :tree
I only have 1 Cheshire and one of each of its dependencies
Also check for stale AOT-compiled files.
Too bad I never remember. Surprisingly, that didn’t actually help. But I’ll exclude it for now and go on merrily pretending that there’s no problem!
Is there an article about why people love Clojure? I'm still trying to make Clojure "click" in my mind. I like it, but I don't have a reason to love it yet.
@freyert: When I talk to people about this, Rich Hickey's "Simple Made Easy" talk seems to come up a lot: http://www.infoq.com/presentations/Simple-Made-Easy
...but I'm sure there are more concise articles/blog posts out there
@lvh (cond-> x (pred? x) f)
but that's not much clearer in my opinion
@alexmiller: Any idea when the state of Clojure results are coming out?
@cfleming people are working on it but not sure due to holidays
@alexmiller: Ok, no problem, just curious.
I'm using Stuart Sierra's reloaded workflow and it's working well except when I introduce a test file in the spec
directory. I get an error like Could not locate spec__init.class
.
Is there a way to make clojure.tools.namespace.repl/refresh
ignore my spec
directory?
is there a way to get clojure.walk/prewalk to not descend into maps? I’m trying to do something to all of the vecs in a tree structure, but it’s iterating over map pairs apparently 😕
@currentoor: you can disable certain namespaces from reloading by (disable-reload!)
: https://github.com/clojure/tools.namespace#disabling-refresh-in-a-namespace , or you can specify directories where tools.namespace will look with (set-refresh-dirs)
: https://github.com/clojure/tools.namespace/blob/be75a292c7df3bdb0e0fcdf010dd3ed42537c6c6/src/main/clojure/clojure/tools/namespace/repl.clj#L164
I don't think there is anything like (refresh-everything-but-these-dirs)
, but @stuartsierra will know for sure
@tolitius: I'll look into that, thanks!
By the way setting my src
and dev
directories with set-refresh-dirs
worked. Thanks again!