From marc.battyani at fractalconcept.com Wed Sep 8 21:21:52 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 8 Sep 2004 23:21:52 +0200 Subject: [cl-pdf-devel] cl-pdf repository update References: <000001c4513d$a000fa10$bf07749c@marcxp><074d01c453f1$080d2740$0a02a8c0@marcxp> <0af701c4549c$e22407e0$0a02a8c0@marcxp> Message-ID: <04dd01c495e9$dd4d0f30$0a02a8c0@marcxp> I've commited the latest modifications to the cl-pdf repository. Rev 60: (needed for the referecences stuff in cl-typesetting) Added *page-number* The full repository is here: http://www.fractalconcept.com:8000/public/open-source/ (It's a subversion 1.0 repository.) The cl-pdf part: http://www.fractalconcept.com:8000/public/open-source/cl-pdf/ The cl-typesetting part: http://www.fractalconcept.com:8000/public/open-source/cl-typesetting/ The mod_lisp part: http://www.fractalconcept.com:8000/public/open-source/mod_lisp/ There are also tarballs for cl-pdf and cl-typesetting: http://www.fractalconcept.com/download/cl-pdf-current.tgz http://www.fractalconcept.com/download/cl-typesetting-current.tgz BTW the (somewhat outdated) home pages for these projects are here: http://www.fractalconcept.com/asp/html/cl-pdf.html http://www.fractalconcept.com/asp/html/cl-typesetting.html http://www.fractalconcept.com/asp/html/mod_lisp.html Marc From Marc.Battyani at fractalconcept.com Thu Sep 9 17:46:08 2004 From: Marc.Battyani at fractalconcept.com (Marc Battyani) Date: Thu, 9 Sep 2004 19:46:08 +0200 Subject: [cl-pdf-devel] cl-pdf and cl-typesetting portability Message-ID: <034301c49694$e6109870$0a02a8c0@marcxp> 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 The full repository is here: http://www.fractalconcept.com:8000/public/open-source/ (It's a subversion 1.0 repository.) The cl-pdf part: http://www.fractalconcept.com:8000/public/open-source/cl-pdf/ The cl-typesetting part: http://www.fractalconcept.com:8000/public/open-source/cl-typesetting/ The mod_lisp part: http://www.fractalconcept.com:8000/public/open-source/mod_lisp/ There are also tarballs for cl-pdf and cl-typesetting: http://www.fractalconcept.com/download/cl-pdf-current.tgz http://www.fractalconcept.com/download/cl-typesetting-current.tgz The (somewhat outdated) home pages for these projects are here: http://www.fractalconcept.com/asp/html/cl-pdf.html http://www.fractalconcept.com/asp/html/cl-typesetting.html http://www.fractalconcept.com/asp/html/mod_lisp.html From ungil at mac.com Thu Sep 9 21:49:55 2004 From: ungil at mac.com (Carlos Ungil) Date: Thu, 9 Sep 2004 23:49:55 +0200 Subject: [cl-pdf-devel] cl-pdf and cl-typesetting portability In-Reply-To: <034301c49694$e6109870$0a02a8c0@marcxp> References: <034301c49694$e6109870$0a02a8c0@marcxp> Message-ID: <2F979336-02AA-11D9-A551-000A95CCF028@mac.com> 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 From marc.battyani at fractalconcept.com Fri Sep 10 21:12:13 2004 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Fri, 10 Sep 2004 23:12:13 +0200 Subject: [cl-pdf-devel] cl-pdf and cl-typesetting portability References: <034301c49694$e6109870$0a02a8c0@marcxp> Message-ID: <073201c4977a$d9e2cbe0$0a02a8c0@marcxp> "Andras Simon" wrote: > > cl-pdf works now with abcl. Great! > > 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.) > > No such problems with abcl, since it doesn't have an FFI at all. > But it has Java. Sticking the following in at the end of zlib.lisp > > #+abcl > (progn > (defun compress-string (i-string) > (let* ((i-string-bytes > (java:jcall > (java:jmethod "java.lang.String" "getBytes" "java.lang.String") i-string "UTF-8")) > (out-array (java:jnew (java:jconstructor "java.io.ByteArrayOutputStream"))) > (compresser (java:jnew (java:jconstructor "java.util.zip.Deflater" "int") > (java:jfield "java.util.zip.Deflater" "BEST_COMPRESSION"))) > (defl-out-stream > (java:jnew > (java:jconstructor > "java.util.zip.DeflaterOutputStream" "java.io.OutputStream" "java.util.zip.Deflater") > out-array compresser))) > (java:jcall (java:jmethod "java.util.zip.Deflater" "setInput" "[B") compresser i-string-bytes) > (java:jcall (java:jmethod "java.util.zip.DeflaterOutputStream" "close") defl-out-stream) > (java:jcall (java:jmethod "java.io.ByteArrayOutputStream" "toString") out-array))) > > (setf *compress-streams* t)) > > provides compression. Thanks, I will add this to cl-pdf. Marc