#50 Lispworks #= reader workaround in FILEIO.LISP

closed-wont-fix
cllib (10)
5
2008-07-07
2007-06-21
No

Lispworks has a bug in the #=/#n# reader macro. (I've submitted a bug report).
I've altered the function FILE-HEADER-ALIST with conditionals to workaround this.

Discussion

  • Sam Steingold

    Sam Steingold - 2007-06-21

    Logged In: YES
    user_id=5735
    Originator: NO

    I am reluctant to accommodate such a blatant bug.
    do they have a response?
    what lw version is broken?

     
  • Aneil Mallavarapu

    Logged In: YES
    user_id=870521
    Originator: YES

    Here is Lispworks' response:
    "We think this use of #n# inside #. is incorrect, though the Common Lisp
    standard doesn't make it clear. The problem is that you cannot generally
    carry the context of the current read operation into the form to be evaluated,
    e.g. consider these cases

    #1=#.(#1#)
    `#.(car ',x)
    `#.(load-time-value ',x)

    To avoid these problems, the LispWorks implementation of #. reads the object
    with a non-recursive read so the #n# context from the surrounding forms is not
    used.

    I suggest just using (length #1#) instead, because the compiler will optimize
    this to the length of the constant string anyway.

    There are also a couple of issues with the buf string that you might like to
    consider:

    - It is not thread-safe, because there is only one string.

    - The string is a literal object in the code because it is made at read time,
    so the code is not compliant with the Common Lisp rules for modifying
    literal objects."

    File Added: fileio.lisp

     
  • Aneil Mallavarapu

    Modified file-header-alist: #.(length #1#) => (length #1#)

     
  • Sam Steingold

    Sam Steingold - 2008-06-22

    Logged In: YES
    user_id=5735
    Originator: NO

    any response from comp.lang.lisp?

     
  • Sam Steingold

    Sam Steingold - 2008-06-22
    • status: open --> pending-wont-fix
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-wont-fix --> closed-wont-fix
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks