What is Nostr?
Julia Evans /
npub1ym9…lm9y
2024-11-27 16:23:34

Julia Evans on Nostr: did some buffering tests in 10 languages where I wrote the equivalent of this program ...

did some buffering tests in 10 languages where I wrote the equivalent of this program and then ran the program with `./program | grep hello`

```
while True:
print("hello")
sleep(1)
```

In 4 of the languages (Python, Ruby, C, Perl) nothing at at all gets printed (because they buffer the output)

in the others (Go, C++, JS, Rust, Java, Lua, bash) you see "hello" printed out once per second

code: https://github.com/jvns/buffer-stdout-tests
Author Public Key
npub1ym9ddu2qh7rda8pxklq4gxw2kxhtm4cgvdvdy64z6agwy88nhuhqcnlm9y