GNU bug report logs -
#18224
Shared arrays are incompatible with bytevector accessors
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 18224 in the body.
You can then email your comments to 18224 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guile <at> gnu.org
:
bug#18224
; Package
guile
.
(Fri, 08 Aug 2014 14:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Panicz Maciej Godek <godek.maciek <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-guile <at> gnu.org
.
(Fri, 08 Aug 2014 14:49:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Creating a shared array based on a bytevector results with an object
whose print representation is identical with a print-representation of
a bytevector:
(define bv #vu8(0 1 2 3))
(define bv/shared
(make-shared-array bv (lambda(i)(list (+ i 2))) '(0 1)))
bv/shared
====> #vu8(2 3)
However, accessing these "shared bytevectors" using the bytevector api
is impossible:
(bytevector-u8-ref bv/shared 0)
====> error: wrong type argument in position 1 (expecting bytevector): #vu8(2 3)
Since the print-representation is identical, this behaviour is
unexpected. Furthermore, the lack of capability of creating shared
bytevectors limits their usefullness. On the other hand, if the shared
bytevector remains contiguous, there should be no performance
concerns.
Reply sent
to
Daniel Llorens <daniel.llorens <at> bluewin.ch>
:
You have taken responsibility.
(Fri, 30 Oct 2015 16:16:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Panicz Maciej Godek <godek.maciek <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 30 Oct 2015 16:16:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 18224-done <at> debbugs.gnu.org (full text, mbox):
http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=eb3d623da57e6d31a58d95f932345fb761f9b701 on master fixes printing of scm_tc7_array (shared array) to be #1(...) or #1typetag(...) so they aren't confused with actual vectors or bytevectors.
With respect to the lack of capability to create shared bytevectors, use the array procedures instead. If you need the arrays to be contiguous, you can check this at run time.
The fundamental distinction between shared arrays on one side and bytevectors/vectors/bitvectors on the other side is not of contiguity, rank, element type, etc. but that the latter types are containers, while the shared arrays are just views. That is why I don't think indirection fields should be added to the bytevectors, this would complicate the lookup functions and overlap in functionality with arrays.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 28 Nov 2015 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 200 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.