GNU bug report logs - #18866
bytevector-copy creates srfi-4 vector with greater length

Previous Next

Package: guile;

Reported by: tantalum <sph <at> posteo.eu>

Date: Tue, 28 Oct 2014 07:15:07 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18866 in the body.
You can then email your comments to 18866 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#18866; Package guile. (Tue, 28 Oct 2014 07:15:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to tantalum <sph <at> posteo.eu>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Tue, 28 Oct 2014 07:15:08 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: tantalum <sph <at> posteo.eu>
To: bug-guile <at> gnu.org
Subject: bytevector-copy creates srfi-4 vector with greater length
Date: Mon, 27 Oct 2014 19:28:49 +0100
with guile version 2.1.0.89-c5ea7 on an x86_64 GNU/Linux system
and the following code
  (use-modules (srfi srfi-4) (rnrs bytevectors))
  (define a (make-f32vector 2 0))
  (define b (bytevector-copy a))
  (write (list a b))

"b" turns out to be an f32vector with length 8, 4 times the length of "a".
i expected the result to have the same length as the argument

see also http://lists.gnu.org/archive/html/guile-devel/2014-10/msg00064.html




Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Wed, 12 Nov 2014 06:06:01 GMT) Full text and rfc822 format available.

Notification sent to tantalum <sph <at> posteo.eu>:
bug acknowledged by developer. (Wed, 12 Nov 2014 06:06:02 GMT) Full text and rfc822 format available.

Message #10 received at 18866-done <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: tantalum <sph <at> posteo.eu>
Cc: 18866-done <at> debbugs.gnu.org
Subject: Re: bug#18866: bytevector-copy creates srfi-4 vector with greater
 length
Date: Wed, 12 Nov 2014 01:04:37 -0500
tantalum <sph <at> posteo.eu> writes:

> with guile version 2.1.0.89-c5ea7 on an x86_64 GNU/Linux system
> and the following code
>   (use-modules (srfi srfi-4) (rnrs bytevectors))
>   (define a (make-f32vector 2 0))
>   (define b (bytevector-copy a))
>   (write (list a b))
>
> "b" turns out to be an f32vector with length 8, 4 times the length of "a".
> i expected the result to have the same length as the argument
>
> see also http://lists.gnu.org/archive/html/guile-devel/2014-10/msg00064.html

I fixed this in 10679f4c59fcffb0657219e28e38d15df8ad09a0 by changing
'bytevector-copy' to always produce a standard bytevector with unsigned
8-bit elements, as if 'bytevector-copy' was implemented using the
standard procedures 'make-bytevector', 'bytevector-length', etc.
This is on the stable-2.0 branch and will be in Guile 2.0.12.

I'm open to the idea of adding another procedure that copies arbitrary
SRFI-4 vectors, but I think it should have a different name.  If you'd
like to persue this, let's create another ticket for it.

I'm closing this bug now.

      Thanks,
        Mark




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 10 Dec 2014 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 134 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.