[Openmcl-devel] *read-default-float-format* in IDE

Arthur Cater arthur.cater at ucd.ie
Fri Jan 27 08:55:31 PST 2012


Some time ago I was asking how to set the default package for the listener.
Getting no answer I developed this - admirably elegant ;) - workaround, in my
ccl-init: perhaps adapting it will do the job for you.

  (defun goblin::set-listener-package (package &optional complain)
    (let ((process (find "Listener" (ccl::all-processes) :key #'process-name :test #'equal)))
      (if process
        (prog1 t
          (gui::eval-in-listener-process process (format nil "(in-package ~s)" package)))
        (when complain (format t "~&Could not find Listener process~%")))))
  (process-run-function 'set-listener-package
    #'(lambda nil (do (it) (it t)
                    (unless (setf it (goblin::set-listener-package :goblin nil)) (sleep 0.1)))))

On 27 Jan 2012, at 15:57, Raffael Cavallaro wrote:

> No matter what I do, I can't seem to save a 64-bit Cocoa IDE application where *read-default-float-format* is anything other than single-float. Ideally, I like to set it to ns:cg-float so that both 32 and 64 bit cocoa lisps read the proper format (as you know, CGFloat is 32 bits on 32-bit systems and 64 bits on 64-bit systems)
> 
> Even something as simple as this in a 64-bit cocoa IDE fails:
> 
> Welcome to Clozure Common Lisp Version 1.8-dev-r15184M-trunk  (DarwinX8664)!
> ? *read-default-float-format*
> SINGLE-FLOAT
> ? (type-of 2.0)
> SINGLE-FLOAT
> ? (setf *read-default-float-format* 'ns:cg-float)
> NS:CG-FLOAT
> ? *read-default-float-format*
> NS:CG-FLOAT
> ? (type-of 2.0)
> DOUBLE-FLOAT
> ? ;; so far so good...
> (require 'build-application)
> ;Compiler warnings for "/Users/raffaelc/ccl/cocoa-ide/builder-utilities.lisp" :
> ;   In MAKE-DOCTYPE-DICT: Unused lexical variable EXPORTABLE-AS
> ;Compiler warnings for "/Users/raffaelc/ccl/cocoa-ide/builder-utilities.lisp" :
> ;   In MAKE-DOCTYPE-DICT: Unused lexical variable BUNDLEP
> ;Compiler warnings for "/Users/raffaelc/ccl/cocoa-ide/builder-utilities.lisp" :
> ;   In MAKE-DOCTYPE-DICT: Unused lexical variable ICON-FILE
> BUILD-APPLICATION
> ("BUILDER-UTILITIES" "BUILD-APPLICATION")
> ? (ccl::build-application
>   :directory "/Users/raffaelc/ccl/"
>   :name "Clozure CL64 test")
> 
> 
> 
> But launching Clozure CL64 test yields:
> 
> Welcome to Clozure Common Lisp Version 1.8-dev-r15184M-trunk  (DarwinX8664)!
> ? *read-default-float-format*
> SINGLE-FLOAT
> 
> Wrapping the ccl:build-application form in the appropriate let doesn't work either. Neither does setting *read-default-float-format* in my ide init file (which I can verify is otherwise being loaded).
> 
> What am I missing?
> 
> 
> Raffael Cavallaro
> raffaelcavallaro at me.com
> 
> 
> 
> 
> 
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list