This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-19
Channels
- # bangalore-clj (35)
- # beginners (42)
- # boot (89)
- # cider (9)
- # clara (2)
- # cljs-dev (29)
- # cljsjs (3)
- # cljsrn (14)
- # clojars (9)
- # clojure (332)
- # clojure-brasil (1)
- # clojure-dev (5)
- # clojure-italy (4)
- # clojure-russia (36)
- # clojure-spec (38)
- # clojure-uk (65)
- # clojurescript (114)
- # clr (11)
- # community-development (105)
- # core-async (10)
- # cursive (4)
- # datascript (1)
- # datomic (58)
- # defnpodcast (3)
- # emacs (4)
- # hoplon (7)
- # juxt (3)
- # keechma (8)
- # off-topic (7)
- # om (109)
- # om-next (8)
- # onyx (26)
- # pedestal (3)
- # planck (8)
- # re-frame (76)
- # reagent (28)
- # rum (25)
- # spacemacs (2)
- # specter (35)
- # untangled (31)
- # yada (27)
@eslachance: check out the docs at https://clojuredocs.org/clojure.core.async , the version with one ! has to be called within a go block - Not sure about the !! version bu lt it sounds like they are showing you different errors
Honestly I was just curious. tbh that's test code I was just running in the repl, but I was surprised to see it no load correctly.
The disconnect between "Runs in REPL" and "Won't let REPL load" didn't immediately occur to me.
I do have an actual #beginners question though. The following code is failing with Parameter declaration "let" should be a vector
, and I'm not sure why. Looks the same as other defn
blocks with a let
...
(defn start-socket
(let [ws-address (:body (http/get API))]
(connect-socket ws-address)))
How do basic migrations work? I'm using the migratus
library. I thought running migratus/up config <numberhere>
and then migratus/down config <numberhere>
would create and then kill a table. However, the table is created but not dropped. That is, the up
seems to work but not the down
. Am I missing something incredibly basic?
I've confirmed that running the SQL in the down
file drops the table when run in psql
at the command line.
Never mind, the ever-helpful Yogthos confirmed my solution: https://github.com/yogthos/migratus/issues/88
@eslachance your defn is missing a parameter list
Regarding <!!
it will block unless the channel is buffered, or there's another thread already doing a !!>
There's probably a go loop somewhere draining that channel, but it needs to start before you do that log or you get a deadlock
hey guy, i could need some help here. i am trying to add to a list inside a map of maps if the if the id matches
problem is, finding the matching element is not a problem, but updating the value inside the nested structure makes my head explode 😞
structure example: {:items ({:item-id 1 :sub-items '({:sub-item-id 1 :value ...))}
any ideas?
maybe i'm not getting that, but i need to find the right element in the nested structed and have no fixed path
or maybe i don't know how to add a filter predicate to update-in
if that is possible
@dev-hartmann For complex paths in data structures currently https://github.com/nathanmarz/specter is the go to tool.
thanks @sveri, found that too, but can't use it for some odd clojurescript error
@sver that's the error by the way: any? already refers to: cljs.core/any? being replaced by: com.rpl.specter.impl/any? at line 530 resources/public/js/compiled/out/com/rpl/specter/impl.cljc
@dev-hartmann Dont want to be pedantic here, but that is a warning and not an error. You will have to exclude the any? function from either specter or cljs.core.
hm, figwheel reports an error and does not compile
@dev-hartmann does it work if you (:require [specter... :as spec]...?
Compiling "resources/public/js/compiled/frontend.js" from ["src/cljs"]... ERROR: any? already refers to: cljs.core/any? being replaced by: com.rpl.specter.impl/any? at line 530 resources/public/js/compiled/out/com/rpl/specter/impl.cljc Compilation aborted Subprocess failed
that's the error message
and i require it like (:require [com.rpl.specter :as specter])
excluding any? in :require does not work, clojure.lang.ExceptionInfo: Only :as, :refer and :rename options supported in :require / :require-macros; offending spec:
Ok, try seomthing like (:require [com.rpl.specter :as specter :rename {any? spec-any?}])
If that does not work I suggest you ask in #clojurescript on how to exclude / rename either of these functions, they probably know best 🙂
that's a pretty good idea
thanks @sveri
@dev-hartmann yea, np, I am curious, just choined #clojurescript, I want to know it myself 😄