Read a paper: Ropes-- an alternative to Strings

  Рет қаралды 7,053

Vivek Haldar

Vivek Haldar

Күн бұрын

Boehm, H. J.; Atkinson, R.; Plass, M. F. Ropes: an alternative to strings. Software Practice and Experience. 1995 December; 25 (12): 1315-1330.
Link to paper: www.cs.rit.edu/usr/local/pub/...
vivekhaldar.com
/ vivekhaldar

Пікірлер: 7
@monad_tcp
@monad_tcp 6 ай бұрын
(from the title only) At first I though this was about Physics, but then I remembered I'm actually graduated in Compsci
@julianyumanji1159
@julianyumanji1159 Жыл бұрын
Thank u and please continue this series
@anon_y_mousse
@anon_y_mousse 5 ай бұрын
I read that paper and it seems to suggest that the method I use for allocation is actually faster than using a rope. I use a geometric allocation scheme and I retain the length of the string. As far as the example of reading in a file by lines, it's a shame I didn't read this paper sooner because it's not too dissimilar from the method I came up with independently where I create a sparse array where it's just a series of partially filled buffers in a balanced tree referenced by their indices. Unless I'm misunderstanding what they're saying where it sounds like they're saying each node in a rope would be sized specifically for whatever data it stores, while I used the same size for each node and allowed for unfilled space before and after each string piece. I used a tag to denote a partial line which actually allowed me to size the buffers in relation to the screen width in characters so that I could very easily wrap lines. It was a lazy method because words would be clipped in half in a lot of cases, but it was really fast when it came to edits. It wouldn't be too difficult to wrap by words, it would just require a slight adjustment to the buffer filling code, but maybe I should continue developing it.
@VivekHaldar
@VivekHaldar 5 ай бұрын
That sounds neat. You should do a proper comparison with ropes and write it up! The Xi editor used ropes and was written in rust if you're looking for a reference implementation. xi-editor.io/docs/rope_science_00.html
@delian66
@delian66 3 ай бұрын
Thank you. I like your channel a lot.
@loogabarooga2812
@loogabarooga2812 5 ай бұрын
Why mention that an issue with char array strings is immutability and then not go into how ropes approach that at all lmao I remember as a college project trying to figure out how to make a text editor and I did end up using a rope. I still don't know how immutability comes into it, and I'm pretty sure I read this specific paper
@delian66
@delian66 3 ай бұрын
@OmerTairi-cf1jxunfortunately I think that people that use `lmao` unironically can not help you or anyone else.
Rope Datastructure
21:06
mjölnir
Рет қаралды 13 М.
Understanding B-Trees: The Data Structure Behind Modern Databases
12:39
Do you have a friend like this? 🤣#shorts
00:12
dednahype
Рет қаралды 50 МЛН
ДЕНЬ РОЖДЕНИЯ БАБУШКИ #shorts
00:19
Паша Осадчий
Рет қаралды 6 МЛН
EASIEST way to send an email in .NET (gmail/SMTP)
15:42
Remigiusz Zalewski
Рет қаралды 8
Read a paper: The LLVM Compilation Framework
12:43
Vivek Haldar
Рет қаралды 1 М.
Read a paper: Static Single Assignment
14:49
Vivek Haldar
Рет қаралды 993
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 591 М.
Fixing RAG with GraphRAG
15:04
Vivek Haldar
Рет қаралды 555
Transport Layer Security (TLS) - Computerphile
15:33
Computerphile
Рет қаралды 467 М.
The Absolute Best Intro to Monads For Software Engineers
15:12
Studying With Alex
Рет қаралды 566 М.
DATA STRUCTURES you MUST know (as a Software Developer)
7:23
Aaron Jack
Рет қаралды 920 М.
LLMs eat entry-level SWEs
9:06
Vivek Haldar
Рет қаралды 938
МОЖНО ЛИ заряжать AirPods в чехле 🧐😱🧐 #airpods #applewatch #dyson
0:22
Apple_calls РЕПЛИКА №1 В РФ
Рет қаралды 22 М.
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1,5 МЛН
😱НОУТБУК СОСЕДКИ😱
0:30
OMG DEN
Рет қаралды 2,8 МЛН