From: David O'Toole
Subject: Emacs' Common Lisp package
Date:
Message-ID: <m3d4wbnwor.fsf@gnu.org>
I am writing a tutorial and cookbook for the CL package included with
GNU Emacs. The CL package implements a very large subset of Common
Lisp (no CLOS.) This lets you work in a hybrid dialect of Emacs Lisp
(with its huge cross-platform libraries and zillions of packages) and
Common Lisp.
It's a great combination. I used it to write these programs:
http://dto.freeshell.org/notebook/RogueLike.html
http://dto.freeshell.org/notebook/Eon.html
So although the tutorial is Emacs-specific, I would like to post here
because I am drawing on Common Lisp knowledge to write it.
1. Would you like to suggest techniques or contribute examples?
2. I've been looking at various lisp archives; can anyone suggest
other interesting code I should look at?
I appreciate any help people could give.
You can see the (very early and incomplete) document at:
http://dto.freeshell.org/e/cl-guide.el
--
David O'Toole
···@gnu.org
http://dto.freeshell.org/notebook/
In article <··············@gnu.org>, David O'Toole <···@gnu.org> wrote:
> I am writing a tutorial and cookbook for the CL package included with
> GNU Emacs. The CL package implements a very large subset of Common
> Lisp (no CLOS.) This lets you work in a hybrid dialect of Emacs Lisp
> (with its huge cross-platform libraries and zillions of packages) and
> Common Lisp.
>
> It's a great combination. I used it to write these programs:
>
> http://dto.freeshell.org/notebook/RogueLike.html
> http://dto.freeshell.org/notebook/Eon.html
That looks quite cool. Interesting stuff. Good to read also.
> So although the tutorial is Emacs-specific, I would like to post here
> because I am drawing on Common Lisp knowledge to write it.
>
> 1. Would you like to suggest techniques or contribute examples?
He, you might look at the CMUCL Hemlock code. It is
an Emacs-like editor written in Common Lisp. We just
discussed it here. Its source code is reasonably well
written and there is enough code to look at (it
is not a toy editor example). Kind of old code,
but it helps in your case, since it is plain CL.
> 2. I've been looking at various lisp archives; can anyone suggest
> other interesting code I should look at?
>
> I appreciate any help people could give.
>
> You can see the (very early and incomplete) document at:
>
> http://dto.freeshell.org/e/cl-guide.el
I think you are right with the CL issue. Emacs should
use more CL.
--
http://lispm.dyndns.org
Rainer Joswig <······@lisp.de> writes:
> In article <··············@gnu.org>, David O'Toole <···@gnu.org> wrote:
>
>> I am writing a tutorial and cookbook for the CL package included with
>> GNU Emacs. The CL package implements a very large subset of Common
>> Lisp (no CLOS.) This lets you work in a hybrid dialect of Emacs Lisp
>> (with its huge cross-platform libraries and zillions of packages) and
>> Common Lisp.
>>
>> It's a great combination. I used it to write these programs:
>>
>> http://dto.freeshell.org/notebook/RogueLike.html
>> http://dto.freeshell.org/notebook/Eon.html
>
>
> That looks quite cool. Interesting stuff. Good to read also.
>
>> So although the tutorial is Emacs-specific, I would like to post here
>> because I am drawing on Common Lisp knowledge to write it.
>>
>> 1. Would you like to suggest techniques or contribute examples?
>
> He, you might look at the CMUCL Hemlock code. It is
> an Emacs-like editor written in Common Lisp. We just
> discussed it here. Its source code is reasonably well
> written and there is enough code to look at (it
> is not a toy editor example). Kind of old code,
> but it helps in your case, since it is plain CL.
>
>> 2. I've been looking at various lisp archives; can anyone suggest
>> other interesting code I should look at?
>>
>> I appreciate any help people could give.
>>
>> You can see the (very early and incomplete) document at:
>>
>> http://dto.freeshell.org/e/cl-guide.el
>
> I think you are right with the CL issue. Emacs should
> use more CL.
>
While I agree, it is probably important to note that the emacs cl package
is built on-top of emacs lisp - its not a separate lisp interpreter and
therefore will always be limited to the CL features that can be implemented
on top of the elisp interpreter. I suspect this means it will never be
possible to make it an ANSI cl compliant package. I don't know if there are
any performance penalties when using the cl package to implement something
rather than using native elisp, but given its another layer of abstraction,
I woldn't be surprised if there was. Personally, its not been an issue for
anything I've done.
I seem to remember that some in the emacs community and dev group tend to
frown on using the cl package. However, that probably only matters if you
wanted a package to become part of the standard distro.
Personally, I like ot use it as much as possible simply because it reduces
the mental overhead of having to translate between different dialects. I
don't think any of my own stuff is worthy of being considered
'interesting', but a project I've contributed to, emacspeak, makes
extensive use of the cl package.
I think a tutorial and more publicity on this package is a good idea. Well
done.
regards,
Tim
--
tcross (at) rapttech dot com dot au