4 ms·
> In Unix, character special files are files that access to I/O devices such as a NULL file (/dev/null) and file descriptors. In our case, stdout is a file desc
by epcoa 3y ago
> In Unix, character special files are files that access to I/O devices such as a NULL file (/dev/null) and file descriptors. In our case, stdout is a file descriptor (1) so it is a character special file. (The name "character special" actually comes from the fact that each character is handled individually.)
Ummm no. This is completely backwards. Stdout isn’t character special if it is pointing to a disk file. And they are hung up on a Linuxism here to boot (the proc symlink). The whole world isn’t Linux and I have never heard of this definition of character special, so I wonder where they found it. Of note, FreeBSD realized the whole block/character distinction was dumb, even block device modes are “character special”.
Author is very confused about the ontology of file descriptors and files, and device nodes. Sure it’s confusing to a newcomer but there are plenty of well written guides on the topic.
Too verbose, too Linux centric and too inaccurate.
And scrolling through nothing new than what is well trodden ground
https://stackoverflow.com/questions/37991116/why-is-stdout-buffering https://stackoverflow.com/questions/37991116/why-is-stdout-b...
Tl fucking dr, stderr is not buffered by default in rust.
- edgyquant 3y agoThis comment seems extremely aggressive and I’d add that most of the world is, in fact, Linux.
- epcoa 3y ago> at most of the world is, in fact, Linux. Yeah, other than the most popular Unix like desktop OS being macOS and iOS a dominant second in mobile. Other than those two that no one uses, most of the world is Linux. And for the topic at hand the macOS design is basically same as FreeBSD as mentioned, macOS is not derived from Linux.
- edgyquant 3y agoMost computers are not desktops. Most phones and servers are Linux based, thus the overwhelming majority of computers are running Linux.
- epcoa 3y agoOh fucking please. You were wrong, get over it and stop making irrelevant snipes that have nothing to do with the original topic. The question from the context was, for someone programming Unix like systems, are there systems other than Linux that matter? The answer is yes. No one started off with a claim that Linux isn't the majority of Unix like systems, how you get that from "The whole world isn't linux" is beyond me. macOS and iOS are heavily used Unix like systems with significant market share. They're not rounding errors. > Most computers are not desktops. Doesn't fucking matter, Mac OS software is still a multi-billion dollar industry. > Most phones iOS is about 30% of the market. Yes 70% is a majority, but not an overwhelming majority whatever that is, especially when that 30% pays the bills more than the other 70% If you're going to pull the irrelevant pedantic shit it helps to be right too, the overwhelming majority of computers are not running Linux since for every crappy Android phone out there, there are dozens of embedded devices running some variety of RTOS. And is a Nintendo Switch a phone or a server?
- loeg 3y agoThe criticisms of file descriptors and files and device nodes and Linux-centrism are all totally reasonable. The stackoverflow link is irrelevent -- it is a question about C. Rust's stdlib and implementation of stdout/stderr buffering is wholly unrelated to the one in C.
- epcoa 3y ago> Rust's stdlib and implementation of stdout/stderr buffering is wholly unrelated to the one in C. They're not wholly unrelated, they are related. The rationale for the implementation in both cases is the same (whether it is good, nonwithstanding). There are stack overflow questions related to the rust implementation, I selected a non rust to illustrate it's more than some rust specific implementation detail that occurred in a vacuum.