unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
Subject: emacs and guile (Re: ehelp woes, or why I hate a module that I love so much)
Date: Tue, 16 Jul 2002 22:58:13 -0400	[thread overview]
Message-ID: <tx1adorvz5m.fsf_-_@raeburn.org> (raw)
In-Reply-To: <20020704164911.4CC1.LEKTU@terra.es> (Juanma Barranquero's message of "Thu, 04 Jul 2002 17:20:37 +0200")


Juanma Barranquero <lektu@terra.es> writes:
> Ken Raeburn has a page on Guile-based Emacs (http://www.mit.edu/~raeburn/guilemacs/),
> but it was last updated on 1999-07-07. Ken is subscribed to this list,
> so I suppose he can comment on it.

Yeah, I was just looking today at how old that page is....

Yes, I've been working on it slowly and quietly, as my free time
allows.  I'm working on it because it interests me, I'd like more
opportunities to work with Scheme, I'd like to encourage others to
work with Scheme, I think it would get Guile more attention (including
its deficiencies in some areas, which hopefully would be readily
identified with a huge application like Emacs and addressed), and I
really want Simon to write those Gnus patches :-).  How threads at the
Scheme level might translate up to the UI, though, I have no idea.

The first batch of work I did, which resulted in the state described
on that web page, caused a fairly large and painful divergence, and
keeping up with new stuff being added to Emacs proved to be a big time
sink.  So I stopped that work, and started a different approach,
namely making some of the Lisp internals in the main FSF sources
easier to isolate and replace.  Hence the ENABLE_CHECKING,
HIDE_LISP_IMPLEMENTATION, and other changes to add all sorts of
compile-time and run-time checks, and the associated (functionally
invisible, I hope) transformations I've been applying to various
patterns throughout the sources to make more use of lisp.h macros.

(BTW, I've got a patch that adds configures option to turn on
ENABLE_CHECKING, or just the use of a union for Lisp_Object.  Should I
check it in?  I've noticed one or two people have been checking in
fixes for Lisp_Object/int mixups, for which I'm grateful, but I'd like
to encourage more of that checking as people write the code in the
first place.)

At this point, int, float and cons values, and to a lesser degree
strings, should be easy to rip out and reimplement.  Converting other
types to Guile's SCM type would be trickier because of a difference in
type handling.  Guile's C-level type extension system involves
allocating Scheme objects which have some application type information
and a pointer to the application data.  In the current Emacs system,
on the other hand, most of the type and pointer information is all in
the Lisp_Object value, and the "==" comparisons require that the
handle value be unique; you could call XSETBUFFER on a Lisp_String
pointer and it wouldn't complain.  So, should XSETBUFFER for Guile
create one of these Scheme objects, or should it use one allocated
earlier?

My approach last time around was to add a SCM field to most of the
"interesting" data types (symbol, misc, and vectorlike), fill it in
when the object was created, and make XSETFOO just copy the value out.
Rather crude, and wasteful of storage space, but it got the job done,
and it minimized the intrusion in random Emacs code and kept it
running with both object representations.

I want to try eliminating more of the XSETFOO calls outside of object
creation, in places where for example a simple assignment will do
instead.  But if I can't get most of them, I may have to use that same
approach again.

Since with the string macro stuff I've been changing in the last few
days, I've nearly reached the point I had in my old development tree
with regard to isolating those types I thought I could easily replace.
(I was starting to work on strings but hadn't finished them.  Vectors
would be easy except for the bits of code that group them with the
"vectorlike" types like buffers.)  So I'm thinking about starting a
branch soon and starting on some actual Guile code again.  Once the
branch is made, it should be much, much easier to get other people
involved.

Smooth interaction between the languages will need a lot more time,
but an Emacs that uses the Guile storage system and can communicate
with Scheme code, even if only by passing a few simple object types,
is certainly doable; I had a proof-of-concept implementation up and
limping long ago, but not remotely ready to be evaluated in terms of
memory use, performance, etc.

So, that's roughly what the current status is of my work....

Ken

  reply	other threads:[~2002-07-17  2:58 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-25 14:50 ehelp woes, or why I hate a module that I love so much Juanma Barranquero
2002-06-25 15:06 ` D. Goel
2002-06-25 15:41   ` Juanma Barranquero
2002-06-26 22:24 ` Richard Stallman
2002-06-27 17:11   ` Juanma Barranquero
2002-06-27 19:57     ` Stefan Monnier
2002-07-02 15:02       ` Juanma Barranquero
2002-07-02 15:18         ` Stefan Monnier
2002-07-02 15:50           ` Juanma Barranquero
2002-06-29  8:41     ` Richard Stallman
2002-07-02 15:15       ` Juanma Barranquero
2002-07-02 15:49         ` Eli Zaretskii
2002-07-03 11:16           ` Juanma Barranquero
2002-07-03 20:57         ` Richard Stallman
2002-07-03 21:32           ` Simon Josefsson
2002-07-04  5:09             ` Eli Zaretskii
2002-07-04  7:58           ` Juanma Barranquero
2002-07-04 10:13             ` Eli Zaretskii
2002-07-04 11:52               ` Juanma Barranquero
2002-07-06 10:38                 ` Eli Zaretskii
2002-07-04 11:02             ` Simon Josefsson
2002-07-04 12:08               ` Juanma Barranquero
2002-07-04 12:19                 ` Miles Bader
2002-07-04 13:31                   ` Juanma Barranquero
2002-07-04 14:02                   ` Simon Josefsson
2002-07-04 14:00                 ` Simon Josefsson
2002-07-04 15:20                   ` Juanma Barranquero
2002-07-17  2:58                     ` Ken Raeburn [this message]
2002-07-17  7:13                       ` emacs and guile (Re: ehelp woes, or why I hate a module that I love so much) Juanma Barranquero
2002-07-17  9:11                       ` Kai Großjohann
2002-07-18 14:54                         ` Richard Stallman
2002-07-18 21:45                         ` Ken Raeburn
2002-07-18 14:55                       ` Richard Stallman
2002-07-18 20:13                         ` Ken Raeburn
2002-07-19 13:03                           ` Andreas Schwab
2002-07-19 16:24                             ` Ken Raeburn
2002-07-19 16:54                           ` Richard Stallman
2002-07-19 17:51                             ` Ken Raeburn
2002-07-18 14:56                       ` Richard Stallman
2002-07-18 19:54                         ` Ken Raeburn
2002-07-19  4:23                           ` Stefan Monnier
2002-07-19 12:56                             ` Ken Raeburn
2002-07-19 13:34                               ` Stefan Monnier
2002-07-19 14:16                                 ` Andreas Schwab
2002-07-19 15:04                                   ` Stefan Monnier
2002-07-19 16:54                           ` Richard Stallman
2002-07-19 17:48                             ` Ken Raeburn
2002-07-19 18:25                             ` Marius Vollmer
2002-07-20  0:35                               ` Richard Stallman
2002-07-20 12:00                                 ` Marius Vollmer
2002-07-21 20:14                                   ` Richard Stallman
2002-07-19 16:54                           ` Richard Stallman
2002-07-04 19:07             ` ehelp woes, or why I hate a module that I love so much Henrik Enberg
2002-07-05  0:49               ` Juanma Barranquero
2002-07-05 11:15                 ` Per Abrahamsen
2002-07-05 10:48             ` Richard Stallman

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=tx1adorvz5m.fsf_-_@raeburn.org \
    --to=raeburn@raeburn.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).