"Dolazy" <francis.rammeloo / gmail.com> writes: > Hi all! > > Vim and emacs are text editor that can be scripted using internal > script languages. I'm thinking of writing a platform independent text > editor myself that uses the ruby language for executing scripts. The > host application would be written in C++ (+Qt) and it would somehow be > able to interact with ruby. > > I think there are basically two ways of implementing this interaction: > - using IPC > - command line interaction (host executes the ruby script with > parameters and catches the output) > > IPC is the most powerful I think, but then again I have various options > to achieve this communication: > - TCP > - XmlRpc > - shared memory > > I'm very new to the concept of inter-process-communication and I would > greatly appreciate your insights on how I would best proceed to achieve > this interaction. > > Or maybe there is a more obvious and straightforward approach that I > overlooked? > Although I've not looked at it in any detail, there is an emacs->ruby interface which allows you to extend emacs functionality with ruby code in a similar way to how functionality is extended with elisp. I would strongly recommend leveraging an existing editor - writing an editor is a non-trivial task and many many code years have been put into vim and emacs. Take advantage of this to allow you time to concentrate on the bits you really want to achieve. Note that if you don't like emacs (many don't) I believe vim has the ability to achieve what you want. A few people from the common lisp community have been working on an interface between vim and common lisp to provide a more high level development environment (similar to emacs + slime). You can probably steal ^H^H^H^H^H borrow some of their ideas to provide a way of interfacing/extending vim with ruby scripts/code. HTH Tim -- tcross (at) rapttech dot com dot au