login
Header Space

 
 

to ccurtis about text user interaface

May 22, 2008 - 11:25pm
Submitted by olecom on May 22, 2008 - 11:25pm.

> Would this make for a better links than elinks?

Run Borland Pascal 7.0 in dosbox to see what Turbo Vision was. Help system there is a nice browser, nither of today's lynx, links or elinks or whole www has. Pictures and flash are mostly spam, many don't know how to turn off.

dialog -> ncurses -> |stdout(ESC) -> tty -> vga_console |-> video RAM/frame buffer
(1)       (2)        (3)            (4)    (5)             (6)

Requesting ordinary dialog with standard placement of info and control elements. Whole chain of calls:

userspace

1. manual writing of windows, boxes, buttons specifying attributes, dimentions, open coded event loops, etc. linux-2.6/scripts/kconfig/lxdialog/*

2. translation of primitive calls of attribute change, cursor move, etc to ESC codes of a terminal. TERM=linux is one of many options

kernel

3. syscall write(tty, ESC, etc.)

4. looking on every byte (every single byte on 32bit or 64bit GHz CPU with all locks held!), doing switch() jumps based on every control character, reading further chars, generating parameters, calling console backend

5. making final representation, doing HW I/O

hardware

6. actual view

Now think of 6 as X server but for text user interface.

tui(ESC) -> /dev/console(ESC) -> video RAM/frame buffer+user input
(1)         (2)                  (3)

userspace

1. ask to show dialog box with $message and y/n choice in standard locations; dlg="\033\1\1message" ESC,DLG,FLAG,message

+----------------+
|    $message    |
|    $message    |
|                |
| [Yes]     [No] |
+----------------+

kernel

2. write(/dev/console, $dlg) syscall blocks until dialog has input

hardware

3. 8 or 16 bit processor creates from standard template (or uploaded skin/schema) dialog, writes message, waits for input, reports back by IRQ/MSI/poll whatever. (2) returns with code as result.

Maybe this can be built in the way comatible with IBM PC. (3) has keyboard and other input connected to it and acts as keyboard controller in "compatible mode". Didn't you know, that it is more important, than hich-tech CPU, e.g. CPU reset or legacy A20 pin ?-) If somebody thinks, that this is GPU, no it's not. This is a character-processing device side-by-side with rendering backends like GPU, RAMDAC, DVI, etc.

For all non-in-kernel emulators, like `xterm`, `putty` any such functionality is stupidly simple -- they are pure userspace appications. BUT, ncurses or any other "tui" library has no clue about such things and UNIX/POSIX "controlling tty" concept with all that useless signal-generating legacy are showstoppers. Here's fundamental design problem. But hey, i can live with task list and manual `kill` on other virtual consoles to send signals! See, no need of tty at all.

Turbo Vision was OOP! library writen for DOS and i8086!. Thus, porting it on UNIX sounds wired and is actually wired. Porting it on (3) -- yes!

System programming is plain text most of the time, unless in game consoles.
____

rant: same with graphics

May 24, 2008 - 9:55am

Same with graphics. I've 8M RAM/90-100Mhz CPU, some dumb VGAdapter with MS Windows 95. Now it's same look & feel in XP with 64M RAM or more and modern fast and hot GPU. Yet nothing works in topic OS, and RT kernel required for dumb responsive graphics. GHz Central PUs (dual cores or not) and plenty of central, over-cached RAM (PAT -- new fun for developers and users/testers) don't help -- X and Mozilla still slowly do what they want, sometimes bothering about what user wants.

Gee, extend stupid GPU arch, implement some trivial socket read()/write() and install X-Window there, be happy.

ACPIfied centralization and extencive caching is doomed.

AVR32(RISC+DSP) arch and chips are very interesting, though. Yet bloated Linux-2.6 and userspace can't do much there yet:

T2 generated binaries play MP3 at about 30% and Ogg/Vorbis at 50% CPU load on the 140MHz reference board while mid-sized MPEG2 streams saturate the CPU.
http://t2-project.org/architectures/avr32/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary