Julia Evans on Nostr: npub1jh9lk…cq2en "line buffered" means that it acts the way you expect (if you ...
npub1jh9lkp88gxtq7ya08ausnhjn9r766qx46xxhn62chrsxvwdvx09smcq2en (npub1jh9…q2en) "line buffered" means that it acts the way you expect (if you print a newline, it gets sent to the output device)
in libc, writes to a terminal are line buffered (and they act the way you'd think). But writes to pipes and files are not -- they're "block buffered" with a buffer size of 8k or something.
Basically libc checks the file descriptor and changes the type of buffering it does depending on whether the file is a terminal or not.
Published at
2024-11-11 18:51:37Event JSON
{
"id": "eb50b3573889fcbad2ef49358171a575818bd7b4714eaa3a56130170cf138623",
"pubkey": "26cad6f140bf86de9c26b7c15419cab1aebdd7086358d26aa2d750e21cf3bf2e",
"created_at": 1731351097,
"kind": 1,
"tags": [
[
"p",
"95cbfb04e741960f13af3f7909de5328fdad00d5d18d79e958b8e06639ac33cb",
"wss://relay.mostr.pub"
],
[
"p",
"a7faf31ab3932bb13af0018f136550010f9447823172d5a4fdfcc1fce6e9defa",
"wss://relay.mostr.pub"
],
[
"e",
"d5932edad075b102460138553587c26e699fefcc67effb4aed294158b84c7323",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://social.jvns.ca/users/b0rk/statuses/113465825508526243",
"activitypub"
]
],
"content": "nostr:npub1jh9lkp88gxtq7ya08ausnhjn9r766qx46xxhn62chrsxvwdvx09smcq2en \"line buffered\" means that it acts the way you expect (if you print a newline, it gets sent to the output device)\n\nin libc, writes to a terminal are line buffered (and they act the way you'd think). But writes to pipes and files are not -- they're \"block buffered\" with a buffer size of 8k or something. \n\nBasically libc checks the file descriptor and changes the type of buffering it does depending on whether the file is a terminal or not.",
"sig": "ede069cfc6c80a31ccbe202d81aafb090151026dc819e7788bdf371214e6dfb48e62edb6731d05ae7b370fa91ab5117a40277c7bb99fb4a02b4fb65b30bbc877"
}