CM with ACL4

Tobias Kunze t@ulysses.Stanford.EDU
Mon, 3 Feb 1997 23:29:44 -0800



Same here on my SGI under ACL 4.3.  It works in CLISP, though:

 | tkunze@ulysses:~ [3208]> clispcm
 |
 | > (stella)
 | Hang on a second...
 |
 | Type ? for help.
 |
 | Stella [Top-Level]: (algorithm henon midi-note (length 250)
 |                       (vars (x pi) (y 30))
 |                       (setf x (- (* x 10) y)
 |                             y (* (truncate x) 10)
 |                             note (note (* x 120))
 |                             rhythm (/ y 200)))
 | #<ALGORITHM: Henon>
 | Stella [Top-Level]: list
 | Top-Level:
 |      1. #<ALGORITHM: Henon>
 |
 | Stella [Top-Level]: archive henon /tmp/foo.cm
 | Archiving /tmp/foo.cm.
 | WARNING:
 | The archive code for algorithm Henon contains one or more references to the
global variable PI, which must exist when Henon is loaded and rerun.
 |
 | Stella [Top-Level]: q
 |
 | > (describe 'variable-globally-special-p)
 |
 | Description of
 | VARIABLE-GLOBALLY-SPECIAL-P
 | This is the symbol VARIABLE-GLOBALLY-SPECIAL-P, names a function.
 | The symbol lies in #<PACKAGE WALKER> and is accessible in the packages CLM,
COMMON-MUSIC, WALKER.
 |
 | > (VARIABLE-GLOBALLY-SPECIAL-P 'pi)
 | T
 | >


In ACL, however, walker::VARIABLE-GLOBALLY-SPECIAL-P seems to clash
with a method or flet which uses the same name (ie, it's function slot
holds a function object, but symbol-function errors):

 | tkunze@ulysses:~ [3209]> aclcm
 | Allegro CL 4.3 [Silicon Graphics Iris 4D; R1] (4/5/96 18:43)
 | Copyright (C) 1985-1996, Franz Inc., Berkeley, CA, USA.  All Rights
Reserved.
 | ;; Optimization settings: safety 1, space 1, speed 1, debug 2.
 | ;; For a complete description of all compiler switches given the current
optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS).
 |
 | [changing package from "COMMON-LISP-USER" to "COMMON-MUSIC"]
 | CM(1): (stella)
 | Hang on a second...
 |
 | Type ? for help.
 |
 | Stella [Top-Level]: (algorithm henon midi-note (length 250)
 |                       (vars (x pi) (y 30))
 |                       (setf x (- (* x 10) y)
 |                             y (* (truncate x) 10)
 |                             note (note (* x 120))
 |                             rhythm (/ y 200)))
 |
 | #<ALGORITHM: Henon>
 | Stella [Top-Level]:
 | Stella [Top-Level]: list
 | Top-Level:
 |      1. #<ALGORITHM: Henon>
 |
 | Stella [Top-Level]: archive henon /tmp/foo.cm
 | /tmp/foo.cm exists. Overwrite? yes
 | Archiving /tmp/foo.cm.
 | Error: attempt to call `VARIABLE-GLOBALLY-SPECIAL-P' which is an undefined
 |        function.
 |   [condition type: UNDEFINED-FUNCTION]
 |
 | Restart actions (select using :continue):
 |  0: Try calling VARIABLE-GLOBALLY-SPECIAL-P again.
 |  1: Return a value instead of calling VARIABLE-GLOBALLY-SPECIAL-P.
 |  2: Try calling a function other than VARIABLE-GLOBALLY-SPECIAL-P.
 |  3: Setf the symbol-function of VARIABLE-GLOBALLY-SPECIAL-P and call it
again.
 |  4: Return to Top-Level.
 |  5: Exit Top-Level.
 | [1] CM(2): (describe 'variable-globally-special-p)
 | VARIABLE-GLOBALLY-SPECIAL-P is a SYMBOL.
 |   It is unbound.
 |   It is INTERNAL in the CLOS package and accessible in the COMMON-MUSIC, and
 | WALKER packages.
 | [1] CM(3): (inspect 'variable-globally-special-p)
 | The symbol VARIABLE-GLOBALLY-SPECIAL-P @ #x1031d9df
 |   which is an INTERNAL symbol in the CLOS package
 |    0 type ---------> Bit field: #x07
 |    1 flags --------> Bit field: #x00
 |    2 hash ---------> Bit field: #xb83f
 |    3 value --------> ..unbound..
 |    4 package ------> The CLOS package
 |    5 function -----> #<Function (unnamed) @ #x1003e952>
 |    6 name ---------> A simple-string (27) that starts "VARIABLE-GLOBALL"
 |    7 plist --------> The symbol NIL
 | [2i] CM(4):


I would just not use the archive command on algorithms for now.  You can
still archive threads and merges of threads.  I always reconstruct
stella algorithms from code I save as lisp anyway, and so does everybody
else, i guess :)  If you *need* algo runs to be archived, try "run <algo>
into <thread>" and then archive the thread.


-Tobias