"Everything is a file" is a retarded and unintuitive concept in the context of graphical operating systems. It made more sense in the 60s and 70s when computers were just overglorified typewriters and manipulating files and interacting with the operating system was simplified under a purely command line environment, but once directories became abstracted as folders it made less sense and just made it feel more needlessly complicated instead of having dedicated registries and configuration interfaces. The UNIX world has spent the past 30 years trying and failing to implement similar abstractions to their interfaces and hide the ugly filesystem hierarchy standard just to keep up with Windows. You know deep down it's true
>>108997468 They traded the "everything is a file" paradigm for a centralized registry and dedicated configuration interfaces distinct from the filesystem itself
>>108997494 To make it easier to read. Regedit just makes it look like that, in reality they're even less readable but you're not meant to directly interface with it anyways
>>108997530 You say this as if most modern Linux distros aren't just failed attempts at abstracting the kernel and filesystem hierarchy standard behind loads of bloatware desktop environments, init interfaces, package managers etc
>>108997508 the windows registry is nothing more than a virtual filesystem >they made it a directory tree with files because its easier to work with doe
>>108997368 >Linux >want to get the memory map of a process >need to open some bullshit in /proc/pid/blahblah/map or something >parse some TEXT FILE (lmao) to get the data you want >what happens if the map of the process changes while you're reading halfway through the file? who knows lol >Windows >want to get the memory map of a process >call VirtualQuery a few times >each call is guaranteed to be self-consistent >all data is returned in a struct you can directly use
>>108997721 Each call to VirtualQuery is guaranteed to return self-consistent data (for that one call only). The kernel acquires a lock while it is reading the data. >does god knows what the source code for the Windows kernel is publicly available on github
Not everything is a file. When I new some dynamic memory, I work with pointers to data, not file handles. Syscalls like reading the time talk direct to the kernel and don't work like files.
>>108997762 >is known to randomly crash your shit you just hallucinated this info you can scroll to the bottom of the thread and find that the program crashes not because of VirtualQuery, but because he incorrectly assumed that a guard page is safe to read just because it has the "readable" attribute. If you access a guard page in a way that is compatible with its other access protections, then your application will receive a STATUS_GUARD_PAGE_VIOLATION exception, which you need to handle. If you do not handle the exception, as with all other exceptions, the app crashes.
>>108997368 >The UNIX world has spent the past 30 years trying and failing to implement similar abstractions to their interfaces and hide the ugly filesystem hierarchy standard just to keep up with Windows You mean Smalltalk?
>>108997906 any form of multi-user isolation on a shared system where users are allowed to run arbitrary code is just security theater and always has been see spectre and meltdown
>>108998193 >>108998203 there's code in there to detect how gay the user is, since it's pride month and they want to give gay users a rainbow flag desktop background but you're too gay and the integer overflowed :(
A file is a file. A directory is a directory. A printer is a printer. A mouse is a mouse.
All deserve their own specific interface if you want your operating system to be intuitive (for both developers and users) and reliable. Using file interface for everything is laziness, it's giving up and using a shitty leaky abstraction for things when vastly better interfaces already exist and are proven to work great in other OSes.
>>108997368 I don't understand what this thread is about. Yes, "everything is a file" is a UNIX philosophy, but neither Linux nor macOS follow it, they at maximum follow the "everything is a file descriptor" philosophy, which is not the same at all because you don't actually use read/write with those file descriptors
>>108997368 I heard from a friend of a friend who knows a janitor at Microsoft that every time an NT build failed he pressed a flaming gooey marshmello on a stick onto the offending developer's back and drew the windows flag out of their burning flesh.
>>108998492 >Microsoft announces Windows 12 >They decides to backpedal on all the slop they added with their previous OS' to try and salvage their reputation >Windows 12 continues the Windows' cycle of every other OS version being good
Text is the universal interface. Everything being a file is a joy, you only need something like fprintf to control and watch the system. It also make things simpler.
>>108997368 >It made more sense in the 60s and 70s It didn’t make much sense even back then, wasting cycles parsing text when your CPU was running at 4 MHz was a total waste.
>>108999861 It runs all the servers you use to watch your slop, and probably the vibrator your wife uses to satisfy herself because you cannot get your dick hard from decades of tranny porn. Being filtered by loonix when it was made as easier as it can be in $CURRENT_YEAR it just means you're retarded, but worry not, it's /g/ and it's a safe place for your kind.
>>108997530 Flounder ass looking plane. >>108997701 I agree that procfs is shit. I agree that Windows does some boutique things better. That being said, both are a race condition. Just trap the process.
>>108997368 And it works. As opposed to clueless zoomers reinventing everything the most retarded way just because they refuse to learn any existing standard, because peak mt stupid dunning Kruger after intro to cs 50.
>>108998389 >neither Linux nor macOS follow it linux does. you can use read() or poll() with data files, sockets, pipes, fifo queues, hardware (eg: /dev/mouse), ... but a nocoder wouldn't know that.
>>109004481 Most of that shit aren't files that are actually present on the filesystem somewhere, they're just file descriptors created by some syscall, which is not compliant with the "everything is a file" idea
>>109004432 >Windows can recover from GPU crashes even. I can't speak for Nvidia but as far as AMD is concerned no it fucking can't but I also can't really blame Windows when AMD releases absolute dogshit drivers