help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Emacs Lisp for script writing


From: Cecil Westerhof
Subject: Re: Using Emacs Lisp for script writing
Date: Tue, 22 Dec 2009 14:51:42 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Tim X <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]