acme.ms 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295
  1. .de EX
  2. .nr x \\$1v
  3. \\!h0c n \\nx 0
  4. ..
  5. .de FG \" start figure caption: .FG filename.ps verticalsize
  6. .KF
  7. .BP \\$1 \\$2
  8. .sp .5v
  9. .EX \\$2v
  10. .ps -1
  11. .vs -1
  12. ..
  13. .de fg \" end figure caption (yes, it is clumsy)
  14. .ps
  15. .vs
  16. .br
  17. \l'1i'
  18. .KE
  19. ..
  20. .TL
  21. Acme: A User Interface for Programmers
  22. .AU
  23. .I "Rob Pike
  24. .I rob@plan9.bell-labs.com
  25. .SP .22i exactly
  26. .AB
  27. .FS
  28. \l'1i'
  29. .br
  30. Originally appeared in
  31. .I
  32. Proc. of the Winter 1994 USENIX Conf.,
  33. .R
  34. pp. 223-234,
  35. San Francisco, CA
  36. .br
  37. Reprinted in
  38. .I "Plan 9 Programmer's Manual: Volume 2"
  39. (Second Edition), AT&T 1995.
  40. .FE
  41. A hybrid of window system, shell, and editor, Acme gives text-oriented
  42. applications a clean, expressive, and consistent style of interaction.
  43. Traditional window systems support interactive client programs and offer libraries of
  44. pre-defined operations such as pop-up menus
  45. and buttons to promote a consistent
  46. user interface among the clients.
  47. Acme instead provides its clients with a fixed user interface and
  48. simple conventions to encourage its uniform use.
  49. Clients access the facilities of Acme through a file system interface;
  50. Acme is in part a file server that exports device-like files that may be
  51. manipulated to access and control the contents of its windows.
  52. Written in a concurrent programming language,
  53. Acme is structured as a set of communicating processes that neatly subdivide
  54. the various aspects of its tasks: display management, input, file server, and so on.
  55. .PP
  56. Acme attaches distinct functions to the three mouse buttons:
  57. the left selects text;
  58. the middle executes textual commands;
  59. and the right combines context search and file opening
  60. functions to integrate the various applications and files in
  61. the system.
  62. .PP
  63. Acme works well enough to have developed
  64. a community that uses it exclusively.
  65. Although Acme discourages the traditional style of interaction
  66. based on typescript windows\(emteletypes\(emits
  67. users find Acme's other services render
  68. typescripts obsolete.
  69. .AE
  70. .SH
  71. History and motivation
  72. .PP
  73. The usual typescript style of interaction with
  74. Unix and its relatives is an old one.
  75. The typescript\(eman intermingling of textual commands and their
  76. output\(emoriginates with the scrolls of paper on teletypes.
  77. The advent of windowed terminals has given each user what
  78. amounts to an array of teletypes, a limited and unimaginative
  79. use of the powers of bitmap displays and mice.
  80. Systems like the Macintosh
  81. that do involve the mouse as an integral part of the interaction
  82. are geared towards general users, not experts, and certainly
  83. not programmers.
  84. Software developers, at least on time-sharing systems, have been left behind.
  85. .FG ./acme.fig1 5i
  86. Figure 1. A small Acme screen\(emnormally it runs on a larger display\(emdemonstrating
  87. some of the details discussed in the text.
  88. The right column contains some guide files,
  89. a mailbox presented by Acme's mail program,
  90. the columnated display of files in Acme's own source directory,
  91. a couple of windows from the OED browser,
  92. a debugger window,
  93. and an error window showing diagnostics from a compilation.
  94. The left column holds a couple of source files
  95. .CW dat.h "" (
  96. and
  97. .CW acme.l ),
  98. another debugger window displaying a stack trace,
  99. and a third source file
  100. .CW time.l ). (
  101. .CW Time.l
  102. was opened from the debugger by clicking the right mouse button
  103. on a line in the stack window;
  104. the mouse cursor landed on the offending line of
  105. .CW acme.l
  106. after a click on the compiler message.
  107. .fg
  108. .PP
  109. Some programs have mouse-based editing of
  110. text files and typescripts;
  111. ones I have built include
  112. the window systems
  113. .CW mux
  114. [Pike88]
  115. and
  116. .CW 8½
  117. [Pike91]
  118. and the text editor
  119. Sam [Pike87].
  120. These have put the programmer's mouse to some productive work,
  121. but not wholeheartedly. Even experienced users of these programs
  122. often retype text that could be grabbed with the mouse,
  123. partly because the menu-driven interface is imperfect
  124. and partly because the various pieces are not well enough integrated.
  125. .PP
  126. Other programs\(emEMACS [Stal93] is the prime example\(emoffer a high
  127. degree of integration but with a user interface built around the
  128. ideas of cursor-addressed terminals that date from the 1970's.
  129. They are still keyboard-intensive and
  130. dauntingly complex.
  131. .PP
  132. The most ambitious attempt to face these issues was the Cedar
  133. system, developed at Xerox [Swei86].
  134. It combined a new programming language, compilers,
  135. window system, even microcode\(ema complete system\(emto
  136. construct a productive, highly
  137. integrated and interactive environment
  138. for experienced users of compiled languages.
  139. Although successful internally, the system was so large
  140. and so tied to specific hardware that it never fledged.
  141. .PP
  142. Cedar was, however, the major inspiration for Oberon [Wirt89],
  143. a system of similar scope but much smaller scale.
  144. Through careful selection of Cedar's ideas, Oberon shows
  145. that its lessons can be applied to a small, coherent system
  146. that can run efficiently on modest hardware.
  147. In fact, Oberon probably
  148. errs too far towards simplicity: a single-process system
  149. with weak networking, it seems an architectural throwback.
  150. .PP
  151. Acme is a new program,
  152. a combined window system, editor, and shell,
  153. that applies
  154. some of the ideas distilled by Oberon.
  155. Where Oberon uses objects and modules within a programming language (also called Oberon),
  156. Acme uses files and commands within an existing operating system (Plan 9).
  157. Unlike Oberon, Acme does not yet have support for graphical output, just text.
  158. At least for now, the work on Acme has concentrated on
  159. producing the smoothest user interface possible for a programmer
  160. at work.
  161. .PP
  162. The rest of this paper describes Acme's interface,
  163. explains how programs can access it,
  164. compares it to existing systems,
  165. and finally presents some unusual aspects of its implementation.
  166. .SH
  167. User interface
  168. .PP
  169. .FG ./acme.fig2 3i
  170. Figure 2. An Acme window showing a section of code.
  171. The upper line of text is the tag containing the file name,
  172. relevant commands, and a scratch area (right of the vertical bar);
  173. the lower portion of the window is the
  174. body, or contents, of the file.
  175. Here the scratch area contains a command for the middle button
  176. .CW mk ) (
  177. and a word to search for with the right button
  178. .CW cxfidalloc ). (
  179. The user has just
  180. clicked the right button on
  181. .CW cxfidalloc
  182. and Acme has searched for the word, highlighted it,
  183. and moved the mouse cursor there. The file has been modified:
  184. the center of the layout box is black and the command
  185. .CW Put
  186. appears in the tag.
  187. .fg
  188. Acme windows are arrayed in columns (Figure 1) and are used more
  189. dynamically than in an environment like X Windows or
  190. .CW 8½
  191. [Sche86, Pike91].
  192. The system frequently creates them automatically and the user
  193. can order a new one with a single mouse button click.
  194. The initial placement of a new window is determined
  195. automatically, but the user may move an existing window anywhere
  196. by clicking or dragging a
  197. .I "layout box
  198. in the upper left corner of
  199. the window.
  200. .PP
  201. Acme windows have two parts: a
  202. .I tag
  203. holding a single line of text,
  204. above a
  205. .I body
  206. holding zero or more lines (Figure 2).
  207. The body typically contains an image of a file being edited
  208. or the editable output of a
  209. program, analogous to an
  210. EMACS shell
  211. window. The tag contains
  212. the name of the window
  213. (usually the name of the associated
  214. file or directory), some built-in commands, and a scratch area to hold arbitrary text.
  215. If a window represents a directory, the name in the tag ends with
  216. a slash and the body contains a list of the names of the files
  217. in the directory.
  218. Finally, each non-empty body holds a scroll bar at the left of the text.
  219. .PP
  220. Each column of windows also has a layout box and a tag.
  221. The tag has no special meaning, although Acme pre-loads it with a few
  222. built-in commands.
  223. There is also a tag across the whole display, also loaded with
  224. helpful commands and a list of active processes started
  225. by Acme.
  226. .PP
  227. Typing with the keyboard and selecting with the left button are as in
  228. many other systems, including the Macintosh,
  229. .CW 8½ ,
  230. and Sam.
  231. The middle and right buttons are used, somewhat like the left button,
  232. to `sweep' text, but the indicated text is treated in a way
  233. that depends on the text's location\(em\f2context\f1\(emas well as its content.
  234. This context, based on the directory of the file containing the text,
  235. is a central component of Acme's style of interaction.
  236. .PP
  237. Acme has no single notion of `current directory'.
  238. Instead, every command, file name,
  239. action, and so on is interpreted or executed in the directory named by the
  240. tag of the window containing the command. For example, the string
  241. .CW mammals
  242. in a window labeled
  243. .CW /lib/
  244. or
  245. .CW /lib/insects
  246. will be interpreted as the file name
  247. .CW /lib/mammals
  248. if such a file exists.
  249. .PP
  250. Throughout Acme, the middle mouse button is used to execute commands
  251. and the right mouse button is used to locate and select files and text.
  252. Even when there are no true files on which to operate\(emfor example
  253. when editing mail messages\(emAcme and its applications use
  254. consistent extensions of these basic functions.
  255. This idea is as vital to Acme as icons are to the Macintosh.
  256. .PP
  257. The middle button executes commands: text swept with the button
  258. pressed is underlined; when the button is released, the underline is
  259. removed and the indicated text is executed.
  260. A modest number of commands are recognized as built-ins: words like
  261. .CW Cut ,
  262. .CW Paste ,
  263. and
  264. .CW New
  265. name
  266. functions performed directly by Acme.
  267. These words often appear in tags to make them always available,
  268. but the tags are not menus: any text anywhere in Acme may be a command.
  269. For example, in the tag or body of any window one may type
  270. .CW Cut ,
  271. select it with the left button, use the middle button to execute it,
  272. and watch it disappear again.
  273. .PP
  274. If the middle button indicates a command that is not recognized as a built-in,
  275. it is executed in the directory
  276. named by the tag of the window holding the text.
  277. Also, the file to be executed is searched for first in that directory.
  278. Standard input is connected to
  279. .CW /dev/null ,
  280. but standard and error outputs are connected to an Acme window,
  281. created if needed, called
  282. \f2dir\f(CW/+Errors\f1 where
  283. .I dir
  284. is the directory of the window.
  285. (Programs that need interactive input use a different interface, described below.)
  286. A typical use of this is to type
  287. .CW mk
  288. (Plan 9's
  289. .CW make )
  290. in the scratch area in the tag of a C source window, say
  291. .CW /sys/src/cmd/sam/regexp.c ,
  292. and execute it.
  293. Output, including compiler errors, appears in the window labeled
  294. .CW /sys/src/cmd/sam/+Errors ,
  295. so file names in the output are associated with the windows and directory
  296. holding the source.
  297. The
  298. .CW mk
  299. command remains in the tag, serving as a sort of menu item for the associated
  300. window.
  301. .PP
  302. Like the middle button, the right button is used to indicate text by sweeping it out.
  303. The indicated text is not a command, however, but the argument of a generalized
  304. search operator.
  305. If the text, perhaps after appending it to the directory of the window containing it,
  306. is the name of an existing file, Acme creates a new window to hold the file
  307. and reads it in. It then moves the mouse cursor to that window. If the file is
  308. already loaded into Acme, the mouse motion happens but no new window is made.
  309. For example, indicating the string
  310. .CW sam.h
  311. in
  312. .P1
  313. #include "sam.h"
  314. .P2
  315. in a window on the file
  316. .CW /sys/src/cmd/sam/regexp.c
  317. will open the file
  318. .CW /sys/src/cmd/sam/sam.h .
  319. .PP
  320. If the file name is followed immediately by a colon and a legal address in
  321. Sam notation (for example a line number or a regular expression delimited in
  322. slashes or a comma-separated compound of such addresses), Acme highlights
  323. the target of that address in the file and places the mouse there. One may jump to
  324. line 27 of
  325. .CW dat.h
  326. by indicating with the right button the text
  327. .CW dat.h:27 .
  328. If the file is not already open, Acme loads it.
  329. If the file name is null, for example if the indicated string is
  330. .CW :/^main/ ,
  331. the file is assumed to be that of the window containing the string.
  332. Such strings, when typed and evaluated in the tag of a window, amount to
  333. context searches.
  334. .PP
  335. If the indicated text is not the name of an existing file, it is taken to be literal
  336. text and is searched for in the body of the window containing the text, highlighting
  337. the result as if it were the result of a context search.
  338. .PP
  339. For the rare occasion when a file name
  340. .I is
  341. just text to search for, it can be selected with the left button and used as the
  342. argument to a built-in
  343. .CW Look
  344. command that always searches for literal text.
  345. .SH
  346. Nuances and heuristics
  347. .PP
  348. A user interface should not only provide the necessary functions, it should also
  349. .I feel
  350. right.
  351. In fact, it should almost not be felt at all; when one notices a
  352. user interface, one is distracted from the job at hand [Pike88].
  353. To approach this invisibility, some of Acme's properties and features
  354. are there just to make the others easy to use.
  355. Many are based on a fundamental principle of good design:
  356. let the machine do the work.
  357. .PP
  358. Acme tries to avoid needless clicking and typing.
  359. There is no `click-to-type', eliminating a button click.
  360. There are no pop-up or pull-down menus, eliminating the mouse action needed to
  361. make a menu appear.
  362. The overall design is intended to make text on the screen useful without
  363. copying or retyping; the ways in which this happens involve
  364. the combination of many aspects of the interface.
  365. .PP
  366. Acme tiles its windows and places them automatically
  367. to avoid asking the user to place and arrange them.
  368. For this policy to succeed, the automatic placement must behave well enough
  369. that the user is usually content with the location of a new window.
  370. The system will never get it right all the time, but in practice most
  371. windows are used at least for a while where Acme first places them.
  372. There have been several complete rewrites of the
  373. heuristics for placing a new window,
  374. and with each rewrite the system became
  375. noticeably more comfortable. The rules are as follows, although
  376. they are still subject to improvement.
  377. The window appears in the `active' column, that most recently used for typing or
  378. selecting.
  379. Executing and searching do not affect the choice of active column,
  380. so windows of commands and such do not draw new windows towards them,
  381. but rather let them form near the targets of their actions.
  382. Output (error) windows always appear towards the right, away from
  383. edited text, which is typically kept towards the left.
  384. Within the column, several competing desires are balanced to decide where
  385. and how large the window should be:
  386. large blank spaces should be consumed;
  387. existing text should remain visible;
  388. existing large windows should be divided before small ones;
  389. and the window should appear near the one containing the action that caused
  390. its creation.
  391. .PP
  392. Acme binds some actions to chords of mouse buttons.
  393. These include
  394. .CW Cut
  395. and
  396. .CW Paste
  397. so these common operations can be done without
  398. moving the mouse.
  399. Another is a way to apply a command in one window to text (often a file name)
  400. in another, avoiding the actions needed to assemble the command textually.
  401. .PP
  402. Another way Acme avoids the need to move the mouse is instead to move the cursor
  403. to where it is likely to be used next. When a new window is made, Acme
  404. moves the cursor to the new window; in fact, to the selected text in that window.
  405. When the user deletes a newly made window, the cursor is
  406. returned to the point it was before the window was made,
  407. reducing the irritation of windows that pop up to report annoying errors.
  408. .PP
  409. When a window is moved, Acme moves the cursor to the layout box in
  410. its new place, to permit further adjustment without moving the mouse.
  411. For example, when a click of the left mouse button on the layout box grows
  412. the window, the cursor moves to the new location of the box so repeated clicks,
  413. without moving the mouse, continue to grow it.
  414. .PP
  415. Another form of assistance the system can offer is to supply precision in
  416. pointing the mouse. The best-known form of this is `double-clicking' to
  417. select a word rather than carefully sweeping out the entire word.
  418. Acme provides this feature, using context to decide whether to select
  419. a word, line, quoted string, parenthesized expression, and so on.
  420. But Acme takes the idea much further by applying it to execution
  421. and searching.
  422. A
  423. .I single
  424. click, that is, a null selection, with either the middle or right buttons,
  425. is expanded automatically to indicate the appropriate text containing
  426. the click. What is appropriate depends on the context.
  427. .PP
  428. For example, to execute a single-word command
  429. such as
  430. .CW Cut ,
  431. it is not necessary to sweep the entire word; just clicking the button once with
  432. the mouse pointing at the word is sufficient. `Word'
  433. means the largest string of likely file name characters surrounding the location
  434. of the click: click on a file name, run that program.
  435. On the right button, the rules are more complicated because
  436. the target of the click might be a file name, file name with address,
  437. or just plain text. Acme examines the text near the click to find
  438. a likely file name;
  439. if it finds one, it checks that it names an existing file (in the directory named in the tag, if the name is relative)
  440. and if so, takes that as the result, after extending it with any address
  441. that may be present. If there is no file with that name, Acme
  442. just takes the largest alphanumeric string under the click.
  443. The effect is a natural overloading of the button to refer to plain text as
  444. well as file names.
  445. .PP
  446. First, though, if the click occurs over the left-button-selected text in the window,
  447. that text is taken to be what is selected.
  448. This makes it easy to skip through the occurrences of a string in a file: just click
  449. the right button
  450. on some occurrence of the text in the window (perhaps after typing it in the tag)
  451. and click once for each subsequent occurrence. It isn't even necessary to move
  452. the mouse between clicks; Acme does that.
  453. To turn a complicated command into a sort of menu item, select it:
  454. thereafter, clicking the middle button on it will execute the full command.
  455. .PP
  456. As an extra feature, Acme recognizes file names in angle brackets
  457. .CW <>
  458. as names of files in standard directories of include files,
  459. making it possible for instance to look at
  460. .CW <stdio.h>
  461. with a single click.
  462. .PP
  463. Here's an example to demonstrate how the actions and defaults work together.
  464. Assume
  465. .CW /sys/src/cmd/sam/regexp.c
  466. is
  467. open and has been edited. We write it (execute
  468. .CW Put
  469. in the tag; once the file is written, Acme removes the word from the tag)
  470. and type
  471. .CW mk
  472. in the tag. We execute
  473. .CW mk
  474. and get some errors, which appear in a new window labeled
  475. .CW /sys/src/cmd/sam/+Errors .
  476. The cursor moves automatically to that window.
  477. Say the error is
  478. .P1
  479. main.c:112: incompatible types on assignment to `pattern'
  480. .P2
  481. We move the mouse slightly and click the right button
  482. at the left of the error message; Acme
  483. makes a new window, reads
  484. .CW /sys/src/cmd/main.c
  485. into it, selects line 112
  486. and places the mouse there, right on the offending line.
  487. .SH
  488. Coupling to existing programs
  489. .PP
  490. Acme's syntax for file names and addresses makes it easy for other programs
  491. to connect automatically to Acme's capabilities. For example, the output of
  492. .P1
  493. grep -n variable *.[ch]
  494. .P2
  495. can be used to help Acme step through the occurrences of a variable in a program;
  496. every line of output is potentially a command to open a file.
  497. The file names need not be absolute, either: the output
  498. appears in a window labeled with the directory in which
  499. .CW grep
  500. was run, from which Acme can derive the full path names.
  501. .PP
  502. When necessary, we have changed the output of some programs,
  503. such as compiler error messages, to match
  504. Acme's syntax.
  505. Some might argue that it shouldn't be necessary to change old programs,
  506. but sometimes programs need to be updated when systems change,
  507. and consistent output benefits people as well as programs.
  508. A historical example is the retrofitting of standard error output to the
  509. early Unix programs when pipes were invented.
  510. .PP
  511. Another change was to record full path names in
  512. the symbol table of executables, so line numbers reported by the debugger
  513. are absolute names that may be used directly by Acme; it's not necessary
  514. to run the debugger in the source directory. (This aids debugging
  515. even without Acme.)
  516. .PP
  517. A related change was to add lines of the form
  518. .P1
  519. #pragma src "/sys/src/libregexp"
  520. .P2
  521. to header files; coupled with Acme's ability to locate a header file,
  522. this provides a fast, keyboardless way to get the source associated with a library.
  523. .PP
  524. Finally, Acme directs the standard output of programs it runs to
  525. windows labeled by the directory in which the program is run.
  526. Acme's splitting of the
  527. output into directory-labeled windows is a small feature that has a major effect:
  528. local file names printed by programs can be interpreted directly by Acme.
  529. By indirectly coupling the output of programs to the input,
  530. it also simplifies the management of software that occupies multiple
  531. directories.
  532. .SH
  533. Coupling to new programs
  534. .PP
  535. Like many Plan 9 programs,
  536. Acme offers a programmable interface to
  537. other programs by acting as a file server.
  538. The best example of such a file server is the window system
  539. .CW 8½
  540. [Pike91],
  541. which exports files with names such as
  542. .CW screen ,
  543. .CW cons ,
  544. and
  545. .CW mouse
  546. through which applications may access the I/O capabilities of the windows.
  547. .CW 8½
  548. provides a
  549. .I distinct
  550. set of files for each window and builds a private file name space
  551. for the clients running `in' each window;
  552. clients in separate windows see distinct files with the same names
  553. (for example
  554. .CW /dev/mouse ).
  555. Acme, like the process file system [PPTTW93], instead associates each
  556. window with a directory of files; the files of each window are visible
  557. to any application.
  558. This difference reflects a difference in how the systems are used:
  559. .CW 8½
  560. tells a client what keyboard and mouse activity has happened in its window;
  561. Acme tells a client what changes that activity wrought on any window it asks about.
  562. Putting it another way,
  563. .CW 8½
  564. enables the construction of interactive applications;
  565. Acme provides the interaction for applications.
  566. .PP
  567. The root of
  568. Acme's file system is mounted using Plan 9 operations on the directory
  569. .CW /mnt/acme .
  570. In
  571. that root directory appears a directory for each window, numbered with the window's identifier,
  572. analogous to a process identifier, for example
  573. .CW /mnt/acme/27 .
  574. The window's directory
  575. contains 6 files:
  576. .CW /mnt/acme/27/addr ,
  577. .CW body ,
  578. .CW ctl ,
  579. .CW data ,
  580. .CW event ,
  581. and
  582. .CW tag .
  583. The
  584. .CW body
  585. and
  586. .CW tag
  587. files contain the text of the respective parts of the window; they may be
  588. read to recover the contents. Data written to these files is appended to the text;
  589. .CW seeks
  590. are ignored.
  591. The
  592. .CW addr
  593. and
  594. .CW data
  595. files provide random access to the contents of the body.
  596. The
  597. .CW addr
  598. file is written to set a character position within the body; the
  599. .CW data
  600. file may then be read to recover the contents at that position,
  601. or written to change them.
  602. (The tag is assumed
  603. small and special-purpose enough not to need special treatment.
  604. Also,
  605. .CW addr
  606. indexes by character position, which is not the same as byte offset
  607. in Plan 9's multi-byte character set [Pike93]).
  608. The format accepted by the
  609. .CW addr
  610. file is exactly the syntax of addresses within the user interface,
  611. permitting regular expressions, line numbers, and compound addresses
  612. to be specified. For example, to replace the contents of lines 3 through 7,
  613. write the text
  614. .P1
  615. 3,7
  616. .P2
  617. to the
  618. .CW addr
  619. file, then write the replacement text to the
  620. .CW data
  621. file. A zero-length write deletes the addressed text; further writes extend the replacement.
  622. .PP
  623. The control file,
  624. .CW ctl ,
  625. may be written with commands to effect actions on the window; for example
  626. the command
  627. .P1
  628. name /adm/users
  629. .P2
  630. sets the name in the tag of the window to
  631. .CW /adm/users .
  632. Other commands allow deleting the window, writing it to a file, and so on.
  633. Reading the
  634. .CW ctl
  635. file recovers a fixed-format string containing 5 textual numbers\(emthe window
  636. identifier, the number of characters in the tag, the number in the body,
  637. and some status information\(emfollowed by the text of the tag, up to a newline.
  638. .PP
  639. The last file,
  640. .CW event ,
  641. is the most unusual.
  642. A program reading a window's
  643. .CW event
  644. file is notified of all changes to the text of the window, and
  645. is asked to interpret all middle- and right-button actions.
  646. The data passed to the program is fixed-format and reports
  647. the source of the action (keyboard, mouse, external program, etc.),
  648. its location (what was pointed at or modified), and its nature (change,
  649. search, execution, etc.).
  650. This message, for example,
  651. .P1
  652. MI15 19 0 4 time
  653. .P2
  654. reports that actions of the mouse
  655. .CW M ) (
  656. inserted in the body (capital
  657. .CW I )
  658. the 4 characters of
  659. .CW time
  660. at character positions 15 through 19; the zero is a flag word.
  661. Programs may apply their own interpretations of searching and
  662. execution, or may simply reflect the events back to Acme,
  663. by writing them back to the
  664. .CW event
  665. file, to have the default interpretation applied.
  666. Some examples of these ideas in action are presented below.
  667. .PP
  668. Notice that changes to the window are reported
  669. after the fact; the program is told about them but is not required to act
  670. on them. Compare this to a more traditional interface in which a program
  671. is told, for example, that a character has been typed on the keyboard and
  672. must then display and interpret it.
  673. Acme's style stems from the basic model of the system, in which any
  674. number of agents\(emthe keyboard, mouse, external programs
  675. writing to
  676. .CW data
  677. or
  678. .CW body ,
  679. and so on\(emmay
  680. change the contents of a window.
  681. The style is efficient: many programs are content
  682. to have Acme do most of the work and act only when the editing is completed.
  683. An example is the Acme mail program, which can ignore the changes
  684. made to a message being composed
  685. and just read its body when asked to send it.
  686. A disadvantage is that some traditional ways of working are impossible.
  687. For example, there is no way `to turn off echo': characters appear on the
  688. screen and are read from there; no agent or buffer stands between
  689. the keyboard and the display.
  690. .PP
  691. There are a couple of other files made available by Acme in its root directory
  692. rather than in the directory of each window.
  693. The text file
  694. .CW /mnt/acme/index
  695. holds a list of all window names and numerical identifiers,
  696. somewhat analogous to the output of the
  697. .CW ps
  698. command for processes.
  699. The most important, though, is
  700. .CW /mnt/acme/new ,
  701. a directory that makes new windows, similar to the
  702. .CW clone
  703. directory in the Plan 9 network devices [Pres93].
  704. The act of opening any file in
  705. .CW new
  706. creates a new Acme window; thus the shell command
  707. .P1
  708. grep -n var *.c > /mnt/acme/new/body
  709. .P2
  710. places its output in the body of a fresh window.
  711. More sophisticated applications may open
  712. .CW new/ctl ,
  713. read it to discover the new window's identifier, and then
  714. open the window's other files in the numbered directory.
  715. .SH
  716. Acme-specific programs
  717. .PP
  718. Although Acme is in part an attempt to move beyond typescripts,
  719. they will probably always have utility.
  720. The first program written for Acme was therefore one
  721. to run a shell or other traditional interactive application
  722. in a window, the Acme analog of
  723. .CW xterm .
  724. This program,
  725. .CW win ,
  726. has a simple structure:
  727. it acts as a two-way intermediary between Acme and the shell,
  728. cross-connecting the standard input and output of the shell to the
  729. text of the window.
  730. The style of interaction is modeled after
  731. .CW mux
  732. [Pike88]: standard output is added to the window at the
  733. .I "output point;
  734. text typed after the output point
  735. is made available on standard input when a newline is typed.
  736. After either of these actions, the output point is advanced.
  737. This is different from the working of a regular terminal,
  738. permitting cut-and-paste editing of an input line until the newline is typed.
  739. Arbitrary editing may be done to any text in the window.
  740. The implementation of
  741. .CW win ,
  742. using the
  743. .CW event ,
  744. .CW addr ,
  745. and
  746. .CW data
  747. files, is straightforward.
  748. .CW Win
  749. needs no code for handling the keyboard and mouse; it just monitors the
  750. contents of the window. Nonetheless, it allows Acme's full editing to be
  751. applied to shell commands.
  752. The division of labor between
  753. .CW win
  754. and
  755. .CW Acme
  756. contrasted with
  757. .CW xterm
  758. and the X server demonstrates how much work Acme handles automatically.
  759. .CW Win
  760. is implemented by a single source file 560 lines long and has no graphics code.
  761. .PP
  762. .CW Win
  763. uses the middle and right buttons to connect itself in a consistent way
  764. with the rest of Acme.
  765. The middle button still executes commands, but in a style more suited
  766. to typescripts. Text selected with the middle button is treated as if
  767. it had been typed after the output point, much as a similar feature in
  768. .CW xterm
  769. or
  770. .CW 8½ ,
  771. and therefore causes it to be `executed' by the application running in the window.
  772. Right button actions are reflected back to Acme but refer to the appropriate
  773. files because
  774. .CW win
  775. places the name of the current directory in the tag of the window.
  776. If the shell is running, a simple shell function replacing the
  777. .CW cd
  778. command can maintain the tag as the shell navigates the file system.
  779. This means, for example, that a right button click on a file mentioned in an
  780. .CW ls
  781. listing opens the file within Acme.
  782. .PP
  783. Another Acme-specific program is a mail reader that begins by presenting,
  784. in a window, a listing of the messages in the user's mailbox, one per line.
  785. Here the middle and right button actions are modified to refer to
  786. mail commands
  787. and messages, but the change feels natural.
  788. Clicking the right button on a line creates a new window and displays the
  789. message there, or, if it's already displayed, moves the mouse to that window.
  790. The metaphor is that the mailbox is a directory whose constituent files are messages.
  791. The mail program also places some relevant commands in the tag lines of
  792. the windows; for example, executing the word
  793. .CW Reply
  794. in a message's tag creates a new window
  795. in which to compose a message to the sender of the original;
  796. .CW Post
  797. then dispatches it.
  798. In such windows, the addressee is just a list of names
  799. on the first line of the body, which may be edited to add or change recipients.
  800. The program also monitors the mailbox, updating the `directory' as new messages
  801. arrive.
  802. .PP
  803. The mail program is as simple as it sounds; all the work of interaction,
  804. editing, and management of the display is done by Acme.
  805. The only
  806. difficult sections of the 1200
  807. lines of code concern honoring the external protocols for managing
  808. the mailbox and connecting to
  809. .CW sendmail .
  810. .PP
  811. One of the things Acme does not provide directly is a facility like
  812. Sam's command language to enable actions such as global substitution;
  813. within Acme, all editing is done manually.
  814. It is easy, though, to write external programs for such tasks.
  815. In this, Acme comes closer to the original intent of Oberon:
  816. a directory,
  817. .CW /acme/edit ,
  818. contains a set of tools for repetitive editing and a template
  819. or `guide' file that gives examples
  820. of its use.
  821. Acme's editing guide,
  822. .CW /acme/edit/guide ,
  823. looks like this:
  824. .P1
  825. e file | x '/regexp/' | c 'replacement'
  826. e file:'0,$' | x '/.*word.*\en/' | p -n
  827. e file | pipe command args ...
  828. .P2
  829. The syntax is reminiscent of Sam's command language, but here the individual
  830. one-letter commands are all stand-alone programs connected by pipes.
  831. Passed along the pipes are addresses, analogous to structural expressions
  832. in Sam terminology.
  833. The
  834. .CW e
  835. command, unlike that of Sam, starts the process by generating the address
  836. (default dot, the highlighted selection) in the named files.
  837. The other commands are as in Sam:
  838. .CW p
  839. prints the addressed text on standard output (the
  840. .CW -n
  841. option is analogous to that of
  842. .CW grep ,
  843. useful in combination with the right mouse button);
  844. .CW x
  845. matches a regular expression to the addressed (incoming) text,
  846. subdividing the text;
  847. .CW c
  848. replaces the text; and so on. Thus, global substitution throughout a file,
  849. which would be expressed in Sam as
  850. .P1
  851. 0,$ x/regexp/ c/replacement/
  852. .P2
  853. in Acme's editor becomes
  854. .P1
  855. e 'file:0,$' | x '/regexp/' | c 'replacement'
  856. .P2
  857. .PP
  858. To use the Acme editing commands, open
  859. .CW /acme/edit/guide ,
  860. use the mouse and keyboard to edit one of the commands to the right form,
  861. and execute it with the middle button.
  862. Acme's context rules find the appropriate binaries in
  863. .CW /acme/edit
  864. rather than
  865. .CW /bin ;
  866. the effect is to turn
  867. .CW /acme/edit
  868. into a toolbox containing tools and instructions (the guide file) for their use.
  869. In fact, the source for these tools is also there, in the directory
  870. .CW /acme/edit/src .
  871. This setup allows some control of the file name space for binary programs;
  872. not only does it group related programs, it permits the use of common
  873. names for uncommon jobs. For example, the single-letter names would
  874. be unwise in a directory in everyone's search path; here they are only
  875. visible when running editing commands.
  876. .PP
  877. In Oberon,
  878. such a collection would be called a
  879. .I tool
  880. and would consist
  881. of a set of entry points in a module and a menu-like piece of text containing
  882. representative commands that may be edited to suit and executed.
  883. There is, in fact, a tool called
  884. .CW Edit
  885. in Oberon.
  886. To provide related functionality,
  887. Acme exploits the directory and file structure of the underlying
  888. system, rather than the module structure of the language;
  889. this fits well with Plan 9's
  890. file-oriented philosophy.
  891. Such tools are central to the working of Oberon but they are
  892. less used in Acme, at least so far.
  893. The main reason is probably that Acme's program interface permits
  894. an external program to remain executing in the background, providing
  895. its own commands as needed (for example, the
  896. .CW Reply
  897. command in the mail program); Oberon uses tools to
  898. implement such services because its must invoke
  899. a fresh program for each command.
  900. Also,
  901. Acme's better integration allows more
  902. basic functions to be handled internally; the right mouse button
  903. covers a lot of the basic utility of the editing tools in Oberon.
  904. Nonetheless, as more applications are written for Acme,
  905. many are sure to take this Oberon tool-like form.
  906. .SH
  907. Comparison with other systems
  908. .PP
  909. Acme's immediate ancestor is Help [Pike92], an experimental system written
  910. a few years ago as a first try at exploring some of Oberon's ideas
  911. in an existing operating system.
  912. Besides much better engineering, Acme's advances over Help
  913. include the actions of the right button (Help had nothing comparable),
  914. the ability to connect long-running programs to the user interface
  915. (Help had no analog of the
  916. .CW event
  917. file),
  918. and the small but important change to split command output into
  919. windows labeled with the directory in which the commands run.
  920. .PP
  921. Most of Acme's style, however, derives from the user interface and window
  922. system of Oberon [Wirt89, Reis91].
  923. Oberon includes a programming language and operating system,
  924. which Acme instead borrows from an existing system, Plan 9.
  925. When I first saw Oberon, in 1988, I was struck by the
  926. simplicity of its user interface, particularly its lack of menus
  927. and its elegant use of multiple mouse buttons.
  928. The system seemed restrictive, though\(emsingle process,
  929. single language, no networking, event-driven programming\(emand
  930. failed to follow through on some of its own ideas.
  931. For example, the middle mouse button had to be pointed accurately and
  932. the right button was essentially unused.
  933. Acme does follow through:
  934. to the basic idea planted by Oberon, it adds
  935. the ability to run on different operating systems and hardware,
  936. connection to existing applications including
  937. interactive ones such as shells and debuggers,
  938. support for multiple processes,
  939. the right mouse button's features,
  940. the default actions and context-dependent properties
  941. of execution and searching,
  942. and a host of little touches such as moving the mouse cursor that make the system
  943. more pleasant.
  944. At the moment, though, Oberon does have one distinct advantage: it incorporates
  945. graphical programs well into its model, an issue Acme has not yet faced.
  946. .PP
  947. Acme shares with the Macintosh a desire to use the mouse well and it is
  948. worth comparing the results.
  949. The mouse on the Macintosh has a single button, so menus are essential
  950. and the mouse must frequently move a long way
  951. to reach the appropriate function.
  952. An indication that this style has trouble is that applications provide
  953. keyboard sequences to invoke menu selections and users often prefer them.
  954. A deeper comparison is that the Macintosh uses pictures where Acme uses text.
  955. In contrast to pictures, text can be edited quickly, created on demand,
  956. and fine-tuned to the job at hand; consider adding an option to a command.
  957. It is also self-referential; Acme doesn't need menus because any text can be
  958. in effect a menu item.
  959. The result is that, although a Macintosh screen is certainly prettier and probably
  960. more attractive, especially to beginners, an Acme screen is more dynamic
  961. and expressive, at least for programmers and experienced users.
  962. .PP
  963. For its role in the overall system,
  964. Acme most resembles EMACS [Stal93].
  965. It is tricky to compare Acme to EMACS, though, because there are
  966. many versions of EMACS and, since it is fully programmable, EMACS
  967. can in principle do anything Acme does.
  968. Also, Acme is much younger and therefore has not
  969. had the time to acquire as many features.
  970. The issue therefore is less what the systems can be programmed to do than
  971. how they are used.
  972. The EMACS versions that come closest to Acme's style are those that
  973. have been extended to provide a programming environment, usually
  974. for a language such as LISP [Alle92, Lucid92].
  975. For richness of the existing interface, these EMACS versions are certainly superior to Acme.
  976. On the other hand, Acme's interface works equally well already for a variety
  977. of languages; for example, one of its most enthusiastic users works almost
  978. exclusively in Standard ML, a language nothing like C.
  979. .PP
  980. Where Acme excels is in the smoothness of its interface.
  981. Until recently, EMACS did not support the mouse especially well,
  982. and even with the latest version providing features such as `extents'
  983. that can be programmed to behave much like Acme commands,
  984. many users don't bother to upgrade.
  985. Moreover, in the versions that provide extents,
  986. most EMACS packages don't take advantage of them.
  987. .PP
  988. The most important distinction is just that
  989. EMACS is fundamentally keyboard-based, while
  990. Acme is mouse-based.
  991. .PP
  992. People who try Acme find it hard to go back to their previous environment.
  993. Acme automates so much that to return to a traditional interface
  994. is to draw attention to the extra work it requires.
  995. .SH
  996. Concurrency in the implementation
  997. .PP
  998. Acme is about 8,000 lines of code in Alef, a concurrent object-oriented language syntactically similar to C [Alef].
  999. Acme's structure is a set of communicating
  1000. processes in a single address space.
  1001. One subset of the processes drives the display and user interface,
  1002. maintaining the windows; other processes forward mouse and keyboard
  1003. activity and implement the file server interface for external programs.
  1004. The language and design worked out well;
  1005. as explained elsewhere [Pike89, Gans93, Reppy93],
  1006. user interfaces built with concurrent systems
  1007. can avoid the clumsy
  1008. top-level event loop typical of traditional interactive systems.
  1009. .PP
  1010. An example of the benefits of the multi-process style
  1011. is the management of the state of open
  1012. files held by clients of the file system interface.
  1013. The problem is that some I/O requests,
  1014. such as reading the
  1015. .CW event
  1016. file, may block if no data is available, and the server must
  1017. maintain the state of (possibly many) requests until data appears.
  1018. For example,
  1019. in
  1020. .CW 8½ ,
  1021. a single-process window system written in C, pending requests were queued in
  1022. a data structure associated with each window.
  1023. After activity in the window that might complete pending I/O,
  1024. the data structure was scanned for requests that could now finish.
  1025. This structure did not fit well with the rest of the program and, worse,
  1026. required meticulous effort
  1027. to guarantee correct behavior under all conditions
  1028. (consider raw mode, reads of partial lines, deleting a window,
  1029. multibyte characters, etc.).
  1030. .PP
  1031. Acme instead creates a new dedicated process
  1032. for each I/O request.
  1033. This process coordinates with the rest of the system
  1034. using Alef's synchronous communication;
  1035. its state implicitly encodes the state of
  1036. the I/O request and obviates the need for queuing.
  1037. The passage of the request through Acme proceeds as follows.
  1038. .PP
  1039. Acme contains a file server process, F, that executes a
  1040. .CW read
  1041. system call to receive a Plan 9 file protocol (9P) message from the client [AT&T92].
  1042. The client blocks until Acme answers the request.
  1043. F communicates with an allocation process, M,
  1044. to acquire an object of type
  1045. .CW Xfid
  1046. (`executing fid'; fid is a 9P term)
  1047. to hold the request.
  1048. M sits in a loop (reproduced in Figure 2) waiting for either a request for
  1049. a new
  1050. .CW Xfid
  1051. or notification that an existing one has finished its task.
  1052. When an
  1053. .CW Xfid
  1054. is created, an associated process, X,
  1055. is also made.
  1056. M queues idle
  1057. .CW Xfids ,
  1058. allocating new ones only when the list is empty.
  1059. Thus, there is always a pool of
  1060. .CW Xfids ,
  1061. some executing, some idle.
  1062. .PP
  1063. The
  1064. .CW Xfid
  1065. object contains a channel,
  1066. .CW Xfid.c ,
  1067. for communication with its process;
  1068. the unpacked message; and some associated functions,
  1069. mostly corresponding to 9P messages such as
  1070. .CW Xfid.write
  1071. to handle a 9P write request.
  1072. .PP
  1073. The file server process F parses the message to see its nature\(emopen,
  1074. close, read, write, etc. Many messages, such as directory
  1075. lookups, can be handled immediately; these are responded to directly
  1076. and efficiently
  1077. by F without invoking the
  1078. .CW Xfid ,
  1079. which is therefore maintained until the next message.
  1080. When a message, such as a write to the display, requires the attention
  1081. of the main display process and interlocked access to its data structures,
  1082. F enables X
  1083. by sending a function pointer on
  1084. .CW Xfid.c .
  1085. For example, if the message is a write, F executes
  1086. .P1
  1087. x->c <-= Xfid.write;
  1088. .P2
  1089. which sends
  1090. the address of
  1091. .CW Xfid.write
  1092. on
  1093. .CW Xfid.c ,
  1094. waking up X.
  1095. .PP
  1096. The
  1097. .CW Xfid
  1098. process, X, executes a simple loop:
  1099. .P1
  1100. void
  1101. Xfid.ctl(Xfid *x)
  1102. {
  1103. for(;;){
  1104. (*<-x->c)(x); /* receive and execute message */
  1105. bflush(); /* synchronize bitmap display */
  1106. cxfidfree <-= x; /* return to free list */
  1107. }
  1108. }
  1109. .P2
  1110. Thus X
  1111. will wake up with the address of a function to call (here
  1112. .CW Xfid.write )
  1113. and execute it; once that completes, it returns itself to the pool of
  1114. free processes by sending its address back to the allocator.
  1115. .PP
  1116. Although this sequence may seem complicated, it is just a few lines
  1117. of code and is in fact far simpler
  1118. than the management of the I/O queues in
  1119. .CW 8½ .
  1120. The hard work of synchronization is done by the Alef run time system.
  1121. Moreover, the code worked the first time, which cannot be said for the code in
  1122. .CW 8½ .
  1123. .SH
  1124. Undo
  1125. .PP
  1126. Acme provides a general undo facility like that of Sam, permitting
  1127. textual changes to be unwound arbitrarily.
  1128. The implementation is superior to Sam's, though,
  1129. with much higher performance and the ability to `redo' changes.
  1130. .PP
  1131. Sam uses
  1132. a multi-pass algorithm that builds
  1133. a transcript of changes to be made simultaneously
  1134. and then executes them atomically.
  1135. This was thought necessary because the elements of a repetitive
  1136. command such as a global substitution should all be applied to the same
  1137. initial file and implemented simultaneously; forming the complete
  1138. transcript before executing any of the changes avoids the
  1139. cumbersome management of addresses in a changing file.
  1140. Acme, however, doesn't have this problem; global substitution
  1141. is controlled externally and may be made incrementally by exploiting
  1142. an observation: if the changes are sorted in address order and
  1143. executed in reverse, changes will not invalidate the addresses of
  1144. pending changes.
  1145. .PP
  1146. Acme therefore avoids the initial transcript. Instead, changes are applied
  1147. directly to the file, with an undo transcript recorded in a separate list.
  1148. For example, when text is added to a window, it is added directly and a record
  1149. of what to delete to restore the state is appended to the undo list.
  1150. Each undo action and the file are marked with a sequence number;
  1151. actions with the same sequence number are considered a unit
  1152. to be undone together.
  1153. The invariant state of the structure
  1154. is that the last action in the undo list applies to the current state of the file,
  1155. even if that action is one of a related set from, for example, a global substitute.
  1156. (In Sam, a related set of actions needed to be undone simultaneously.)
  1157. To undo an action, pop the last item on the undo list, apply it to the file,
  1158. revert it, and append it to a second, redo list.
  1159. To redo an action, do the identical operation with the lists interchanged.
  1160. The expensive operations occur
  1161. only when actually undoing; in normal editing the overhead is minor.
  1162. For example, Acme reads files about seven times faster than Sam, partly
  1163. because of this improvement and partly because of a cleaner implementation.
  1164. .PP
  1165. Acme uses a temporary file to hold the text, keeping in memory only the
  1166. visible portion, and therefore can edit large files comfortably
  1167. even on small-memory machines such as laptops.
  1168. .SH
  1169. Future
  1170. .PP
  1171. Acme is still under development.
  1172. Some things are simply missing.
  1173. For example, Acme should support non-textual graphics, but this is being
  1174. deferred until it can be done using a new graphics model being developed
  1175. for Plan 9. Also, it is undecided how Acme's style of interaction should best be
  1176. extended to graphical applications.
  1177. On a smaller scale, although the system feels smooth and comfortable,
  1178. work continues to tune the heuristics and
  1179. try new ideas for the user interface.
  1180. .PP
  1181. There need to be more programs that use Acme. Browsers for
  1182. Usenet and AP News articles, the Oxford English Dictionary, and other
  1183. such text sources exist, but more imaginative applications will
  1184. be necessary to prove that Acme's approach is viable.
  1185. One that has recently been started is an interface to the debugger Acid [Wint94],
  1186. although it is still
  1187. unclear what form it will ultimately take.
  1188. .PP
  1189. Acme shows that it is possible to make a user interface a stand-alone component
  1190. of an interactive environment. By absorbing more of the interactive
  1191. functionality than a simple window system, Acme off-loads much of the
  1192. computation from its applications, which helps keep them small and
  1193. consistent in their interface. Acme can afford to dedicate
  1194. considerable effort to making that interface as good as possible; the result
  1195. will benefit the entire system.
  1196. .PP
  1197. Acme is complete and useful enough to attract users.
  1198. Its comfortable user interface,
  1199. the ease with which it handles multiple tasks and
  1200. programs in multiple directories,
  1201. and its high level of integration
  1202. make it addictive.
  1203. Perhaps most telling,
  1204. Acme shows that typescripts may not be the most
  1205. productive interface to a time-sharing system.
  1206. .SH
  1207. Acknowledgements
  1208. .PP
  1209. Howard Trickey, Acme's first user, suffered buggy versions gracefully and made
  1210. many helpful suggestions. Chris Fraser provided the necessary insight for the Acme editing
  1211. commands.
  1212. .SH
  1213. References
  1214. .LP
  1215. [Alef] P. Winterbottom,
  1216. ``Alef Language Reference Manual'',
  1217. .I
  1218. Plan 9 Programmer's Manual,
  1219. .R
  1220. AT&T Bell Laboratories,
  1221. Murray Hill, NJ,
  1222. 1992;
  1223. revised in this volume.
  1224. .br
  1225. [Alle92]
  1226. .I
  1227. Allegro Common Lisp user Guide, Vol 2,
  1228. .R
  1229. Chapter 14, "The Emacs-Lisp Interface".
  1230. March 1992.
  1231. .br
  1232. [AT&T92] Plan 9 Programmer's manual, Murray Hill, New Jersey, 1992.
  1233. .br
  1234. [Far89] Far too many people, XTERM(1), Massachusetts Institute of Technology, 1989.
  1235. .br
  1236. [Gans93] Emden R. Gansner and John H. Reppy, ``A Multi-threaded Higher-order User Interface Toolkit'', in
  1237. .I
  1238. Software Trends, Volume 1,
  1239. User Interface Software,
  1240. .R
  1241. Bass and Dewan (Eds.),
  1242. John Wiley & Sons 1993,
  1243. pp. 61-80.
  1244. .br
  1245. [Lucid92] Richard Stallman and Lucid, Inc.,
  1246. .I
  1247. Lucid GNU EMACS Manual,
  1248. .R
  1249. March 1992.
  1250. .br
  1251. [Pike87] Rob Pike, ``The Text Editor \f(CWsam\fP'', Softw. - Pract. and Exp., Nov 1987, Vol 17 #11, pp. 813-845; reprinted in this volume.
  1252. .br
  1253. [Pike88] Rob Pike, ``Window Systems Should Be Transparent'', Comp. Sys., Summer 1988, Vol 1 #3, pp. 279-296.
  1254. .br
  1255. [Pike89] Rob Pike, ``A Concurrent Window System'', Comp. Sys., Spring 1989, Vol 2 #2, pp. 133-153.
  1256. .br
  1257. [PPTTW93] Rob Pike, Dave Presotto, Ken Thompson, Howard Trickey, and Phil Winterbottom, ``The Use of Name Spaces in Plan 9'',
  1258. Op. Sys. Rev., Vol. 27, No. 2, April 1993, pp. 72-76,
  1259. reprinted in this volume.
  1260. .br
  1261. [Pike91] Rob Pike, ``8½, the Plan 9 Window System'', USENIX Summer Conf. Proc., Nashville, June, 1991, pp. 257-265,
  1262. reprinted in this volume.
  1263. .br
  1264. [Pike92] Rob Pike, ``A Minimalist Global User Interface'', Graphics Interface '92 Proc., Vancouver, 1992, pp. 282-293. An earlier version appeared under the same title in USENIX Summer Conf. Proc., Nashville, June, 1991, pp. 267-279.
  1265. .br
  1266. [Pike93] Rob Pike and Ken Thompson, ``Hello World or Καλημέρα κόσμε or
  1267. \f(Jpこんにちは 世界\fP'', USENIX Winter Conf. Proc., San Diego, 1993, pp. 43-50,
  1268. reprinted in this volume.
  1269. .br
  1270. [Pres93] Dave Presotto and Phil Winterbottom, ``The Organization of Networks in Plan 9'', Proc. Usenix Winter 1993, pp. 271-287, San Diego, CA,
  1271. reprinted in this volume.
  1272. .br
  1273. [Reis91] Martin Reiser, \fIThe Oberon System,\fP Addison Wesley, New York, 1991.
  1274. .br
  1275. [Reppy93] John H. Reppy,
  1276. ``CML: A higher-order concurrent language'', Proc. SIGPLAN'91 Conf. on Programming, Lang. Design and Impl., June, 1991, pp. 293-305.
  1277. .br
  1278. [Sche86] Robert W. Scheifler and Jim Gettys,
  1279. ``The X Window System'',
  1280. ACM Trans. on Graph., Vol 5 #2, pp. 79-109.
  1281. .br
  1282. [Stal93] Richard Stallman,
  1283. .I
  1284. Gnu Emacs Manual, 9th edition, Emacs version 19.19,
  1285. .R
  1286. MIT.
  1287. .br
  1288. [Swei86] Daniel Sweinhart, Polle Zellweger, Richard Beach, and Robert Hagmann,
  1289. ``A Structural View of the Cedar Programming Environment'',
  1290. ACM Trans. Prog. Lang. and Sys., Vol. 8, No. 4, pp. 419-490, Oct. 1986.
  1291. .br
  1292. [Wint94], Philip Winterbottom, ``Acid: A Debugger based on a Language'', USENIX Winter Conf. Proc., San Francisco, CA, 1993,
  1293. reprinted in this volume.
  1294. .br
  1295. [Wirt89] N. Wirth and J. Gutknecht, ``The Oberon System'', Softw. - Prac. and Exp., Sep 1989, Vol 19 #9, pp 857-894.