Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
wruza
on Oct 12, 2017
|
parent
|
context
|
favorite
| on:
A Little Story About the `yes` Unix Command
>because without adding a BufWriter in rust, stdout is line-buffered, so each line emits a write system call,
Why the hell is it line-buffered when writing to a pipe? Yet another common sense “enhancement”?
glandium
on Oct 12, 2017
[–]
It's
always
line buffered. Unlike python, where its behaviour depends on whether stdout is a tty or not.
wruza
on Oct 12, 2017
|
parent
[–]
That doesn’t answer my question, let me reformulate it: what’s the rationale behind this behavior?
Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
Why the hell is it line-buffered when writing to a pipe? Yet another common sense “enhancement”?