#655 find-symbol in LINUX is wrong.

closed-invalid
Bruno Haible
clisp (525)
5
2013-01-17
2013-01-17
No

C/Break 1 USER[8]> (find-symbol "SIN" "LINUX")
LINUX:sin ;
:EXTERNAL
C/Break 1 USER[8]> (find-symbol "sin" "LINUX")
NIL ;
NIL

The consequence is that:

C/USER[15]> (defpackage :example (:use :cl :linux))

*** - (use-package (#<package linux> #<package common-lisp>) #<package example>): 27 name conflicts remain
Which symbol with name "SIN" should be accessible in #<package example>?
The following restarts are available:
COMMON-LISP :R1 #<package common-lisp>
LINUX :R2 #<package linux>
ABORT :R3 Abort main loop
C/Break 1 USER[16]> :q
C/USER[17]>

Discussion

  • Bruno Haible
    Bruno Haible
    2013-01-17

    Package LINUX is case-sensitive and case-inverted:

    $ clisp -K full
    [1]> (setq p (find-package "LINUX"))
    #<PACKAGE LINUX>
    [2]> (package-case-sensitive-p p)
    T
    [3]> (package-case-inverted-p p)
    T

    Please read about these concepts in http://www.clisp.org/impnotes.html section 11.5 "Package Case-Sensitivity"
    http://www.clisp.org/impnotes.html#package-case

    There is no ANSI compliance issue because case-sensitive packages, and in particular the LINUX package, are outside the scope of ANSI CL.

    The name conflicts between the COMMON-LISP package and the LINUX package are real: the two SIN functions behave differently.
    [9]> (cl:sin 1000000000.0d0)
    0.5458434494091139d0
    [10]> (linux:sin 1000000000.0d0)
    0.5458434494486996d0

     
  • Bruno Haible
    Bruno Haible
    2013-01-17

    • status: open --> closed
     
  • Bruno Haible
    Bruno Haible
    2013-01-17

    • status: closed --> closed-invalid