Fork me on GitHub
#missionary
<
2023-11-10
>
telekid20:11:11

Looking for troubleshooting help. Discussion in thread >

telekid20:11:56

when working-version is set to true, the program works as expected

telekid20:11:38

that is, the following is printed at the repl:

:c4 :start
:c4 :stop ;; three seconds later
:c5 :start ;; one second later
:c5 :stop ;; one second later
nil
user> 

telekid20:11:58

however, when false, the program hangs at the following point:

:c4 :start

telekid20:11:44

as far as I can tell, this is happening because my after function isn't liking something about the flow returned by m/watch

telekid20:11:30

but it isn't obvious to me what would differ from the flow returned by m/watch vs the flow returned by m/ap

telekid20:11:12

the flow returned by watch is continuous while the flow returned by ap is discrete, but I don't think that matters in this context

leonoel20:11:00

(after end) never terminates because end is Infinite

leonoel20:11:06

I think you want to terminate after first successful sleep, you can do that in the m/reduce stage Replace {} with (comp reduced {})

telekid20:11:22

aaah, I thought I might need a reduced somewhere but I couldn't quite figure out where

telekid20:11:23

thank you!

telekid20:11:25

that fixed it