News for hackers. Stuff that matters.
Re:Software reuse is more like an organ transplant than snap... by jiggawatts on Wednesday June 24, 2020 @07:04PM (#23634873)
> That's it. And it turns out that's a pretty powerful abstraction

But that's not what an abstraction is! UNIX pipes are maximally low-level, as close to un-abstract as it is possible to get, except perhaps if it used bit-streams instead of byte-streams. It literally cannot get less abstract than that.

UNIX pipes are completely untyped, like a C codebase that uses only void* to pass all data. (Okay, some way of indicating end-of-stream is also needed, but it's still a good analogy.)

> pipes are almost always the wrong tool if you do want structure

Not almost the wrong tool, entirely the wrong tool.

You can't magically shoehorn types back into an untyped system when all the existing components assume untyped streams.

PowerShell's structured and typed object streams is more UNIX than UNIX: https://news.ycombinator.com/item?id=23423650

Re:Software reuse is more like an organ transplant than snap... by heretoo on Wednesday June 24, 2020 @08:27PM (#23635451)
> You can't magically shoehorn types back into an untyped system when all the existing components assume untyped streams.

If this were true, then a typed system couldn't exist on top of machine code and random access memory, because the existing components (i.e. CPU + random access memory) have no knowledge of the types you are speaking of.

I think the assumption is false. Types can be shoehorned onto untyped data.

Re:Software reuse is more like an organ transplant than snap... by heretoo on Wednesday June 24, 2020 @08:23PM (#23635424)
> But that's not what an abstraction is! UNIX pipes are maximally low-level

To put a spin on it, maximally low-level within it's particular domain, perhaps, sitting on top of the transistors below them, sitting on top of quantum physics.

Thinking a bit further, an abstraction appears to be the mapping in both directions between two domains. That being said, the two domains themselves, are independent, and don't appear to be the abstraction.

The verb "abstract" would mean we are mapping from one domain to the other.

I think "homomorphism" is the mathematical term for what I'm describing.

What's my point? We can always go lower. :)

Re:Software reuse is more like an organ transplant than snap... by shadowgovt on Wednesday June 24, 2020 @11:02PM (#23636458)
The pipe is itself a huge abstraction. If you need proof, read the implementation. Buffering, open vs closed, process suspension when the pipe is empty and resumption when there is data... Pipes hide a lot of complexity under the hood, even as simple as they are.
Re:Software reuse is more like an organ transplant than snap... by teddyh on Thursday June 25, 2020 @03:05AM (#23637693)
The pipe abstracts the transfer of data, not the data being transferred.