From: John Carter Date: 2001-12-04T10:10:51+09:00 Subject: [ruby-talk:27394] Re: Killer app for Ruby developers? On Tue, 4 Dec 2001, Hal E. Fulton wrote: > This is an idea that is very skeletal > yet I think there's a twist that makes > it significant (especially for XP people). I have a hard earned deep scar tissue programming rule-of-thumb... Never write an editor, never write a sort routine. Why? Because it requires a huge amount of effort to get up to anything as good as the existing system tools. If you need an editor 999 times out of 1000 you do better with system("emacs") or writing a few lines of elisp. (BTW Elisp isn't all that scary and it is very good for its job...) My point remains undiluted even if you don't like emacs, you can say system( "vi") for all I care, or even extend vi using "vile" macros. And yes, you could even do the twist in _far_ fewer lines of Elisp than it would take to produce an editor remotely as good as Emacs, even writing it in Ruby. In fact, if you dig around enough, you might even find an elisp package that does that.... BTW I often use the Meta-1 Meta-| emacs command to pipe chunks of a file through nifty ruby one liners... Conclusion.... I'm not saying, "Don't do that". I'm saying, "Make sure what you do will be compelling better than Emacs and a few lines of Elisp." Probably should join forces with somebody working on a refactoring browser for Ruby. Parting shot... The first place to look for how to design such an editor is emacs. Emacs is basically an Elisp interpretor providing the basic infrastructure and then a largish pile of Elisp macros doing the actual work... ie. Work out what basic primitives elisp has to work on buffers and the like, implement those in Ruby or in C primitives. Either that or simply provide ruby bindings to the same primitives that Elisp uses... John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : john.carter@tait.co.nz New Zealand Carter's Observation - "If a bug was really hard to find, you won't know what to do with it when you do find it."