
A Tour of the Acme Editor - lnmx
http://research.swtch.com/acme
======
ibdknox
Very neat. It seems to me the really interesting bit here is the ability to
add execution meaning to arbitrary bits of text. Can anyone who uses Acme
comment on whether or not that is primarily what gives Acme its power? Is
there something else key to it that isn't shown cleanly in the video?

Interestingly, I also see Light Table as an "Integrating" Development
Environment - something that utilizes all the amazing tools out there and
strings them together into a very fluid workflow. I think we need to decouple
the raw functionality of dev tools from the experience of their use, since it
seems to me the latter is infinitely configurable and far too subjective to
get "right" in all cases.

~~~
EdiX
It's definitely the ability to parse expressions like "<file>:<lineno>" and
open files at the right position, it essentially makes it integrated with many
many unix tools without actually having to write any integration code.

The ease of piping the selection through an external program is a close
second.

However I do not use it.

What's funny about acme is that it's a perfect metaphor for the entire plan9:
it shows you how striving for a simple, beautiful design can create new, great
solutions to old problems.

But at the same time it will also kill the adoption of the product completely:
acme doesn't support any keybindings (doesn't fit the desing), no syntax
highlighting (not the editor's job to parse code), nothing but bitmapped fonts
(implementing externally defined standards is a chore), tags file support
(doesn't fit the design), incremental search (doesn't fit the design),
horizontal scrolling (makes it complicated to use the same editor control for
the tags too), configuring the color scheme (no), weird non-standard behaviour
of up and down keys (we just like it better this way)...

Bringing any of this up to a 9fan will also be a great metaphor for the
friendliness of the community.

~~~
rsc
I won't argue any of your points but one. You can use whatever system fonts
you like on OS X. Here's some Comic Sans for you:
<http://swtch.com/~rsc/hackernews.png>

~~~
hollerith
A hint on how to achieve that would be greatly appreciated.

I tried starting Acme as follows, but no joy:

9 acme -F '/Library/Fonts/Comic Sans MS.ttf'

ADDED. After googling site:swtch.com, I tried the following two invocations,
but still no joy:

9 acme −F /mnt/font/Monaco/13a/font

9 acme −F /usr/local/plan9/mnt/font/Monaco/13a/font

\-- which is not so surprising as neither /mnt nor /usr/local/plan9/mnt exist.

ADDED. Actually, cannot get the -F flag to Acme to do anything. E.g.,
$PLAN9/font/luc/latin1CW.18.font exists, but Acme started with "acme -F
$PLAN9/font/luc/latin1CW.18.font" uses the same font as Acme started with
"acme".

~~~
yiyus
-F changes the fixed width font. You want -f.

~~~
hollerith
Thanks. Am now able to choose among the fonts supplied by the plan9port
tarball.

Still would like to be able to choose a OS X system font, though.

~~~
rsc
Sorry, my original reply with the screenshot included a command line, but it
got lost in the internet tubes, and when I reposted the reply I forgot the
command line.

acme -f /mnt/font/ComicSansMS/16a/font is how I made the screenshot. Run
fontsrv -p . to get a list of the fonts you can use.

~~~
hollerith
A final question, Russ: are you the primary author of fontsrv?

~~~
luriel
Not sure if russ is still reading this thread, but AFAIK, yes, he, or one of
the many secret rsc clones is the primary author of fontsrv.

------
luriel
Acme was also Dennis Ritchie's editor of choice, there is a picture of him and
his working environment here:

<http://acme.cat-v.org>

Also wish Russ had shown acme in a full screen setup, one of the most awesome
things about acme is how well it manages having tons of windows, and you don't
get a real feeling for it without seeing it done in a real full screen large
environment.

~~~
klrr
Isn't it annoying to program without syntax highlight? Or is it just some
false rumor I've heard that acme doesn't have that feature... it looks a lot
like wmii. I have to try it though, emacs and vim really sucks, too bloated
for my taste, I'm still not that hardcore that I use ed for programming so I'm
searching for an simple, minimal and correct alternative to emacs and vim....

~~~
rsc
For a number of years in the mid-1990s I switched between Borland's IDE when
using DOS and vi (not vim) and later sam when using Unix. The fact that one
world had highlighting and the other didn't have it had no effect on my
productivity, at least not one in favor of highlighting. It never occurred to
me that I should miss it on Unix or that it was annoying not to have it. They
were just different tools that did different things.

I know lots of people have strong feelings about this highlighting or that,
but honestly, just try going without it for a week or two. I bet you'll find
it is not that big a deal after all.

~~~
klrr
Okey, thanks. I'll try it. If I feel that it ain't really for me I think I'll
just write my own editor. :)

------
agumonkey
The <$basename> ':' syntax for inner reference is great. As the OP describes
it, hypertext for files.

With per format program, possibly implicitely called based on extension, it
could be extended to structural reference.

/foo/bar.c:function[2]/statement[3] would call an ANSI C parser and return the
substream enclosing the :/expr/ passed.

~~~
4ad
That's how the plumber works:
<http://doc.cat-v.org/plan_9/4th_edition/papers/plumb>

~~~
agumonkey
I was thinking of something at the os level, like the namespaces for windows.

~~~
ori_b
The plumber is effectively at the OS level. It's a userspace program, but it
provides it services to the whole system at once. It's a global service that
handles all plumbing between all programs. (Think "Android Intents". It's not
too far off, conceptually.). Running, for example,

    
    
        plumb path/to/file.c:123
    

will send the file to whatever editor instance is set up to handle C files,
and move the dot to line 123, from wherever it is invoked, be it the command
line, the

    
    
        plumb bar.jpg
    

will open bar.jpg in whatever image viewer is appropriate. More or less, you
can think of the plumber as a system level "take this text and do an
appropriate action with it" service, where you can set up whatever rules you
want to do the plumbing.

I don't think there's a good reason for this to live inside the OS, instead of
simply running as a service. I don't think there's any extra functionality or
elegance that would buy you.

~~~
agumonkey
Right, I just meant something as global as the windows namespaces (I don't
know how it is designed, kernel module for vfs or userspace)

------
pdw
Conceptually I love Acme, but the three-button mouse thing has turned out to
be a real problem for me. I don't think I can work without a scroll mouse, and
I've never found a mouse that has both three real buttons and a scroll wheel.
Can anybody recommend one?

~~~
thebigshane
I think the Evoluent mouse gets recommended by Acme users.

<http://www.evoluent.com/>

[http://www.amazon.com/Evoluent-Vertical-Mouse-Right-
Handed/d...](http://www.amazon.com/Evoluent-Vertical-Mouse-Right-
Handed/dp/B00427TAIK)

<http://russ.cox.usesthis.com> \-- `rsc`, do you still use this setup?

~~~
rsc
Yes, that's still my mouse of choice. On a Mac you need a 3rd-party tool like
'USB Overdrive' to remap the buttons correctly. On Linux you can use xmodmap.

------
sprash
I really tried to use it but the disrupted work flow caused by the necessity
for pixel perfect mouse aiming was headache inducing.

~~~
Ygg2
How can this be? In the example he managed to click on things to run commands
by just clicking on the word, instead of selecting the entire line perfectly.

------
goldfeld
What's the point in an all-text user interface if you still use the mouse?

~~~
jff
Simply because text is entered via the keyboard does not mean that the
keyboard is the only way to _manipulate_ text.

------
gruseom
_Acme focuses entirely on the idea of text as user interface_

Sounds a little like Oberon. I wonder how many people have used both.

~~~
luriel
If you read the acme[1] paper you will see Rob Pike explicitly acknowledges
the influence of Oberon.

This can be seen even more clearly in Acme's more direrect predecessor:
help[2]

[1]: <http://doc.cat-v.org/plan_9/4th_edition/papers/acme/>

[2]: <http://doc.cat-v.org/plan_9/1st_edition/help/>

~~~
gruseom
Thank you. I didn't know there was a direct influence. It's intriguing,
because the two cultures share a similar design style: "aggressive use of a
small number of abstractions" as Ken Thompson put it. I like that design
style.

------
otoburb
Great screencast. I tried to read through the Acme guide before but never
quite got the gist of it. This reminds me of the Starcraft interface in that
if you have excellent mouse twitch reflexes it seems you can more easily
induce a sense of flow (whether you're productive or not is a different
matter; see APM spam[1]).

Definitely not an environment to work in if you have cats/kids that like to
fiddle with your mouse when you're in the kitchen or taking a bio-break.

[1] <http://en.wikipedia.org/wiki/Actions_per_minute>

------
mhd
I fiddled with acme a few times over the years, but never got around using it
for a real project (I _did_ use sam for quite a while about 10 years ago). I'd
like to see the "advanced" version of this screencast, i.e. someone doing a
small programming project with it, coding, debugging etc.

And preferable _not_ a C/Go unix CLI/server, where you probably have decent
cooling and can stay within acme all the time. The trivial blog web app
example would be interesting, maybe in Java, Ruby, Perl, Python etc., so that
it's easier to compare this with IDEs or vim/emacs.

------
sgt
From the looks of it, _everyone_ on HN is currently downloading Plan 9 from
User Space. It's a 51MB download and the download speed is currently
3-4kB/sec!

~~~
jff
Quoth Russ Cox:

The swtch.com machine has a fairly slow connection. Better ways to get it: \-
hg clone <https://code.google.com/p/plan9port> plan9 \-
<http://am.lcs.mit.edu/~rsc/plan9port.tgz> I changed the link on the home page
to point to that tgz instead.﻿

------
rjzzleep
ok, looks interesting. i still like my vim though as the editor part.

so to summarize, we'd need an editable terminal, like the one acme provides
and a plumber that works with that termal, put it all in a tiling wm, and
we're there, right?

in my opinion, in a way, the behavior is already very similar to what everyone
with tiling wms trys to achieve. but maybe i'm missing something crucial

------
bbbertie
It would be really neat to integrate the plumber into one's usual development
environment, be it vim or emacs or whatever. I'd like to do this with vim, but
I thought I'd ask first: Does anyone here already do this (with plan 9 from
user space)? Any hang-ups I should be prepared for?

~~~
sleepydog
All you need is some sort of remote control for your tool -- for example, a
way to open a file in an existing emacs instance. plumb is just a command like
any other that provides global ipc between all your programs,

    
    
        plumb "path/too/foo.c"
    

runs the argument string through the gauntlet of plumbing rules. It's up to
you to edit the plumbing rules to send the file to your editor.

Before I lost my hard drive, I had some udev rules setup that used the plumber
to post notifications to a 9term window on my desktop when a USB drive was
mounted. It's really dead simple, really makes you wonder about the
proliferation of complex messaging systems like dbus.

------
djacobs
I like that Acme has such a radically different paradigm from vi, but I can't
imagine that pixel-dependent mouse interactions could ever beat vi for text
manipulation. (It takes me a maximum of about 4 keystrokes to get anywhere I
want in a vi buffer.)

------
cm3
Russ do you prepend plan9port/bin to PATH when using acme as a way to prefer
tools which do not make use of escape sequences for coloring term output? Or
do you disable color in tools like mercurial?

~~~
rsc
No, but I do export TERM=dumb and then complain to authors of programs that
still emit escape sequences.

------
bokchoi
Evergreen is an Acme-inspired editor with a similar philosophy:

<http://software.jessies.org/evergreen/>

------
bobak
some editable shell interaction in <http://xiki.org/> & <http://ipython.org/>

------
cm3
How do you indent with spaces instead of tabs?

~~~
jff
Execute the command "Indent on" to turn auto-indent on for the current window.
Acme will then automatically insert the same indentation as the previous line
for every new line you make. I just tested, it works with tabs and spaces.
(But don't use spaces :-)

~~~
cm3
Thanks I'll try that. Am I able to make acme source that from a personal
customization script on startup?

~~~
jff
No, we don't support startup scripts in Acme (you could implement it of
course, the code is simple), but you can use the "Dump" command to take a
snapshot of your current Acme layout. I'm not sure if that will preserve the
status of Indent, but it may at least help you.

------
fallenapple
Can acme run without a graphics layer (e.g. X11) beyond VGA?

Why does it need more than VGA text if it entirely text-based?

~~~
rsc
> Can acme run without a graphics layer (e.g. X11) beyond VGA?

It would not be hard to make the underlying graphics code work on top of
linuxfb. I think a patch for that might be floating around.

> Why does it need more than VGA text if it entirely text-based?

Did you really watch the video? You can see that while acme is entirely about
editing text, the UI itself is graphical.

~~~
jff
Russ, you probably remember that Aki did a linuxfb version of drawterm for
Tiny Horrible Xen; I'd bet the changes could be adapted to Plan 9 Port without
too much trouble, really the Linux framebuffer is pretty simple.

~~~
thebigshane
I would be incredibly interested in a version of Acme that would not require X
windows. Hell, I'd even pay for it.

(I currently run emacs on arch linux with no x)

~~~
jff
If you install Plan 9 Ports, check out /usr/local/plan9/src/cmd/devdraw. Russ
can correct me if I'm wrong, but I think that's the only place the graphical
programs interface with X. You'll need to find the places where devdraw is
using X, and replace them with framebuffer code.

