News for hackers. Stuff that matters.
Re:Unix doesn’t follow the Unix philosophy by pilif on Friday May 25, 2012 @09:48AM (#4023428)
The fact that ls can produce output that can't be reliably sorted using the sort utility shows that ls is actually doing three things instead of just one: Listing files, sorting the output and then displaying the output in a human readable format.

This is not to criticize ls though - I would imagine that no matter how small the operation (well aside of operations executed directly by the cpu), there's still the possibility to break it up into smaller parts.

At some point convenience just trumps modularity.

ls -lt is just more convenient than a (hypotetical) ls -t | sort | xargs fileinfo | display-fileinfo

On a related note: Windows PowerShell comes closer to this ideal by being able to send arbitrary objects between pipes. This still has the side-effect though that single commands become much more awkward to use as they don't produce output that's usable on its own.

Re:Unix doesn’t follow the Unix philosophy by cturner on Friday May 25, 2012 @09:58AM (#4023463)

    I would imagine that no matter how small the operation
    (well aside of operations executed directly by the cpu),
    there's still the possibility to break it up into smaller
    parts.
The scripting system could have been designed to make layering easier. Bourne descendants are ugly and awkward. Hence, unix evolved into a situation where ls had lots of features, whereas were there a better scripting system, we might have had a standard environment which you could introspect deeper and extend with more confidence.
Re:Unix doesn’t follow the Unix philosophy by ori_b on Friday May 25, 2012 @10:04AM (#4023494)
> The scripting system could have been designed to make layering easier.

How? sh sucks for anything involved, but I can't think of a way to simplify pipelines much.

Re:Unix doesn’t follow the Unix philosophy by jcmhn on Saturday May 26, 2012 @12:28AM (#4026485)
A line oriented xargs could have been built in from day one.

A pair of shell variables honored by commands that let you specify output wrappers or separators would have been nice too. Think "-Q" in gnu ls, but universally supported and user-controlled.