[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OPS5 under Allegro Common Lisp

     I'd like to know where I can get/buy OPS5 (a version that will work
     under Allegro CL). A couple of years the sources to OPS5 was posted
     on the net. I have that, but it doesn't seem to work. 
     C.Ramanathan                                      |
     Software Tool & Die, Purveyors to the Trade       |ra@skuld.std.com
     1330 Beacon St, Brookline, MA 02146,(617)739-0202 |{xylogics,uunet}world!ra
Sorry that I didn't respond to your original message.

The sources that were posted to comp.sources.unix a few years ago weren't
exactly Common Lisp (though they were pretty close to it.)  The distribution
that's on uunet.uu.net contains a file which describes some of the differences
(it also explains some of the gyrations its author had to go through to
bring them up under what was then an incomplete CL implementation.)

Your original message stated that you got errors like:

        neq is invalid 'cause it is used by the kernel
        K is an invalid agrument to car....

The first - which may have also occurred for ASSQ and MEMQ, at least - should
have been a continuable error which allowed you to overwrite the builtin
definitions of these functions.  All of these things are defined in the MACL
kernel, and some of them are assumed to be primitive by the compiler, so
it's best to conditionalize their definitions from the source (e.g., 

#-:ccl  ; add this before each spurious definition
(defun assq (x y)
  (assoc x y :test #'eq))

[ the person who originally ported this code should really have put it in
a seperate package, so that these kind of conflicts were less likely to

The code also uses an invalid DO syntax in at least one case: the function
"DO-RJUST" contains a statement of the form:

        (do k (- width size) (1- k) (not (> k 0)) (princ '| | port))

This needs to be parenthesized correctly:

        (do ((k (- width size) (1- k))) ((not (> k 0)) (princ '| | port))

There may be other cases of this as well; the older idiom was, I believe,
valid in MACLISP and may have been understood by some early CL implementations.
(This would seem to explain the "can't take CDR of K" message ...)

Unfortunately, I don't really have the time to port OPS5 myself.  I would be
interested in hearing from you if you encounter any further problems after
making the indicated changes.