Rope Science – Computer science concepts behind the Xi editor
Please read this with a grain of salt as it does not seem practical or necessary. It seems like the kind of thing written by a young person who is excited but doesn&#x27;t really have much experience. Most of the ideas would not be real-world-useful as stated.<p>Excitement is nice to feel, but it takes some experience to know when excitement is really aimed in a productive direction. Otherwise we end up with the kind of motivation that so often produces over-complex and mis-aimed software: having a &quot;cool idea&quot; for &quot;exciting technology&quot; and then looking for places to apply it, and the applications don&#x27;t really fit or don&#x27;t really work, but we don&#x27;t want to notice that, so we don&#x27;t.<p>To pull examples: an entire one of these essays is on &quot;paren matching&quot; and how it would be really great if you monoidized (ugh) and parallelized that ... the basic idea of which is instantly shot down by the fact that language grammars are just more complicated than counting individual characters. Hey bro, what if there is a big comment in the middle of your file that has some parens in it? The author didn&#x27;t even think of this, and relegates this to a comment at the end of that particular essay: &quot;Jonathan Tomer pointed out that real parsing is much more interesting than just paren matching.&quot; Which is a short way of saying &quot;this entire essay is not going to work so you probably shouldn&#x27;t read it, but I won&#x27;t tell you that until the bottom of the page, and even then I will only slyly allude to that fact.&quot; Which in itself is contemptuous of the reader -- it is the kind of thing that happens when you are excited enough about your ideas that the question of whether they are correct is eclipsed. This leads to bad work.<p>There&#x27;s the essay about the scrollbar -- if you have a 100k-line text file, do you really want a really long line somewhere in the middle to cause the scrollbar to be narrow and tweakyin the shorter, well-behaved majority of the file? No, you probably don&#x27;t! But this shoots down the idea that you might want to do a big parallel thing to figure out line length, so he declines to think about it. In reality what you probably want is the scrollbar to be sized based on a smooth sliding window that is slightly bigger than what appears on the screen (but not too much).<p>Besides which, computers are SO FAST that if you just program them in a straightforward way, and don&#x27;t do any of the modern software engineering stuff that makes programs slow, then your editor is going to react instantly for all reasonable editing tasks.<p>I don&#x27;t want to be too overly critical and negative -- these sorts of thoughts are fine if they are your private notes and are thinking about technical problems and asking friends for feedback. It becomes different when you post them to Hacker News and&#x2F;or the rest of the internet, because this contains an implicit claim that these are worth many readers&#x27; time. But in order to be worth many readers&#x27; time, much more thought would have had to go in ... and as a result, the ideas would have changed substantially from what they are now.<p>I didn&#x27;t read past essay 4, so if it gets more applicable to reality after that I don&#x27;t know!