Fork me on GitHub
#core-async
<
2016-01-28
>
ragge12:01:42

wasn't there talk about promise-chans being dereferable? was that dropped or am I completely mistaken?

ragge13:01:48

found the quote by rich, actually it was channels in general

ragge13:01:12

also found an open issue for it, so question answered: http://dev.clojure.org/jira/browse/ASYNC-102

alexmiller14:01:59

it was not dropped but it's annoyingly hard to implement cleanly (without introducing namespace cycles)

raymcdermott20:01:35

newbie question: is there a sliding buffer that can drop items based on length of time in the buffer aka time based sliding window?

jgdavey20:01:58

@raymcdermott: There’s nothing like that built-in. You could try to implement it yourself. However, I would suggest trying to see if you could re-frame the problem in terms of timeout instead. When you pair channels with timeout, you can do quite a bit of sophisticated stuff.

raymcdermott20:01:38

@jgdavey: I’m struggling to re-frame it like that to be honest - could be a limit of my imagination!

jgdavey20:01:23

If you were to implement yourself, you could make a go that simply pulls from a channel, and adds to another as a [timestamp item] pair, then finally pushes into an unbounded chan that has a transducer that filters based on age of that timestamp

raymcdermott20:01:23

does that mean putting the burden on the consumer?

raymcdermott20:01:01

@jgdavey: ok, no … I think I see … the channel has the filter so the consumer just sees the result of the transducer …. I’ll have a go (pun not intended)

darwin21:01:03

just wondering if something like this is doable (in ClojureScript version of core.async): https://github.com/binaryage/dirac/issues/3