This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-15
Channels
- # beginners (34)
- # boot (6)
- # cider (20)
- # cljs-dev (5)
- # clojure (7)
- # clojure-austin (1)
- # clojure-dusseldorf (10)
- # clojure-spec (11)
- # clojure-uk (3)
- # clojurescript (7)
- # cursive (1)
- # datomic (6)
- # defnpodcast (1)
- # hoplon (2)
- # luminus (32)
- # lumo (9)
- # nrepl (2)
- # nyc (1)
- # off-topic (18)
- # onyx (9)
- # portkey (3)
- # re-frame (27)
- # reagent (102)
- # shadow-cljs (70)
- # tools-deps (25)
- # vim (2)
Hi 🙂
how can I collect data from a bulk of Go
channels, I get Assert failed: <! used not in (go ...)
for the code below.
I know why I get it, I'm asking what is the best way to consume from all channels.
(->> state
:pods
(map #(go [(pd/id %) (<! (f/pod-metrics fleet %))]))
(map <!)
(into {}))
is there something like into
but with an offset? I have a vector of elements and I get chunks of that data over the network, so I want to copy, say, 50 elements into the vector at a given offset
No, and an array might be a better match
right. thanks. this makes me realize what i’m doing is a bad idea and i shouldn’t be doing it. 🙂
@justinlee The best I can think of to get close to the same as an array would be to start off with
(reduce-kv (fn [coll k v] (assoc coll (+ k 1) v)) [0 0 1 1] [4 5])
and then convert it to use transients, which it is amenable to