Hacker News new | ask | show | jobs
by zokier 4256 days ago
Here is the four line version: http://www.kparc.com/$/edit.k (lines beginning with / are comments)
3 comments

Since I don't know how to read K, and it's not really very friendly to amateurs who're just scanning a program without a reference open... is this equivalent to a bare C program implementing an editor with no libraries, or is it relying on stuff the system provides?
I see cz cx and cv in the four-line version, which seem like they are referring to Ctrl-Z, Ctrl-X, etc. If that is the case, then there is a lot of behind the scenes support stuff to get from those four lines of code to a window on the screen or a buffer in a terminal.
I think the first line imports view.k: http://www.kparc.com/$/view.k
Obviously bug free! Regarding intelligibility / comprehensibility: it's somewhere between brainfuck and Perl's worst examples of line noise