~kris/9p

krisyotam.net

krisyotam.net/reference/pmikkelsen/pmikkelsen.com/me/how-i-started-using-acme.html -rw-r--r-- 12.4 KiB
8bfa4b74 — Kris Yotam ci: declare SourceHut source for push builds a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE HTML>
<html>
<head>

    <title>me - how i-started using acme</title>
    <style media="screen, handheld">
body { display: flex; flex-wrap: wrap; font-family: sans;}
header { flex-basis: 100%; flex-shrink: 0; }
article { flex-basis: 60%; padding-left: 1em; }
footer { flex-basis: 100%; flex-shrink: 0; }
header nav { display: flex; justify-content: space-between; }
nav a, header a { text-decoration: none ; color: inherit; }
header h1 span { margin-left: 1em; font-size: 50%; font-style: italic; }
.mainContent > nav { flex-basis: content; padding-right: 1vw; min-width: 16em; }
nav ul { display: flex; flex-direction: column; list-style-type: none; list-style-position: outside; padding-left: 0;  }
nav li ul { padding-left: 0.6em }
footer { display: flex; justify-content: space-between; }

/* cut here to leave vanity behind */

body { margin:0; padding: 0; font-size: 84%; font-family: Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; }
a { text-decoration: none; color: }
a:hover { text-decoration: underline; }
.thisPage { color: black; }

/* header and top bar */
header nav { background-color: rgb(100,135,220); color: white; padding: 0.3em; border-bottom: 2px solid black; font-size: 91%; }
header h1 { background-color: #ff6d06; color: black; margin: 0; border-bottom: 2px solid black; font-weight: normal; padding: 0.25ex; font-size: 233%; }
header a:hover { text-decoration: none; }

/* sidebar */
.mainContent > nav { border-right: 1px solid #ddd; padding: 0;  } 
.mainContent > nav > div { border-bottom: 1px solid #ddd; } 
.mainContent > nav > div a { color: rgb(0, 102, 204); display: block; text-transform: capitalize; font-weight: bold; padding: 0.25em 1ex 0.25em 2mm; font-size: 102%} 
.mainContent > nav > div a:hover { color: white; background-color: rgb(100,135,220); border-left: black solid 0.2em; text-decoration: none; }
.mainContent > nav > div p { font-weight: bold; margin: 0 0 0.5em 2mm; padding: 1em 0 0 0; }

/* main copy */
article { padding: 0.5ex 0 5vh 1vw;  }
article h1, article h2 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; border-bottom: 2px solid rgb(0,102,204); }
article h3, article h4, article h5 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; }
article h6, article h7, article h8 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; }
article a { color: rgb(0,102,204); }
article a:hover { color:  rgb(100,135,220); }
article pre { font-size: 1.2em; }

/* footer */
footer { color: white; background-color: rgb(100,135,220); }
footer a { color: inherit; }
footer div { padding: 1em; }

/* tables */
table { border: 1px solid rgba(128,128,128,0.5); padding: 0; }
th { color: white; background-color: rgb(100,135,220); }
tr:nth-child(odd) { background-color: rgba(128,128,128,0.1)  }

/* modifications */
img {
	max-width: 100%;
	border: 1px solid black;
}

body {
	
}

header h1 {
	background-color: #c2d2c6;
}

html {
	font-size: 1.2em;
}

header nav, footer {
	background-color: #442a13;
}

code > pre {
	border: 2px solid #442a13;
	background-color: #c2d2c6;
	width: max-content;
	padding: 0 0.5em;
}

.mainContent > nav > div a, article a:hover {
	color: #442a13;
}

.mainContent > nav > div a:hover {
	color: #442a13;
	background-color: #c2d2c6;
}

article h1, article h2 {
	color: #c48f3b;
	border-bottom: 2px solid #442a13;
}

article a, .thisPage, footer, header nav {
	color: #c48f3b;
}

footer {
	padding: 0.5em;
	flex-shrink: 1;
	flex-basis: unset;
}

header {
	flex-basis: unset;
}

html {
	display: flex;
	min-height: 100%;
}

body {
	flex-direction: column;
	flex: 1;
	background-color: #e3dfd7;
}

.mainContent {
	display: flex;
	flex-grow: 1;
}    </style>
    <link rel="shortcut icon" href="https://images.pmikkelsen.com/favicon.ico" type="image/vnd.microsoft.icon">
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 



    

</head>
<body>

<header>
    <nav>
    <div class="left">
		<a href="https://pmikkelsen.com">notes</a> |
		<a href="https://git.pmikkelsen.com">git</a> |
		<a href="https://images.pmikkelsen.com">images</a> |
		<a href="https://files.pmikkelsen.com">files</a> |
		<a href="https://prolog.pmikkelsen.com">PProlog</a> |
		<a href="https://apl.pmikkelsen.com">APL9</a> |
		<a href="https://aplwc.org">aplwc</a>
    </div>

    <div class="right">
		<a href="https://git.sr.ht/~pmikkelsen">sourcehut</a> |
		<a href="https://9front.org">9front</a> |
		<a href="https://openbsd.org">OpenBSD</a> |
		<a href="https://dyalog.com">Dyalog</a>
    </div>

    </nav>
    <h1><a href="../index.html">Peter&#39;s website <span id="headerSubTitle">- random notes</span></a></h1>
</header>

<div class=mainContent>
    <nav id="side-bar">
        <div>
<ul>
<li><a href="../APL-and-J/index.html">&rsaquo; APL and J/</a></li>
<li><a href="../OpenBSD/index.html">&rsaquo; OpenBSD/</a></li>
<li><a href="../contact.html">&rsaquo; contact</a></li>
<li><a href="../facts/index.html">&rsaquo; facts/</a></li>
<li><a href="../haskell/index.html">&rsaquo; haskell/</a></li>
<li><a href="../linux/index.html">&rsaquo; linux/</a></li>
<li><a href="../mainframe/index.html">&rsaquo; mainframe/</a></li>
<li><a href="index.html" class="thisPage">&raquo;<i> me/</i></a></li>
<li><ul>
<li><a href="how-i-started-using-acme.html" class="thisPage">&raquo;<i> how i started using acme</i></a></li>
<li><a href="stuff-i-use.html">&rsaquo; stuff i use</a></li>
</ul></li>
<li><a href="../opinions/index.html">&rsaquo; opinions/</a></li>
<li><a href="../plan9/index.html">&rsaquo; plan9/</a></li>
<li><a href="../prolog/index.html">&rsaquo; prolog/</a></li>
<li><a href="../web/index.html">&rsaquo; web/</a></li>
</ul>
        </div>
    </nav>

<article>
<h2>The beginning</h2>
<p>My very first code editor was visual studio 2010 for windows 7. This was when I didn't know what programming was, and a teacher I had suggested that we used that, so we could start learning some C#. It was very fun and all, but soon after, I decided that I wanted to learn another language, and the whole idea of using an IDE which is specialized for a specific programming language or environment just seemed very odd to me. Surely there had to be better options, where I as a user could decide by myself what languages I wanted support for. I tried out multiple different small editors but didn't really like any of them.</p>
<p>After some time, I decided that I wanted to try linux, and I installed fedora or linux mint (don't remember at this point), and I liked it very much. Comming from windows where it is normal just to go to a random website and download the tools I needed, it was a great joy to be able to just type a command in the terminal and watch my program get installed.</p>
<h2>First try: vim</h2>
<p>After reading online for some time, it seemed that the editor which all the cool linux users used was vim, so I decided to learn that. The experience was very different from what I was used to, but I liked the keyboard shortcuts and that it looked very cool. Of course I installed every plugin that I had read about online and it all became a mess, but I stuck with it for around 3-4 years. The things I liked the most was that I felt it was very fast to do what I wanted, but unfortunately the flow with multiple files was never something I could get used to, and all the plugins made me sick.</p>
<h2>Second try: emacs</h2>
<p>Just to give another very popular editor a try, I installed emacs sometime 2-3 years ago. Comming from vim, the keyboard shortcuts in emacs sucks, but the editor itself is just so much more powerful, because plugins and customisations could be written in a real programming language. I started, as many other emacs users do, to use emacs for everything i could. I read my mails, watched PDFs, managed my system, and even used it as my window manager for a period. Around the same time that I started using emacs, I also started using OpenBSD as a secondary operating system. I noticed that many very good tools are available in unix, but emacs almost has everything implemented again in elisp, which seemed stupid to me. But hey, it works so I stuck with it. Until late 2019.</p>
<h2>Now acme</h2>
<p>One day in school when one of my group mates asked if I could look at something for him, I saw that he was using visual studio code, which made it natural to use a mouse to click around in the file. Of course this was also possible in emacs, but since I came from vim, it was never something that I did. He argued that it was much faster to just click in the file where he wanted to edit, than to navigate using the keyboard, and I thought that maybe he was right, so I started digging. After some time looking though the internet for some editors which made much use of the mouse, I found acme and decided to install it. And wow it was different.</p>

<p><a href="https://images.pmikkelsen.com/acme-in-action.png" /><img src="https://images.pmikkelsen.com/acme-in-action.png" alt="A picture of acme in action" /></a></p>
<p>Acme uses the mouse for everything, since there are very few keyboard shortcuts (not even copy and paste). As shown on the picture, there are no menus and no icons; everything is just text, and the different buttons on the mouse can interpret that text in different ways. For example, middle clicking on the text <code>New</code> wil create a new text frame, and right clicking on the text <code>example</code> will search the file for the word. Actually, it is more advanced than that since the right click will first send the selected text to something called the plumber, which might do something fun like opening the file which has that name. I suggest interrested readers to read the page <a href="http://acme.cat-v.org/">here</a> and some of the documents linked from that site to learn more about acme. The video introduction from Russ Cox <a href="https://www.youtube.com/watch?v=dP1xVpMPn8M">here</a> is also great.</p>
<h2>What I like about acme</h2>
<ul>
<li>
<p><strong></strong>The colours<strong></strong>: they cannot be changed without modifying the source, but luckily for me, I love those pale bright colours. In fact, there are the very reason this website has the colours that it has.</p>
</li><li>
<p><strong></strong>Writing commands<strong></strong>: since acme allows users to control it via the 9P protocol (if you don't understand, read the links above), it is possible to write "plugins" or commands in whatever language I want. After just creating a program with the needed functionality, it is possible to write the name somewhere and middle click on it, just like it was always there. Not may editors makes it possible to use the environment as much as acme does, which was also one of my wonders about emacs back then. It allows me to turn it into <strong>my</strong> IDE using whatever tools I see fit, instead of depending on support directly in the editor.</p>
</li><li>
<p><strong></strong>Everything as text<strong></strong>: this means that if I run a gdb session via the <code>win</code> command, it is totally possible for me to just scroll up in the history and delete lines which are not important, and to write notes as I debug. Also, since commands are just text which is clicked, it is possible to have a document with commands which are useful in a given project, which I can then open and click.</p>
</li><li>
<p><strong></strong>Lack of customisation<strong></strong>: while this might seem strange, comming from a vim and emacs background, it surely is wonderful to have an editor which does <strong>not</strong> encourage the user to customise the hell out of it. I have spent way too much time doing this in the past and it had to stop.</p>
</li><li>
<p><strong></strong>Lack of syntax highlighting and auto completion<strong></strong>: some people love it and can't live without it, but I very much prefer to learn the syntax of the language based on the contents, not based on some colours an editor throws at me. Also I feel like I learn and remember much better when there is no auto completion.</p>
</li>
</ul>
<h2>Other editors I use sometimes</h2>
<p>Sometimes I have to do very small editing tasks, and sometimes as root, in which case it is just simpler to open the file in vi. Note that this is the small vi, and not the "improved" vim. I also sometimes edit my text in sam with is another editor written by Rob Pike, and I quite like that one too for smaller projects. You can read more about sam <a href="http://sam.cat-v.org/">here</a>.</p>

</article>
</div>

<footer>
<a href="http://werc.cat-v.org">Powered by werc</a> © Peter Mikkelsen 2019-2025
</footer>
</body></html>