[Openmcl-devel] Re: Trying to get LISA to run
gb at clozure.com
Tue Mar 29 08:51:52 EST 2005
On Tue, 29 Mar 2005, nrms wrote:
> Okay, no wonder nobody replied, since what I wrote was nonsense.
Sorry. Replying was on my to-do list. Honest.
> Actually there 2 problems, the first one is that require stuff (that
> one I wrongly thought caused all this mess). I guess this one I could
> circumvent by loading the needed file explicitly.
CCL:*MODULE-SEARCH-PATH* contains a list of directories; REQUIRE
looks in each of these for a loadable file that "matches" the name of the
(defun lisa-debugger ()
(pushnew (pathname-directory (lisa-debugger))
should cause (
? (REQUIRE "LISA-DEBUGGER")
to find and load "lisa-debugger.lisp".
(There are other ways of controlling REQUIRE's behavior; the one based
on *MODULE-SEARCH-PATH* is built-in and pretty simple, but you can
define your own functions to map module names to one or more files.)
> The major problem seems to be that in a file called epilogue.lisp I got
> the following code
> #\# #\? #'(lambda (strm subchar arg)
> which is the evildoer. Is the problem here that character "?" is the
> prompt in openmcl? Is there an intelligent way to solve this conflict?
OpenMCL uses #? to reference foreign variables, as in:
(if (zerop #?errno)
(format t "~&No C errors lately."))
(That's a bad example, because "errno" may not be a real variable in a
#? is used to reference some foreign variables in the Cocoa example;
redefining the reader macro would probably cause problems when loading
> Thank you for any hints.
It should probably be easier than it is to get your hands on a totally
"standard" readtable (one that only has CL functionality defined, and
doesn't include extensions like #_, #$, and #?) in OpenMCL. The fact
that that doesn't happen that way is probably a bug, but it wouldn't
necessarily prevent conflicts like this if it was fixed.
I'm not really sure how LISA's used, but it seems that the available
1) Use a different dispatching macro that happens not to conflict with
the one provided by the implementation (e.g., #!, maybe.)
2) Use the same dispatching macro and clobber the implementation's
definition (making it harder to load examples or other code that uses
3) Use separate readtables (with separate definitions of #?).
(3) is probably the cleanest solution, but may be somewhat awkward for
> Nils Stritzel
> Am 28.03.2005 um 18:18 schrieb nrms:
> > Hi!
> > I am trying to get LISA (Lisp Intelligent Software Agents) to run with
> > openmcl. Actually I have already thought I had suceeded, but as it
> > turned out, I haven't.
> > The following is how it is supposed to work with other lisps. I tried
> > to figure out one solution myself, but it failed with the interesting
> > side-effect
> > the (require "cocoa") did not work anymore after calling my "solution".
> > (defun lisa-debugger ()
> > (translate-logical-pathname "lisa:debugger;lisa-debugger.lisp"))
> > #+Allegro
> > (setf system:*require-search-list*
> > (append system:*require-search-list*
> > `(:newest ,(lisa-debugger))))
> > #+clisp
> > (setf custom:*load-paths*
> > (append custom:*load-paths* `(,(lisa-debugger))))
> > #+LispWorks
> > (let ((Loadable-modules `(("lisa-debugger" . ,(lisa-debugger)))))
> > (defadvice (require lisa-require :around)
> > (module-name &optional pathname)
> > (let ((lisa-module
> > (find module-name loadable-modules
> > :test #'string=
> > :key #'car)))
> > (if (null lisa-module)
> > (call-next-advice module-name pathname)
> > (call-next-advice module-name (cdr lisa-module))))))
> > So this what I thought that it might be a solution. As I figured out
> > by now it is obviously wrong; ccl:*module-search-path* is not what I
> > am looking for,
> > since it only contains directories and I try to append a file name.
> > But what is the correct way to solve this?
> > #+Openmcl
> > (setf ccl:*module-search-path*
> > (append ccl:*module-search-path* `(,(lisa-debugger))))
> > Any help or advice appreciated.
> > Nils Stritzel
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel