Incremental output
devanshj opened this issue · 2 comments
What should be done in the case of python -c "while True: print('hello')"
? Currently there is no output because the process never exits.
Hmm so one thing is clear that we can't have (i: Cogni.Input) => Observable<Cogni.Output>
instead of (i: Cogni.Input) => Promis<Cogni.Output>
because when the stdin is being re-entered we don't want users so see intermediate states.
I was thinking maybe we could start emitting after only previous inputs are written. Like if 1\n2\n3\n
is input and 3 is the "new" input show incremental after writing 3. But the thing is we would never have incremental output unless it's infinite loop or with a sleep in process code. We already have an issue opened for former and latter breaks the assumptions we make about the process's code so that isn't what we want.