4 ms·
i feel like structured data in a shell will phase out. The posix pipes allow streaming any data. So if programs want to stream structured data, just build progr
by sigmonsays 7y ago
i feel like structured data in a shell will phase out. The posix pipes allow streaming any data. So if programs want to stream structured data, just build programs who know how to communicate with each other using structured data. The older shells withstand the test of time with generic interfaces.
For instance, because of the influx of JSON the past few years I have learned to use jq very well. It does everything I need and I didn't need to upgrade my shell to use it. What if everything becomes protobuf down the road?
- JohnBooty 7y agoi feel like structured data in a shell will phase out. The posix pipes allow streaming any data. There's a huge mismatch in coreutils. Nearly everything is built around a line-based philosophy. However, nearly any coreutil you care to name also likes to cram multiple bits of information on a single line. That means you often have to do a bunch of ugly manipulation with awk, sed, cut, whatever to anything programmatic with the output of each command. For instance, because of the influx of JSON the past few years I have learned to use jq very well. It does everything I need Yeah, jq is awesome and covers a lot of needs. But coreutils don't really emit json, so... yeah. There's a lot that it can't work with, right? What if everything becomes protobuf down the road? I know you're being facetious, I think protobuf is clearly overkill for very many needs. Nushell seems to build upon what we've learned in the last 30-40 years. Pipes and simple interchange formats work well and are very useful for a lot of use cases. However, experience also shows that very few programs output lines of text that are atomic in nature. Each line represents multiple things and we frequently need to parse them out. That seems like a very common use case that our shell can handle for us.