logoalt Hacker News

NetBSD adds a new text editor called atto

181 points • by luke8086 • yesterday at 11:59 AM • 142 comments • view on HN

Comments

chipotle_coyote • yesterday at 1:40 PM

To promote this to a top-level comment, because I think it's important context: nothing in the README file says the point is to be "beginner-friendly". As far as I can tell, that's something that Hacker News or whoever submitted this used as a description. Neither the word "beginner" nor the word "friendly" appear in the README; its goal is to "be the smallest functional Emacs in less than 2000 lines of C."

I think somebody incorrectly described Atto as comparable to nano/pico, and these comments are dragging it because it's not something that it was never intended as.

➕ show 6 replies
MonkeyClub • yesterday at 2:19 PM

OpenBSD also has an Emacs-y non-extensible editor, mg(1):

https://man.openbsd.org/mg

Just noting for completeness, as I didn’t catch any mention of it.

➕ show 3 replies
Fil0sOFF • yesterday at 3:57 PM

> https://man.netbsd.org/atto.1

> atto is not the standard editor.

Hah. That is clearly a reference to https://www.gnu.org/fun/jokes/ed-msg.en.html

➕ show 1 reply
Levitating • yesterday at 12:41 PM

NetBSD isn't the first to use the name. My pet text editor is also called atto: https://git.levitati.ng/Levitating/atto

➕ show 2 replies
Gracana • yesterday at 2:16 PM

Who knew a little emacs-like editor would be so controversial.

I think it looks great. Syntax highlighting, multi-buffer, splits, standard emacs commands... For new users in the emacs camp, this seems like a nice editor to include in the base install. Even as a vi user, I'd be pretty happy being stuck with this in a rescue system.

➕ show 1 reply
markusQi • yesterday at 1:25 PM

The source code and README are here: https://github.com/NetBSD/src/tree/trunk/usr.bin/atto

You are welcome!

➕ show 1 reply
itomato • yesterday at 12:38 PM

NetBSD has beginners?

➕ show 4 replies
whartung • yesterday at 4:25 PM

I always thought the essential feature of an emacs was its extensibility. I never felt that emacs was just a collection of keybinds and split buffer windows.

Note, I'm not talking about Lisp per se, just some kind of mechanic within the editor to allow the user to make extensions to it.

➕ show 1 reply
OnlineTux • yesterday at 12:48 PM

Why not just add nano?

➕ show 2 replies
LeFantome • today at 2:43 AM

Ironically, the best text editor for *nix may be Microsoft Edit.

Rucadi • yesterday at 12:44 PM

For me the most easy-to-use editor for cli / ssh and relatively lightweight is https://github.com/sinelaw/fresh everybody can just use it intuitively.

➕ show 3 replies
mig39 • yesterday at 2:31 PM

Is this the same editor that is used in the open-source Moodle LMS?

https://docs.moodle.org/400/en/Atto_editor https://github.com/moodlehq/moodle-editor_atto

➕ show 1 reply
hoppp • yesterday at 6:13 PM

How do you exit atto? Gotta make it hard:)

fodkodrasz • yesterday at 7:54 PM

I guess it has poor (or nonexistent) unicode support in 48kb. My only gripe with NetBSD was its lacking UTF-8 support for many core tools (eg. wscons, vi) when I used it as daily driver beck in the days (NetBSD 5 RC2 times :P)

➕ show 1 reply
agumonkey • yesterday at 8:24 PM

stings to see emacs keybinding hardcoded

unless someone can offer a custom keybinding mechanism.. and custom dynamic functions the user can bind to..

dkenyser • yesterday at 3:38 PM

Genuine question: Are there a lot of "beginners" hopping on NetBSD?

I feel like most people who even know about NetBSD would be technical enough to at least function at a basic level in something like vi or nano.

➕ show 1 reply
cowlevel • yesterday at 2:03 PM

To be beginner friendly they should call it text editor. Or notepad, or quickwriter. No beginner is going to guess that something called Atto lets you write words on a computer.

➕ show 1 reply
talideon • yesterday at 9:04 PM

I appreciate this in the man page:

> atto is not the standard editor

1vuio0pswjnm7 • yesterday at 10:19 PM

https://www.netbsd.org/~ktnb/ait.html

(If don't want to link curses and terminfo)

For me ait is a 277.3K static binary (musl)

Here's an earlier "Anthony's Editor" by Anthony Howe of MK Systems for IOCC 1991

https://www.ioccc.org/1991/ant/index.html

Here is a message about writing editors he sent to comp.editors in 1991

https://web.archive.org/web/20031214211718if_/http://ned.rub...

https://web.archive.org/web/20040221091356if_/http://ned.rub...

The later Anthony's Editor upon which atto is based, from 1993:

https://web.archive.org/web/20101130024855if_/http://sites.g...

The atto author got it to compile on GNU/Linux:

https://github.com/hughbarney/Anthonys-Editor--for-Ubuntu-Li...

According to the above Usenet communication, Howe was not a CS major

Perhaps this explains why his IOCC entries are so good IMHO

His 6086-character grep-like utility, "ag", from 1993 is all-time favorite

It still compiles today: 30.6K static binary (musl)

➕ show 2 replies
jmclnx • yesterday at 1:03 PM

>making it suitable for inclusion in the rescue system

People seem to be missing the point. Also NetBSD has what I call a "real single user mode". Last time I had to boot single user, ed(1) was the only editor available without some work. My guess is this new editor will be useful for people who do not want to deal with ed(1).

I have not seen it yet, but I guess it will be included in 11.1.

➕ show 1 reply
bmacho • yesterday at 2:19 PM

Badly editorialized title.

arbor-group • yesterday at 1:57 PM

The beginner-friendly label seems to be obscuring what atto actually is, which is a very small Emacs-like editor meant to live in the base system. At roughly 48 KB and under 2,000 lines of C, it fits places nano and the larger alternatives do not, especially a rescue environment or single-user mode where you still need something more usable than ed or a stripped-down vi. That constraint also explains the choices people are arguing about here: Emacs bindings come with the design, and a permissively licensed C program can be maintained with the tools NetBSD already ships, unlike a Go editor such as micro. For someone new to NetBSD but already comfortable at a Unix terminal, that is a reasonable trade. It is less a first editor for a general beginner than a safety net that happens to be approachable once you are already in that world.

scottchiefbaker • yesterday at 9:01 PM

[dead]

scottchiefbaker • yesterday at 8:53 PM

[dead]

georgestones • yesterday at 1:01 PM

[dead]

IshKebab • yesterday at 12:44 PM

> Perhaps all that needs to be known to use atto at a basic level is that holding the control key, pressing x, then pressing w will write the currently open file, and holding the control key, pressing x, then pressing c will exit the editor.

Very beginner friendly lol. These people have no idea.

Micro is a beginner-friendly console text editor. This isn't.

➕ show 6 replies
codedokode • yesterday at 1:32 PM

Why are they using weird key combinations instead of traditional Ctrl + S, Ctrl + A, Ctrl + C used in desktop applications? Why every console program wants to be a special snowflake and not use standard key combinations, please explain. I do not care that 40 years ago someone used Ctrl + C to send SIGINT, it is 2026 now.

➕ show 9 replies