It fails in sbcl 1.3.18 and works properly in clisp 2.49.
Does this mean you expect it to fail in sbcl? Why?
18:13:57 ~ 501 > sbcl
This is SBCL 1.3.18, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (setf lparen '#\( )
; in: SETF LPAREN
; (SETF LPAREN '#\()
; ==>
; (SETQ LPAREN '#\()
;
; caught WARNING:
; undefined variable: LPAREN
;
; compilation unit finished
; Undefined variable:
; LPAREN
; caught 1 WARNING condition
#\(
* (quit)
18:14:05 ~ 502 > clisp
i i i i i i i ooooo o ooooooo ooooo ooooo
I I I I I I I 8 8 8 8 8 o 8 8
I \ `+' / I 8 8 8 8 8 8
\ `-+-' / 8 8 8 ooooo 8oooo
`-__|__-' 8 8 8 8 8
| 8 o 8 8 o 8 8
------+------ ooooo 8oooooo ooo8ooo ooooo 8
Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2000
Copyright (c) Sam Steingold, Bruno Haible 2001-2010
On Sun, Mar 4, 2018 at 5:48 PM, Stas Boukarev <email address hidden> wrote:
> Works as expected in SBCL.
>
> ** Changed in: sbcl
> Status: New => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1753341
>
> Title:
> (setf lparen '#\( ) fails
>
> Status in SBCL:
> Invalid
>
> Bug description:
> Type
>
> (setf lparen '#\( )
>
> in the repl. In clisp, this behaves as I expect it to. In sbcl, it
> fails.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sbcl/+bug/1753341/+subscriptions
>
In SBCL, you get some warnings, because what you're doing is assigning
to a variable with no binding. This is (strictly speaking) undefined
behaviour; SBCL does in fact set the SYMBOL-VALUE of LPAREN to what you
ask it to (so it doesn't "fail") but it also tells you that you
shouldn't do that.
To define a global variable, use DEFPARAMETER (and conventionally,
*earmuff* your variable).
I'm new at this -- and probably shouldn't have filed a bug report. I'll be
more careful.
Murray
On Mon, Mar 5, 2018 at 3:41 AM, Christophe Rhodes <
<email address hidden>> wrote:
> murray wolinsky <email address hidden> writes:
>
> > I don't understand. This is what I get:
>
> In SBCL, you get some warnings, because what you're doing is assigning
> to a variable with no binding. This is (strictly speaking) undefined
> behaviour; SBCL does in fact set the SYMBOL-VALUE of LPAREN to what you
> ask it to (so it doesn't "fail") but it also tells you that you
> shouldn't do that.
>
> To define a global variable, use DEFPARAMETER (and conventionally,
> *earmuff* your variable).
>
> Christophe
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1753341
>
> Title:
> (setf lparen '#\( ) fails
>
> Status in SBCL:
> Invalid
>
> Bug description:
> Type
>
> (setf lparen '#\( )
>
> in the repl. In clisp, this behaves as I expect it to. In sbcl, it
> fails.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/sbcl/+bug/1753341/+subscriptions
>
Works as expected in SBCL.