ILISP vs. LispWorks 4.3

[email protected] Mon, 5 Jan 2004 16:38:30 +0100
Newsgroups gmane.lisp.ilisp.devel
Message-ID <937E0F5B52D1D2118C8B0008C70889210FF2AEB0@xtet0s2e.dbva2000.hypovereinsbank.de>
Hi there,

I'm using ILISP with LispWorks 4.3, and I've run into a number of problems.
Please excuse my not sending proper patches---the tools necessary for this
are not available in my (very restricted) working environment.  (Outlook
will likely also have mangled the source code---sorry about that.)

First of all, there's some magic specific to LW 4.1 and 4.2 in
lispworks.lisp
which I've rewritten ot not refer to the LispWorks version directly:

(defun ilisp-find-function (name package)
  (multiple-value-bind (symbol status)
      (intern name package)
    (and (eq status :external)
         symbol)))

(defun ilisp-callers (symbol package)
  "Print a list of all of the functions that call FUNCTION.
Returns T if successful."
  (ilisp-errors
      (let ((function-name (ilisp-find-symbol symbol package))
	    (*print-level* nil)
	    (*print-length* nil)
	    (*package* (find-package 'lisp))
	    (callers ())
	    )
	(when (and function-name (fboundp function-name))
	  (setf callers (munge-who-calls
                         (cond
                          ((ilisp-find-function "WHO-CALLS" 'lw)
                           (funcall (ilisp-find-function "WHO-CALLS" 'lw)
                                    function-name))
                          ((ilisp-find-function "WHO-CALLS" 'hcl)
                           (funcall (ilisp-find-function "WHO-CALLS" 'hcl)
                                    function-name)))))
	  (dolist (caller callers)
	    (print caller))
	  t))))

Next, the code for sys:get-top-loop-handler etc. doesn't work anymore in
4.3---
specifically, sys::line is no longer available.  Accordingly, the settings
for `ilisp-save-command' and `ilisp-restore-command' in ilisp-hlw.el are
obsolete.

On Windows, ILISP also fails to quote filenames correctly.  I've put the
following kludge
into ilisp-snd.el:

(defun ilisp-quote-filename (file)
  "Quote backslashes in FILE."
  (replace-in-string file "\\\\" "\\\\\\\\"))

(defun ilisp-load-or-send (file)
  "Try to load FILE into the inferior LISP.
If the file is not accessible in the inferior LISP as determined by
ilisp-load-or-send-command, then visit the file and send the file over
the process interface."

  (let* ((command
	  (format (ilisp-value 'ilisp-load-or-send-command) 
		  (ilisp-quote-filename
		   (lisp-file-extension
		    file 
		    (ilisp-value 'ilisp-init-binary-extension t)))
		  file)))
		  (insert-string (format ilisp-block-command string)
(process-buffer (ilisp-process)))
  ...

With this in place, I can at least eval stuff like (+ 1 2).  I'll see if
more develops.

Please direct feedback to [email protected]'m not on
ilisp-devel.

Cheers,
Mike
 


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click