| 1 | .TH REDCSL 1 "2010 October 10" "redcsl" |
|---|
| 2 | . |
|---|
| 3 | . |
|---|
| 4 | .SH NAME |
|---|
| 5 | redcsl \- Run REDUCE under CSL |
|---|
| 6 | . |
|---|
| 7 | . |
|---|
| 8 | .SH Synopsis |
|---|
| 9 | .B redcsl |
|---|
| 10 | [ |
|---|
| 11 | .I command-line switches |
|---|
| 12 | ] [ |
|---|
| 13 | .I file ...\& |
|---|
| 14 | ] |
|---|
| 15 | . |
|---|
| 16 | . |
|---|
| 17 | .SH DESCRIPTION |
|---|
| 18 | .I redcsl |
|---|
| 19 | runs REDUCE based on the |
|---|
| 20 | .BR CSL |
|---|
| 21 | Lisp system. |
|---|
| 22 | . |
|---|
| 23 | . |
|---|
| 24 | .SH REDCSL Options |
|---|
| 25 | .TP |
|---|
| 26 | .I file |
|---|
| 27 | read input from file. |
|---|
| 28 | |
|---|
| 29 | After all other options have been processed, the files given on the rest of |
|---|
| 30 | the command line are read in and processed. A filename of |
|---|
| 31 | .B - |
|---|
| 32 | can be used to designate standard input. |
|---|
| 33 | .TP |
|---|
| 34 | .B -b [OIP] |
|---|
| 35 | tells the system to avoid any attempt to recolour prompts and input text. |
|---|
| 36 | It will mainly be needed on X terminals that have been set up so that they |
|---|
| 37 | use colours that make the defaults here unhelpful, like white-on-black. |
|---|
| 38 | |
|---|
| 39 | This option can be followed by colour specifications to make things yet |
|---|
| 40 | more specific. It is supposed to be the idea that three colours can be |
|---|
| 41 | specified after it for output, input and prompts, with the letters KRGYbMCW |
|---|
| 42 | standing for blacK, Red, Green, Yellow, blue, Magenta, Cyan and White. |
|---|
| 43 | |
|---|
| 44 | This may not fully work yet! |
|---|
| 45 | .TP |
|---|
| 46 | .BI -d " symbol[=value]" |
|---|
| 47 | defines Lisp symbol |
|---|
| 48 | .I symbol |
|---|
| 49 | at system start, with value |
|---|
| 50 | .I value |
|---|
| 51 | . |
|---|
| 52 | .TP |
|---|
| 53 | .B -g |
|---|
| 54 | enables debugging mode. It sets a lisp variable |
|---|
| 55 | .SB !*backtrace |
|---|
| 56 | and arranges that all backtraces are displayed notwithstanding use of |
|---|
| 57 | .SB errorset. |
|---|
| 58 | .TP |
|---|
| 59 | .BI \-i " imagefile\fR,\fP " \-i- |
|---|
| 60 | CSL and Reduce use image files to keep both initial heap images and |
|---|
| 61 | .I fasl |
|---|
| 62 | loadable modules. By default if the executable launched has some name, |
|---|
| 63 | say xxx, then an image file xxx.img is used. But to support greater |
|---|
| 64 | generality |
|---|
| 65 | .B -i |
|---|
| 66 | introduces a new image, |
|---|
| 67 | .B -i- |
|---|
| 68 | indicates the default one and a sequence of such directives list |
|---|
| 69 | image files that are searched in the order given. These are read-only. |
|---|
| 70 | The similar option |
|---|
| 71 | .B -o |
|---|
| 72 | equally introduces image files that are scanned for input, but that |
|---|
| 73 | can also be used for output. Normally there would only be one |
|---|
| 74 | .B -o |
|---|
| 75 | directive. |
|---|
| 76 | .TP |
|---|
| 77 | .BI -j " dumpfile" |
|---|
| 78 | dumps a record of all the files read during the Lisp run into |
|---|
| 79 | .I dumpfile |
|---|
| 80 | with a view that it can be included in a Makefile to document dependencies. |
|---|
| 81 | .TP |
|---|
| 82 | .BI -k " nnn[/ss]" |
|---|
| 83 | sets the size of the heap to be used. If |
|---|
| 84 | .BI -k nnn |
|---|
| 85 | is given then that much |
|---|
| 86 | memory will be allocated and the heap will never expand. Without this |
|---|
| 87 | option a default amount is used, and (on many machines) it will grow |
|---|
| 88 | if space seems tight. |
|---|
| 89 | |
|---|
| 90 | If this options is given as |
|---|
| 91 | .B -k |
|---|
| 92 | .I nnn/ss |
|---|
| 93 | then ss is the number of CSL pages to be allocated to the Lisp stack. |
|---|
| 94 | The default value (which is 1) should suffice for almost all users, and |
|---|
| 95 | it should be noted that the C stack is separate from and independent of |
|---|
| 96 | this one and it too could overflow. |
|---|
| 97 | |
|---|
| 98 | A suffix K, M or G on the number indicates units of kilobytes, |
|---|
| 99 | megabytes or gigabytes, with megabytes being the default. so |
|---|
| 100 | .B -k200M |
|---|
| 101 | might represent typical usage. |
|---|
| 102 | .TP |
|---|
| 103 | .BI -l " logfile" |
|---|
| 104 | sends a copy of the standard output to |
|---|
| 105 | .I logfile\fR.\fP |
|---|
| 106 | It is very much as if the Lisp function |
|---|
| 107 | .SB (spool logfile) |
|---|
| 108 | had been invoked at the start of the run. |
|---|
| 109 | .TP |
|---|
| 110 | .B -n |
|---|
| 111 | ignore startup function. |
|---|
| 112 | |
|---|
| 113 | Normally when the system is started it will run a |
|---|
| 114 | .I restart function |
|---|
| 115 | as indicated in its heap image. There can be cases where a heap image has |
|---|
| 116 | been created in a bad way such that the saved restart function always fails |
|---|
| 117 | abruptly, and hence working out what was wrong becomes hard. In such cases |
|---|
| 118 | it may be useful to give the |
|---|
| 119 | .B -n |
|---|
| 120 | options that forces CSL to ignore any startup function and merely begin |
|---|
| 121 | in a minimal Lisp-style read-eval-print loop. |
|---|
| 122 | .TP |
|---|
| 123 | .B -o |
|---|
| 124 | see |
|---|
| 125 | .B -i |
|---|
| 126 | .TP |
|---|
| 127 | .B -q |
|---|
| 128 | quiet run: sets |
|---|
| 129 | .SB !*echo |
|---|
| 130 | to |
|---|
| 131 | .SB nil |
|---|
| 132 | and switches off garbage collector messages. |
|---|
| 133 | .TP |
|---|
| 134 | .BI -r " nnn[,mmm]" |
|---|
| 135 | seed random number generator. |
|---|
| 136 | |
|---|
| 137 | The random-number generator in CSL is normally initialised to a value |
|---|
| 138 | based on the time of day and is hence not reproducible from run to run. |
|---|
| 139 | In many cases that behavious is desirable, but for debugging it can be useful |
|---|
| 140 | to force a seed. The directive |
|---|
| 141 | .B -r |
|---|
| 142 | .I nnn[,mmm] |
|---|
| 143 | sets the seed to up to 64 bits taken from the values |
|---|
| 144 | .I nnn |
|---|
| 145 | and |
|---|
| 146 | .I mmm. |
|---|
| 147 | THe second value is optional, and specifying |
|---|
| 148 | .B -r0 |
|---|
| 149 | explicitly asks for the non-reproducible behaviour (I hope). Note that |
|---|
| 150 | the main Reduce-level random number source is coded at a higher level |
|---|
| 151 | and does not get reset this way - this is the lower level CSL |
|---|
| 152 | generator. |
|---|
| 153 | .TP |
|---|
| 154 | .B -s |
|---|
| 155 | sets the Lisp variable |
|---|
| 156 | .SB !*plap |
|---|
| 157 | and hence the compiler generates an assembly listing. |
|---|
| 158 | .TP |
|---|
| 159 | .BI -t " name" |
|---|
| 160 | reports the time-stamp on the named module, and then exits. This is |
|---|
| 161 | for use in perl scripts and the like, and is needed because the stamps |
|---|
| 162 | on modules within an image or library file are not otherwise instantly |
|---|
| 163 | available. |
|---|
| 164 | |
|---|
| 165 | Note that especially on windowed systems it may be necessary to use |
|---|
| 166 | this with |
|---|
| 167 | .BI -- " filename" |
|---|
| 168 | since the information generated here goes to the default output, which |
|---|
| 169 | in some cases is just the screen. |
|---|
| 170 | .TP |
|---|
| 171 | .BI -u " symbol" |
|---|
| 172 | forcibly undefine a Lisp symbol. There are probably very very few |
|---|
| 173 | cases where it is useful since I do not have a large number of |
|---|
| 174 | system-specific predefined names. |
|---|
| 175 | .TP |
|---|
| 176 | .B -v |
|---|
| 177 | An option to make things mildly more verbose. It displays more of a |
|---|
| 178 | banner at startup and switches garbage collection messages on. |
|---|
| 179 | .TP |
|---|
| 180 | .B -w |
|---|
| 181 | force console mode. |
|---|
| 182 | |
|---|
| 183 | On a typical system if the system is launched it creates a new window and uses |
|---|
| 184 | its own windowed intarface in that. If it is run such that at startup the |
|---|
| 185 | standard input or output are associated with a file or pipe, or under X the |
|---|
| 186 | variable |
|---|
| 187 | .SB DISPLAY |
|---|
| 188 | is not set it will try to start up in console |
|---|
| 189 | mode. The flag |
|---|
| 190 | .B -w |
|---|
| 191 | indicates that the system should run in console |
|---|
| 192 | more regadless, while |
|---|
| 193 | .B -w+ |
|---|
| 194 | attempts a window even if that seems doomed to failure. When running |
|---|
| 195 | the system to obey a script it will often make sense to use the |
|---|
| 196 | .B -w |
|---|
| 197 | option. Note that on Windows the system is provided as |
|---|
| 198 | two separate (but almost identical) binaries. For example the file |
|---|
| 199 | .SB csl.exe |
|---|
| 200 | is linked in windows mode. A result is that if launched from the |
|---|
| 201 | command line it detaches from its console, and if launched by |
|---|
| 202 | double-clicking it does not create a console. It is in fact very ugly |
|---|
| 203 | when double clicking on an application causes an unwanted console |
|---|
| 204 | window to appear. In contrast |
|---|
| 205 | .SB csl.com |
|---|
| 206 | is a console mode version of just the same program, so when launched |
|---|
| 207 | from a command line it can communicate with the console in the |
|---|
| 208 | ordinary expected manner. |
|---|
| 209 | .TP |
|---|
| 210 | .B -z |
|---|
| 211 | start without image. |
|---|
| 212 | |
|---|
| 213 | When bootstrapping it is necessary to start up the system for one initial time |
|---|
| 214 | without the benefit of any image file at all. This option makes |
|---|
| 215 | this happen, so when it is specified the system starts up with a minimal |
|---|
| 216 | environment and only those capabilities that are present in the CSL |
|---|
| 217 | kernel. It will normally make sense to start loading some basic Lisp |
|---|
| 218 | definitions rather rapidly. The files |
|---|
| 219 | .SB compat.lsp |
|---|
| 220 | , |
|---|
| 221 | .SB extras.lsp |
|---|
| 222 | and |
|---|
| 223 | .SB compiler.lsp |
|---|
| 224 | have Lisp source for the main things I use, and once they are loaded |
|---|
| 225 | the Lisp compiler can be used to compile itself. |
|---|
| 226 | .TP |
|---|
| 227 | .B --help |
|---|
| 228 | It is probably obvious what this option does! But in particular it |
|---|
| 229 | displays an explanation of the |
|---|
| 230 | .B --dump-source |
|---|
| 231 | option, and hence should count as a prominent and easy-to-find way of |
|---|
| 232 | alerting people to their rights and obligations. Note that on Windows |
|---|
| 233 | of the application was linked as a windows binary it carefully creates |
|---|
| 234 | a console to display the help text in, and organizes a delay to give |
|---|
| 235 | people a chance to read it. |
|---|
| 236 | .TP |
|---|
| 237 | .BI -- " filename" |
|---|
| 238 | If the application is run in console mode then its standard output could |
|---|
| 239 | be redirected to a file using shell facilities. But the |
|---|
| 240 | .B -- |
|---|
| 241 | directive (followed by a file name) redirects output within the Lisp |
|---|
| 242 | rather than outside it. If this is done a very limited capability for |
|---|
| 243 | sending progress or status reports to stderr (or the title-bar when |
|---|
| 244 | running in windowed mode) remains via the |
|---|
| 245 | .SB report!-right |
|---|
| 246 | function. |
|---|
| 247 | |
|---|
| 248 | The |
|---|
| 249 | .B -w |
|---|
| 250 | option may frequently make sense in such cases, but if that |
|---|
| 251 | is not used and the system tries to run in a window it will create it |
|---|
| 252 | starting off minimised. |
|---|
| 253 | . |
|---|