sandell@ferret.ils.nwu.edu (Greg Sandell) (12/07/89)
Below is a concise summary of the responses I got to my posting on Lisp, X-Windows, and C. For those of you who missed this posting, I've included it as the first thing. The response was really quite remarkable...29 very imformative replies. Thank you very much to all of you who replied, because the information helped us make some rather large decisions in our shop. Greg Sandell *************************************************************** * Greg Sandell, Institute for Learning Sciences, Evanston, IL * * sandell@ferret.ils.nwu.edu * *************************************************************** [ here is the original posting. ] I would like to hear from anybody who is involved (or has been involved) in using X-Windows in a LISP environment. The obvious problem is that there is a wealth of information on using X in a 'C' programming environment, but very little with regard to LISP. We have clx running on Sun SPARCs in our shop, but this appears to be a preliminary, experimental package under development. I am especially interested in the following questions, but I would appreciate any other wisdom you may have to offer. 1. Our version of clx (which came bundled with the X library we got for the SPARCs) is a 1988 copy. Have any further releases come out? Are they available via FTP? 2. How feasible is it to write low-level routines for performing X functions in C and have that compiled code called from LISP? The advantage there is to use the power of all the example code currently available that is written in C. 3. Does anyone use ALLEGRO COMMON WINDOWS, which uses X windows and clx? If so, is this a productive environment. [ summary of replies. ] INFO ON CLX A clx manual may be obtained by ftp-ing to csc.ti.com (10.7.0.46)...perhaps the updated source is available there, too? clx comes automatically with the X distribution tape. The new version of X windows (X11.V4) is due *any day now* and it will have an updated clx bundled with it. I believe that January 1990 is the announced release date. It is available by ftp to 18.30.0.212 (expo.lcs.mit.edu). Sun/Lucid should be contacted directly to see if they have an X toolkit of their own. One user reports successful results using clx with Allegro Common Lisp. Current versions of clx may be obtained by ftp to 128.247.159.141 (csc.ti.com), grabbing the files pub/clx.tar or pub/clx/tar.Z (the latter is compressed). The documentation is in pub/clxman/ doc.tar.Z (ascii) or pub/clxman/ps.tar.Z (postscript). Not necessary for CLX to mimic C's data structures because CLX provides its own set of data structures that parallel the C structures. PRODUCTS FOR LISP/XWINDOWS ENVIRONMENTS CLUE (Common-Lisp User Environment) is supposed to be a higher-level Xt-like interface for CLX, but it appears to lack documentation other than a specification/reference manual, which is pretty poor at that. CLX is already fairly slow, and CLUE appears to be code that is simply run by CLOS, so all in all CLUE must run pretty slow. CLUE is available by ftp from 128.247.159.141 (csc.ti.com) in /pub/clue.tar.Z (compressed form). Like CLX, CLUE comes from TI. One person reports that a window system called CLIM is even better than CLUE. It will not be released until summer '90, however. It appears to be under development at Xerox PARC; contact janssen@parc.xerox.com (Bill Janssen) for details. Harlequin's LispWorks uses CLX as a low-level interface to X, but uses CLUE as a higher-level toolkit for building human interfaces. A free evaluation copy of LispWorks is available by writing to lispworks-request@harlequin.co.uk. This has gotten several recommendations from people on the net. Allegro's Common Windows appears to be a nice system, but it will not run with the twm window manager, and such an attempt crashes the system. It provides a front-end to clx, basically, and users find it to be a powerful tool. It uses CLOS, but is not fully integrated yet. The product is in a pilot release, and one user says that Franz's committment to it is not very extensive, based on indications from Franz; others claim that the tech support from Franz is very good. Also available with it is a package called Composer, a window-level debugger/profiler, but its "slow as molasses, even on a sparcstation," someone said. It is non-portable code...it only runs on Allegro. Despite the drawbacks, more users recommended this solution than any other interface; of course, this may reflect a widespread use of Allegro rather than the excellence of Common Windows. LeLisp has both C and X interfaces. Liszt Programming Inc. makes a product called Express Windows, implemented in Common Lisp and using CLX. Obvius (Object oriented image understanding system) is a software project at MIT to create a general purpose image processing utility in Lisp. It uses a homebrew interface to X11 (i.e., it does not use clx or clue). However, they eventually hope to port Obvius to a clx/clue platform. Contact bradley@demille.media.mit.edu for information. ISSUES INVOLVED IN THE C TO LISP INTERFACE Can C object code be dynamically linked in to a running LISP image? Can C's data types be converted to LISP's data types? Can you use a shared memory area to pass information between procedures in C and LISP? C TO LISP INTERFACES Guy Steele's Lisp book gives information on calling foreign functions in Lisp. People on the net say that C-Lisp interfacing works pretty well, once you can do it. However, the task of building a large library of function calls (in C) to the X library will probably be very time-consuming. Allegro Common Lisp has a Foreign Function Call facility that allows you to use C routines within lisp. Apple common lisp has an interface to any MPW compiler code, including LISP. Kyoto Common Lisp is actually written in C and the source code is available, making embellishments easy. Kyoto is available free of charge, but it's an experimental implementation. Sun Common Lisp's (aka Lucid Common Lisp) ADVANCED USER'S GUIDE has a lengthy section on using foreign functions (Chapt. 5, "Working beyond the Lisp environment"). (Note that the ADVANCED USER's GUIDE and the USER's GUIDE are two different items.) A set of demo code comes with the Lucid; on our system it's under a directory called foreign-code-examples. DEC's VaxLisp is the best implementation for a hybrid C-LISP environment. It supports a very large repetoire of C data types, including C structures. *************************************************************** * Greg Sandell, Institute for Learning Sciences, Evanston, IL * * sandell@ferret.ils.nwu.edu * ***************************************************************
barmar@Think.COM (12/07/89)
In article <1882@accuvax.nwu.edu> sandell@ferret.ils.nwu.edu (Greg Sandell) writes: >One person reports that a window system called CLIM is even better than > CLUE. It will not be released until summer '90, however. It > appears to be under development at Xerox PARC; contact > janssen@parc.xerox.com (Bill Janssen) for details. To give credit where it's due... CLIM was originally designed and developed by International Lisp Associates; at the time (last winter) it was known as Y Windows. It implements a portable user interface management system that can be run over any window system. This past spring they got together with people at Xerox who were developing an object-oriented scheme for generic interfacing to different window systems, and together they've been reimplementing CLIM using that underlying facility. >Liszt Programming Inc. makes a product called Express Windows, implemented > in Common Lisp and using CLX. Express Windows implements Symbolics's Dynamic Windows user and programmer interfaces in Common Lisp using CLX. The primary goal was to allow people who had developed sophisticated user interfaces using Symbolics's UIMS library to port them to other CL implementations. It was demoed at last summer's SLUG (Symbolics Lisp User's Group) conference, and it was a pretty good emulation of a Lispm. >Guy Steele's Lisp book gives information on calling foreign functions in > Lisp. Wrongo! There's absolutely nothing in CLtL about foreign function calling. There is currently no portable foreign function interface (in fact, Lucid on the Vax and Lucid on the Sun-4 are incompatible in this respect). Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar
lou@atanasoff.rutgers.edu (Lou Steinberg) (12/08/89)
In article <1882@accuvax.nwu.edu> sandell@ferret.ils.nwu.edu (Greg Sandell) writes: > Allegro's Common Windows appears to be a nice system, but it will not run > with the twm window manager, and such an attempt crashes the system. Not in our experience. We use TWM (currently version 5.31 4/26/89) and Allegro's Common Windows (3.0.1.beta.sun4.1), and have not seen any such fatal interaction. (There are some minor problems, e.g. scroll bars in the wrong place when you move a window, but this *is* really a beta release of the windowing stuff, and I understand a "real" release is to be shipped in a few days.) Common Windows is a more-or-less window-system-independent interface from LISP. E.g. I believe there have been implementations for Sunview as well as X. It has much of the flavor of the Interlisp-D windowing functions. At one point there was some talk of making this the standard common lisp windowing interface (hence the name), but I don't know what has happened to that. -- Lou Steinberg uucp: {pretty much any major site}!rutgers!aramis.rutgers.edu!lou arpa: lou@cs.rutgers.edu
janssen@parc.xerox.com (Bill Janssen) (12/09/89)
In article <1882@accuvax.nwu.edu>, sandell@ferret (Greg Sandell) writes: >One person reports that a window system called CLIM is even better than > CLUE. It will not be released until summer '90, however. It > appears to be under development at Xerox PARC; contact > janssen@parc.xerox.com (Bill Janssen) for details. While CLIM (Common Lisp Interface Manager) may or may not eventually be better than one thing or another, (and I have no idea whether it is better or worse than CLUE), I am not the appropriate contact person, being an interested observer rather than an implementor. I'll ask the designers (from International Lisp Associates and Xerox PARC) to post something about it. Bill -- Bill Janssen janssen.pa@xerox.com (415) 494-4763 Xerox Palo Alto Research Center 3333 Coyote Hill Road, Palo Alto, California 94304
attila@bellcore.bellcore.com (12/20/89)
*************************************************************** * Greg Sandell, Institute for Learning Sciences, Evanston, IL * * sandell@ferret.ils.nwu.edu * *************************************************************** [ here is the original posting. ] I would like to hear from anybody who is involved (or has been involved) in using X-Windows in a LISP environment. The obvious problem is that there is a wealth of information on using X in a 'C' programming environment, but very little with regard to LISP. We have clx running on Sun SPARCs in our shop, but this appears to be a preliminary, experimental package under development. [...] Date: December 19, 1989 CLIM (Common Lisp Interface Manager) is under development by ILA (International Lisp Associates), Lucid, Symbolics, and Xerox; it will offer a hardware and software independent high level UIMS which can run on top of any (of the supported) X-window implementations. The target operating and window systems are: Genera, Open Look, MS Windows, Presentation Manager, and SUN's implementation of X. Given that the promoters (Symbolics and Lucid) have the majority of the Lisp market there is a good chance of it becoming a standard. Beta copies are shipped about now, and first release is projected beginning of 2Q90. I have a 39 page preliminary CLIM Manual with a print date of August 89. My copy came from HIC@ALDERAAN.SCRC.Symbolics.COM --HIC is Howard Cannon who developed Flavors. The rest is a summary of Howard Cannon's talk given at Bellcore in November of 1989. CLIM Highlights (as per Cannon's talk): Features: -oo system build from CLOS primitives; CLOS functions defined to talk to X-window and other window substrates directly. -the developer will not work in pixel coordinates (not like KEE) but in logical descriptions, ie. on third from top, one half over, etc. -includes an inking model which defines x forms -output recording and incremental redisplay -some application support -some constraint language Presentations: The objective or philosophy of CLIM is to make a portable analogue of the Symbolics UIMS (Dynamic Windows, Presentations Types). So, CLIM will -maintain semantic connection between the object and the graphic presentations -provide high level interaction -smart mouse activity -context dependent behavior... -allow multiple display types from the same object (a la Presentation Types) with inheritance and all. The rest of the talk included some code samples and future directions. The most interesting plan is to provide a "chameleon" capability, viz. define a "menu" in some environment, say Genera, which will pop up the familiar Symbolics menu for the three button mouse, while, in another environment, say, Mac it will build the many bar, and drop downs for the one button mouse. Same comments apply to scrollbars, close box/quit icons, etc. For more information catch someone at one of the vendor organizations, or start with your Lisp salesperson. Leslie A. Walko, attila@bellcore.com