This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-09
Channels
- # admin-announcements (1)
- # boot (225)
- # braid-chat (1)
- # cider (25)
- # cljs-dev (35)
- # cljsrn (1)
- # clojars (6)
- # clojure (81)
- # clojure-berlin (1)
- # clojure-dev (21)
- # clojure-france (2)
- # clojure-japan (6)
- # clojure-poland (1)
- # clojure-russia (10)
- # clojure-uk (3)
- # clojurescript (121)
- # code-reviews (1)
- # core-async (4)
- # core-logic (2)
- # cursive (15)
- # datomic (8)
- # hoplon (4)
- # jaunt (112)
- # jobs-discuss (35)
- # om (41)
- # parinfer (8)
- # re-frame (3)
- # reagent (4)
- # ring (2)
- # untangled (38)
I don't think I've seen this before. lein repl
and lein run
both are failing with the same problem:
$ lein run
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See for further details.
Exception in thread "main" java.lang.ExceptionInInitializerError, compiling:(/private/var/folders/0x/tkfh3v953r9gwfdnxzlncnvh0000gn/T/form-init4880099928816078715.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.ExceptionInInitializerError
lein repl doesn't load your code, so that error must becoming from lein, likely a lein plugin
escherize: not sure what you upgraded from but there were some changes in 1.7 to avoid loading classes on import
@plexus: Hi, I tried to include tracer-gui into my web app. For this I added [tracer-gui "0.1.0-SNAPSHOT"] to my dev dependencies and added the trace-ring
call around my handler. Restarting my application then will throw an error:
interesting, can you add (clojure.core/compile 'tracer-gui.gui)
before calling trace-ring
?
@plexus: That is not helping either. The error still occurs. It happens as soon as I add [tracer-gui.core :as tg]
to my :require function
ok, try to upgrade, I added :aot [tracer-gui.gui]
to the project.clj
, it should be able to find the generated class now
Sending tracer-gui/tracer-gui/0.1.0-SNAPSHOT/tracer-gui-0.1.0-20160409.115917-2.jar (40k)
to
to upgrade dependencies, normally it only checks for new snapshots once a day (dixit stackoverflow ;))
Ok, Now there is a different error: :message java.lang.NoClassDefFoundError: clojure/lang/Tuple, compiling:(tracer_gui/core.clj:1:1)
nope: :message java.lang.NoClassDefFoundError: clojure/lang/Tuple, compiling:(foo/barrr/middleware.clj:1:1)
that's most likely it. These classes are now AOT compiled against 1.8, you might have issues using < 1.8
what would be the best way to 'split' a map, where a specific set of keys go into one map, and the "rest" go into another?
Hi, how would I convert a map to a vec? {:foo :bar} -> [:foo :bar]... (into [] puts it into a second vec like this (into [] {:foo :bar}) => [[:foo :bar]]
Is there any serious project working on a c++ implementation of clojure ? Got myself into a c++ project and wondered whether it exists .
@hiredman: after looking through the stacktrace with your guidance, I've concluded that probably the stacktrace was from an older version of cljfmt
.
Hi Guys! I am beginner to Clojure and really wanted to learn serious stuff about it. Currenlty going through Clojure for the Brave and True!
Hi @abhishekamralkar nice to meet you here. We have a dedicated #C053AK3F9 channel if you have questions. Good Lück 😄
@sveri: if you wanted to make something simpler just flatten your result
[[:foo :bar]] is just a nested vector so flatten seems like the perfect tool for the job
@adamkowalski: That was my first approach too, but then I get back a seq when I want a vec so I have to wrap it into a (into [] ... again and it just blows up the code
what about this then? (reduce #(into %1 %2) [] {:a 1 :b 2})
then you can choose the data structure you would like by just changing the accumulator default
but mapcat also allows you to do that
@lmergen: Maybe something like (defn split-map [m keyset] (map flatten (split-with (fn [[k _]] (keyset k)) m)))
? Will return a seq of seqs but it should be trivial to make them maps if needed
flatten is only useful when you don't know the structure of what you are operating on, which you should always know, and flatten is indiscriminate about what it flattens
04:07 < hiredman> ~flatten
04:07 < clojurebot> flatten is rarely the right answer. Suppose you need to use a list as your "base type", for
example. Usually you only want to flatten a single level, and in that case you're better off with
concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.
I used to run both, so that I had real logs. The webui is definitely enough better to be worth using IMO.