[erlang-questions] erlang for programming a text editor

Richard O'Keefe ok@REDACTED
Sun Nov 1 23:27:38 CET 2009


On Nov 1, 2009, at 6:31 PM, Ted Henry wrote:

> With 100 core chips probably coming to desktop computers in the near  
> future,
> I wonder about writing a multiprocess vi-like or emacs-like text  
> editor
> (probably more emacs-like in implementation.)

David Warren used to use a home-brew text editor he'd written in Prolog,
so why not?
>

> Would Erlang offer a
> good advantage over a programming language with software transactional
> memory (e.g. Haskell, Clojure)? Would *you* use Erlang to program a  
> text
> editor or desktop application?

What exactly do you want transactional memory _for_?
Have you read Joe Armstrong's blog entry about STM in Erlang?

One issue in a text editor is undo.  I have my own small but powerful
text editor written in C that I still use. The only thing I've ever
really missed in it is a good undo.  Erlang should at least remove
the temptation to use data structures that make it hard to provide
undo.  (AVL DAGs in Erlang, anyone?)

My editor could keep up with me on a PDP-11/60.  So it's not things
that require human involvement that would benefit from concurrency.
Rendering with fancy fonts and bizarre hard-to-read colours is
more demanding, but then, who needs to do _that_?

So the most interesting questions are not "what language" or even "what
features", but
  - what is it that we want extra computing power to DO when we are
    "editing", and
  - what concurrency pattern(s) is(are) useful to express that?




More information about the erlang-questions mailing list