compile Maxima file containing a large list



On 2012-08-04, Volker van Nek <volkervannek at gmail.com> wrote:

> I did a translate_file and looked into the translation. There I found
>          (LIST '(MLIST) 99 124 119 123 242 107 111 197 48 1 103 43 254
>                215 171 118 202 130 201 125 250 89 71 240 173 212 162
>                175 156 164 114 192 183 253 147 38 54 63 247 204 52 165
>                229 241 113 216 49 21 4 199 35 195 24 150 5 154 7 18 128
>                226 235 39 178 117 9 131 44 26 27 110 90 160 82 59 214
>                179 41 227 47 132 83 209 0 237 32 252 177 91 106 203 190
>                57 74 76 88 207 208 239 ...))))

This particular problem was fixed a little while ago and the fix will
appear in the next release. Relevant change shown below in PS.

To protect against changes to any of the output format variables, using
WITH-STANDARD-IO-SYNTAX seems like a good idea. GCL doesn't have it, but
I guess it's not a big deal to have #-gcl #+gcl.

There might be some variables which might be bound to non-default
values within WITH-STANDARD-IO-SYNTAX. For example, I suppose *PACKAGE*
should be :MAXIMA instead of :CL-USER. I don't know if there are others.

Also, there are at least two places (reached from save and from
compile_file) where Maxima generates Lisp code. I guess we should
identify all such places and handle them the same way.

best

Robert Dodier

PS.
$ git diff 28b91d60..61dc2359 src/transs.lisp
src/transs.lisp
diff --git a/src/transs.lisp b/src/transs.lisp
index 036c36f..d192f42 100644
--- a/src/transs.lisp
+++ b/src/transs.lisp
@@ -169,6 +169,7 @@
   ;; we want the thing to start with a newline..
   (newline in-stream)
   (let ((*readtable* (copy-readtable nil))
+        (*print-circle* nil) (*print-level* nil) (*print-length* nil)
        #-gcl (*print-pprint-dispatch* (copy-pprint-dispatch)))
     #-gcl
     (progn