4 ms·
A tutorial for the sam command language (1986) [pdf]
- m463 3y agoI remember using line-oriented editors, maybe pre-vi. maybe ed, though I vaguely recall something else. I don't remember sam however.
- School-Cotton 3y agoWas it ex?
- m463 3y agoI thought ex was the line oriented vi. maybe ex came around before vi? I also remember teco.
- School-Cotton 3y agoYes you’re exactly right, ex is the line oriented vi, but it came first. So it’s probably more accurate to say that vi is the screen-oriented ex.
- ithkuil 3y agois there a good "streaming sam" implementation that can be used instead of sed?
- throwaway68218 3y agoPlan 9 from User Space [1] a.k.a. plan9port includes an official *nix port of sam and its streamed variant ssam(1) [2]. [1] https://9fans.github.io/plan9port/ https://9fans.github.io/plan9port/ [2] https://9fans.github.io/plan9port/man/man1/ssam.html https://9fans.github.io/plan9port/man/man1/ssam.html
- thristian 3y agodeadpixi'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 https://github.com/deadpixi/sam
- thristian 3y agoIf 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 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/ https://github.com/martanne/vis/
- mananaysiempre 3y agoAnd while it doesn’t use the sam language precisely, I think in the broader “postfix Vi with visual feedback” category Kakoune[1] also warrants mentioning. The command language, in my experience, feels much more logical than that of Vis coming from a blank slate (things might be different if you come from Vim, but even when I used Vim regularly I never used the editing language that much exactly because I could never remember the damn thing). And having mentioned Kakoune it’d probably be unfair to then not point out Helix[2]. It has a very similar editing language, but it’s a fairly anti-Unix everything-bolted-in affair on the inside (“everything works out of the box” being the advertising take) compared to Kakoune’s Acme-inspired no-scripting scripting (there’s an ex-style command to exec a user program that can then drive the editor over stdio RPC, a set of hooks, and that’s it). So if you’ve come for the Plan 9 feels, I don’t expect Helix to be that appealing. It’s still an excellent editor, nevertheless. [1] https://kakoune.org/ https://kakoune.org/ [2] https://helix-editor.com/ https://helix-editor.com/
- Syssiphus 3y agoThe SDF Plan9 Bootcamp is running at the moment. Registration is under: https://sdf.org/plan9/ https://sdf.org/plan9/ In case anyone wants to try sam or acme on Plan9 without having to install the system.
- deleted 3y ago[deleted]
- cf100clunk 3y agoNot sam (a.k.a. SAM) from HP-UX: http://www.polarhome.com/service/man/?qf=sam&tf=2&of=HP-UX&sf=1m http://www.polarhome.com/service/man/?qf=sam&tf=2&of=HP-UX&s...