This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws-lambda (1)
- # beginners (55)
- # cider (19)
- # clojure (96)
- # clojure-spec (2)
- # clojure-uk (6)
- # clojurescript (22)
- # datomic (6)
- # editors (13)
- # emacs (6)
- # euroclojure (1)
- # hoplon (3)
- # immutant (1)
- # jobs-rus (2)
- # off-topic (2)
- # onyx (4)
- # portkey (3)
- # re-frame (76)
- # reagent (110)
- # shadow-cljs (13)
- # spacemacs (10)
- # specter (9)
- # tools-deps (9)
- # vim (7)
What do you mean? I didn't know you could ask for data that didn't have a shape defined in the schema.
I believe the question was querying against entities that are not attribute entities. If that’s the case you could do something like this to return all non-attribute entity ids:
(d/q '[:find [?eid ...] :where [?eid _ _] (not [?eid :db/valueType _])] db)
Yep. I'm trying to query all eid that doesn't have
:db/valueType. Unfortunately the given solution throws with "insufficient bindings". I ended up querying all eid who has
:db/ident, get all eid with
datoms, get the difference with
set/difference and then finally I can feed it to
@suryapjr via interop with java https://docs.oracle.com/javase/7/docs/api/javax/crypto/Cipher.html
Not really a problem, at some points like when doing Java interop, or when you want to run something in production, you might to increase your Java knowledge.
I'm trying to validate a user registration submission using specs. It comes in a map that has a bunch of keys, including
:pass-confirm. How would I check if the values at these two keys are equal?
Just had to ask and I found the solution:
(s/def ::user-reg #(= (::pass %) (::pass-confirm %)))
What would be the smart way of doing circular list in clojure. Assuming that I want to iterate in a circular way on a sequence. Don’t know if using lazy-seq together with concat is smart (my solution). Any ideas?
(defn circular-list [coll] (lazy-seq (concat coll (circular-list coll))))
I'm struggling with how to test code in a namespace that has two public functions and then a few private functions used by the public ones. From what I've seen in my searching there are two options. 1) You test the private functions by referring directly to the function's var, like
(#'some-ns/some-private-function). 2) You make the private functions public so they can be easily tested. Or am I missing something?
In the Joy of Clojure though I've seen separating the implementation (private functions) of a namespace into a separate namespace and making them public, so perhaps that's the idiomatic route. :thinking_face:
Hey, I wanna run
lein figwheel devcards and then connect Cider to that REPL. But I am
not smart enought to work it out. When running
lein figwheel devcards from a shell I get
a REPL and can run stuff like
(js/alert "Hey") and that will be sent to my browser. Now
I wanna connect Cider to that REPL. I am using
M-x cider-connect-clojurescript, entering
localhost and the port 7002 and I get a REPL in the
user namespace. But from here I cant
(js/alert "Hey"), I get a exception `CompilerException java.lang.RuntimeException: No
such namespace: js`. And when inside a .cljs buffer and trying to send stuff to the REPL I get
an error saying: "`cider-eval-defun-at-point` needs a ClojureScript REPL". What am I
The lein template I am using: https://github.com/reagent-project/reagent-template
lein new reagent unitime +test +devcards +cider +sass.
Okey, when i connect using
M-x cider-connect-clojurescript and the run
M-x cider-connection-browser it understands that it is a ClojureScript REPL
if this works for you, you can create a user.clj and have the repl load that file to make it easier to repeat those steps each time
@U0TU3SMNC nice, this steps works fine for me. I get Figwheel to run and the Cider REPL is working just fine 🙂 Thx!
I recently created a small minimal project to reproduce an issue I was having (but ended up not being an issue) https://github.com/haywoood/deb
but with that I can connect cider to a browser repl, and a browser repl that runs my unit / integration tests against the browser