3 ms·
How about protocol buffers and content negotiation? Your pipe figures out a proto that program a can emit and program b can consume. ls -> repeated FileDescr
by patmcguire 10y ago
How about protocol buffers and content negotiation? Your pipe figures out a proto that program a can emit and program b can consume.
ls ->
repeated FileDescriptor files;
| repeated string names;
Where FileDescriptor is whatever it needs to be, has all the info ls -l does. You have a heirarchy of outputs: if the next takes FileDescriptors, you give it FileDescriptors, if it doesn't you give it strings.
What would go to stdout goes through a toString filter.