public inbox for guile-emacs@sourceware.org
 help / color / mirror / Atom feed
* guile and emacs
@ 1999-08-28 11:21 Ken Raeburn
  1999-08-28 13:48 ` Mikael Djurfeldt
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ken Raeburn @ 1999-08-28 11:21 UTC (permalink / raw)
  To: guile-emacs

Hi, gang.  Sorry you haven't heard from me in a while.  Here's what's
up:

My RSI is improving, but not gone.  I'm starting to put more time into
Guile-Emacs again.

Emacs 20.4 is out, and a bunch of redisplay changes and other changes
are now getting merged into the Emacs sources.  I've also got a chance
to merge in some of my initial changes for making the main body of the
Emacs code less aware of the Lisp internals.  That'll be what I focus
on next.


At http://www.xemacs.org/Architecting-XEmacs/index.html there are some
ideas some of the XEmacs folks have come up with for improving the
Emacs/Lisp interface, which appear to be independent of the
Emacs/XEmacs split.

In particular, Michael Sperber is looking into moving XEmacs to a
general Scheme base.  Not specifically Guile, for two reasons: 1) a
more general Scheme interface allows later retargeting if desired, or
giving the user the option of multiple back ends for comparison, and
2) he's got some "issues" with Guile's implementation decisions,
including the use of conservative GC.  What he's saying makes sense,
so I'll be looking a bit at separating further into "Lisp" vs "general
Scheme" vs "Guile" bits what I've done so far.  (GC will be an
interesting issue though; I've got some thoughts on that.)

Mike's a researcher in programming languages, and has been working on
(among other things) Lisp->Scheme translation, with a prototype
translator already in the works.  We might be able to build on this.

There's also occasionally some relevant discussion in comp.lang.scheme
and comp.lang.lisp; that's how I got in touch with Mike.


Jim Blandy has been working in Japan with the MULE folks to figure out
a good way to do multilingual support in Guile.  Sounds like it'll be
functionally similar to the Emacs MULE implementation, but not
identical.  He's proposed an interface, so I may start experimenting
with a stub (unibyte-only) version of that interface.


A snapshot of the code I've been working on is at
http://www.mit.edu/~raeburn/guilemacs/guilemacs.tgz if you want to
play with it.  It includes CVS admin files, so if you've got CVS and
an FSF account, you'll be able to do updates starting with that
version.  (For those of you I've already told about it, don't bother
fetching it again, it's the same old snapshot.)

The post-20.4 changes have been pretty huge.  I'm going to try to get
some of my more basic changes merged into the main sources before
trying to merge that stuff back into my CVS tree.


That's it for now...

Ken

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guile and emacs
  1999-08-28 11:21 guile and emacs Ken Raeburn
@ 1999-08-28 13:48 ` Mikael Djurfeldt
  1999-09-08 12:43 ` Jim Blandy
  1999-09-08 12:57 ` Jim Blandy
  2 siblings, 0 replies; 5+ messages in thread
From: Mikael Djurfeldt @ 1999-08-28 13:48 UTC (permalink / raw)
  To: Ken Raeburn; +Cc: djurfeldt

Ken Raeburn <raeburn@raeburn.org> writes:

> 2) he's got some "issues" with Guile's implementation decisions,
> including the use of conservative GC.  What he's saying makes sense,
> so I'll be looking a bit at separating further into "Lisp" vs "general
> Scheme" vs "Guile" bits what I've done so far.  (GC will be an
> interesting issue though; I've got some thoughts on that.)

I'm curious about what he has to say on Guile implementation
decisions.  Could you give me a reference?

Also, regarding conservative GC, making a generic interface to the
Scheme interpreter is no solution.  If you have an interface which
would work for both an interpreter using a conservative GC and one
using precise GC, you could just as well take the one with precise GC.

The major gain of conservative GC is that the interface becomes
simpler and less bug prone.

I have only limited experience in running Guile for longer times, but
I have had scwm running for several days without problems, and a
friend of mine has a server application which also runs for long
without problems.  This makes me doubt that there is a problem in
practise with using conservative GC.

/mdj

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guile and emacs
  1999-08-28 11:21 guile and emacs Ken Raeburn
  1999-08-28 13:48 ` Mikael Djurfeldt
@ 1999-09-08 12:43 ` Jim Blandy
  1999-09-08 12:57 ` Jim Blandy
  2 siblings, 0 replies; 5+ messages in thread
From: Jim Blandy @ 1999-09-08 12:43 UTC (permalink / raw)
  To: Ken Raeburn; +Cc: guile-emacs

Please, PLEASE do not use my Cygnus address for Guile-related E-mail.

Please use Jim Blandy <jimb@red-bean.com>.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guile and emacs
  1999-08-28 11:21 guile and emacs Ken Raeburn
  1999-08-28 13:48 ` Mikael Djurfeldt
  1999-09-08 12:43 ` Jim Blandy
@ 1999-09-08 12:57 ` Jim Blandy
  1999-09-08 14:30   ` Mikael Djurfeldt
  2 siblings, 1 reply; 5+ messages in thread
From: Jim Blandy @ 1999-09-08 12:57 UTC (permalink / raw)
  To: Ken Raeburn; +Cc: guile-emacs

If you want to see my implementation of the Guile multi-byte API,
check out jimb_mb_branch_1 of the guile-core module.

The internal representation is meant to be *identical* to that used by
Emacs 20.4, except for composed characters, which Guile will never
implement, and which even Emacs is removing in favor of a different
implementation.


I don't know Sperber's objections to conservative GC, but if it's the
usual fear that pointers will get dropped, or garbage will be
preserved, my experience with Emacs and Guile is that explicit root
marking is in practice *more* prone to GC-related bugs, by a large
margin.  I think that explicit root marking is impractical without
software tools to help verify that you've done things right.

For example, note that the code below is incorrect in Emacs.  Assume
all functions return Lisp_Object values:

	foo (bar (), baz ())

Suppose the compiler calls bar first, then baz.  While baz runs, foo's
frame holds a reference to bar's return value --- possibly the only
one.  If collection can occur in baz, then bar's return value will be
collected.  Instead, you must write:

	{
	  Lisp_Object temp = Qnil;
	  GCPRO1 (temp);

	  temp = bar ();
	  foo (temp, baz ());
	}

But for anyone who has not worked on both Guile and Emacs, these
arguments are anecdotal, and the usual way of thinking about program
design suggests the opposite conclusion.  So I don't know what to do.
Any suggestions?

I guess this is an inappropriate forum for this.  But I don't know
anyplace else where the choice between conservative and explicit root
marking becomes such an immediate issue.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: guile and emacs
  1999-09-08 12:57 ` Jim Blandy
@ 1999-09-08 14:30   ` Mikael Djurfeldt
  0 siblings, 0 replies; 5+ messages in thread
From: Mikael Djurfeldt @ 1999-09-08 14:30 UTC (permalink / raw)
  To: Jim Blandy; +Cc: djurfeldt

Jim Blandy <jimb@red-bean.com> writes:

> For example, note that the code below is incorrect in Emacs.  Assume
> all functions return Lisp_Object values:
> 
> 	foo (bar (), baz ())
> 
> Suppose the compiler calls bar first, then baz.  While baz runs, foo's
> frame holds a reference to bar's return value --- possibly the only
> one.  If collection can occur in baz, then bar's return value will be
> collected.  Instead, you must write:
> 
> 	{
> 	  Lisp_Object temp = Qnil;
> 	  GCPRO1 (temp);
> 
> 	  temp = bar ();
> 	  foo (temp, baz ());
> 	}
> 
> But for anyone who has not worked on both Guile and Emacs, these
> arguments are anecdotal, and the usual way of thinking about program
> design suggests the opposite conclusion.  So I don't know what to do.
> Any suggestions?

I think sharing your experience with precise vs conservative GC is one
important thing.  We could also try to sift the archives for
discussions on this topic.

I think it would be a really big mistake to settle for an interface
compatible with precise GC if the problems with conservative GC are
just phantoms.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-09-08 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-28 11:21 guile and emacs Ken Raeburn
1999-08-28 13:48 ` Mikael Djurfeldt
1999-09-08 12:43 ` Jim Blandy
1999-09-08 12:57 ` Jim Blandy
1999-09-08 14:30   ` Mikael Djurfeldt

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