3 ms·
That first one you quoted is pretty incredible. It's hard for me to even imagine writing many thousands of lines of code in ed today.
by OskarS 9y ago
That first one you quoted is pretty incredible. It's hard for me to even imagine writing many thousands of lines of code in ed today.
- Santosh83 9y agoI have no idea but perhaps in those days (60s & 70s), they wrote code on paper first before feeding it into the computer? If so, then ed was probably tolerable. It's nigh unthinkable these days of course.
- todd8 9y agoThat is how we coded. TECO, my first editor, requires keeping ones code in your head while typing in edit instructions. At 300 baud a teletype was pretty slow to print back the code that you had typed, so every dozen or so line edit commands I would print out the lines I was working on. Try out ed on a Unix or Linux (or MacOS) system to get a taste of the experience, and don’t forget that playback happened on a teletype printing back at around the speed of a fast typist. Nevertheless, this was much better than punching cards.
- Gracana 9y agoLine editors aren't so bad, and the Unix ed is pretty awesome. It's easy to list and read through code, and it has powerful search-and-replace. You just have to get used to using search or cursor movement commands for making edits. The programming I've been doing lately has all been in CP/M, using its "ed", which is a very simple line editor, and I still haven't felt the need to write things out beforehand. I think you just get used to it.
- kovek 9y agoWith ed you can do cursor movements? How? I meant to ask people how they use ed and compile an article, so that people would have a better idea of what's possible and what is not with ed. Could we talk about how ed can be used?
- Gracana 9y agoOops, sorry to mislead you. I was wrong about Unix ed. I knew it had powerful regex and line addressing, I figured it had character addressing/cursor positioning too. CP/M ed has basic search and replace, but most work is done with cursor movements.
- DonHopkins 9y agoITS Emacs has "glass tty" support that responded to keystrokes exactly as normal, but only showed one current line by repainting it without using any fancy control characters or escape codes, just backspace, carriage return and line feed. (That's what it meant to be "glass".) So ^L would refresh just the current line, and you could ^N down through a file to print it out line by line. http://www.finseth.com/craft/#c2 http://www.finseth.com/craft/#c2
- kps 9y agoVi likewise has ':open'.
- deleted 9y ago[deleted]
- tetraca 9y agoI still deal with a line editor on a near daily basis working with some ancient piece of software. For editing records/data, it's very tolerable, and I wouldn't gain too much speed using a visual editor given the data format. For programming, laying it out on paper (or, more often these days, copy pasting the code from a visual editor after you're satisfied with it) is typical. After a while of using it, you kind of do get used to the limitations and work in the system, but I can't say how efficient I'd actually be making a non trivial program with just a line editor. For instance, creating and maintaining consistent indentation is just plain awful because you can't use tab and there is no auto spacing (well, in this particular instance. Unix ed and most other line editors wouldn't have this issue). I bet if I had to use it entirely with no visual editor to back me up, I'd end up being much more in tune to catching my mistakes though.
- marcosdumay 9y agoWell, of course, one would write with `cat -`, and only edit with `ed`. It isn't a very productive cycle, but with printouts and smaller codebases, it seems viable.
- hollander 9y agoI think that the programs, back in the days, were not many thousands lines of code. They were small, and did only one or two things. Each program doing one thing reliably with a simple interface, and you can call it from another program, and build something big from that. But still, they are all small pieces of code.
- mavelikara 9y agoSome day we will look back and say the same about generics in Go :-)