What does HackerNews think of sam?

An updated version of the sam text editor.

Language: C

deadpixi's sam port[1] includes a "ssam" command, but it's just a shell-script that writes standard input to a temporary file, launches sam to run commands, then copies the temporary file to standard output - it's not really a "stream".

"Plan 9 from User Space" has its own ssam command, whose implementation is basically the same, except as an rc script instead of a shell script.

I don't know if there's an actually-streaming sam implementation anywhere.

[1]: https://github.com/deadpixi/sam

If you'd like to try out the sam command language yourself, there's an X11 port that works quite nicely on modern POSIX systems:

https://github.com/deadpixi/sam

Alternatively, the vis editor combines sam's command language with a vim-style modal interface that runs in the terminal, and is therefore even more portable:

https://github.com/martanne/vis/

Occasional mtm user here. I'm in no way associated with the original author of mtm, but several of his other projects are worth pointing out as well. A nice focus on simplicity.

An updated version of Plan 9's sam text editor for Unix: https://github.com/deadpixi/sam

tine, a clone of AmigaDOS ED editor: https://github.com/deadpixi/tine

libtmt, a tiny terminal emulation library (as I understand, this is the core of mtm as well): https://github.com/deadpixi/libtmt

and the eregex regular expressions library: https://github.com/deadpixi/ergex

EDIT: Also worth noting is tty8, another tiny terminal multiplexer. All it does is provide 8 virtual terminals and have 3 keybindings for control: https://github.com/dimkr/tty8

Indeed, the Plan9 ecosystem itself (including its Linux port, plan9port) is heavily built around GUI and a mouse.

Sam alone, however, can be compiled for command line only, without X11 support under Linux. This has been done in the 9base package:

https://git.suckless.org/9base/file/sam/Makefile.html

https://tools.suckless.org/9base/

There is also an updated Linux version of Sam alone, without any other P9 tools. I suppose this should also be trivial to build without X11 support:

https://github.com/deadpixi/sam/

I think ed uses a tmp file.

You can try a custom sam(1) fork (it uses structural regex, google/ddg them): https://github.com/deadpixi/sam

sam -d for the classic cli mode.