aleph

fantomofdoom 2018-08-13T15:34:15.000440Z

Hi, smb use manifold (https://github.com/ztellman/manifold), i can't find how create something like core.async go-loop only for manifold stream? (and smb known if use manifold.deffered/loop & recur, thread are parked or it alway take message from source)

mccraigmccraig 2018-08-13T18:19:29.000107Z

@fantomofdoom what exactly do you want to do ? lots of stream ops can be done with stream/map and stream/reduce. occasionally you need some finer control and then deferred/loop and deferred/recur may be useful e.g. https://github.com/ztellman/manifold/blob/master/src/manifold/stream.clj#L232

mccraigmccraig 2018-08-13T18:20:13.000362Z

i haven't yet come across any stream solution i couldn't express with some combination of those ops

fantomofdoom 2018-08-13T18:22:54.000438Z

@mccraigmccraig Hi, i need smth like this >in core.async

(go-loop []
    SOME WORK
      (>! out-ch processed-msg)
    (recur))
i need infinity loop that get msg from channel process and push forward

mccraigmccraig 2018-08-13T18:24:58.000316Z

@fantomofdoom that's a stream/map ... if you look at the impl you can see it uses the lower-level connect primitives to do pretty much what you are doing in your go loop - https://github.com/ztellman/manifold/blob/master/src/manifold/stream.clj#L614

fantomofdoom 2018-08-13T18:30:20.000362Z

thx)