1
0

acme.ms 49 KB

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