shar: a text editor
1 minute read •
The date was May 09, 2025 when I first started working on shar (named after myself, by slicing my first name in half :]). My seniors Ahmad Liaqat and Mohsin Fawad had already worked one its implementation in their DSA course. But their approach was different; using lines of linked lists (separated by \n) and a giant vector of lines. Asking about their approach and testing their code I decided to implement my own version. There were some reasons for that:
- The code was only windows compatible and me being a linux user wanted to write my own version for linux(I used Ubuntu then).
- Secondly, that version was too slow: for example, the cursor took forever to move around the file.
- And I also wanted to approach the problem differently as not to use vectors and linked lists and make it as fast as possible.