> Let’s say this again, “email client”. The notion of email client itself is gone at this point. Really? Is it lame to be using an email clients these days? I still use an email client (Thunderbird) because I can't stand the thought of all my mail sitting forever on Goggle's or whoever's servers. Yes, I know that they could have secretly archived all of my email the moment it was sent or received, and that my privacy…
Writing an editor in less than 1000 lines of code, just for fun
41–50 of 146 posts
Re: Writing an editor in less than 1000 lines of code, just for fun
#42I just used @antirez's 1k LOC kilo editor to edit his 1K LOC editor and it was an oddly pleasurable experience :)
Re: Writing an editor in less than 1000 lines of code, just for fun
#43Earlier quoted context omitted.
Yeah but that is so much less usable. Quick, which one is up?
The point is, they are no longer in symbolic memory. At this point they are muscle memory. Quick, which muscle do you use to move your right thumb in? Does it matter?
Another example: There are several passwords that I can type instantly, but I wouldn't be able to recite them.
Re: Writing an editor in less than 1000 lines of code, just for fun
#44Earlier quoted context omitted.
Yeah but that is so much less usable. Quick, which one is up?
Just look at your keyboard :-) ( https://en.m.wikipedia.org/wiki/ADM-3A#Legacy ) I always try to remember them by noting that the leftmost key moves left, the rightmost key moves right (not too hard), and that 'K climbs' (using alliteration to remember that). That leaves 'J' for cursor down. In practice, though, I use the cursor keys. Luckily, they work on the editors/systems I work on nowadays. Side effect is that I…
map :echo 'damnit!'
map :echo 'you suck!'
map :echo 'this is why you fail'
map :echo 'nooooo!'Re: Writing an editor in less than 1000 lines of code, just for fun
#45Re: Writing an editor in less than 1000 lines of code, just for fun
#46Earlier quoted context omitted.
I know k is up, because I constantly k in bash, bit the point of using hjkl is exactly not to know which one is what. You set your finger on the keyboard in home position, now your muscle memory does the rest.
> I know k is up, because I constantly k in bash What is ESC-k supposed to do in Bash?
Re: Writing an editor in less than 1000 lines of code, just for fun
#47What challenges might you have if you wanted to implement something like this inside a game framework like Unity or MonoGame with C#, where it renders everything via DirectX or OpenGL?
The main challenge is that, even now, in the year 2016, there is no objectively good, fast, reliable way of rendering arbitrary text with formatting in a texture. Hell, even just plain text is kind of a pain in the ass. And yes, I know about signed distance fields.
Re: Writing an editor in less than 1000 lines of code, just for fun
#48Earlier quoted context omitted.
The main challenge is that, even now, in the year 2016, there is no objectively good, fast, reliable way of rendering arbitrary text with formatting in a texture. Hell, even just plain text is kind of a pain in the ass. And yes, I know about signed distance fields.
The nice thing about a framework like Unity is that they do have a textfield object that behaves a lot like a standard text object in the .NET Framework. It has a lot of shortcomings but rendering the text is the easy part.