Fork me on GitHub

Any advice for quickly figuring the culprit dependency? this is when upgrading the project to clojure 1.9: > WARNING: any? already refers to: #'clojure.core/any? in namespace: vertigo.core, being replaced by: #'vertigo.core/any?


@matan if its a leiningen project lein deps :tree might help

Alex Miller (Clojure team)13:04:22

sounds like the culprit is vertigo ( and you can find the path to it with lein deps :why vertigo

Alex Miller (Clojure team)13:04:51

however, this is just a warning - it’s just saying that core now has an any? function and in vertigo.core, an any? function is being declared which will shadow the clojure.core one. That’s generally not an issue and shouldn’t cause any problems. The warning can be “fixed” in vertigo by using (:refer-clojure :exclude [any?]) to the namespace declaration

Alex Miller (Clojure team)13:04:07

but it looks like vertigo is archived


Ah, thanks!


@alexmiller my concern has been the scope in which vertigo's any? would shadow clojure's any?


I assume that scope would be the library that uses vertigo among my dependencies


thanks for adding those convenience functions in 1.9!


some of them were sure missing


the shadowing only happens in the namespace that declares any?

Alex Miller (Clojure team)14:04:28

shouldn’t be an issue. any code that was requiring that namespace would have been referring to the vertigo any? and still will




(totally unrelated) can we destructure (e.g. a vector) outside a let or defn form?


@matan As you would expect (like defn) it works for anonymous functions.

((fn [[x y]] [y x]) [1 2])


There is also clojure.core/destructure


So say I wish to pass arguments to a function, directly drawing them from within a vector, I'd have to explicitly use destructure or a let form in my code?

Alex Miller (Clojure team)15:04:10

Usually when people want to do this they write a macro that produces a let, fn, etc




Do you people have some sound advice on IDEs? I've been using emacs+cider for the last two months to learn Clojure, but I haven't acquired a taste for it, so I'm shopping for a new IDE/editor. Primarily, I want to use Clojure/CLJS for web development. I really like Light Table, but it looks like the project is pretty much dead now, and I'm not sure it's worth investing time into learning a stagnant tool like that. Nightcode is cool, but I'd prefer to have an IDE with a more sleek user interface, plus it seemed a little buggy too on the first try. So I'm pondering going with Atom with Proto REPL - I just don't know how well it works with all the peculiarities of Clojure and Clojurescript development. Thoughts?


@nikoszp But I moved from Atom to Cursive.


Thanks! How come?


It just had everything I needed built-in. Parinfer, Rainbow parens, and custom key mappings with delayed presses.


I could still happily use Atom with the setup above though. Not a huge difference between the two.


That's very useful, thanks!


@nikoszp I prefer using IntelliJ with the superb cursive plugin. Very nice and easy setup and for me the only thing that works perfectly even with the java internals of Clojure.


And not to mention intellij’s great code analysis and it helped out in using java libs in my clojure code which i often have to do


That's two votes for Cursive then. My only qualm is that the license is only free for "non-commercial licence for open-source work, personal hacking, and student work" as the site puts it.


Which I think is fare. The developers need to make money somehow. But if that’s a real concern then the Atom setup above is just as good.


I use Atom and protorepl and I am very happy with it.


A lot of forward thinking clojure tools are being developed for Atom first, so there is that. For example, parinfer. Yes, these will be released on other editors in the future, but in the now, they work best on Atom


It's not that expensive, and @cfleming is often quick with fixes and feature requests.


That's a fair point. Splurging on it might even add an additional incentive to learn it inside out 😄


one more for cursive, it's awesome


Alright, thanks for the input peeps. I'll definitely give Cursive a try!


@rahul080327 What does the "cursive plugin" add that IntelliJ doesn't have builtin for clojure?


@matan IntelliJ by itself doesn’t support clojure. Needs Cursive to support it. Like the Rust plugin to supoort rust.


Got it :thumbsup:


How would you say does it add up v.s. its $199 per seat price-tag?


BTW does that price cover for the IntelliJ license as well?


I’m reading through clojure/tools/cli.clj and I found the function compile-option-specs. It looks like this:

(defn- compile-option-specs
  {:post [(every? (comp identity :id) %)
          (distinct?* (map :id (filter :default %)))
          (distinct?* (remove nil? (map :short-opt %)))
          (distinct?* (remove nil? (map :long-opt %)))]}
  (map (fn [spec]
         (-> (if (map? spec)
               (select-spec-keys spec)
               (compile-spec spec))
             (wrap-val :validate-fn)
             (wrap-val :validate-msg)))
My question: what is the {:post [...]} map doing? It looks to me like the function would just return (map (fn [spec] ... ) option-specs) and ignore {:post ... } The docs say “An assertion error is thrown if any :id values are unset, or if there exist any duplicate :id, :short-opt, or :long-opt values.” So I assume the {:post} map is something to do with that. But how can it be used to throw an error?


the :post vector is for specifying postconditions (conditions on the return value of a function)


thank you


no prob 🙂


@matan IntelliJ license is extra, but there is a community version which is sufficient for cursive. If I was using clojure professionally I'd pay the price for cursive. As its only pet projects / open source stuff for me now, I can use the free version.


If you have public open source projects you can also apply for a open source license @jetbrains.


> If you have public open source projects you can also apply for a open source license @jetbrains. that's only for the open source projects I assume, you won't get a free pass for your commercial ones just because of your open source ones I assume


Does Cursive put you on the crashing form when your program crashes?


Or you still have to read exception traces and navigate to the source line yourself, then guess which form crashed when the line has many forms?