NIL is undefined?
Posted: Tue Dec 08, 2009 1:25 am
hi @ll,
being still a bloody noob, i'm experimenting, trying this and that, just in order to get a feeling for the language. i use every means i can find on the web, but today i've been running into a trap of which no escape seems available. consider this simple script:
it compiles well, but when i try running it, via 'sbcl --script', the debugger keeps on telling me that the function NIL is undefined. apparently the error gets thrown from within the if condition, but from where ever: nil is certainly not undefined. can anyone please shed some light on this?
being still a bloody noob, i'm experimenting, trying this and that, just in order to get a feeling for the language. i use every means i can find on the web, but today i've been running into a trap of which no escape seems available. consider this simple script:
Code: Select all
(push "/root/clbuild/systems/" asdf:*central-registry*)
(asdf:operate 'asdf:load-op :bordeaux-threads)
(defun in-thread (a)
(let ((b 0)
(lock (bordeaux-threads:make-lock)))
(loop while (= 1 1) do
(setq b (+ b 1))
(setq a (+ a 1))
(bordeaux-threads:acquire-lock lock t)
(print a)
(bordeaux-threads:release-lock lock)
(if (= b 10) (return 0))
)))
(bordeaux-threads:make-thread (in-thread 0) :name 't-1)
(bordeaux-threads:make-thread (in-thread 10) :name 't-2)
(bordeaux-threads:make-thread (in-thread 100) :name 't-3)