From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Cecil Westerhof Newsgroups: gmane.emacs.help Subject: Re: Using Emacs Lisp for script writing Date: Tue, 22 Dec 2009 14:51:42 +0100 Organization: Decebal Computing Message-ID: <87ljgv3ymp.fsf@Traian.DecebalComp> References: <87hbrrrl3c.fsf@Traian.DecebalComp> <87vdg09ls9.fsf@Traian.DecebalComp> <878wcw53mj.fsf@lion.rapttech.com.au> <87pr677s4z.fsf@Traian.DecebalComp> <874onj5jxu.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261492874 11292 80.91.229.12 (22 Dec 2009 14:41:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Dec 2009 14:41:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 22 15:41:07 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NN5v5-0000eG-1f for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Dec 2009 15:41:03 +0100 Original-Received: from localhost ([127.0.0.1]:48656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NN5v5-0003pz-42 for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Dec 2009 09:41:03 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Original-Newsgroups: gnu.emacs.help X-Homepage: http://www.decebal.nl/ User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) Cancel-Lock: sha1:5JhyHhWWvrj6IB0fG4keMfLQQpY= Original-Lines: 93 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: 1261489903 news.xs4all.nl 22936 decebal/[::ffff:84.53.123.169]:16780 Original-X-Complaints-To: abuse@xs4all.nl Original-Xref: news.stanford.edu gnu.emacs.help:175722 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70798 Archived-At: Tim X writes: >> I think I will try to write the scripts only in CL. In that way it is >> easier to share. Otherwise people need to have a CL implementation and >> Emacs on their system. When there is a situation that an elisp version >> is a lot more efficient -because of the optimisation for text- I could >> create two versions. But elisp is of course very handy for extending the >> functionality of Emacs. :-D > > I think that is a wise way to go. My apologies if I sounded too > 'preachy' or critical of what you are doing. No problem. I do not mind to be put on the right track. ;-) > My main motivation was to > highlight that at this stage, you need to be very careful about > assessing efficiency and performance. I'll try to keep that in mind. But compiling the regular expression made a big difference. Also, I remember someone telling me that lists are not very efficient. What should I use instead? Or will I found that out in Practical Common Lisp? > Lisp dialects are somewhat > notorious for being easy to learn and very hard to master. I already experienced a little of it. > For this reason, I've found other > resources, such as Practical Common Lisp, CLTL2 and other books really > useful. I tend to skim them, find the general area and terms I need and > then go back to the hyperspec to get the precise definition/usage. Practical Common Lisp I already use. (From there I got the property list.) From CLTL2 is said: "The book does not correspond exactly with the ANSI standard: some details are different; some things from the standard are missing; and some things from CLtL2 are not in the final ANSI standard. Programmers should therefore be wary of using it as a reference." But I'll add it to my (already very big -maybe I need to sift) arsenal. > I have managed to get myself confused as well by doing this. > It is best to concentrate on one until you are quite comfortable and > familiar with it and then move on to the next dialect. Apart from > reducing the potential for confusion, you can also appreciate the > pros/cons of the different dialects better. With different dialects do you mean different Lisp dialects or different CL dialects? The former I think I do not like, the latter is where I will aim at. When I write portable code, I can switch to the dialect that is best for the situation. > (though I still find elisp and emacs the best > extensible editor and kitchen sink available!) I agree. For example I am also using GNUS -just as you I saw-. It is a lot of work, but I think/hope that when I have GNUS in my fingers, I can easily make it do what I want instead of what the developer thought I wanted. ;-) > good luck I'll need it. :-D > P.S. Another advantage to CL is that if you plan to share/distribute > some of what you are doing, you can compile it to native code. This > means people don't even have to know you wrote it in lisp. This can help > overcome the considerable FUD regarding CL that exists out there. That is a good point. But with clisp that does not work as far as I know. I tried to install SBCL, but the install process needs Lisp. It only mention it to do with SBCL and CMUCL. So that can wait until later. > PPS. Make sure you do put the effort into getting SLIME working. I already planned that. Another question. The BBDB and also the example in Practical Common Lisp use lists for the database. Is this not inefficient? Would a real database not be better. Not that I want to burn me at the moment on databases. ;-) -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof