[comp.editors] Orphaned Response

gillies@m.cs.uiuc.edu (01/15/90)

>/* Written 11:28 am  Jan  4, 1990 by fin@uh.msc.umn.edu */
> However, it is a (not universally accepted) software axiom that an
> application-writer has better things to do than re-implement the
> operating system.  CP/M did not offer any paged virtual memory
> support.  Hence we did not re-implement anything.  However, a "typical
> workstation environment" (e.g., Sun) offers the virtual memory support
> in hardware.

I think you lose a lot by assuming (1) virtual memory support (2) The
ability for client programs to remap pages, and (3) that the page
replacement scheme will mesh nicely with your editor.

I still haven't seen a good argument why you shouldn't do the editor
with pieces (linked lists of *arbitrary* text stretches -- not lines).
This technique makes NO assumptions on disk/page/block sizes, can make
decent progress with a very small working set, and is unbeatable for
small changes to 50-megabyte 1-line files.

gillies@m.cs.uiuc.edu (02/06/90)

sjs@spectral.ctt.bellcore.com (Stan Switzer) writes:
>On another point, handling text and simple structural features like
>paragraphs in the buffer-gap scheme seems pretty straight forward.
>How about handling font and size changes, underlining, figures,
>buttons, tabs and other active areas?  I can see several ways to go
>with this.  Can anybody shed some light on this for me?

I believe the first editor to handle multiple character styles was
Bravo, from Xerox (1976).  It used "pieces".  A piece editor stores
your file as a (linked) list of pieces.  A piece is a (ptr,lth) tuple.
For plain text, a file initially is just one (ptr,lth).  As you make
changes, the pieces are split, the linked list grows, and the lth's
shorten.  When you write the file out to disk, the file once again
become a single piece (i.e. a form of garbage collection).

This is a marvelous way to handle megabyte or gigabyte files.

It is easy to enhance pieces to make them triples: (ptr, lth, style).
This is how Bravo was written.  I suspect it's also how MS-Word works
(MS-Word was designed by one of Bravo's authors).

gillies@m.cs.uiuc.edu (08/21/90)

Memory is only $50-$60 per megabyte now.  Why not throw some hardware
at the problem?