Fork me on GitHub
#clojure
<
2020-05-24
>
ben.sless14:05:07

If I create a lazy sequence in one thread (A) and pass it to another (B) which iterates over it, can I assume the computation will happen on thread B?

alexmiller15:05:45

It’s cached and used from both so it depends

alexmiller15:05:08

If A is not iterating, then yes it’s in B

ben.sless15:05:31

Just what I wanted to know. Thanks 🙂

alexmiller15:05:41

The thread that needs an unrealized value will be the one to realize it

jrychter16:05:00

Which also means, be careful with your dynamic variables, because they might not be there when the value is realized (this used to bite me when I was beginning to write Clojure, coming from Common Lisp).

danieltanfh9517:05:09

how do you guys do event streaming for Datomic? I just want a web app that displays live data changes with reagent

danieltanfh9501:05:07

they don’t seem to fire events, it’s more like a on-request if I’m understanding this correctly. So I guess I’m supposed to notify some thing that the log has changed and I should update some log cache?

vemv02:05:37

In my previous post I didn't really find the thing I had in mind (that I vaguely remembered) it's the transaction report queue. Seems like this app would map quite well to your original intent (given the frontend focus): https://github.com/waf/push-demo

danieltanfh9516:05:17

thanks, that seems to be what I had in mind as well

matthewlisp19:05:47

Hello, does anyone happen to have a snippet or something to easily generate mac addresses as strings ?