topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Monday March 18, 2024, 10:09 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Mini review: The Acme editor on Debian on Windows  (Read 37633 times)

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Mini review: The Acme editor on Debian on Windows
« on: May 16, 2018, 07:40 AM »
Basic Info

App NameAcme
App URLhttp://acme.cat-v.org/
Supported OSesPlan 9, its forks (9atom, 9front, Harvey OS, JehanneOS et al.) and Inferno; UNIX, Linux and related operating systems are supported through plan9port. There is/was a Windows version called Acme-SAC but it does not seem to work on Windows 10 anymore.
Pricing SchemeThis is free software.
Reviewer Donation LinkGive me virtual money replacements.
Screencast Video URLhttps://www.youtube..../watch?v=dP1xVpMPn8M

Preface:

This is actually both a review and a tutorial. Please don't hurt me for partially ignoring the headline.

Intro:

After the UNIX 7th Edition which almost anything that claims to be "UNIX-like" is either based upon or inspired by had been released, the developers continued to work on it. However, the last three UNIX releases did not see much adoption: Between UNIX Version 7, released in 1979, and UNIX Version 8, released in 1985, the UCB's UNIX distribution BSD had been developed so far that it had more than twice of UNIX's system calls. In fact, the eighth UNIX was basically a reimported version of 4.1cBSD, modified to run on VAX computers.

Neither the 9th nor the 10th (and final) UNIX were ever released as a complete operating system, efforts to work on it were soon stopped in favor of what should have been UNIX's successor for operating systems research, named Plan 9 from Bell Labs, inspired by what was called "the worst movie of all times". (I will not link that.) The developers of Plan 9, mostly being recruited from the UNIX and C teams (among them, Rob Pike and Ken Thompson), continued from what they had: the graphical terminal Blit came in the 8th edition, Mk and the rc shell were there in the last UNIX version as well. Plan 9 tried to complete UNIX's approach of "everything is a file" by introducing the 9P protocol which acted as a replacement for regular APIs (including sockets and other device calls). Using the wikifs layer, even the Wikipedia could be edited as if it was a collection of files on the local machine. (Sadly, this layer does not seem to have been ported to other operating systems yet. edit: There is a FUSE version though.)

Of course, since the 70s were over, the usual computer had a real screen instead of a printer and Apple, Amiga and Atari had successfully taken Xerox's revolutionary input device, the "mouse", out of obscurity by the mid-80s, this was what was considered the best way to interact with a computer: The Plan 9 operating system, including its text editors sam and acme, was developed to be used with a three-button mouse. The designers decided that light blue and light yellow were the best colors to stare at all day, so there was not much to configure. Theming was not a thing.

This is how everything in Plan 9 - and its various distributions - looks like:

acme.pngMini review: The Acme editor on Debian on Windows

(This is Acme running in Xming on Windows 10. I'll talk about that in a short while.)

Although Plan 9 did not convince the majority of people just yet, probably because there is no good web browser available for it (but NetSurf is said to be ported soon) and because generations of UNIX, BSD and Linux people, including me, have bragged about the efficiency of being able to use a keyboard for everything, some of its ideas (virtual filesystems, its text editors, ...) were made available to other operating systems. "Plan 9 from User Space", not a bad pun in my opinion, works on most systems - excluding Windows. But after some time spent with Acme on a different system, I want to try it on Windows as well.

The tutorial part begins.

Installing Acme on Windows 10:

Windows 10 has got support for being used as a host system for Linux applications as of today. I do not like Linux, but this is the least inconvenient way to use Acme on Windows. What we need is both an X server (Xming is still good enough, install and start it before continuing) and a Linux distribution running on the Windows NT subsystem. I chose to install the "nightly" version of plan9port via Debian. Here's how to install it. In theory, you could run any Debian desktop application with this combination now, but let's stick to the topic here.

When the Debian installation is completed, start the bash (while I prefer the csh, Windows itself only comes with a native bash.exe) and install the essential build tools:

$ sudo apt-get install build-essential xorg-dev git

If you happen to be stuck behind a proxy and the above command fails to connect to the servers, add the following text to your ~/.bashrc file (a number of editors are already installed, including nano and a version of Vim as vi):

export http_proxy=http://your.proxy:port
export https_proxy=http://your.proxy:port

Now grab and build the Plan 9 tools:

$ git clone https://github.com/9fans/plan9port.git
$ cd plan9port
$ ./INSTALL

This will take a while - not too long though. The relevant utilities will be inside /home/USERNAME/plan9port/bin then. You can reach the / folder from Windows as %localappdata%\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\rootfs\, but that will not help you much: Those are Linux binaries. (But it might or might not be a good idea to hardlink your ~ directory to where you can access it more easily.)

Prepare your bash to find both acme and your X server - add to your ~/.bashrc file:

PLAN9=/home/USERNAME/plan9port export PLAN9
PATH=$PATH:$PLAN9/bin export PATH
export DISPLAY=:0

Now you have two options in order to see the glory of Acme for the first time:

1. Restart your bash and type acme &.
2. Make a desktop shortcut for Acme which you could also pin to the taskbar and/or the start menu if you want to.

I find the second option to be notably more convenient. The command for the shortcut is:

powershell -windowstyle hidden -command "&{ bash -ic acme }"

The -i flag is important since you'll definitely want to read your .bashrc file before trying to start Acme. - As far as I could see, there is no easier way to do that without having a terminal window open all the time. Maybe Microsoft will improve this in the future.

How to use (the basics of) Acme?

The blue part on top of your Acme window contains commands ("tags") like your usual toolbar does. It is editable (I'll explain why - just read on). Middle-clicking "New" opens a new text window, "Newcol" adds a new column where you could open even more text windows. The square in the top left corner allows you to change the size of each window. By default, the text you are writing is not assigned to a file name. If you want to save it to a file, move your mouse cursor to the top left corner of your text window and write down the path. A new item named "Put" will appear in your tagline. Middle-click it to save the file. If you want to open any file instead, write down its path anywhere and right-click it. (Obvious, isn't it?) The "Putall" command will save all modified buffers which have assigned paths, by the way.

Note: Since we are in an emulated environment here, "C:\" is actually "/mnt/c". This might be important when dealing with your files.

You can either use the particular tags or - the recommended way - mouse chords for cutting, copying ("snarfing") and pasting text. Consult the documentation for a general overview. There are six keybindings, mostly inspired by Emacs's, but that's about it.

One more note: Your up/down cursor keys won't work. Use the mouse to move between lines. Scroll down to "The Good" for more surprising features.

Let us come back to the usual review now.

Who is this app designed for:

Freaks. ;D Also, Acme is an awesome developers' editor because of its near-perfect interaction with the operating system. No, it does not have syntax highlighting. Do you really need that though? Third, if you are one of those who think a mouse does not make you work any faster (or you want to convince someone of either the keyboard or the mouse), Acme could help you. Or disturb you. Or them.

The Good

Everything in Acme is text. Even the "toolbar" is text. You can not only remove existing commands (although they'll reappear), you can also add your own ones; in fact, Acme is its own command shell. You can see one example on my screenshot from above: Type a command, middle-click it and it will be executed. By default, the output appears in the "+Errors" window, but you can also inline the output by prefixing the command with a pipe.

|date

Middle-clicking that will print the current date at the cursor position. Since you probably don't want to have "|date" appear in your actual file, you can use the tag bar for that: Hover your mouse over the second bar (the one that ends with "Delcol") and enter "|date" there.

acme-bar.pngMini review: The Acme editor on Debian on Windows

Middle-clicking it does exactly what you think it does. You can use any command there, including text manipulation commands and compilers.

Interestingly, that works in both directions. Do you remember that I have mentioned the 9P protocol in the Intro section which allows Plan 9 applications to talk to each other? Since we have installed the whole plan9port package (you did follow my instructions, right?), we can access our currently running Acme instance from Windows with the 9p command. To see what I mean, open a command prompt via cmd or something (or you could use the bash directly, but that needs no further explanation):

C:\> bash -ic "9p ls acme"

The most interesting part is behind the numbers. Each number is assigned to one text window inside your running Acme instance. You can read what is typed there by extracting the "body":

C:\> bash -ic "9p read acme/3/body"

This will print what you see on the screen in the window with the ID "3". Spooky? Not yet! You can also write into it, e.g.:

C:\> bash -ic "echo 'Hey DonationCoder!' | 9p write acme/3/data"

That will insert "Hey DonationCoder!" at the cursor position in the window with the ID "3". 8) Basically, you can control every aspect of Acme - including its tag bars, of course - using any programming language which is able to print text on the screen. This is both weird and amazing and there is no reason why no other IDE does that. Since you can control anything inside Acme from outside Acme, you could use that to write a shell script that formats your source code as well.

The needs improvement section

  • The look. I like the colors (I have set up my Emacs to use them), but I would like to have a better default font than what comes with plan9port.
  • I really want to have a native Windows version of Acme because using /mnt/c/... breaks my workflow. Mimicking 9p on Windows could be quite a huge task though... probably that's why nobody has done that yet.
  • Added: Acme does not support file/directory names which contain a space character yet. This is a known bug, it will probably be fixed.

Why I think you should use this product

Try something new? Dive into history? Show off your weirdness to your friends? Do nerdy things with nerdy software? Acme has it.

How does it compare to similar apps

Ha! Hahahaha! Haha!

Oh, well... there actually are some. A number of people have written Acme clones (usually with some Vim thrown in) for various operating systems, including "Acme for Vim":

https://github.com/driusan/de
https://c9x.me/edit/
https://github.com/p...e/plan9-for-vimspace

(Could be continued.)

I haven't spent much time with those yet, but none of those seems to have been developed with Windows in mind, so none of those is able to work around the "Needs improvement" part, at least not the standalone ones. Someone should really change that.

Added: There actually is a reimplementation of (some of) Acme minus the 9P part which might or might not be interesting for those who want to try new things:
https://github.com/as/a

Conclusions

I feel dizzy.
« Last Edit: May 17, 2018, 05:32 PM by Tuxman »

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,958
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #1 on: May 16, 2018, 08:03 AM »
ha ha, very good :Thumbsup:

I always loved the idea of editors/word processors that just, or mainly, use the keyboard. But my work never involved working in an editor long enough to really learn that whole aspect. FWIW in my old Freehand vector software, I would estimate I knew, and regularly used, a few dozen shortcuts (not even including basic universal ones).
Tom

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #2 on: May 16, 2018, 08:07 AM »
I always loved the idea of editors/word processors that just, or mainly, use the keyboard.

Which makes sense because they are used to write text.  :D
However, all editors and word processors have two modes, "modify" and "insert". Vim uses "modify" by default, Emacs and Microsoft Word use "insert" by default - the opposite mode is always available behind special keys. For Acme, those are on your mouse. Same same, but different.

But my work never involved working in an editor long enough to really learn that whole aspect.

I sometimes wish that mine wouldn't either.  ;D

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #3 on: June 05, 2018, 04:51 AM »
For those who can't get enough:
acme2k can be installed over your existing acme and it comes with configurable colors and fonts (and more keybindings).

 :D

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #4 on: June 09, 2019, 11:02 AM »
For those who are still here:
edwood seems to be a very good reimplementation of the Acme editor - and it does not even need Debian to run on Windows natively!

https://github.com/rjkroege/edwood

Akertyna

  • Participant
  • Joined in 2019
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #5 on: July 08, 2019, 03:12 AM »
I have been using Acme for a while without using any scripts to help my workflow. I'm trying to incorporate a script that simply indents a selection of lines. I do not know why, but none of the scripts are working. I've tried several that I found on github or inside some apps on apknite including the relatively common a+ and a- scripts. I added them to a folder in my path, trying both rc and bash, chmod +x'ed them, and they do not work. The script below echos out properly in the +ERROR window, removes a line with the selected text yet does not replace and indent it. Have I missed a setup step somewhere? Any help you could provide would be great.
9indent.sh:

#!/usr/bin/env bash

#9indent

echo "WinId is: " $winid

echo -n "1,$" | 9p write acme/$winid/addr

echo "Selected whole contents for overwriting with 'write'"

9p read acme/$winid/body | indent -st | 9p write acme/$winid/data

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #6 on: July 08, 2019, 07:21 AM »
I have just tried it: It works for me.

  • Make sure indent is actually installed and available for your user (because else it will obviously fail).
  • chmod -x /home/youruser/9indent.sh
  • Add it to your toolbar and middle-click it.

Before:

Before.pngMini review: The Acme editor on Debian on Windows

After:

After.pngMini review: The Acme editor on Debian on Windows

Does indent -st work in a "Win" window?

edit: My screenshots are made with acme2k because that's what I happen to have on this machine, but it should not matter that much.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #7 on: January 21, 2020, 05:26 AM »
Heads up: plan9port's Acme supports file names with spaces now.
https://github.com/9...f5977d12bea820e921ca

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #8 on: August 26, 2020, 05:17 PM »
NetSurf is said to be ported soon

Update: NetSurf is available on 9front now. :)

superboyac

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,347
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #9 on: August 27, 2020, 12:01 AM »
this looks so hardcore lol

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #10 on: August 27, 2020, 02:40 AM »
It is!

retsi

  • Participant
  • Joined in 2021
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #11 on: November 15, 2021, 04:40 AM »
Necromancing here, but what a thorough review, possibly the best around.
I wonder if anyone got windows programs like GCC running on acme.

Thanks.

blake1024

  • Participant
  • Joined in 2021
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #12 on: November 27, 2021, 07:58 AM »
If you're running with Xming & WSL, here is what I did to get it working:

From Windows:  ipconfig

Get the IP address of the Windows host.  It will look like this:
IPv4 Address. . . . . . . . . . . : 192.168.1.203

From WSL, do:  export DISPLAY=192.168.1.203:0

acme will now work.

Tuxman

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,466
    • View Profile
    • Donate to Member
Re: Mini review: The Acme editor on Debian on Windows
« Reply #13 on: January 05, 2022, 09:17 AM »
On Windows 11 with the "new" WSL, Acme does not seem to need that anymore.  :)