An experiment in writing a text editor