[CM] "; There is no class named RANDOM."
padovani
josepadovani@yahoo.com.br
Mon, 20 Aug 2007 21:08:57 -0300
------=_Part_82197_6955559.1187654937189
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi, I'm studying the last chapter of "Notes from the Metalevel" and I am
getting some errors...
In chapter 20, when I try to evaluate the lines
"
(new heap :of (list (new cycle :of 'q :for 3)
(new palindrome :of '(e. s e))
(new random :of '(h w h.) :for 1)))
"
I get:
"
There is no class named RANDOM.
[Condition of type SIMPLE-ERROR]
Restarts:
0: [ABORT-REQUEST] Abort handling SLIME request.
1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" {B96CB41}>=
)
Backtrace:
0: (SB-PCL::FIND-CLASS-FROM-CELL RANDOM NIL T)
1: ((LAMBDA (#:WHOLE593 #:ENVIRONMENT594)) (NEW RANDOM :OF (QUOTE (H W
H.)) :FOR 1) #<unavailable argument>)
2: (MACROEXPAND-1 (NEW RANDOM :OF (QUOTE (H W H.)) :FOR 1) #<NULL-LEXENV>=
)
3: (MACROEXPAND (NEW RANDOM :OF (QUOTE (H W H.)) :FOR 1) #<NULL-LEXENV>)
4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (NEW RANDOM :OF (QUOTE (H W H.)) :FOR 1)
#<NULL-LEXENV>)
5: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LIST (NEW CYCLE :OF (QUOTE Q) :FOR 3)
(NEW PALINDROME :OF (QUOTE #)) (NEW RANDOM :OF (QUOTE #) :FOR 1))
#<NULL-LEXENV>)
6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (NEW HEAP :OF (LIST (NEW CYCLE :OF # :FO=
R
3) (NEW PALINDROME :OF #) (NEW RANDOM :OF # :FOR 1))) #<NULL-LEXENV>)
7: ((LAMBDA NIL))
8: ((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-SYNTAX-HOOKS (T))
#<unused argument> #<unused argument> #<CLOSURE (LAMBDA NIL) {B939E65}>)
--more--
"
and in chapter 24, when I try to evaluate the CMN example
"
(define (duet-cmn stf len nts)
(let ((nts (new heap :notes nts))
;; choose quarter or two eighths
(rhy (new random
:of `(1 ,(new cycle :of '(1/2 1/2))))))
(process while (< (now) len)
for n =3D (next nts)
for r =3D (next rhy)
output (new midi :time (now)
:duration r
:keynum n
:channel stf) ; link to cmn staff
wait r)))"
I get:
"
; in: LAMBDA NIL
; (CM:NEW RANDOM :OF `(,1 ,(CM:NEW CM:CYCLE :OF '(1/2 1/2))))
;
; caught ERROR:
; (in macroexpansion of (NEW RANDOM :OF ...))
; (hint: For more precise location, try *BREAK-ON-SIGNALS*.)
; There is no class named RANDOM.
; (LET ((CM::NTS (CM:NEW CM:HEAP :NOTES CM::NTS))
; (CM::RHY (CM:NEW RANDOM :OF `(,1 ,#))))
; (CM:PROCESS CM::WHILE (< (CM:NOW) CM::LEN) CM::FOR CM::N =3D
; (CM:NEXT CM::NTS) CM::FOR CM::R =3D (CM:NEXT CM::RHY)
CM:OUTPUT
; ...))
;
; note: deleting unreachable code
;
; note: deleting unreachable code
;
; compilation unit finished
; caught 1 ERROR condition
; printed 2 notes
"
it seems to be the same error but as I am a newbie I have no idea about
what is wrong...
Tx if anyone can help,
Jos=E9 H. Padovani
------=_Part_82197_6955559.1187654937189
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi, I'm studying the last chapter of "Notes from the Metalevel&quo=
t; and I am getting some errors...<br><br>In chapter 20, when I try to eval=
uate the lines<br><br>"<br>(new heap :of (list (new cycle :of &#=
39;q :for 3)
<br>  =
; (new palindrome :of '(e. s e))<br>  =
; (new random :=
of '(h w h.) :for 1)))<br>"<br><br>I get:<br><br><br><br>"<br=
>There is no class named RANDOM.<br> [Condition of type SIMPLE-=
ERROR]
<br><br>Restarts:<br> 0: [ABORT-REQUEST] Abort handling SLIME request=
.<br> 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "=
worker" {B96CB41}>)<br><br>Backtrace:<br> 0: (SB-PCL::FIND-CL=
ASS-FROM-CELL RANDOM NIL T)
<br> 1: ((LAMBDA (#:WHOLE593 #:ENVIRONMENT594)) (NEW RANDOM :OF (QUOT=
E (H W H.)) :FOR 1) #<unavailable argument>)<br> 2: (MACROEXPAN=
D-1 (NEW RANDOM :OF (QUOTE (H W H.)) :FOR 1) #<NULL-LEXENV>)<br> =
; 3: (MACROEXPAND (NEW RANDOM :OF (QUOTE (H W H.)) :FOR 1) #<NULL-LEXENV=
>)
<br> 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (NEW RANDOM :OF (QUOTE (H W H.)=
) :FOR 1) #<NULL-LEXENV>)<br> 5: (SB-INT:SIMPLE-EVAL-IN-LEXENV =
(LIST (NEW CYCLE :OF (QUOTE Q) :FOR 3) (NEW PALINDROME :OF (QUOTE #)) (NEW =
RANDOM :OF (QUOTE #) :FOR 1)) #<NULL-LEXENV>)
<br> 6: (SB-INT:SIMPLE-EVAL-IN-LEXENV (NEW HEAP :OF (LIST (NEW CYCLE =
:OF # :FOR 3) (NEW PALINDROME :OF #) (NEW RANDOM :OF # :FOR 1))) #<NULL-=
LEXENV>)<br> 7: ((LAMBDA NIL))<br> 8: ((SB-PCL::FAST-METHOD =
SWANK-BACKEND:CALL-WITH-SYNTAX-HOOKS (T)) #<unused argument> #<unu=
sed argument> #<CLOSURE (LAMBDA NIL) {B939E65}>)
<br> --more--<br>"<br><br>and in chapter 24, when I try to evalua=
te the CMN example<br><br>"<br>(define (duet-cmn stf len nts)<br> =
; (let ((nts (new heap :notes nts))<br> =
;; choose quarter or two eighths<br>
(rhy (new random<br> =
:o=
f `(1 ,(new cycle :of '(1/2 1/2))))))<br> (process wh=
ile (< (now) len)<br> &nb=
sp; for n =3D (next nts)<br>  =
; for r =3D (next rhy)<br> &=
nbsp; output (n=
ew midi :time (now)
<br>  =
; :=
duration r<br> &=
nbsp; &nbs=
p; :keynum n<br>  =
; &n=
bsp; :channel stf) ; link to cmn staff<br> &nb=
sp; wait r)))"<br><br>=
I get:<br><br>"<br>; in: LAMBDA NIL<br>
; (CM:NEW RANDOM :OF `(,1 ,(CM:NEW CM:CYCLE :OF =
9;(1/2 1/2))))<br>; <br>; caught ERROR:<br>; (in macroexpansion=
of (NEW RANDOM :OF ...))<br>; (hint: For more precise location=
, try *BREAK-ON-SIGNALS*.)<br>; There is no class named RANDOM.
<br><br>; (LET ((CM::NTS (CM:NEW CM:HEAP :NOTES CM:=
:NTS))<br>; (CM::RHY (CM:NE=
W RANDOM :OF `(,1 ,#))))<br>; (CM:PROCESS CM::WHILE=
(< (CM:NOW) CM::LEN) CM::FOR CM::N =3D<br>; &nbs=
p; (CM:NE=
XT CM::NTS) CM::FOR CM::R =3D (CM:NEXT CM::RHY) CM:OUTPUT
<br>; &nbs=
p; ...))<br>; <br>; note: deleting unreachable code=
<br>; <br>; note: deleting unreachable code<br>; <br>; compilation unit fin=
ished<br>; caught 1 ERROR condition<br>; printed 2 =
notes<br>"<br> it seems to be the same error but as I am a newbie=
I have no idea about what is wrong...
<br>Tx if anyone can help,<br>Jos=E9 H. Padovani<br>
------=_Part_82197_6955559.1187654937189--