3 ms·
A good article, which shows that even plain text editing (without any formatty) is already way more complex than a layperson may appreciate. For the developer,
by jll29 5y ago
A good article, which shows that even plain text editing (without any formatty) is already way more complex than a layperson may appreciate.
For the developer, there are some gems to be discovered when writing a text editor; recall that using regular expressions coverted to finite state machines saw the light as part of editing, and I remember being given a very cool paper (from the 1960s!) by my undergrad compiler construction professor that proposed an efficient algorithm for testing whether a string containing a line of text can possibly be a substring of any valid Pascal program (it was a piece of theory invented while and for a syntax-aware Pascal editor, possibly from IBM but not sure). Another thing is data structures: I learned of ropes, an alternative to strings for representing text (optimized for fast editing) in the context of text editing: https://dl.acm.org/doi/10.1002/spe.4380251203 https://dl.acm.org/doi/10.1002/spe.4380251203
- jmcphers 5y agoThere's a new(ish) editor called Xi that's built on the rope data structure: https://github.com/xi-editor/xi-editor https://github.com/xi-editor/xi-editor
- reificator 5y agoJust a heads up: That editor project, while conceptually interesting, is currently abandoned.
- Narishma 5y agoI don't think that's still actively developed.