3 ms·
I'm not sure why but i kind of feel this is just the general purpose of an operating system, to provide an environment for things to 'be done in' using the syst
by sim7c00 2y ago
I'm not sure why but i kind of feel this is just the general purpose of an operating system, to provide an environment for things to 'be done in' using the system's resources. And you can't pre-build everything that needs to be done, so it's important to make it extensible and allow for interoperability between programs relatively easily.
Windows does this too... it's just less touted to be such an environment as it has a lot of applications built in binary form which do a lot of work for you. But essentially, most of it's functionality is exposed via scripting interfaces, a lot of programs can also be extended with simple scripts. This even without including powershell into the mix, which allows to really go the next mile. you can even createRemoteThread (maybe a bad idea, but an example of how extensible it is! ;D)... - it's not posix etc. but definitely programmable.
don't get me wrong, i do love that people on unix aim to make things pipeable. I'd hope someday they will make their outputs easier to parse though rather than to have to have cut,awk,sed in the mix every-time to reformat stuff into a structure more easily interpreted. A common difficult task is to parse output from 'ls'. The underlying data is quite organized at every level, but the tool outputs are a big struggle to parse if you don't want to rely on strict formatting of filenames.
this last bit ofcourse can be said about many things about computers and data storage/exchane - it's kind of always a mess. there's so many standard ways to output things, and non-standard, that it's just a zoo of stuff to parse...
I'd be delighted if someday there's an OS which requires things sent into another program to adhere to an open and well defined data formatting standard, and just one at that. I guess no one wants to reinvent the wheel though and make each piped data piece be strictly json or something like that. it would make life a lot easier and can even be serialized/deserialized fairly generically to optimise transfer where needed...
It's what i want to do for my own OS, sadly no one will ever use that... :D but i am free to dream as i type a million lines of defines and bit twiddles! :D
- II2II 2y agoI agree with your points, heck even the classic Macintosh operating system exposed interfaces for end user programmability, but I think the article's author was illustrating that this is much closer to the norm for Unix based operating systems. As for piping text around, that is largely a product of a different era. an era when resources were more limited and ideas less developed. Keep in mind that Unix was developed at a time when most interactive systems used glorified typewriters. (While a terminal doesn't have to be a computer, the complexity pretty much necessitates IC's and they quickly evolved into simple computers.)
- wwalexander 2y ago> I'd be delighted if someday there's an OS which requires things sent into another program to adhere to an open and well defined data formatting standard, and just one at that Emacs? Jokes aside, I really do think S-exprs would be a good candidate for what you’re talking about as they can represent the same structures as JSON et al with less ceremony. Since S-exprs separate atoms with whitespace, and most UNIXy programs parse structured text using whitespace, you could implicitly wrap those programs’ input/output with parens to make them work on S-exprs.
- immibis 2y agoThe decline of COM and Visual Basic has been a disaster for the human race. You could script GUI applications, in an object-oriented fashion, more easily than any Unix shell. You didn't just have to concatenate processes in a pipeline; you could arbitrarily reach inside them. And remember being able to embed an arbitrary application into a rectangle in your Word document or PowerPoint presentation, with OLE? That was related.