These are chat archives for pozadi/kefir

5th
Jun 2015
Roman Pominov
@rpominov
Jun 05 2015 10:49

is the reason hides in the fact .scan creates a Property?

it simply because in most cases one want property out of scan. You can easily convert it back to stream by adding .changes() (seems like it fixes you problem in jsfiddle)

@shamansir ^
Ulric Wilfred
@shamansir
Jun 05 2015 11:02
that’s just great! thanks! yeah, I see reasoning in why it’s a Property.
btw, may be being Property makes sense only when there’s some seed specified?
Roman Pominov
@rpominov
Jun 05 2015 11:08
hm... maybe. But I think it's better when methods always return same type. Also it would be a breaking change, but I will keep it in mind for v3.0
Ulric Wilfred
@shamansir
Jun 05 2015 18:24
hmm, this way it never fires an event if start was emitted before both value-streams fired anything.
probably because take(1) never happened, got it.
Roman Pominov
@rpominov
Jun 05 2015 18:33
Yep, take(1) never happened. You can fix it by converting start to property start = start.toProperty().
Ulric Wilfred
@shamansir
Jun 05 2015 18:38
if I’m not doing smth wrong, it doesn’t help( : http://jsfiddle.net/shaman_sir/jd25ftsf/6/
Ulric Wilfred
@shamansir
Jun 05 2015 18:44
(time to use KefirVision :) )
Roman Pominov
@rpominov
Jun 05 2015 18:51
Right, it won't work :)
Ulric Wilfred
@shamansir
Jun 05 2015 18:52
may be some stream is not activated
Roman Pominov
@rpominov
Jun 05 2015 18:59
The problem actually is that .bufferBy() won't emit if buffer is empty. I think it should emit empty array, for consistency, and to make your case work.
But it's a breaking change...
Or we can consider this a bug, and fix without bumping to 3.0
rpominov/kefir#108
Ulric Wilfred
@shamansir
Jun 05 2015 19:07
I haven’t yet decided if it’s a bug, but since you say and it should help me, I am for it)