ciel-lang / CIEL

CIEL Is an Extended Lisp. Scripting with batteries included.
http://ciel-lang.org
346 stars 16 forks source link

set *read-default-float-format* to 'double-float #32

Open bo-tato opened 1 year ago

bo-tato commented 1 year ago

I'm too new at lisp to be suggesting such changes, but I was reading common lisp recipes and Edi Weitz suggests setting this in .sbclrc. It seems like a sensible default, maybe it makes sense for ciel to set this by default?

vindarel commented 1 year ago

+ 1 I was hit by single floats already.

Let's not rush and be sure there would not be surprising side-effects, maybe especially in popular third-party libraries. Being a suggestion in CL Recipes gives it a lot of weight though!

thanks

bo-tato commented 1 year ago

sounds good, I've got it set in my .sbclrc and will report if I run into any issue with it

bo-tato commented 1 year ago

well it caused the first issue, I was building ciel again from scratch and got an error when it builds nodgui:

[package nodgui-user].......While evaluating the form starting at line 12, column 0
  of #P"/home/user/quicklisp/local-projects/CIEL/build-image.lisp":

debugger invoked on a TYPE-ERROR @53069491 in thread
#<THREAD tid=4405 "main thread" RUNNING {10013B8113}>:
  The value
    0.0d0
  is not of type
    SINGLE-FLOAT
  when binding SB-C::ITEM

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
bo-tato commented 9 months ago

A fix is merged into nodgui and now CIEL builds and seems to work fine with (setf *read-default-float-format* 'double-float)

vindarel commented 9 months ago

Thanks! I'll try it a bit in my day-to-day and all projects.