I couldn't find discussion on this elsewhere. Is it required that the bytevector object created by make-bytevector of (scheme bytevector) and the one created by make-bytevector of (scheme base) the same type?
I supposed there would be no reason to make them different. However, there are some procedures that have the same name butdifferent signature, so we can't simply import both (scheme bytevector) and (scheme base) without fiddling names with only/except/rename/prefix.
I'm really sorry to bring back such an old thread, but while working on a (scheme bytevector) implementation for STklos I have found the same problem as Gauche's author. The incompatibilities that I found are (only the first one is really a problem):1. bytevector-copy! -- the signatures are different:(bytevector-copy! source source-start target target-start k) ; R6RS(bytevector-copy! to at from [ start end ]) ; R7RS
3. (Not a big problem, but introduces an inconsistency in design, and requires attention, and perhaps changes to other R7RS procedures to keep the system consistent with itself) Negative byte/octet arguments to make-bytevector, bytevector-fill! etc:
Were these modified in the R6RS errata? I can't connect to r6rs.org for some reason (is the site down?), and can't find the R6RS errata anywhere else -- standards.scheme.org also points to r6rs.org for the errata...
On Sat, Jul 16, 2022 at 3:22 PM Jeronimo Pellegrini <jeronimo....@gmail.com> wrote:I'm really sorry to bring back such an old thread, but while working on a (scheme bytevector) implementation for STklos I have found the same problem as Gauche's author. The incompatibilities that I found are (only the first one is really a problem):1. bytevector-copy! -- the signatures are different:(bytevector-copy! source source-start target target-start k) ; R6RS(bytevector-copy! to at from [ start end ]) ; R7RSThis is indeed a problem, and we have no solutions, only workarounds.
Larceny's approach is, when running in a hybrid REPL ("larceny --r7r6"), to import the R6RS version as `r6rs:bytevector-copy!`. This choice was made because all other destructive copy procedures place the destination before the source. If you impot (rnrs bytevectors) explicitly, you get the unprefixed R6RS version, of course.Fortunately, all other conflicts between R6RS and R7RS-small procedures and macros can be handled under the general R7RS permission for domain extension, signature extension, etc. See Clinger's paper "R7RS Considered Unifier of Previous Standards" at <http://andykeep.com/SchemeWorkshop2015/papers/sfpw1-2015-clinger.pdf> for details.
3. (Not a big problem, but introduces an inconsistency in design, and requires attention, and perhaps changes to other R7RS procedures to keep the system consistent with itself) Negative byte/octet arguments to make-bytevector, bytevector-fill! etc:This is also a domain extension, though not mentioned in Clinger's paper.Were these modified in the R6RS errata? I can't connect to r6rs.org for some reason (is the site down?), and can't find the R6RS errata anywhere else -- standards.scheme.org also points to r6rs.org for the errata...
This is indeed a problem, and we have no solutions, only workarounds.Is it really a problem? I don't think so because we have a library system.
It should be noted that Clinger's paper does not contain a complete survey of all such "conflicts". For example, let-syntax in R6RS splices, while it does not in R7RS.
Moreover, it should be noted that many of these "conflicts" go away in Clinger's paper because the requirement of R6RS that the implementation raises an exception when a procedure is called with arguments outside its specified domain is ignored.
On Sat, Jul 16, 2022 at 3:22 PM Jeronimo Pellegrini <jeronimo....@gmail.com> wrote:3. (Not a big problem, but introduces an inconsistency in design, and requires attention, and perhaps changes to other R7RS procedures to keep the system consistent with itself) Negative byte/octet arguments to make-bytevector, bytevector-fill! etc:This is also a domain extension, though not mentioned in Clinger's paper.
Were these modified in the R6RS errata? I can't connect to r6rs.org for some reason (is the site down?), and can't find the R6RS errata anywhere else -- standards.scheme.org also points to r6rs.org for the errata...