jupyter-c-kernel icon indicating copy to clipboard operation
jupyter-c-kernel copied to clipboard

Update kernel.py

Open kl2792 opened this issue 7 years ago • 3 comments

Fix #36 on MacOS, have not tested on Linux, though I don't see why it wouldn't (I use only built-ins).

kl2792 avatar Oct 09 '17 17:10 kl2792

I would accept it, but you actually removed the use of master.c which is needed to disable stdout buffering :/

brendan-rius avatar Oct 09 '17 20:10 brendan-rius

Hm, I'm just curious -- why should stdout buffering be disabled? Isn't it the default for C programs?

kl2792 avatar Oct 12 '17 12:10 kl2792

There are some cases where there is a long loop and something being printed in it. For example:

for (int i = 0; i < 1000000; i++) {
  printf("%d\n", i);
  sleep_10_ms();
}

we want the result to be printed as the loop loops, not after it has ended

brendan-rius avatar Oct 12 '17 13:10 brendan-rius