* Ryan Pavlik <rpav / mephle.com> [Oct, 08 2003 22:30]: > The thing with lisp, though, is that everyone has used lisp already, > and while I love lisp, there wouldn't be much of a reason to switch > from XEmacs and its twenty million extensions. Yes, this is one of the downsides in a way. You won't be able to get people to switch very easily when everything is the same ;-) > YES. I've been wanting "erubs" (Editor for Ruby Scripts ;-) for > awhile; something like emacs, but s/lisp/ruby. Same design otherwise. hehe, that won't be the name, but yeah, that's in a sense what I want. Except s/Emacs/Vim/ ;-). > Well, the main thing is that ruby has a lot of very convenient pattern > and text matching functionality, and a boatload of extensions. And > it's a very easy language, so anyone can pick it up and start > extending the editor, unlike emacs, where fewer brave the waters. Well, no dependencies on Ruby extensions would be necesarry, but I guess, since they exist, they could be used. > For instance, I recently wrote a bit of code to align things: > > a = b ___\ a = b > foo = bar / foo = bar > > This was a few simple lines of ruby. Not counting comments, it's 44 > lines of lisp that don't quite work perfectly. Could you provide the code? I'd love to see the comparison. > As much as I love lisp, I can't really think of things that would be > easier to in any of the above scheme flavors that wouldn't be easier > in ruby. OK. The way I see it, Ruby is OO-programming personified. LISP is, well, functional? programming personified. Anyway, I have gotten the feeling that it's generally easier to think in terms of functional, not OO, when editing text. I mean, what do tho OO constructs really add? > > > * What language allows the most of the editing commands to be written in > > the given language? > > Ruby certainly allows this. It's extremely trivial to extend and use > Ruby in C. They go hand-in-hand. Plus there are existing GUI > packages you could interface to if you wanted to provide UI handling > in ruby without a lot of work. Ah, I think you misunderstood the question. Or I'm misunderstanding the answer ;-). I want the C core to be as small as possible, leaving the most possible flexibility using the extension language. And I don't generally see the need for GUI extensions and such. > > * Is Ruby good enough for the task at the moment, performance wise? > > * Resource wise? Does anyone have any statistics on this? > > This is a decent benchmark: > > http://www.bagley.org/~doug/shootout/craps.shtml > > Is ruby at the top of that list? No. (Note that most of the > languages above it are compiled, including the bigloo scheme > implementation). But XEmacs elisp falls near the bottom, and I use > that for editing tasks daily. Tcl and Rep both fall below. Thanks, great summary! > So, I wouldn't worry about performance. And, memory-wise, I can't > really offer benchmarks, but I have a system managing tens of > thousands of objects that doesn't present a problem. OK. Good. > > I'm not talking about the ease of implementing a web browser in the > > target language, rather the ease of structuring an extensible framework > > in it. > Then Ruby is ideal. Extending and embedding it is extremely easy. Yeah, this, I know. My experiences from the Ruby-GNOME2 project have been great. Very easy to add extensions. I haven't used the embedding facilities yet, but I'm sure they're good. > > Also, is there any way of redefining the // operator for constructing > > regular expression objects? I'm planning on implementing a new regex > > syntax for the editor (to make searches/substitutions easier to > > describe). > > No, but I would encourage you leave the existing regular expression > format intact, as, while somewhat write-only, is familiar to most > people who will be using your editor. Redefining // would break a lot > of extension code, and alienate a large part of your audience. > > However, that's not to say you can't make your own matching format. > I'm not sure what you have in mind, but there are a number of ways to > bend the syntax to integrate such things. Yeah, but that's just the thing. This is one of the real selling points, if you will ;-). Oh well, I guess one can always do some MyRegex.new(string) but then you wind up with the string interpolation problems (\n and friends). :-( > > > thanks in advance, > > If you write a ruby editor... thank _you_. ;-) hehe, we'll see ;-) > > hth, > thanks for your long and quick response. It's good to know that at least someone is interested :-), nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}