This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-04
Channels
- # announcements (7)
- # beginners (37)
- # boot (6)
- # calva (13)
- # cider (13)
- # cljdoc (52)
- # cljs-dev (9)
- # clojure (117)
- # clojure-europe (3)
- # clojure-italy (12)
- # clojure-nl (21)
- # clojure-russia (8)
- # clojure-spec (77)
- # clojure-uk (20)
- # clojurescript (142)
- # community-development (6)
- # cursive (5)
- # datomic (13)
- # emacs (9)
- # figwheel-main (20)
- # fulcro (33)
- # graphql (11)
- # instaparse (6)
- # klipse (1)
- # off-topic (7)
- # om (8)
- # quil (7)
- # re-frame (11)
- # reagent (39)
- # reitit (10)
- # shadow-cljs (36)
- # spacemacs (3)
- # test-check (3)
- # tools-deps (83)
- # utah-clojurians (31)
- # vim (14)
What's the rationale for having if-not
defined as
(defmacro if-not [test then else] `(if (not ~test) ~then ~else))
instead of
(defmacro if-not [test then else] `(if ~test ~else ~then))
?I think it’s so it does what it says in the name and for consistency with the 2-arity
Would this work? It would remove the need to have if-not defined for multiple arities
But it would be less self-documenting than the definition in the core library
that implies it takes any number of args
(if-not true? 1 3 4 5 6 12 "hi" :kw)
so… not better :)
@alexmiller Thanks for the answer. I simplified the definition. The 2 arity is given by
([test then] `(if-not ~test ~then nil))
.In my definition it would imply swapping then
and nil
around. I don't think there's much to gain from removing not
in terms of speed, so readability trumps here, I guess. Thanks
Hey all. I'm having trouble getting a very simple deps.edn going. I keep on getting a message that opencv can't be found in mvn central, but I've added my custom repo where the jar can be found.
I don't see the artifacts in http://first.wpi.edu/FRC/roborio/maven/release/org/opencv/
perhaps you mean org.opencv/opencv-java
?
Ooooh. Yes. Probably.
or should i simply use seqs and lazily eval the maps and then (pmap send-to-sqs lazy-seq)
pmap is rarely what you want, I'd use transduce, with the sqs send in the function arg
@seancorfield I fixed opencv-java but that native library is still being a pain. Is there a way to specify a jar for specific platform? In this case its "opencv-natives-3.1.0-linux-arm-raspbian.jar" that I need.
@cdimara I'm not sure. Join #tools-deps and ask in there.
I think there's a :classifier
option in deps.edn
for that, but I've never used it.
no, that’s gone
classifiers are now specified in the lib name - opencv-natives$linux-arm-raspbian {:mvn/version "3.1.0"}
@alexmiller thanks! Sometimes I feel really bad about bothering more knowledgable people on here with my dumb questions. But I don't know how I'd figure that out on my own.
also thank you @seancorfield
feel no bother - happy to help :)
So, I have an old affection for Emacs. Never grokked it, at all, really, but always liked it and got along well enough. Anyway, it was natural to use it when I wanted to get into Clojure. Just wanted to ask how the experience compares to using, say, Atom?
@mattias504 Most Clojure devs use Emacs, but when you're getting started, I'd say to use whatever editor you're already comfortable with, as long as it has decent Clojure support.
Atom has ProtoREPL and Chlorine available as packages and both are solid. I used Atom/ProtoREPL for two years but recently switched to Atom/Chlorine. I used Emacs for several years before that.
In general, you don't want to be learning a new editor at the same time as learning Clojure (IMO).