<story><title>Show HN: A Unixy approach to WebSockets</title><url>http://websocketd.com/</url></story><parent_chain><item><author>jeremiep</author><text>&amp;gt; Write programs to handle text streams, because that is a universal interface.&lt;p&gt;I always hated that part of UNIX. It would be so much better if programs could handle data-structure streams instead. Having text streams causes every single program to implement ad-hoc parsers and serializers.&lt;p&gt;I now use the command-line only for trivial one-time actions. For everything else I&amp;#x27;ll use a scripting language and forget about reading and writing text streams altogether.</text></item></parent_chain><comment><author>xorcist</author><text>The answer is probably the same as why powershell isn&amp;#x27;t as usable as a unix shell is. Which in turn has a lot to do with why we&amp;#x27;re still programming text files and not clicking fancy objects, despite it is seemingly a more powerful system and the many projects which tried to take advantage of that.&lt;p&gt;Text is a useful common denominator. Text is possible to version control, tie to bug trackers, and handle with configuration management systems.&lt;p&gt;The same is true for the command line. If you handle structured data, or objects, you communicate using APIs. While it&amp;#x27;s not theoretically impossible to still use version control and configuration management, it turns out that it&amp;#x27;s much more difficult in practice. Plain text is a useful lowest common denominator.</text></comment>
<story><title>Show HN: A Unixy approach to WebSockets</title><url>http://websocketd.com/</url></story><parent_chain><item><author>jeremiep</author><text>&amp;gt; Write programs to handle text streams, because that is a universal interface.&lt;p&gt;I always hated that part of UNIX. It would be so much better if programs could handle data-structure streams instead. Having text streams causes every single program to implement ad-hoc parsers and serializers.&lt;p&gt;I now use the command-line only for trivial one-time actions. For everything else I&amp;#x27;ll use a scripting language and forget about reading and writing text streams altogether.</text></item></parent_chain><comment><author>ayani</author><text>The .NET shell does this, but that&amp;#x27;s why it&amp;#x27;s not Unix, and it&amp;#x27;s not universal.&lt;p&gt;If programs passed data structures then either you&amp;#x27;re forcing a certain data structure model (i.e. it&amp;#x27;s not universal, because it&amp;#x27;s not compatible with anything else), or your data structures are so general (i.e. a block stream) that your applications are going to be parsing anyway... and that&amp;#x27;s going to be even nastier than if everything was stupid text steams in the first place.</text></comment>