[cl-pdf-devel] cl-pdf and cl-typesetting portability

Carlos Ungil ungil at mac.com
Thu Sep 9 21:49:55 UTC 2004


Hello,

cl-pdf works with Corman Lisp, with some effort. See:
http://www.artofprogramming.com/bb/viewtopic.php?t=85
http://www.artofprogramming.com/bb/viewtopic.php?t=86

A few patches are needed to start using it (to compile iterate, to  
parse properly font definitions, to workaround a pathname problem) and  
other patches are needed to allow for binary fragments in pdf files  
(for compression and images) [the editor behaviour is wrong with the  
"correct" parse-integer, it might be wiser to change it only in the  
cl-pdf package]

There is as well a bug I've never reported. In chart.lisp, the  
draw-object method for the histogram class contains the following code:
      (if (stacked-series obj)
	  (loop for values in (apply 'list (series obj))
which is wrong: (apply 'list (series obj)) returns (series obj)!

I found this solution (which I don't really like, but seems to work):
      (if (stacked-series obj)
           (loop for values in
                 ;;(apply 'list (series obj))
                 ;;stolen from wbuss at gmx.net (comp.lang.lisp 2004-04-07)"
                  
;;http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF 
-8&selm=m3smff7e0q.fsf%40buss-14250.user.cis.dfn.de
                 (let ((lists (series obj)))
                   (loop with args = (copy-list lists)
                         while (loop for columns on lists
                                     for args-rest on args
                                     for argsp = (first columns) then  
(or argsp (first columns))
                                     do (setf (first args-rest) (pop  
(first columns)))
                                     finally (return argsp))
                         collect (apply #'list args)))

Cheers,

Carlos

On Sep 9, 2004, at 7:46 PM, Marc Battyani wrote:

>
> I know that cl-pdf and cl-typesetting work very well with LispWorks as  
> it's
> the Lisp implementation I use daily. But I would like to know how it  
> works
> on other implementations.
> For instance I've been told that there are again some problems with  
> the zlib
> FFI binding for SBCL and maybe CMUCL.
> (This zlib FFI has proven to be the major annoyance.)
>
> Another portability problem was the under-specification of the LOOP
> behaviour in the standard, which caused problems with Lisps not using  
> a MIT
> based LOOP, like CLisp. So far it's solved by switching to ITERATE  
> which is
> better than LOOP anyway ;-)
>
> Other problems/patches/etc. ?
>
> Thanks,
>
> Marc





More information about the cl-pdf-devel mailing list