|Version 6 (modified by rme, 7 years ago) (diff)|
Frequently Asked Questions about Clozure CL
RANDOM always returns the the same sequence of numbers.
In Clozure CL, the initial random state in a thread is always the same. This sometimes shows up in SLIME when people use something like C-c C-r on a form involving RANDOM and are surprised to see the same result every time.
Stream #<xyz> is private to #<some process>
By default, streams are private to the thread that created them. This restriction eliminates a lot of locking overhead on stream operations, and makes streams faster. When creating streams that will be used by multiple threads, specify :sharing :lock when calling OPEN or MAKE-SOCKET.
See http://ccl.clozure.com/ccl-documentation.html#Additional-Open-Keywords in the manual for more details.
Defining class aliases with (SETF FIND-CLASS) doesn't define a matching type
The spec demands that only the proper name of a class produces a matching type definition.
See http://clozure.com/pipermail/openmcl-devel/2009-May/009313.html for further explanation.
Building the lisp kernel on Snow Leopard doesn't work
In order to build the lisp kernel on Mac OS X 10.6 Snow Leopard, you must install the optional 10.4 support when installing Xcode. If you haven't done this, you'll see errors like "no include path in which to search for mach-o/dyld.h" very early in the build process.
See also ticket:626.
The #$ reader macro doesn't find certain Cocoa constants.
Some of the "constants" that Cocoa uses are not numeric constants at all, but are actually variables that refer to instances of NSString.
For instance, NSTitledWindowMask is an actual numeric constant, so #$NSTitledWindowMask => 1. On the other hand, NSFontAttributeName is a variable which refers to an NSString. In cases like this, use the #& reader macro: #&NSFontAttributeName =>#<NS-MUTABLE-STRING "NSFont" (#x7FFF701D8410)>.
As of Clozure CL 1.4, the #$ reader macro will try to look up a foreign variable if it can't find a constant definition. This makes things like #$NSFontAttributeName work.