we gave in to the urge to start writing a text editor https://code.irenes.space/ivy
(it doesn't edit anything yet)
we gave in to the urge to start writing a text editor https://code.irenes.space/ivy
(it doesn't edit anything yet)
smol library, which seems quite nice. pleasingly, there isn't some big war between the authors of different rust async runtimes; rather, roughly the same group of authors wrote first tokio, then async-std, then most recently smol. this last one refactors the whole thing into a bunch of tiny, loosely-coupled libraries; smol itself is just a shorthand to import a few of those libraries at once. so that's pretty neat.neat. we found and fixed a bug in our function that iterates through the file and keeps track of byte offsets to each line. it wasn't properly handling empty lines.
... see, finding a bug like that feels like progress to us because it demonstrates that the abstraction is doing the things we think it is, and when it fails it was just a minor tweak needed
like it makes us more confident of the approach than we were before
(we are way over-read on text editor implementation strategies, like in our body's early 20s our system read dozens of papers about it, so it's not like we really need more confidence, but hey)
we definitely want to eventually support files larger than can fit in memory (so, like, in the hundreds of gigs)
not soon, but eventually
though it may be easier to get that into the architecture early on, rather than retrofitting it.. hm. well, we'll chew on that
@ireneista That was also true for a while in the 32-bit days! Hard disks were below 2 GB, and on some platforms max file size was 2 GB, and even after that wasn't true, surely a *text* file will never have a reason to be over 2 GB, right?
I'm not sure if any text editors did "just mmap() the whole file" though (I assume classic Mac OS can't support it at all if you don't enable virtual memory; I'm not sure about Windows 98).