These are chat archives for pozadi/kefir

21st
Feb 2015
Ulric Wilfred
@shamansir
Feb 21 2015 06:32
yeah, may be when one of the sub-streams ends, the signal is "consumed" one more time to check if next value in this stream fits and parallely take values in other sub-stream, so it doesn't reaches zip. probably this is the reason.
Ulric Wilfred
@shamansir
Feb 21 2015 07:17
will try to move takeWhile in front of map for iteration streams.
Ulric Wilfred
@shamansir
Feb 21 2015 08:26
..nope, even with .takeWhile(function() { return value < max; }).map(function() { return value++; }), some streams emit values between zip/repeat cycles: http://glui.me/?i=7750kxzqu6afy2f/2015-02-21_at_09.22_2x.png/
Ulric Wilfred
@shamansir
Feb 21 2015 08:58
…solved with converting signal to property when sub-stream was finished at least once (so when previous stream was finished in repeat, it immediately emits next value from next cycle)
Roman Pominov
@rpominov
Feb 21 2015 18:49
@Globegitter I have added a quick example http://pozadi.github.io/kefir/#examples
it even a little interactive)
I also created another one (more advanced), but stepped on an issue with how .combine handles errors, so it delayed until we resolve the issue pozadi/kefir#58
Roman Pominov
@rpominov
Feb 21 2015 18:55
Heh, this story with example turned out to plans of releasing v2.0.0 soon pozadi/kefir#57 :)
Roman Pominov
@rpominov
Feb 21 2015 19:03
@shamansir glad you managed to solve it by yourself, because I not sure I am able to figure out how this thing works any more :D
Ulric Wilfred
@shamansir
Feb 21 2015 19:47
In general, to get rid of infinite loop when zipping two synchronous streams I've just added a master-emitter that says “all the listening [iterating] streams, please step to next values”—it produces only empty signals and this way aligns/synchronyzes values in the zipped stream (and keeps the logic in one sequential order/one single execution thread). Everything else is a code related to my special case and is not important :).
(just in case if someone was interested :) )