home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / editors / 2026 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  4.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!rsg1.er.usgs.gov!news.cs.indiana.edu!syscon!gator!fang!att!cbnewsi!cbnewsh!warren
  2. From: warren@cbnewsh.cb.att.com (warren.a.montgomery)
  3. Newsgroups: comp.editors
  4. Subject: Re: buffer gap: actually writing an editor
  5. Summary: Make sure it is customizable!
  6. Keywords: Finseth, Craft, Of, Text, Editing
  7. Message-ID: <1992Aug18.142309.26241@cbnewsh.cb.att.com>
  8. Date: 18 Aug 92 14:23:09 GMT
  9. References: <fortony.714037868@murphy>
  10. Organization: AT&T
  11. Lines: 85
  12.  
  13. In article <fortony.714037868@murphy>, fortony@sonne.cso.uiuc.edu writes:
  14.  
  15. >     I'm having some problems imagining how I'd implement
  16. > the buffer gap method.  Finseth says this is just a big
  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. You don't move after every insertion, only when the gap is filled
  24. up (or in some schemes not at all).  The performance problem with
  25. buffer gap schemes, if there is one, is that moving around in the
  26. file can require you to move the gap, and that requires copying.
  27. ...
  28. >     My second dilemma is modelessness over modality.
  29. > Please restrain all thoughts you may have on this point to
  30. > technical discussion.
  31. ...
  32. Sorry, This isn't a technical issue.  I've seen studies supporting
  33. both modal and non-modal editors as being better from a keypress
  34. standpoint, but keyboard efficiency has nothing to do with user
  35. preference or effectiveness.  People basically will want your
  36. editor to behave exactly like the one they learned on.  In the old
  37. days, emacs and vi were the things most users had experienced, if
  38. any, but now there are lots of PC based editors with varying
  39. degrees of Modality that people are likely to have experienced.
  40. The best suggestion is that whatever you do, make it flexible
  41. enough to be rebound.
  42. ...
  43. > but he goes on to think that LISP is a great
  44. > implementation and extension language which those same
  45. > users would be using, so I'm kinda iffy. 
  46. ...
  47. I don't think the big win is Lisp per-se vs anything else here,
  48. but you need an extension langauge that lets you incrementally
  49. update and dynamically bind new functionality, like lisp, and it
  50. is a big win to have your "built in" commands built on top of the
  51. extension language (something I learned by doing otherwise in my
  52. emacs clone).
  53. ...
  54. > What are currently accepted held beliefs concerning
  55. > memory usage and well-behaved generic editors?
  56. ...
  57. My first comment is that unless your editor will be used for doing
  58. searches on War and Peace, run on some ancient hardware, or you
  59. did something terribly inefficient in the buffer representation,
  60. virtual memory behavior of the buffer is not likely to be a big
  61. problem for you.  As someone else pointed out, if you search the
  62. whole buffer you have to read it, and the key things are to store
  63. it in a way that minimizes the number of disk blocks to read and
  64. hopefully reads each block only once, which all the sensible
  65. schemes approach pretty well.  There are some other issues to at
  66. least think about:
  67.  
  68. Large text and "overhead" data space are frequently more annoying
  69. from than the buffer storage, particularly on a machine with lots
  70. of editors running.  In the latter case, making all of the basic
  71. editor shareable is important, and may be trickey if a lot of it
  72. is written in some extension language, since the pages
  73. containing your extension language code may look like writeable
  74. data to the underlying operating system.
  75.  
  76. Much editing is read-only (using an editor to page through a file
  77. that is never modified).  Avoiding having to copy the file being
  78. edited into your memory space can be a big win in this case, and
  79. is possible for a paged buffer gap or paged list of segments kind
  80. of representation (just page it out of the file itself).  
  81.  
  82. If you do some explicit memory management or use multiple threads,
  83. you may be better able to overlap slow operations to improved the
  84. percieved response.  My emacs clone, for example, starts
  85. repainting the display while reading a large file as soon as it as
  86. enough of the file read to be able to do it, masking the time
  87. required for file reading with the screen painting.
  88.  
  89. Have fun, editor implementations are a great place to try out all
  90. those things you learned in operating systems and compilers
  91. courses that you normally don't get a chance to apply, because
  92. someone else already did it for you.
  93.  
  94. -- 
  95.  
  96.     Warren Montgomery
  97.     att!iexist!warren
  98.