Documenting a large and complicated product like Allegro CL is never easy and even conscientious users often have difficulty finding answers to specific questions in the documentation. In this note, we flag some recent support questions which might be of general interest.
This note is for our Lisp, not for our database products like AllegroGraph and AllegroCache.
Answer:(run-shell-command "cmd /c foo.bat" :show-window :hide)
The function run-shell-command looks very complicated because it has lots of options, but doing simple things is often easy. Also many OS commands can be run using the specialized Operating System Interface functions.
Answer:(tpl:do-command :cd "new-dir-path/")
The variable cl:*print-right-margin* controls how many characters are printed on a line. This initial value is nil, which means determine how many will fit and print that many, but the value can be set to any integer.
Our problem is this: streams in ACL are implemented as instances of CLOS classes, and any class can have any initargs we or the user chooses to define. open does some setup and then calls make-instance with the arguments passed to open. There is no way for open to know which argument/value pair is valid or not.
make-instance could check for validity of initargs but this is expensive and doing so would slow down stream creation significantly (and slow it down for every stream created, so all correct code would also run more slowly). In choosing between evils, we have chosen what we believe to the the lesser. (See this section of implementation.htm for details of the implementation of open.)
A socket is just a stream, so you can use cl:open-stream-p to tell whether it is opened or closed. Note that a true value says it is open but cannot be wholly trusted: even in a non-multiprocessing environment an open stream to an outside device can be closed for reasons external to Lisp and in a multiprocessing environment, another process can close a stream between the call to open-stream-p and an attempt to access, so for total safety, you can wrap the write/read in an error handler which will act appropriately if there is a write/read failure.
As with load, -L loads the fasl file if present. It calls load which works as usual, behaving as specified by sys:*load-search-list*, so if you have modified the value of that variable in the image, the behavior will follow the modification.
This was obviously a bug and was fixed by a patch released soon after the report. The date was 1/1/1942 and the locale was Czechoslovakia which had year-round daylight saving time that year. The bug was caused by an unnoticed assumption that it was never daylight saving time on December 31 or January 1. We mention this (now fixed) problem to remind people that however much testing you do, some cases will slip by and be discovered in the field.
|Copyright © 2016 Franz Inc., All Rights Reserved | Privacy Statement||