News for hackers. Stuff that matters.
Re:Awkward – A Node.js-based terminal emulator by lhnz on Wednesday July 20, 2016 @12:12PM (#12130159)
I've read it before.

So I know that:

> Write programs to handle text streams, because that is a universal interface

But I also think that:

> To build it out of simple parts connected by well-defined interfaces.

Many text representations are vastly different, and neither simple or well-defined.

Re:Awkward – A Node.js-based terminal emulator by Aneurysm9_ on Wednesday July 20, 2016 @12:19PM (#12130220)
The interface is not necessarily the content of the message conveyed by the interface. Lines of text std(in|out) is a well-defined interface. Some programs may go further and specify the format of messages passed on that interface. https://github.com/synacor/dtk is one such system that specifies (for most of its commands) tab-delimited records as the message format. It interfaces well with other elements of the UNIX ecosystem, however, because its interface is simply lines of text on std(in|out).