869 private links
This article talked about three data structures for efficient text editing (a.k.a. text buffer data structure): Rope, Gap Buffer, and Piece Table. It's first time I learned about Piece Table, it works like this:
- Store the text in an append-only fashion in two buffers known as original file and add file
- Store the information about segments of the files as a list of reference to the slices into the two buffers (known as "piece table")
The inserting/deleting in this data structure would simply need to breaking up items in the piece table. It seems like a good candidate as a basis to implement CRDT in a collaborative editor.
From my preliminary understanding of the nature of this data structure, it doesn't seem necessary to have two buffers, a single append-only buffer preloaded with the file should be sufficient.
UPDATE: I found this post on vscode blog extremely helpful: https://code.visualstudio.com/blogs/2018/03/23/text-buffer-reimplementation
An UX idea on rich text editing. My favorite part is the clever way to distinguish inside and outside a formatted block.
An online ide to play with webassembly. Supports both C and Rust languages.
<blockquote>Write great Twitter threads..</blockquote>
write-only twitter experience. no friends.
Free and open source alternative to Photoshop. Works offline. Reads many formats, including rasterized and vector. The developer claims it is more capable than GIMP.
One impressive fact is that this piece of software is developped by a single person.