3 ms·
Just because data is in a text stream doesn't mean it is not structured. Awk is designed to handle structured text for example, the output of most (traditional)
by luriel 15y ago
Just because data is in a text stream doesn't mean it is not structured. Awk is designed to handle structured text for example, the output of most (traditional) Unix tools is 'structured' too (eg., ls and ps).
I recommend you read The Unix Programming Environment which gives many illustrations of how the Unix 'text streams' model works in practice.
One of the authors of that book and other folks that created Inferno (and Plan 9 and Unix) are now at Google working on Go.
Go channels are obviously not the same as Unix pipes, but there are similarities.
- _delirium 15y agoTraditional Unix stream processing assumes a specifically line-oriented structure, though, and is somewhat awkward in other cases. The Plan 9 people recognized that, and made some attempts to improve it, for example with Rob Pike's concept of "structural regular expressions" to describe streams that have a different "shape" than an array of lines: http://doc.cat-v.org/bell_labs/structural_regexps/ http://doc.cat-v.org/bell_labs/structural_regexps/