From: Cecil Westerhof <Cecil@decebal.nl>
To: help-gnu-emacs@gnu.org
Subject: Re: Using Emacs Lisp for script writing
Date: Tue, 22 Dec 2009 01:46:04 +0100 [thread overview]
Message-ID: <87pr677s4z.fsf@Traian.DecebalComp> (raw)
In-Reply-To: 878wcw53mj.fsf@lion.rapttech.com.au
Tim X <timx@nospam.dev.null> writes:
> your comparisons of speed are not really justified. Clisp is a general
> purpose implementation of CL while emacs lisp is a specialised dialect
> for text processing. This means that you will likely get pretty good
> performance from elisp compared to clisp when using it at a novice
> level. However, as your understanding of CL and your familiarity with
> clisp improve, you will get faster and faster results from clisp.
It is already a lot better as it was. I am learning and -most important-
get a lot of help from this group.
> Clisp (and most modern CL implementations) have lots of optimisation
> which can be applied. In general, you don't do this until it is
> necessary and until you have the algorithms worked out. There are also
> many basic lisp idioms you have yet to learn that will improve both your
> code readability and its performance. The good news is that it will
> likely help in both your elisp and your CL (and scheme and any other
> lispy language you might try).
>
> The performance differences you are geting now really say more about
> your level of expertise with the language. It does show that with a
> specialised dialect, such as elisp, the novice will likely do better
> than with a general dialect, such as CL. However, depending on the
> scripts and what you are doing, you will likely run into situations
> where you cannot easily do with elisp what you want and you ahve to
> start jumping through lots of hoops that would be much easier using a
> more general dialect, such as CL.
One problem is interacting. Just batch scripting is no problem in elisp,
but at the moment you want to interact with the user, you have a
problem. That is the reason I started with CL.
If you want to see what I have done until: I put the scripts on the web.
The CL files are reachable at:
http://www.decebal.nl/CommonLisp/sources/substitute-expression.cl
http://www.decebal.nl/CommonLisp/sources/script-utils.cl
The original Emacs Lisp code:
http://www.decebal.nl/EmacsLisp/sources/substitute-expression.el
>> Using emacs for scripting can
> also have much longer load times, especially if your not using emacs in
> server mode, compared to a natively compiled clisp program.
I am not using Emacs server at the moment, but the load times are not a
real problem.
> At this point in your learning curve, any comparisons of performance are
> very much meaningless as they are not really comparing the tehcnologies,
> but rather the programmer. While you may find elisp faster and easier at
> this point, you will find CL a more useful general purpose tool in the
> long term.
I hope -and expect- so. ;-]
> I suspect that in the end, both tools will be valuable. Which
> one you use for a task will depend on the type of task. Some scripts
> will be more suited for elisp and others will be more suited to CL.
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
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
next prev parent reply other threads:[~2009-12-22 0:46 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-16 15:32 Using Emacs Lisp for script writing Cecil Westerhof
2009-12-16 16:24 ` Sam Steingold
2009-12-16 17:18 ` Teemu Likonen
2009-12-16 23:37 ` Cecil Westerhof
2009-12-17 19:08 ` Sam Steingold
2009-12-16 23:04 ` Pascal J. Bourguignon
[not found] ` <mailman.13065.1260980854.2239.help-gnu-emacs@gnu.org>
2009-12-16 23:31 ` Cecil Westerhof
2009-12-17 11:29 ` Cecil Westerhof
2009-12-21 18:35 ` Frank Fredstone
2009-12-21 19:20 ` Cecil Westerhof
2009-12-21 20:57 ` Sam Steingold
2009-12-21 21:13 ` Sam Steingold
2009-12-21 23:06 ` Tim X
2009-12-22 0:46 ` Cecil Westerhof [this message]
2009-12-22 11:26 ` Tim X
2009-12-22 13:51 ` Cecil Westerhof
2009-12-22 15:36 ` Pascal J. Bourguignon
2009-12-22 16:54 ` Cecil Westerhof
2009-12-23 2:50 ` Tim X
2009-12-23 7:38 ` Cecil Westerhof
[not found] ` <mailman.18.1261429198.1956.help-gnu-emacs@gnu.org>
2009-12-22 0:06 ` Cecil Westerhof
2009-12-22 12:51 ` Tim X
2009-12-22 15:42 ` Pascal J. Bourguignon
2009-12-22 17:04 ` Cecil Westerhof
2009-12-22 19:02 ` Pascal J. Bourguignon
2009-12-22 20:49 ` Cecil Westerhof
2009-12-23 3:19 ` Tim X
2009-12-23 6:27 ` Cecil Westerhof
[not found] ` <mailman.21.1261430019.1956.help-gnu-emacs@gnu.org>
2009-12-22 0:28 ` Cecil Westerhof
2009-12-18 21:39 ` Andreas Politz
2009-12-19 10:02 ` David Engster
2014-05-10 5:54 ` mug896
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pr677s4z.fsf@Traian.DecebalComp \
--to=cecil@decebal.nl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).