Ed is the standard text editor (2014)
wiki.c2.com
wiki.c2.com
I'm reminded most of all of the fdisk util, where the workflow is pretty much the same: print, modify, print, save. But also I can see where Vi/Vim come from, as I regularly do the same thing as in the vid: %s/something/something else/g and then wq.
“Introducing The Amazing Compact Disc, 1982” https://www.youtube.com/watch?v=_Tx6TYnPat8 — “You can pick it up and move around, even shake, and nothing happens”, yeah sure bud.
“Introduction to Microsoft Excel, 1992” https://www.youtube.com/watch?v=kOO31qFmi9A
“Susan Kare explains Macintosh UI ergonomics on the Computer Chronicles, 1984” https://www.youtube.com/watch?v=x_q50tvbQm4 — the control panel is just astounding by modern standards, especially seeing as for me the control panel is a litmus test of an OS interface.
Also one of my favorite music-making tutorials is the three-part, three-hour series ‘Intro to Synthesis’ from sometime in the early 80s: https://www.youtube.com/watch?v=atvtBE6t48M — instead of going through all the terminology in ten minutes and one second, the guy takes his time twiddling knobs and showing what each one does.
Get an iPad, and delete all the app icons, except the couple you use every day, like iMail and Safari. (You can always access them from the Applications folder.)
Turn off all the notifications. Set the desktop background to some non-distracting solid color. Keep your data in folders, don't clutter up the desktop.
Use Pages to write things. Or, maybe just use write.as on the web, and let them handle the fiddly details like backup and web page hosting of your work.
If you have a Linux background and just want something simple (but very capable when you need it), run i3 or Sway on Alpine.
I actually used such a thing to dial a BBS when my Atari 800xl's modem got hit by lightning. Obsolete then, and slow but I got my fix. Fun times...
Afaik phone phreaking used a variety of whistling devices of different complexity: from https://slate.com/human-interest/2013/02/phone-phreaks-the-t...
Our COBOL programs had to be submitted as a deck of cards wrapped with a rubber band. To ruin someone else's assignment, shuffle their deck and return it to the box.
SSH with 7-bit ASCII encryption :-)
Sort of wish I could work from home distraction free with a typewriter on my kitchen table though, instead having to be constantly be distracted by slack, zoom, email etc.
'79 seems like a much simpler time.
2) Turn off desktop notifications
3) Set timer
4) enjoy working in peace
5) timer goes off, check feeds for updates
Repeat Steps 3, 4, 5. for timer length suggestions see: pomodoro
1) Mute phone
2) Turn off desktop notifications
4) enjoy working in peace
5) check notifications when you like
7) Live a happier and less stressful life.
Edit:// to be fair I have downtime notifications on priority. Everything else is not time critical
Sorry, I don't buy in the fetishisation of that and being instantly available.
If someone needs to get in touch with me, then they will.
Also, we created a scenario where they literally cannot get in touch with you even if they need you.. are you expecting an emergency carrier pigeon?
[1] Shameless plug, here it is: https://github.com/bojle/edd
TEXT EDITOR.I love reading C2, but anything in reference to ed(1) besides "Ed, man! !man ed" is wasting my VALUABLE time. :-)
`The standard unix text editor` has been my Slack bio as long as I can remember for a reason.
Less commands and a language where "everything is a (huge) string". So its operations are not limited to lines like in ed. A tutorial of the command language: http://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pdf
And Pike's introductory paper: http://doc.cat-v.org/plan_9/4th_edition/papers/sam/
All in all, the terseness of the language can be quite addictive. :) http://sam.cat-v.org/cheatsheet/
ed $file << COMMANDS
g/^#.\*$/d
/yaml_key:
s/^/#/
w
q
COMMANDSIt is still much more usable than ed. At least, it makes it easier to debug your script.
For a single edition script (one shell command), yeah, I'd say there is no large difference.
One thing I do like about ed, though, is that when I run eshell within emacs, I can call ed from there. Since ed doesn't make any assumptions on the capabilities of the terminal it runs on, it works perfectly well in that environment, and being able use another editor from within my editor made me very happy for a couple of minutes. ;-)
The way it worked was like this: As you keyed in your program, letter by letter, it was printed out on the paper immediately like a typewriter. If you ran the program and there was a problem, you'd just read (or re-read) the printout, find the line with the bug, then use a line editor to fix just that line. You might mark the paper with pencil to keep track of the change. After a while if you needed to see the latest version, you'd just print the whole program out, or just the lines you needed.
This realization finally clued me into what was going on when I was 10yo and programming BASIC on a TRS-80 Color Computer. It was essentially simulating a teletype (which makes sense given BASIC's inception at Dartmouth [2]), where you would type each line individually, then if there was a problem, you would edit the program individual lines at a time. I always thought it was an odd until I understood how actually using a teletype actually worked. Also explains why the command to write letters to the screen is called "PRINT".
1. https://www.gatesnotes.com/About-Bill-Gates/Early-Days-as-a-...
I heard that a lot of people preferred fewer files and longer functions for the same reason--it was all there on the fanfold output and could be read at once, rather than working in 80x25 chunks. After that mode of working was replaced by interactive programming at the display terminal, we started to prefer functions that didn't span more than 1-2 screens.
https://en.m.wikipedia.org/wiki/Teleprinter
Enjoy.
(Here's a short third-party manual that someone wrote. http://www.sqrt-pi.org/boots/Done-That/Edlin-manual/p11.html )
TECO-like editors are interesting to use:
Unlike line editors (like ex/ed/edlin, etc.), the edit position can be anywhere, not just at line boundaries. But there is no screen, so you really need a good imagination to keep track of this..
Also, they can edit files larger than can fit in the edit buffer, but not in the way this works on modern editors, where the editor manages everything. Instead, the editor makes one pass through the large file, copying it from input to output. You get to make changes along the way, in the part of it that fits in the edit buffer.
TECO has a page concept to help with this: you break your large file into pages separated with form feeds, and there are commands to retrieve the next page from the input file and write the old page to the output file. But I've seen TECO clones without the page concept on early micros.
Vestiges of this page concept remain in emacs to this day..
Anyway, here are some links:
http://www.columbia.edu/cu/computinghistory/dec20.html
https://www.livingcomputers.org/Computer-Collection/Online-S...
TOPS-20 was really nice.
With 512K of RAM on a 6MHz 80286, using an editor that fit into one "segment" and loaded quickly from a floppy was nice. The original DOS 1.0 edlin was just over 2K.
Of course, we had printed manuals back then, and you could learn EDLIN with the manual on your lap while you typed commands.
https://www.roug.org/soren/6809/os9sysprog.html
Previous to that I used the TECO editor on a PDP-11
Still sucks though. Even in psql I regularly drop into vim with \e to edit whole queries before sending them out.
This metaphor, BTW, persists on a lot of mainframe related tasks where, while you see lines on a screen, the computer is reasoning about punch cards.
But in the past you may have got just some naked Bourne Shell with no defaults at all.
https://docstore.mik.ua/orelly/unix3/upt/ch30_14.htm explains a bit.
They don't make books like this anymore. ;)
It's the single book that more than any had me finally grok Unix. I still have my copy, first edition, two-colour printing (blue for "hyperlinks" to related sections).
Jerry Peek is also an absolute treasure for Unix shell wisdom --- bash in particular though he's highly knowledgeable about others as well.
(global-set-key "\C-w" 'backward-kill-word)
(global-set-key "\C-x\C-k" 'kill-region)
(global-set-key "\C-c\C-k" 'kill-region)
;; https://www.reddit.com/r/emacs/comments/5jbvc3/kill_is_now_cc_ck_instead_of_cw/Not used for my code IDE or anything, but little config files etc.
We had vi on our '11 in 1980 but I could never get along with it and still can't.
Source if anyone's interested. 1700 loc : https://github.com/v7unix/v7unix/blob/master/v7/usr/src/cmd/...
-- The Unix Hater's Handbook pp. 57
I still lament that the C2 wiki switched to JS rendering.
This site uses features not available in older browsers.“Ed is the standard text editor.” (1991) - https://news.ycombinator.com/item?id=14406846 - May 2017 (8 comments)
Ed is the standard text editor (1991) - https://news.ycombinator.com/item?id=9936980 - July 2015 (3 comments)
Lots more:
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
Read entries from c2 wiki.
Don't know what to do with yourself for a few minutes DO NOT open Reddit, Facebook, Instagram, TikTok, Twitter ... Whatever.
Read the original, classic group discussion on tech. With Ward Cunningham, Kent Beck, Rob Pike, and many many other luminaries contributing to this endless discussion, you cannot fail to be educated on some level.
So before you read another random article here, on medium or some other place where a "10x" dev just learned something about X ... Just don't, go read c2 wiki.
Is there some operating environment I'm not aware of?
The answer to this question is always yes. In this case for example: plenty of old control devices in industrial settings are still operating and use this bitrate.
ed .ssh/config
68d
wq
done, didnt fill my terminal with vim or emacs, didnt tab over to my gui editor then back againalso it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions:
postPatch = ''
ed Makefile <<EOF
/^CFLAGS/s/-DFOO//
/-funroll-loops/s//-ffast-math/
/_BSD_SOURCE/s//_DEFAULT_SOURCE/
/^LDFLAGS/d
/ranlib/s,,${pkgs.my_special_epic_ranlib}/bin/ranlib,
wq
EOF
'';
etc etcsure, using ed as your daily driver code editor in 2022 is probably stupid, but it's still useful enough that any linux distro that excludes it by default irritates me
I think this is my ed use-case as well. I've noticed I need to "apt-get install ed" sometimes. The standard editor is not always standard, it seems.
one of these days i will go around pestering distro release engineers to include it; after all, it's less heavyweight than any one of their homespun lightdm greeters
https://pubs.opengroup.org/onlinepubs/009604499/utilities/se...
It's "ed" which is de facto non-standard.
Linux distros don’t follow a standard anymore, as as I can tell. And Linux was never entirely POSIX compliant.
sed -i 68d .ssh/config
It was an eye-opening experience for me when I realized sed and ed commands are almost identical
ssh-keygen -R $HOST
IIRC the security warning actually used to suggest this command, but then stopped in order to discourage people from thoughtlessly bypassing it. (I don’t like this pracrice of deliberate unhelpfulness—cf Chrome’s “thisisunsafe” HSTS override—but neither do I like the results of being helpful in such cases. Ugh.)> also it's a nicely "semantic"/compact/comprehensible way of expressing patches in things like portfiles or nix expressions
As far as I can tell, your ed script sans the wq at the end is a valid sed(1) script, and that is what people usually use for casual patching in packaging situations (although Nix also has substituteInPlace et al).
> no reason
This is like saying "There is no reason to use UNIX (now that we have Ubuntu, Gnome, and Wayland)." Personally, I tend to stick with the CLI for as long as it gets me where I need.
(And then install Emacs and turn off the screen candy fluff they've added over the last 25-30 years).