Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In case anyone hasn't seen it this CppCon talk https://youtu.be/sPhpelUfu8Q talks about rrb-trees and how they're a great data structure for writing a text editor that can handle unlimited sized documents without locking up, and allows for editing while saving and opening, and an easy way to support an undo command.

Most text editors today do not support such functionality. With lockless data structures like an rrb-tree it becomes easy. It really is an ideal way to do write a text editor.



For those like me who are unfamiliar with Relaxed Radix Balanced trees, here's the paper presenting the algorithm:

RRB-Trees: Efficient Immutable Vectors (2012)

https://infoscience.epfl.ch/record/169879/files/RMTrees.pdf

EDIT: For further reading:

Improving RRB-Tree Performance through Transience (2014)

https://hypirion.com/thesis.pdf

Article: https://hypirion.com/musings/thesis

Code: https://github.com/hyPiRion/c-rrb


Are there any good ones that exist? I'm a security analyst and I frequently work with large text files, 200MB-1GB and the text editors I've tried are incredibly slow.

A lot of the time I can use grep and other command-line tools to find what I need, but given the nature of the job I don't always know what I'm looking for so having the raw file open in a text editor is sometimes the only way.


I’d recommend xi-editor, vi/vim/neovim or emacs for that


Try JOE, it can handle files this large no problem.


The person from the talk may have a github repo with the text editor he wrote shown in the talk.


As an ultimate noob of this area of expertise, can I ask if Sublime Text works? If not, why?


I'm the noob, not the parent. No sarcasm intended.


Gvim can open files of 2GB or more and search through them without any problem.


What about piece tables?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: