building a working text-editor to be used as main driver is kicking my ass right now, the depth of selection wizardry, like where the cursor ends up after text operations, is endless.
A lot of subtle things I've never really noticed until they were gone.
@neauoire once I added a repl mode to my editor I was really surprised how difficult it was to enforce that the prompt was read-only. so many bugs over something that felt so small!
selection is a beast too for sure, though I had much less trouble with that by sticking with a point+mark model like Emacs.
@neauoire sounds like the right occasion to draw out and describe your algorithms on paper. or are you already doing that? :P
@theruran I've already gathered "most" primitives, https://git.sr.ht/~rabbits/left/tree/master/item/src/main.tal#L284
But everytime I think I've got it right, I do something with an expectation of where the cursor should end up, and I'm still wrong half the time..
@neauoire When I wrote my text editor years ago, that was one of the hardest thing I had to figure out.
In the end, I could write a program that would tell me where it needed to be, so I expanded that into something that wrote unit tests to make sure my "real" logic was correct.
Wasn't very efficient at 15k tests though, but at least it was only 8 seconds to run.
@neauoire No. I ended up writing four novels with it (~250k words), but then hit enough things that I couldn't fix without a massive restructure.
Then started over again about six more times over the next ~14 years. :D
@neauoire It's part of Author Intrusion, my attempt at writing an IDE for writing novels including refactoring, find usages, etc.
@neauoire If you were to maintain a list of specific concrete scenarios, that would be invaluable for "someone following in the future". Just as steps to perform and expected result.
@dokoissho I keep alternating between two designs for the copy/paste, but I think I found something I like this morning :)
@neauoire Is it working currently? I can select and delete text in docs but haven't been able to paste any text in from outside.
@dokoissho you need to put the text you want to bring into left in the .snarf file. That hasn't worked ?
@ruby0x1 haha yeah, I don't think that'll fit. I even had to cut the ascii sheet in half to make it fit in memory..
Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.