Fork me on GitHub
#beginners
<
2017-12-24
>
ashsaym05:12:26

Hello Guys,, I am new to clojure and trzing to learn it. Can anyone recommend me some tutorial for react-native and clojure Please?

jumar08:12:25

@U8JRHPTMH what exactly do you want to learn? If you want to learn Clojure, I'd skip the react-native part and just focus on Clojure fundamentals. A list of great Clojure books might include Living Clojure, Clojure for the Brave and True, Programming Clojure (3rd edition to be released soon). That's said if you really want to start learning about clojurescript + react native, http://cljsrn.org/ is a good starting point.

ashsaym14:12:36

Thank you very much

boldaslove15609:12:06

Hi, can someone who have ever use sente help me? How do you actually 'logout' a user? I have a user id stored in :connected-uids atom. Should I just listen for :chsk/uidport-close event and then swap! it manually from the atom?

noisesmith15:12:21

in my experience the sente connected-uids is updated for me and only reflects currently connected users

boldaslove15603:12:36

Aw you are right! I should just call chsk-disconnect!

OctarineSorcerer13:12:12

Hey all! Quick question, how generally accepted is it to split function arguments onto separate lines?

(defn example
  [x
   {:keys [long arg] :as this-arg-is-a-really-long-example}
   [some & other-stuff]]
  (println "hi"))

alexmiller14:12:39

totally fine

jgh14:12:59

if I have a vector of maps, how do I perform merge-with on it? e.g. [{:a 1 :b 2} {:a 1 :c 3}]

jgh14:12:48

merge with syntax seems to be (merge-with + {:a 1 :b 2} {:a 1 :c 3}) ;; {:a 2 :b 2 :c 3}

jgh14:12:40

ah i can just use reduce

jumar15:12:58

@jgh you can also use apply:

(apply merge-with + [{:a 1 :b 2} {:a 1 :c 3} {:a 10 :d 9}])

jgh15:12:09

ah ok good to know