Remix.run Logo
netbsdusers 8 hours ago

Plan 9 implements some sort of "everything has a directory entry" concept. Sockets are files already in Unix. "Everything is a file" in Unix means they have a uniform treatment as file descriptors. Its perfection is probably in Capsicum where when you create a new process, you get a process file descriptor referring to it instead of a PID.

cenamus 7 hours ago | parent [-]

Sockets really aren't files im Unix though, you don't create them with (f)open, and you don't read/write with (f)read/(f)write

somat 3 hours ago | parent [-]

As much as I like bsd I think the socket interface is their biggest failure, don't get me wrong, the socket interface is not bad, it is an amazing accomplishment that most of the internet is based on. The reason I regard it as a failure is because it is so close but not quite touching. A core unix idea is to have a single namespace registry and a simple universal api(open, seek, read, write, close) to access resources on this registry. and you can tell the bsd socket team was trying(like I said it's close) but they failed to close the loop and shipped an api that did not match the core unix api.

And for free, a rant, I think this is why Microsoft's registry is so bad. On paper it sounds great "a single place to put all your config" I could totally sell it. But in practice it is miserable to use. When proposed nobody said "we already have a hierarchical namespace where all our config can go and it already has pretty great tooling, lets just make it better" so they invented a custom one that required custom special access patterns and custom special tooling and custom special api's, and... it sort of sucks to use. I guess in their defense they were not fully onboard the idea that you could have one tree(they liked their many trees A: B: C:)