News for hackers. Stuff that matters.
Re:Text Showdown: Gap Buffers vs. Ropes by josephg on Monday October 09, 2023 @06:42PM (#37826361)
That doesn’t sound like a text file. Sounds like you have the world’s least convenient database.

You’re on your own with that one. Sounds like a job for SQLite, not a rope library.

Re:Text Showdown: Gap Buffers vs. Ropes by roland35 on Monday October 09, 2023 @07:41PM (#37826860)
[delayed]
Re:Text Showdown: Gap Buffers vs. Ropes by KerrAvon on Monday October 09, 2023 @06:49PM (#37826433)
Dude. TFA is literally about the core data structures for a text editor. Many people care about large text files. It's something people actually do. BBEdit on the Mac can edit files much larger than RAM without thrashing. If you don't want to support text editors, that's fine, but then what is your rope library for?
Re:Text Showdown: Gap Buffers vs. Ropes by josephg on Monday October 09, 2023 @07:00PM (#37826525)
Good question. I wrote it to support my work on highly efficient text CRDTs for collaborative editing. I wrote a blog post about it a few years ago, though this is out of date now since I’ve made so many new performance improvements:

https://josephg.com/blog/crdts-go-brrr/

Re:Text Showdown: Gap Buffers vs. Ropes by alpaca128 on Monday October 09, 2023 @07:19PM (#37826677)
I've reformatted 1GB files with a Vim macro in the past, weeks ago I processed 3-4GB JSON files, it's not that unusual nowadays if you work with a bit of data.

Though note that in many cases long lines are also important to consider - many editors struggle hard and become near unusable if the line on screen is e.g. 1MB long (which again isn't as uncommon as you'd think).

Re:Text Showdown: Gap Buffers vs. Ropes by eviks on Tuesday October 10, 2023 @04:34AM (#37829742)
Indeed. Do you know which editors don't blink working with a 1gb-1line json file?