Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
there were some problems using #'inspect in CLISP with a HTTP frontend.
Actually it did not work in Netscape on Linux at all (this happened with
libc6, for instance; at least for me).
I asked on the list before, and Bruno provided a partial workaround, but
no fix. But patch back then was not that complete, too.
Well, the problematic issues are as follows:
* there was no real HTTP-header handling
* connection-close and keep-alives were not handled
* changes in the socket stuff in libc6 obviously caused resets that
crashed the inspect-session.
So, I think I have a working version of #'inspect now, that tackles all
I've tested it with Netscape only, though.
Before I commit it, I'd like some feedback, if this works for other
people, too, or if there are some other 'features' ;).
BTW, using lynx as a browser did not work for me in the old version. And
it does not in this one. This might be due to run-program ...
Anyway, please try it, and report any problems.
The file is attached. You can _load_ it into a running lisp, and might
set sys::*inspect-frontend* and sys::*inspect-browser*.
Eric Marsden wrote:
> >>>>> "ma" == martin <martin@...> writes:
> ma> So, I think I have a working version of #'inspect now, that
> ma> tackles all these problems. I've tested it with Netscape only,
> ma> though.
> This looks nicely written, but the function SYS::LIST-LENGTH-DOTTED is
> not defined in my 2000-03-06 version of CLISP.
I'll CC this to clisp-devel, too.
Well, the code I started with, is from the CVS-version.
If I remember correctly, #'inspect was introduced after the last
So, you might add the following code, to get sys::list-length-dotted:
;;; #'sys::list-length-dotted is only defined in a CLISP-version >
(unless (and (fboundp 'sys::list-length-dotted)
;; Returns the length of the list, or nil if circular.
;; The second value is the last atom (i.e., `dotted-p').
(defun list-length-dotted (obj)
;; cf. function list-length in CLtL p. 265
(do ((nn 0 (+ nn 2))
(fast obj (cddr fast))
(slow obj (cdr slow)))
(when (atom fast) (return (values nn fast)))
(when (atom (cdr fast)) (return (values (1+ nn) (cdr fast))))
(when (eq (cdr fast) slow) (return nil)))))
I've attached the complete inspect-file, additionally.