Why not just let the frontends link with the core statically?
After all re-configuration triggers a re-link.

Cheers,
JP.

On Wed, May 11, 2011 at 11:53 AM,  <arenie...@gmail.com> wrote:
> Hello guys,
> Recently I've been thinking on splitting Yi into core package and UIs.
> Here are some of my thoughts:
> Currently Yi core slightly depends on frontends.
> This dependence can be easily removed(fix me if I'm wrong). However, it'll
> no longer be possible to select frontend on startup with command line
> arguments.
> I see 2 ways of dealing with this problem:
> - dynamically load selected frontend on startup (hs-plugins?). Personally
> I'm against it, since it'll do nothing but add extra dependencies.
> - migrate to client/server architecture. Instead of loading object file in
> runtime, Yi'll:
>    - start listening socket
>    - select UI depending on cmd args and user config
>    - run UI client, pass it socket address
>    - ...
> I find this soltuion much more flexible. Reasoning:
> - Before initiating this migration, some kind of protocol between UI and
> core has to be made. It'll limit core editor functions that can be accessed
> directly by UI.
> (Now frontend has to do a lot of stuff that core should handle(at least in
> my point of view). E.g. Yi has a nice handler for keyboard events, but mouse
> stuff is done mostly by UI. It sets mark point, moves cursor, scrolls
> buffer, etc. Moving these actions to Yi core'll simplify UIs and make their
> behaviour more consistent.)
> - It'll be possible to implement remote/multiple connections to one editor
> instance. Just like emacs --daemon mode.
> - smaller Yi executable, probably faster config reloading. GHC won't have to
> link GUIs into executable.
>
> I realize this transition'll require a lot of work, but benefits seem worth
> trying.
> I'll appreciate your opinion on this decoupling. Also, if there are no
> principal objections, I'll slowly start working on it.
>
> --
> Yi development mailing list
> yi-devel@googlegroups.com
> http://groups.google.com/group/yi-devel

-- 
Yi development mailing list
yi-devel@googlegroups.com
http://groups.google.com/group/yi-devel

Reply via email to