Earlier quoted context omitted.
I'd venture to guess everyone here knows what YouTube is even if they never use it. I wonder how many (even on this list) have seen a CRT? (I'm guessing the answer is "more than I think...")
I was going to agree "more than you think", but in tech years I'm also old. Maybe people have seen CRT tv's in parents' or grandparents' houses. As someone who has used multiple CRT's and both 5.25" and 3.5" floppy disks, this thread makes me feel old.
Why Emacs has buffers
61–70 of 88 posts
Re: Why Emacs has buffers
#62“Buffer” is just as bad or good a name as “file” or “document”. Files and documents can be in-memory and temporary, and the primary purpose of an Emacs buffer arguably isn’t buffering.
Re: Why Emacs has buffers
#63The C source for Emacs buffer: https://github.com/emacs-mirror/emacs/blob/master/src/buffer...
Re: Why Emacs has buffers
#64Earlier quoted context omitted.
Funny how there’s two levels of obsolescence here: I’ve used plenty of floppies, but none of them were actually floppy ; I’ve had 8-inch floppies waved at me but I don’t think I’ve ever seen a powered-on 8-inch drive. (Yes, I’ve heard the nuclear launch story.)
I only used 5 1/4 and 3 1/2 floppy disks, and I assume you refer to the 3 1/2 ones as the cover on those was hard. I always thought the 'floppy' part was to refer to the disk itself, which, even on the 3 1/2 ones was flexible, but now you make me question that and perhaps they name just stuck even if they stopped being floppy? I never thought of this because in my country they were referred to as "diskettes" , a word…
Re: Why Emacs has buffers
#65“Buffer” is just as bad or good a name as “file” or “document”. Files and documents can be in-memory and temporary, and the primary purpose of an Emacs buffer arguably isn’t buffering.
In the most general sense, “Document” is a better name, because more people understand what a document is than understand what a “buffer” is.
A "buffer" is a transition zone the user can work/interact with (and sync to it's source if any)
Re: Why Emacs has buffers
#66The C source for Emacs buffer: https://github.com/emacs-mirror/emacs/blob/master/src/buffer...
I thought eMacs was lisp.
Re: Why Emacs has buffers
#67This conflates the user concept of a buffer with the gap buffer implementation emacs happens to use. This is a pity, because buffers as a user sees them are a strength of emacs, the article covers several of the reasons for this. Other editors have files which don't happen to be saved to disk or have a name, and that might sound like the same idea as a buffer but in practice it isn't, and emacs does a lot of neat stu…
> This conflates the user concept of a buffer with the gap buffer implementation emacs happens to use. I did not conflate these things at all. Gap buffers, etc. are irrelevant; a boring implementation detail. Unfortunately, _most_ editors leave it at that, or with a thin veneer on top of it, and call it a day. That's why I go to great pains to elucidate why "string-based" editing is a Bad Idea, and why Emacs _does no…
I've gone from misunderstanding it to not understanding it, which is an improvement I suppose. Because you conclude by saying that the buffer is the same as the string, so that makes the string-based versus buffer-based comparison feel like a matter of terminology. If that section isn't about some tight matching of the data structure to the user experience (including programming) then I don't understand it.
> Emacs is not bifurcated, but a lapse of judgment 40 years ago could’ve made it so: a complex, string-fiddly world for Serious Programmers; and a safe, boring, but disjointed, world that “users” are expected to use.
If the above isn't about the gap buffer (I don't dispute that, you wrote it) then I don't know what's being referred to, maybe that could be bolstered a bit for those of us who don't have a detailed knowledge of emacs history.
Re: Why Emacs has buffers
#68Small correction: > Emacs is not bifurcated, but a lapse of judgment 40 years ago could’ve made it so Emacs uses a gap buffer because TECO used a gap buffer (before it became Emacs, it was just gene ciccarelli’s TECO init file) and that decision goes back 60 years
I don't think this is about using a gap buffer specifically, but rather about making buffers first-class objects. With respect to the line you quote, what matters is not the specific implementation of a buffer which is chosen, but the fact that code works in terms of buffers rather than strings.
The most common machines at the time had all sorts of strings and buffers of various character widths (on a single machine) and I remember back then I often encountered and used the term "string" in a more abstract way to refer to contiguous set of symbols rather than the more concrete way it is used today that was starting to evolve at that time.
Re: Why Emacs has buffers
#69“Buffer” is just as bad or good a name as “file” or “document”. Files and documents can be in-memory and temporary, and the primary purpose of an Emacs buffer arguably isn’t buffering.
In the most general sense, “Document” is a better name, because more people understand what a document is than understand what a “buffer” is.
However, I think it doesn't really matters, because people who choose to use Emacs (or Vim) - even among developers - are much more likely to be aware of those "low level" details or understand and adapt easily. So how they are named doesn't matters more than the odd "frame" term Emacs uses instead of "Windows".
Re: Why Emacs has buffers
#70The C source for Emacs buffer: https://github.com/emacs-mirror/emacs/blob/master/src/buffer...
Pretty neat for a piece of software that's been around for 37 years.