From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.emacs.devel Subject: Re: Emacs Lisp and Guile Date: 20 Jul 2002 09:37:50 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200207200035.g6K0ZAb27891@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027155092 16322 127.0.0.1 (20 Jul 2002 08:51:32 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 20 Jul 2002 08:51:32 +0000 (UTC) Cc: raeburn@raeburn.org, emacs-devel@gnu.org, mvo@zagadka.ping.de Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17Vpxb-0004F9-00 for ; Sat, 20 Jul 2002 10:51:31 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17VqAO-0006pq-00 for ; Sat, 20 Jul 2002 11:04:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17VpxZ-00086u-00; Sat, 20 Jul 2002 04:51:29 -0400 Original-Received: from mail.uklinux.net ([80.84.72.21] helo=s1.uklinux.net) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17Vpws-00081O-00; Sat, 20 Jul 2002 04:50:47 -0400 Original-Received: from portalet.ossau.uklinux.net (ppp-0-154.lond-b-3.access.uk.tiscali.com [80.40.12.154]) (authenticated) by s1.uklinux.net (8.11.6/8.11.6) with ESMTP id g6K8oeI29441; Sat, 20 Jul 2002 09:50:40 +0100 Original-Received: from laruns.ossau.uklinux.net.ossau.uklinux.net (laruns.ossau.uklinux.net [192.168.1.3]) by portalet.ossau.uklinux.net (Postfix on SuSE Linux 7.2 (i386)) with ESMTP id 85F8616C2; Sat, 20 Jul 2002 09:44:00 +0000 (GMT) Original-To: rms@gnu.org In-Reply-To: <200207200035.g6K0ZAb27891@aztec.santafe.edu> Original-Lines: 80 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5929 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5929 >>>>> "Richard" == Richard Stallman writes: Richard> Can you tell us the status of your work making Emacs Lisp Richard> work on Guile? I've written a prototype translator, mostly in Scheme, which is available in Guile CVS (HEAD branch). In this prototype, things that are `primitives' in Emacs are almost all defined in _Scheme_, not C. The best demonstration of what it can do is obtained by telling it to `(load "loadup.el")' and seeing how far it gets before hitting an error. Last time I tried, it processed 3279 lines of Elisp before stopping in mule.el (because I haven't defined the make-char-table primitive): guile> (load-emacs) Calling loadup.el to clothe the bare Emacs... Loading /usr/share/emacs/20.7/lisp/loadup.el... Using load-path ("/usr/share/emacs/20.7/lisp/" "/usr/share/emacs/20.7/lisp/emacs-lisp/") Loading /usr/share/emacs/20.7/lisp/byte-run.el... Loading /usr/share/emacs/20.7/lisp/byte-run.el...done Loading /usr/share/emacs/20.7/lisp/subr.el... Loading /usr/share/emacs/20.7/lisp/subr.el...done Loading /usr/share/emacs/20.7/lisp/version.el... Loading /usr/share/emacs/20.7/lisp/version.el...done Loading /usr/share/emacs/20.7/lisp/map-ynp.el... Loading /usr/share/emacs/20.7/lisp/map-ynp.el...done Loading /usr/share/emacs/20.7/lisp/widget.el... Loading /usr/share/emacs/20.7/lisp/emacs-lisp/cl.el... Loading /usr/share/emacs/20.7/lisp/emacs-lisp/cl.el...done Loading /usr/share/emacs/20.7/lisp/widget.el...done Loading /usr/share/emacs/20.7/lisp/custom.el... Loading /usr/share/emacs/20.7/lisp/custom.el...done Loading /usr/share/emacs/20.7/lisp/cus-start.el... Note, built-in variable `abbrev-all-caps' not bound ... [many other variable not bound messages] ... Loading /usr/share/emacs/20.7/lisp/cus-start.el...done Loading /usr/share/emacs/20.7/lisp/international/mule.el... : In procedure make-char-table in expression (@fop make-char-table (# #)): : Symbol's function definition is void ABORT: (misc-error) Type "(backtrace)" to get more information or "(debug)" to enter the debugger. guile> There are two serious restrictions: - Most Emacs Lisp primitives are not yet implemented. In particular, there are no buffer-related primitives. - Performance compares badly with Emacs. Using a handful of completely unscientific tests, I found that Guile was between 2 and 20 times slower than Emacs. I think that both these restrictions point in the same direction: the way forward is to define the primitives by compiling a preprocessed version of the Emacs source code, not by trying to implement them in Scheme. This, of course, is what Ken Raeburn's project is already trying to do, so there is little point in me trying to do the same thing independently. Unless this picture changes, I don't plan to do any further significant work on the prototype translator. I expect that most of the translator's Scheme code will eventually become obsolete, replaced by bits of Emacs C code. Until then, though, it should have a role: - as a guide to the Guile Emacs project on how to interface to the Elisp support in libguile (notably, usage of `@fop' and `@bind') - as a proof of concept and fun thing to experiment with - as a working translator that could help us develop our picture of how we want to integrate translator usage in general with the rest of Guile. Best regards, Neil