acme.ms 49 KB

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