home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / editors / 2014 < prev    next >
Encoding:
Text File  |  1992-08-17  |  4.4 KB  |  94 lines

  1. Newsgroups: comp.editors
  2. Path: sparky!uunet!usc!sol.ctr.columbia.edu!caen!news.cs.indiana.edu!umn.edu!unet.umn.edu!fin
  3. From: fin@unet.umn.edu (Craig A. Finseth)
  4. Subject: Re: buffer gap: actually writing an editor
  5. Message-ID: <1992Aug17.142553.28151@news2.cis.umn.edu>
  6. Keywords: Finseth, Craft, Of, Text, Editing
  7. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  8. Nntp-Posting-Host: norge.unet.umn.edu
  9. Organization: University of Minnesota, Networking Services.
  10. References:  <fortony.714037868@murphy>
  11. Date: Mon, 17 Aug 1992 14:25:53 GMT
  12. Lines: 80
  13.  
  14. In article <fortony.714037868@murphy>, fortony@sonne.cso.uiuc.edu writes:
  15. |> Greets!  I just finished reading Finseth's fine _The Craft of
  16. |> Text Editing_ (forty bucks -- cha ching!).  Why?  Well, I'm
  17.     ...
  18. |> The inserted character requires that the right bit be moved
  19. |> farther right out of the way in memory.  Depending on the
  20. |> size of the file and the efficiency of the memmove, this
  21. |> could take a really long time.  And in a modeless editor
  22.  
  23. Remember that there is a gap between the left and right bits.  When
  24. inserting text, you have to move the gap to the point (i.e., where you
  25. are inserting), then just move a pointer and stuff the character.
  26.  
  27. The entire right bit would only be moved if you ran out of gap.  For
  28. example, GNU-Emacs moves the entire right bit by at least a Kbyte.  If
  29. you are on a system where such large motions will cause problems, I
  30. suggest using paged buffer gap.
  31.  
  32. |>     My second dilemma is modelessness over modality.
  33. |> Please restrain all thoughts you may have on this point to
  34. |> technical discussion.  I'm thinking that modality is 
  35. |> basically 'control-lock'.  Instead of having to type
  36. |> ^F^F^F^F^F^D as per emacs, a user in vi can type 
  37. |> ESCkkkkkj(editing entry key), 'locking' the control key
  38. |> down until she 'unlocks' it with 'a' or 'r' or 'i' or
  39. |> whatever.  Finseth thinks this is disreputable behavior
  40. |> for an editor because users might not be able to figure
  41. |> out modes -- but he goes on to think that LISP is a great
  42. |> implementation and extension language which those same
  43. |> users would be using, so I'm kinda iffy.  Are there any
  44. |> studies on the average keypresses in, say, vi, versus
  45. |> the average keypresses (including the first press of 
  46. |> the bucky key[s]) in emacs?
  47.  
  48. Well, there are three issues here: modes, Lisp, and number of
  49. keypresses.
  50.  
  51. I consider that the major issue modes is their psychological
  52. complexity.  Now, people _can_ learn to deal with anything.  The
  53. question is, what _should_ they learn.  It is my opinion that modes
  54. should not be present in core operations such as basic editing.
  55.  
  56. I consider Lisp to be an excellent implementation language.  However,
  57. I do not say that it is the only good language, nor do I say that
  58. every user should be able to program in Lisp.
  59.  
  60. I am only aware of one study (the Robert's study mentioned in my
  61. bibliography), and was on three ancient editors and TECO (which, oddly
  62. enough, has the same insert / edit modality as vi).
  63.  
  64. |>     My third dilemma is emulation of virtual memory.
  65. |> As a maintainer of sun workstations, I am acutely aware
  66. |> that sensible programs can swap to disk much more sanely
  67. |> than the system.  However, increasing the number of
  68. |> boundaries a search or move can cross seems to get scary,
  69. |> especially when, as must be the case, the chunks of file
  70. |> can be of very different sizes.  A user might delete
  71. |> everything out of a chunk except for the letter 'a',
  72. |> for instance, and then issue a search for "*aa".  This
  73. |> would have the potential for seriously spamming the
  74. |> machine and/or the disk system if the chunk got swapped
  75. |> out.  What are currently accepted held beliefs concerning
  76. |> memory usage and well-behaved generic editors?
  77.  
  78. Well, until we get affordable content-addressable disk drives, the
  79. _only_ way to do a linear search through text is to fetch each block
  80. into memory and look at it.  The trick is to maxmize the information
  81. in each block.  Buffer gap does that because, except for the four
  82. block ends, each block is 100% packed with data in the correct order.
  83. Paged buffer gap lowers the data packing to less than 100%, but at
  84. least all the data is in the right order.  Linked line can have
  85. terrible properties, due to interweaving of lines.
  86.  
  87. Craig A. Finseth            fin@unet.umn.edu [CAF13]
  88. Networking Services            +1 612 624 3375 desk
  89. Computer and Information Services    +1 612 625 0006 problems
  90. University of Minnesota            +1 612 626 1002 fax
  91. 130 Lind Hall, 207 Church St SE
  92. Minneapolis MN 55455-0134, USA
  93.  
  94.