property lists with numeric indicators

3 messages Options
Embed this post
Permalink
Logan O'Sullivan Bruns

property lists with numeric indicators

Reply Threaded More More options
Print post
Permalink
Hi,

It appears that ABCL has a bug when processing property lists with
numeric indicators above 255. For any indicator or key above 255 it
will return nil even when such a property does exist.

Here is an example:

  CL-USER(1): (setf props nil)
  NIL
  CL-USER(2): (setf (getf props 1) "alpha")
  "alpha"
  CL-USER(3): (getf props 1)
  "alpha"
  CL-USER(4): (setf (getf props 255) "beta")
  "beta"
  CL-USER(5): (getf props 255)
  "beta"
  CL-USER(6): (setf (getf props 256) "gamma")
  "gamma"
  CL-USER(7): (getf props 256)
  NIL

The same test done with CMUCL and ECL returns the property regardless
of numeric indicator size.

The above is with ABCL from today (subversion revision 11963.)

Thanks for the useful program.

  - logan

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel
Stas Boukarev

Re: property lists with numeric indicators

Reply Threaded More More options
Print post
Permalink
On Sat, May 30, 2009 at 5:34 AM, Logan O'Sullivan Bruns
<[hidden email]> wrote:

> Hi,
>
> It appears that ABCL has a bug when processing property lists with
> numeric indicators above 255. For any indicator or key above 255 it
> will return nil even when such a property does exist.
>
> Here is an example:
>
>  CL-USER(1): (setf props nil)
>  NIL
>  CL-USER(2): (setf (getf props 1) "alpha")
>  "alpha"
>  CL-USER(3): (getf props 1)
>  "alpha"
>  CL-USER(4): (setf (getf props 255) "beta")
>  "beta"
>  CL-USER(5): (getf props 255)
>  "beta"
>  CL-USER(6): (setf (getf props 256) "gamma")
>  "gamma"
>  CL-USER(7): (getf props 256)
>  NIL

GETF uses EQ, and integers aren't guaranteed to be EQ, so this behavior is ok.

--
With best regards, Stas.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel
Logan O'Sullivan Bruns

Re: property lists with numeric indicators

Reply Threaded More More options
Print post
Permalink
Yes, my mistake. Thanks to everyone for the quick replies.

  - logan

On Sat, May 30, 2009 at 08:05:08AM +0400, Stas Boukarev wrote:

> On Sat, May 30, 2009 at 5:34 AM, Logan O'Sullivan Bruns
> <[hidden email]> wrote:
> > Hi,
> >
> > It appears that ABCL has a bug when processing property lists with
> > numeric indicators above 255. For any indicator or key above 255 it
> > will return nil even when such a property does exist.
> >
> > Here is an example:
> >
> > ??CL-USER(1): (setf props nil)
> > ??NIL
> > ??CL-USER(2): (setf (getf props 1) "alpha")
> > ??"alpha"
> > ??CL-USER(3): (getf props 1)
> > ??"alpha"
> > ??CL-USER(4): (setf (getf props 255) "beta")
> > ??"beta"
> > ??CL-USER(5): (getf props 255)
> > ??"beta"
> > ??CL-USER(6): (setf (getf props 256) "gamma")
> > ??"gamma"
> > ??CL-USER(7): (getf props 256)
> > ??NIL
>
> GETF uses EQ, and integers aren't guaranteed to be EQ, so this behavior is ok.
>
> --
> With best regards, Stas.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel