Live data from Hacker News

Writing an editor in less than 1000 lines of code, just for fun

antirez.com

51–60 of 146 posts

Re: Writing an editor in less than 1000 lines of code, just for fun

#51
post #35

Earlier quoted context omitted.

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?

Exactly: muscle memory. In your car, do you move the turn signal lever up or down to indicate a right turn? It actually takes longer to answer this question than to do the action in real life. Another example: There are several passwords that I can type instantly, but I wouldn't be able to recite them.

> In your car, do you move the turn signal lever up or down to indicate a right turn?

You rotate it the same direction you're about to rotate the wheel. The vi navigation keys have no such convenient correspondence.

Re: Writing an editor in less than 1000 lines of code, just for fun

#52
post #6

Earlier quoted context omitted.

Presumably h, j, k, l will always get you around in vi?

Yeah but that is so much less usable. Quick, which one is up?

'k' is up, because the author is typing quite a few of it in the screencast before going up. :)

Re: Writing an editor in less than 1000 lines of code, just for fun

#53

Earlier quoted context omitted.

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.

Unity only supports Unicode BMP. Unity doesn't support surrogates, RTL rendering/input etc. Rendering the text performantly for none western scripts is definitely not the easy part, especially on mobile (where Unity also fails to behave properly).

Proper Unicode and RTL support is something Jonathan Blow recently spent a lot of time getting just right for The Witness. I wonder if he'd ever consider open sourcing that work.

Re: Writing an editor in less than 1000 lines of code, just for fun

#54
post #6

Earlier quoted context omitted.

Presumably h, j, k, l will always get you around in vi?

Yeah but that is so much less usable. Quick, which one is up?

The leftmost one is left, the rightmost one is right. Of the two that remain, the one that looks vaguely like an arrow pointing downward, that one goes down. There's one key remaining, and that one goes up, k?

As everyone says, it doesn't take a lot of practice before you know it well enough that you'll never forget. Unbind the arrow keys, or go play some nethack (no-keypad), or whatever.

Re: Writing an editor in less than 1000 lines of code, just for fun

#55
post #41

> 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…

Gmail's web client also non-optionally auto-wraps text before sending, which is very annoying when you're trying to send a patch or part of a log file.

That issue basically forced me to switch from plain-text to html emails, and thence to the slippery slope of using italics and the OCD of syntax highlighting my code snippets..

Re: Writing an editor in less than 1000 lines of code, just for fun

#56
post #6
post #4

Earlier quoted context omitted.

Nice thing about Nano is that they arrow keys always seem to do what they are supposed to, no matter the system, shell, TTY, etc. Vi seems to have issues sometimes, and needs extra config

Presumably h, j, k, l will always get you around in vi?

Not in insert mode, it will insert 'h', 'j', 'k' and 'l' ;-)

Re: Writing an editor in less than 1000 lines of code, just for fun

#59

> 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…

Also my android phone has an email client. It's pretty nice to be able to view offline.
Post reply on HN