[comp.windows.x] Lisp X Server

barmar@think.COM (Barry Margolin) (06/21/89)

In article <8906201951.AA01028@wscad4.local> uejiowh@wscad4.crd.ge.COM writes:
>I just swa the announcement and it sounds interesting - a window manager on the
>X Window System with a built in LISP Interpreter.   But how about a server 
>with a LISP Interpreter?

What would this mean?  I'm using an X Server on a Symbolics Lisp
Machine, so it has access to a Lisp interpreter.  But what would the
server want to do with it?  An X Server simply implements operations
defined in the X protocol, and none of them involve interpretation.  I
suppose you could define an X protocol extension that would make use
of the Lisp interpreter.

Actually, I suspect you're trying to invent a way to give X the
expressive power of NeWS.  NeWS has the ability to download PostScript
procedures to the server and then have it execute them.  For instance,
this would allow you to download all the workings of a pop-up menu, so
that the client would only have to say something like "mark (Item1)
(Item2) (Item3) MenuChoose", and the server would pop up the menu,
wait for the user to choose something, and then return the choice to
the client (in X this has to be done on the client, usually in a
widget library).  For those of us who prefer prefix polish to reverse
polish it would be nice if there were a Lisp window system of this
sort (maybe the CLIM work being done by ILA, Symbolics, Lucid, and
Xerox will include something like this).

Barry Margolin
Thinking Machines Corp.

barmar@think.com
{uunet,harvard}!think!barmar

mike@ists.ists.ca (Mike Clarkson) (06/28/89)

In article <22675@news.Think.COM> barmar@kulla.think.com (Barry Margolin) writes:
>Actually, I suspect you're trying to invent a way to give X the
>expressive power of NeWS.  NeWS has the ability to download PostScript
>procedures to the server and then have it execute them.  For instance,
>this would allow you to download all the workings of a pop-up menu, so
>that the client would only have to say something like "mark (Item1)
>(Item2) (Item3) MenuChoose", and the server would pop up the menu,
>wait for the user to choose something, and then return the choice to
>the client (in X this has to be done on the client, usually in a
>widget library).  For those of us who prefer prefix polish to reverse
>polish it would be nice if there were a Lisp window system of this
>sort (maybe the CLIM work being done by ILA, Symbolics, Lucid, and
>Xerox will include something like this).

I agree with Barry.  I've been hacking on NeWS called from Scheme, and
it's remarkable the similarities between PostScript and Lisp.  They
are both weakly typed languages with automatic garbage collection.
The reverse polish notation is a rather superficial difference relative
to the fact that PostScript is explicitly stack based.

Given the fact that NeWS source is cheap for universities (~1000$), it
strikes me that it would not be a too difficult problem to make a 
Lisp front end to a PostScript interpreter.  It would make a great
Master's or Ph.D. project, and one could take advantage of a lot of PD
Lisp based debugging tools to make a really decent windowing environment.

Mike.


-- 
Mike Clarkson					mike@ists.ists.ca
Institute for Space and Terrestrial Science	uunet!attcan!ists!mike
York University, North York, Ontario,		FORTRAN - just say no. 
CANADA M3J 1P3					+1 (416) 736-5611

bob@tinman.cis.ohio-state.edu (Bob Sutterfield) (06/29/89)

In article <118@ists.ists.ca> mike@ists.ists.ca (Mike Clarkson) writes
   Given the fact that NeWS source is cheap for universities (~1000$),
   it strikes me that it would not be a too difficult problem to make
   a Lisp front end to a PostScript interpreter.

X11/NeWS is already internally structured as two language interpreters
(X11 and PostScript) operating on the same event queue, window forest,
etc.  Rather than make a language front-end to the PostScript
interpreter, why not install another language interpreter at the same
level as the two that are already there?

It would certainly be more difficult than just a front-end, but the
thoroughly-integrated result would be far beyond a front-end's
capabilities.

I've heard of several front-end projects, and of course there already
exist window systems based on other languages (Interlisp, Smalltalk),
but perhaps Sun has a more general and accessible extension mechanism
at the interpreter level.  It would certainly make a good thesis
project!