

Neovim Plugin UI architecture  - tambourine_man
https://github.com/neovim/neovim/wiki/Plugin-UI-architecture

======
danieldk
Question from the uninitiated: in the 'old days', you'd write or expose a C
library. Most languages support C APIs without too much work and you don't
need to serialize/deserialize data structures.

Although the described approach has some advantages (a plugin is separate from
the Neovim process, can run across a network, etc.), I wonder if in some
situations this doesn't give to much overhead. E.g. if someone is scrolling
fast, do you really want to communicate with all plugins over a named pipe or
socket, doing messagepack serialization/deserialization?

~~~
kansface
Vi was designed to work over a 300 baud modem. The throughput needed for a
text editor is minimal (and still is). A C API would avoid the extra overhead,
but no one is interested in writing cross platform unicode/binary safe plugins
in the language. Also consider that buggy plugins that live in other processes
won't crash the editor.

~~~
stesch
By the way: 300 bps, not 300 baud. Baud is something different and you can
transfer a lot more bits per second with 300 baud than just 300.

~~~
chongli
No, _300 baud_. This comes from a direct quote by Bill Joy[0]:

 _" No. It took a long time. It was really hard to do because you've got to
remember that I was trying to make it usable over a 300 baud modem."_

[0]
[http://www.theregister.co.uk/2003/09/11/bill_joys_greatest_g...](http://www.theregister.co.uk/2003/09/11/bill_joys_greatest_gift/)

------
stewbrew
I hope this works out well for Windows users who run 20+ plugins -- no zombies
or anything when neovim crashes.

~~~
aktau
I'm thinking that it won't be necessary to split out all plugins into separate
processes. One could just as well use one host per scripting language and
combine all plugins that use the same scripting language.

~~~
tarruda
Exactly, only the host process needs to implement the event loop described in
the wiki.

The host can also implement custom discovery/loading of plugins in a way that
makes usage of the subscribe/unsubscribe API completely transparent

~~~
MetaCosm
Still, IMHO, nice to split them out -- so they don't stomp on each other or do
other silly things. Same reason it is nice (but not memory efficient) that
Chrome does this... individual processes are safe and sane.

------
herokusaki
Neovim looks promising. Not to derail the thread but is there a similar
reimplementation effort on the Emacs side?

