[cl-typesetting-devel] problems getting up and running

rohan nicholls nichollsrohan at hotmail.com
Fri Oct 21 21:11:35 UTC 2005


Hello everyone,

I have been trying out cl-pdf and cl-typesetting, but I cannot get the
examples to work, and would appreciate any help getting sorted out.

When I run the example I get this error on sbcl 0.9.4.14 with slime cvs
(last updated 2005-08-29):

encoding error on stream #<SB-SYS:FD-STREAM for "file /tmp/ex1.pdf" 
{A2F7221}>
(:EXTERNAL-FORMAT :ASCII):
the character with code 153 cannot be encoded.
  [Condition of type SB-INT:STREAM-ENCODING-ERROR]


I adjusted the *afm-files-directories* to point to the afm folder in
the cl-pdf package.  Other than that I haven't touched anything, as to
get started I did not feel the zlib compression was necessary, and I
did not want to screw things up until I knew what I was doing.

Thanks in advance.

Rohan

Here is the slime dialogue with blocks of similar messages snipped, if
the full version is needed let me know and I can include it:

; SLIME 2005-08-29
CL-USER> (require 'asdf)
NIL
CL-USER> (asdf:operate 'asdf:load-op 'cl-pdf)
; loading system definition from /Users/rohan/.sbcl/systems/cl-pdf.asd into
; #<PACKAGE "ASDF4430">
; registering #<SYSTEM :ITERATE {9B26971}> as ITERATE
; registering #<SYSTEM :SALZA {9CBEE79}> as SALZA
; registering #<SYSTEM :CL-PDF {9E36C39}> as CL-PDF
STYLE-WARNING: implicitly creating new generic function FONT-TYPE
STYLE-WARNING: implicitly creating new generic function FONT-DESCRIPTOR
STYLE-WARNING: implicitly creating new generic function MAKE-DICTIONARY
STYLE-WARNING: redefining FONT-DESCRIPTOR in DEFGENERIC
STYLE-WARNING: redefining MAKE-DICTIONARY in DEFGENERIC
STYLE-WARNING: redefining FONT-DESCRIPTOR in DEFGENERIC
STYLE-WARNING: implicitly creating new generic function WRITE-OBJECT
STYLE-WARNING: implicitly creating new generic function WRITE-STREAM-CONTENT
STYLE-WARNING: implicitly creating new generic function WRITE-DOCUMENT
STYLE-WARNING: implicitly creating new generic function MAKE-JPEG-IMAGE
STYLE-WARNING: implicitly creating new generic function AXIS-SIZE
STYLE-WARNING: implicitly creating new generic function DRAW-OBJECT
NIL
CL-USER> (load 
"/Users/rohan/software/source/cl-type/cl-pdf/examples/examples.lisp")
; in: LAMBDA NIL
;     (%DOWN-FRACTAL X
;                  (- Y (* 1 DY) (* DX +TG30+ -1) (* 0.125 +TG60-TG30+ 
DXF2))
;                  DXF2
;                  DYF2
;                  LEVEL)
;
; caught STYLE-WARNING:
;   undefined function: %DOWN-FRACTAL

;
; caught STYLE-WARNING:
;   This function is undefined:
;     %DOWN-FRACTAL
;
; compilation unit finished
;   caught 2 STYLE-WARNING conditions
; in: LAMBDA NIL
;     (LET ((REAL (REALPART Z)) (IMAG (IMAGPART Z)))
;     (WHEN (< 2 (ABS Z)) (RETURN (- NB-ITER (- N #)))))
;
; caught STYLE-WARNING:
;   The variable REAL is defined but never used.
;
; caught STYLE-WARNING:
;   The variable IMAG is defined but never used.

;     (FLOOR (EXPT (/ X MAX) (/ NB-ITER 256)) (/ 1 (1- NB-COLS)))
; --> BLOCK MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL FUNCTION IF AND IF NOT 
IF
; --> ZEROP
; ==>
;   (= REM 0)
;
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a (OR (RATIONAL (-1/29999) (1/29999))
;                               (DOUBLE-FLOAT (-3.333444448148272d-5)
;                                             (3.333444448148272d-5))
;                               (SINGLE-FLOAT (-3.3334443e-5)
;                                             (3.3334443e-5))), not a FLOAT.
;
; note: unable to open code because: The operands might not be the same 
type.

; --> BLOCK MULTIPLE-VALUE-BIND MULTIPLE-VALUE-CALL FUNCTION IF AND IF AND 
IF
; --> MINUSP
; ==>
;   (< NUMBER 0)
;
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a FLOAT.

;     (EXPT (/ H 320) 2)
; ==>
;   (* SB-C::X SB-C::X)
;
; note: unable to
;   convert x*2^k to shift
; due to type uncertainty:
;   The first argument is a (RATIONAL -8388608/5 536870911/320), not a 
INTEGER.
;   The second argument is a (RATIONAL -8388608/5 536870911/320), not a 
INTEGER.

;     (* (EXPT (/ H 320) 2) 268436766)
;
; note: unable to
;   convert x*2^k to shift
; due to type uncertainty:
;   The first argument is a (RATIONAL 0 70368744177664/25), not a INTEGER.
;
; note: unable to
;   recode as leas, shifts and adds
; due to type uncertainty:
;   The first argument is a (RATIONAL 0
;                                     70368744177664/25), not a 
(UNSIGNED-BYTE
;                                                                32).
;   The result is a (VALUES (RATIONAL 0 18889558114533453594624/25)
;                           &OPTIONAL), not a (VALUES (UNSIGNED-BYTE 32) 
&REST T).
;
; note: unable to
;   recode as leas, shifts and adds
; due to type uncertainty:
;   The first argument is a (RATIONAL 0 70368744177664/25), not a FIXNUM.
;   The result is a (VALUES (RATIONAL 0 18889558114533453594624/25)
;                           &OPTIONAL), not a (VALUES FIXNUM &REST T).

;     (* Z Z)
;
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a RATIONAL.
;   The second argument is a NUMBER, not a FLOAT.
;
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a FLOAT.
;   The second argument is a NUMBER, not a RATIONAL.

<snip more unable to optimize messages>

; note: forced to do GENERIC-* (cost 30)
;       unable to do inline fixnum arithmetic (cost 4) because:
;       The first argument is a (RATIONAL -8388608/5 536870911/320), not a 
FIXNUM.
;       The second argument is a (RATIONAL -8388608/5
;                                          536870911/320), not a FIXNUM.
;       The result is a (VALUES (RATIONAL 0 70368744177664/25)
;                               &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline (signed-byte 32) arithmetic (cost 5) because:
;       The first argument is a (RATIONAL -8388608/5
;                                         536870911/320), not a (SIGNED-BYTE 
32).
;       The second argument is a (RATIONAL -8388608/5
;                                          536870911/320), not a 
(SIGNED-BYTE 32).
;       The result is a (VALUES (RATIONAL 0 70368744177664/25)
;                               &OPTIONAL), not a (VALUES (SIGNED-BYTE 32)
;                                                         &REST
;                                                         T).
;       etc.

;     (* (EXPT (/ H 320) 2) 268436766)
;
; note: forced to do GENERIC-* (cost 30)
;       unable to do inline fixnum arithmetic (cost 3) because:
;       The first argument is a (RATIONAL 0 70368744177664/25), not a 
FIXNUM.
;       The result is a (VALUES (RATIONAL 0 18889558114533453594624/25)
;                               &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline fixnum arithmetic (cost 4) because:
;       The first argument is a (RATIONAL 0 70368744177664/25), not a 
FIXNUM.
;       The result is a (VALUES (RATIONAL 0 18889558114533453594624/25)
;                               &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       etc.

;     (* 150000.0d0 ZOOM)
; --> * * FLOAT
; ==>
;   (SB-KERNEL:%DOUBLE-FLOAT SB-C::N)
;
; note: forced to do full call
;       unable to do inline float coercion (cost 5) because:
;       The first argument is a (RATIONAL 0
;                                         18889558114533453594624/25), not a 
(SIGNED-BYTE
;                                                                            
  32).
;       unable to do inline float coercion (cost 6) because:
;       The first argument is a (RATIONAL 0
;                                         18889558114533453594624/25), not a 
(UNSIGNED-BYTE
;                                                                            
  32).

;     (* Z Z)
;

<snip unable to call, and forced to do generic messages >

;
; note: forced to do GENERIC-- (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a INTEGER, not a FIXNUM.
;       The result is a (VALUES INTEGER &OPTIONAL), not a (VALUES FIXNUM 
&REST T).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a INTEGER, not a FIXNUM.
;       The result is a (VALUES INTEGER &OPTIONAL), not a (VALUES FIXNUM 
&REST T).
;       etc.

;     (SETF C
;           (COMPLEX (+ (REALPART CENTER) (* INC (+ # #)))
;                    (+ (IMAGPART CENTER) (* INC (+ # #))))
;         Z
;           #C(0.0d0 0.0d0))
; --> PROGN SETF
; ==>
;   (SETQ C
;           (COMPLEX (+ (REALPART CENTER) (* INC (+ # #)))
;                    (+ (IMAGPART CENTER) (* INC (+ # #)))))
;
; note: doing complex float to pointer coercion (cost 13) to C
;
; compilation unit finished
;   caught 2 STYLE-WARNING conditions
;   printed 75 notes
T
CL-USER> (example1)
which lead to the error that I ran into earlier

_________________________________________________________________
Talk with your online friends with MSN Messenger http://messenger.msn.nl/




More information about the cl-typesetting-devel mailing list