tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: web inherits UNIX console?

On Sun, 11 Sep 2011, David Young wrote:

> An idea that I keep turning over in my head and cannot put to rest is
> that the web already has a lot better console abstraction, in the form
> of DOM, than the glass teletype that UNIX uses now.  Maybe we should
> switch?
> Another idea I'm mulling is that web stuff like HTML5 (Canvas) + SVG
> will eventually add up to a graphics console with a lot more seats,
> portability, and capability than X11.
> Thoughts?

This does some of that:

and this is an older version of approx the same idea:

(most of the older xmlterm sites seem to be 404 now).

iirc there's a third version of roughy the same idea out there, but i can't
find it atm.

The problem here isn't just that a webbroswer based terminal could give us 
a better ui, its that the unix paradigm is a fragile one.

Consider the time honoured ritual of working out who's using up all the 
disk space so they can be complained at:

cd /home ; du -ks * | sort -rn | head -10
4435696 david
1582120 mike
1066760 abrahaley
672724  geoff
657528  ward
615152  riws
458376  ken
403160  jasper
343124  james
259384  pas

Wouldn't the output be nicer if we used the -h option to du to humanise 
the numbers?

812K    tonyt
657M    geoff
643M    ward
601M    riws
468K    ian
448M    ken
394M    jasper
336M    james
254M    pas
199M    hughn


The problem is that unix tools format there output for humans, if you want
to manipulate the output then you run into problems, which defeats the whole
strength of a unix system - being able to pass data through multiple
operations to sort and filter and manipulate it.

Also, why do we have top/iftop/pftop/ntop rather than ps | top, netstat -i |
top, pfstat | top, and so on?

If the vairous system utilities spat out data in some structured format[1]
we could sort and manipulate it much eaiser, it would also fix the
'find -print0 | xargs -0' hack.

The problem then is working out where we format the output for humans, the
last program in the pipeline? the shell? the terminal?

If we do it in either of the first 2 options we can keep the existing
terminal system (either emulated or not), but don't get so much more in the
way of graphics, the third options means new terminals everywhere, and maybe
a curses using program for the final stages of pipelines for backwards

The other things to work out are how we format the data on the wire: line
orientated, with a record per line? with info about the records on it's
own at the start, or with info about the records on every line (which
would be fairly backwards compatable)?

e.g. something like[2]:




What do we do about metadata, ignore it? Make pipes and stdin/out speak

do we want programs in a pipeline to be able to walk up and down the
programs in the pipeline and see what they do? I think we need that for top
to work (either a program would have to recognise that it was being run
under top and spit out data repeatedly, or top would have to work out
which program(s) were feeding data to top and repeatedly re-run them).

Then for the graphical stuff we can do:

cd /home ; du -s * | sort -r size | head -10 | piechart -t "Top 10 disk space

[1] this is not a excuse for xml related bikeshedding again.

[2] with a config file somewhere that says a filename is a string and a 
filesize is a

[3] and thinking about it a bit more we'd need a way of changing types - all
those filenames also happen to be usernames, it would be nice to have a way
to change them to usernames so we could do, e.g. | xargs -n 1 | email -s
"Please clear up some disk space"

[]                                   [0x2ECA0975]

Home | Main Index | Thread Index | Old Index