Earlier quoted context omitted.
No, it won't. You might want an arena for other reasons (better reasoning about lifetimes, preventing nest of pointers, etc.), but an array of line array approach to text editors is totally valid (except in the case of millions of extremely small lines).
I do from time to time open files of millions of small lines. To this day vim handles it better than emacs. These would be log files.
Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)
61–64 of 64 posts
Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)
#62Earlier quoted context omitted.
Are there any similar options that handle collation and normalisation? No small Unicode library seems to implement them, unfortunately.
Author of libgrapheme here: Both collation and normalisation are non-trivial and have many gotchas thanks to the way the Unicode consortium likes to write their specifications. I sometimes get the feeling that they don't even care about implementers and just document what is done in the reference implementation ICU. The only sensible normalisation one can implement is the full decomposition (NFD), and maybe the full…
Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)
#63Earlier quoted context omitted.
I do from time to time open files of millions of small lines. To this day vim handles it better than emacs. These would be log files.
Log files have lines that are long enough, I was thinking more of one/two-character long lines (such that the overhead of malloc bookkeeping would be more than the line size in memory). Regardless, Emacs also stores the data in a single array with a gap in middle (and memcpy is relatively cheap), so what slows it down is probably not the choice of data structure but everything else built around it.
Re: Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)
#64Earlier quoted context omitted.
Heh, I maintain the MacPorts port for this lib! Like all suckless projects, it’s written in very simple and portable C which makes it a breeze to package. https://ports.macports.org/port/libgrapheme/
Thanks for your work on packaging my library. Please let me know if I can make the process simpler for you; I take great care to make packaging as simple as possible for the packagers. Likewise I have no sympathy for those writing software that is almost deliberately hard to package.