News for hackers. Stuff that matters.
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by kzrdude on Friday April 08, 2022 @02:32PM (#30960809)
Does anything implement it like that?
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by mftb on Friday April 08, 2022 @02:44PM (#30960966)
It's vaguely reminiscent of Vim's implementation, in the sense that I think, for large files, in it's default config, Vim keeps most of the text in it's swap file and pages it in as needed.

Vim's implementation also feels somewhat line-oriented in that if you load a large JSON file that has everything on 1 line and you try to edit that line, uh... it will be sluggish, but if you do, like %!jq '.' and format it, you can them move around the file a little easier.

Edit - What the heck while I'm at it:

Emacs - Historically used a Gap-Buffer which optimized more for locality of edits than loading large files. It doesn't suffer though as much from heap fragmentation though as the linked-list of strings type approach.

Monaco - The editor in VS Code recently went from a linked-list of strings to a PieceTree buffer. Which basically loads a the whole file into an immutable buffer and then uses the PieceTree to manage the edits.

Others - Lately people keep talking about Ropes, which is another tree type deal with extra-smarts specifically for text editing. I don't know of a game-changing editor like the others mentioned that uses it tho.

Re:NotepadNext: A cross-platform reimplementation of Notepad++ by jll29 on Friday April 08, 2022 @04:24PM (#30962109)
Ropes were introduced in this paper in the journal Software, Pracise and Experience: https://doi.org/10.1002/spe.4380251203 (best accessed from a university domain)

An example for an editor that uses them to manage large text files is Xi-Editor: https://github.com/xi-editor/xi-editor (edit: written in Rust).

Re:NotepadNext: A cross-platform reimplementation of Notepad++ by mftb on Friday April 08, 2022 @04:46PM (#30962305)
Cool, I'm really interested in that paper, ty.
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by compressedgas on Friday April 08, 2022 @11:12PM (#30964985)
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by nly on Friday April 08, 2022 @02:37PM (#30960860)
Wouldn't mind betting Sublime does a good job
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by OneLeggedCat on Friday April 08, 2022 @07:34PM (#30963771)
It does. I loaded a 14GB file in it once.
Re:NotepadNext: A cross-platform reimplementation of Notepad++ by _hl_ on Friday April 08, 2022 @02:43PM (#30960956)
xi-editor has some reasonably sophisticated handling for large files