On Mon, May 01, 2006 at 07:38:40AM +0900, Randy K. wrote:
On Sunday 30 April 2006 11:00 am, Phil J. wrote:
Let me know your thoughts (which aren’t allowed to include “do we really
need another editor” :)).
Ok, I won’t ask that in quite that way, but:
I think you may have mis-understood my question (or I didn’t explain
properly), what I was asking was more a design question than a general
building yet another editor what do you think” question. As you took the
time to write a response I’ll answer you though (check bottom where I
re-phase my query):
- What is your goal for this editor–is it a learning project or intended
to eventually be a “product” in some sense?
Both, I’m very interested in editors and find myself downloading new
they arrive and playing with them (though I’m an avid Vim user).
- Is it to be as full-featured as Emacs or more like Notepad?
Well, the idea is to write the base of the editor in C and have the API
almost completely available to Ruby. So, theoretically, it could be as
full-featured as Emacs or as simple as Notepad.
If I was going to expend effort on an editor, I’d work on nedit. It is
written in C, is very featureful and fast, etc. It includes a C-style/based
macro language, keystroke recording to start macros, syntax highlighting,
autoindent, etc., etc., etc.
To be honest I’d like to start from scratch and see what I come up with,
secondly I hate GUI based editors personally.
What I was actually trying to ask was:
The base will be written in C not in pure Ruby. I would like to know
people think I would be better using C types at the core or Ruby types
implimented in C. So, I can, A), write a basic editor in C and then
up with Ruby using Data_Wrap_Struct() much like an extenstion would. Or
can, B), start from the beginning with rb_define_class() and friends
relying on Ruby from the start. The advantages and dis-advantages that I
think may exsist:
* The core of the application would be instantly reconisable to a C
hacker who has no Ruby experience.
* If I decide it should be extendable by another language it would
* Better performance?
* I would have to impliment and then map things like linked lists
meaning wheel re-invention.
* more work
* Can’t rely on libruby for memory handling.
So which one?