[Larceny-users] Random data stored by bytevector-set! if the value to store is any non-fixnum

Felix S Klock II (Larceny-users list proxy) felixluser at pnkfx.org
Mon Jul 16 08:14:47 EDT 2012


Lars (cc'ing larceny-users)-

I will copy your message into a comment on the ticket.

----

If you would like to do updates yourself to the trac data in the
future, according to the CCS trac website:

  https://trac.ccs.neu.edu/pr/

you can register for a trac account by following this link:

  https://trac.ccs.neu.edu/pr/user/register

(I don't remember what the next steps are from there to give you
credentials e.g. for making comments, creating tickets, etc.  But an
account seems like the right first step.)

Cheers,
-Felix

On Sun, Jul 15, 2012 at 3:46 PM, Lars T Hansen <lth at acm.org> wrote:
> The following is probably related in some way to
> https://trac.ccs.neu.edu/trac/larceny/ticket/342, but I don't know
> that I have credentials to log in and comment directly.
>
> Larceny 0.97 on Windows, running under Cygwin:
>
> $ larceny.bin
> Larceny v0.97 "Funny in the Head" (Aug 19 2009 14:35:39, precise:Win32:unified)
>
>> (define x (make-bytevector 1))
>
>> (bytevector-set! x 0 #i0)
> #vu8(141)
>
>> (bytevector-set! x 0 #i0)
> #vu8(93)
>
> This appears to happen for other inexact values than #i0 as well, and
> for fractions such as 3/2, and indeed for any non-fixnum I've tried.
> Fixnums are truncated.
>
> Almost any behavior would be more useful than storing random data
> here.  The context in which I ran into this problem would have liked
> for the improved behavior to be an error message, and judging from the
> behavior of eg fx+ on inexacts I suspect that is probably most in
> keeping with the language as a whole, but that's just a suggestion.
>
> --lars
>
> _______________________________________________
> Larceny-users mailing list
> Larceny-users at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/larceny-users



More information about the Larceny-users mailing list