4 ms·
I don't think the cli is any less of a metaphor than the desktop is. Its just a different metaphor. Its not like shell pipelines are really pipes between two p
by bawolff 6y ago
I don't think the cli is any less of a metaphor than the desktop is. Its just a different metaphor.
Its not like shell pipelines are really pipes between two processes or a filesystem is the same as a physical system of files.
- PaulDavisThe1st 6y agoA pipe(2) in Unix is actually a piece of memory arranged so that it can be used as a FIFO, written and read to. There really is a physical object corresponding to the pipe, and the "|" refers directly if tersely to that object. A filesystem is fundamentally a way toorganize blocks of data on a storage medium. It consists of an actual physical medium with various attributes, which is used by a rule-driven system ("the filesystem") to decide where to put data (and conversely where to find it). It doesn't actually work in the same way as a paper filing cabinet, but in most operational senses, the two things are far closer together than they are different. The CLI is not a metaphor - it's an abstraction. It removes details that you don't need to know about (mostly), but provides you with a way to operate directly upon the objects (concepts) known to the operating system that you are interacting with. The classic Mac desktop described in TFA does consist of a lot of metaphors. Technically one can see this clearly in the way that the kernel of macOS isn't responsible for most of the way that desktop functions today: this is left to user-space services that create higher level objects for the user to interact with, leaving the kernel to deal with the same sorts of objects you'd describe with the CLI. Or something like that.
- bawolff 6y ago> There really is a physical object corresponding to the pipe If you open up your computer and get out your microscope, you're not going to find the pipe. Computers are metaphors on top of metaphors. There's nothing wrong with that but you have to go way way down the abstraction tree before you are dealing with anything "physical" > The CLI is not a metaphor - it's an abstraction. I'm unconvinced there is a difference (other than abstractions being hardcore)
- Phrodo_00 6y ago> If you open up your computer and get out your microscope, you're not going to find the pipe. You should be able to, though. The pipe has a (OS) memory location, which, after a bunch of redirections, is an absolute location in memory, which is a bunch of capacitors and transistors. Now, you could argue that those redirections are akin to metaphors, though.
- anyfoo 6y agoOr I could argue that I could ultimate find the capacitors and transistors for anything else we're talking about here. Except if they're just transistors because the representation of the pipe is sitting in static RAM for some reason, or in the fluctuation of a magnetic field. Or all of the above at the same time (caches, page files). Which one is the "real", non-metaphorical representation of the pipe? The one in the cache because it's being worked on by the CPU? The one in memory because its lifetime is longer?
- dgb23 6y agoAs I understand it, the difference is that an abstraction is a sign for a computational object. A metaphor is a sign for something else, outside of the computer, and only indirectly related to the computational object it represents.
- PaulDavisThe1st 6y agoThank you! Put very precisely and, IMO, accurately.
- watersb 6y ago"An abstraction is a sign for a computational object." Writing that on my wall. Over the past year, I have revisited the SICP [0] and the audio recording of a one-week short course that Hal Abelson and Gerry Sussman taught for HP [1]. You nailed it. [0]: "The Structure and Interpretation of Computer Programs", https://en.m.wikipedia.org/wiki/Structure_and_Interpretation_of_Computer_Programs https://en.m.wikipedia.org/wiki/Structure_and_Interpretation... (see also https://github.com/sarabander/sicp https://github.com/sarabander/sicp ) [1]: http://cabezal.com/sicp/ http://cabezal.com/sicp/
- anyfoo 6y ago> There really is a physical object corresponding to the pipe, and the "|" refers directly if tersely to that object. By that argument, there really is a physical object corresponding to the desktop. That, too, is made up of pieces of memory. > It consists of an actual physical medium with various attributes Not necessarily. I mean, yes, ultimately it does because we live in a physical reality. But ultimately even I start think about a filesystem in my head it exists on a physical medium, my brain. Are the trees that modern filesystem usually consist of nowadays actual trees growing in my computer, or are they metaphors? Named after their biological counterpart because they roughly look and act like them in very specific aspects? Like a desktop, or a window? Are the "folders" or "directories" that you interact with in your shell actually those pieces of objects, or are they a metaphor? > The CLI is not a metaphor - it's an abstraction. It removes details that you don't need to know about (mostly), but provides you with a way to operate directly upon the objects (concepts) I don't see the distinction. The desktop provides you with a way to operate directly upon the objects/concepts of the OS. In both cases, there is usually a multitude of abstractions before you reach any actual physical object. > the way that the kernel of macOS isn't responsible for most of the way that desktop functions today [...] leaving the kernel to deal with the same sorts of objects you'd describe with the CLI You mean the same way the kernel is not responsible for the way the CLI functions? Why is an open() system call (which can refer to numerous virtual, abstract, immaterial things) more "real" when the piece of memory it has been passed has been collected through a multitude of abstractions and maybe originated from a sequence of keystrokes on a keyboard via USB, than if it had been collected through a multitude of abstractions and maybe originated from a sequence of mouse movements via USB?
- stouset 6y agoYour first paragraph is literally an argument that pipes are, in fact, a metaphor.
- bfirsh 6y agoAgreed, though perhaps you could say it's more "real" than the GUI because you're dealing with lower level concepts. We touch on metaphors in this section: https://clig.dev/#conversation-as-the-norm https://clig.dev/#conversation-as-the-norm