bytestring isn't a datatype, right?
Shiro Kawai
(07 Oct 2020 10:01 UTC)
|
Re: bytestring isn't a datatype, right?
John Cowan
(07 Oct 2020 15:15 UTC)
|
Re: bytestring isn't a datatype, right?
Marc Nieper-Wißkirchen
(07 Oct 2020 16:15 UTC)
|
Re: bytestring isn't a datatype, right?
Wolfgang Corcoran-Mathe
(07 Oct 2020 16:47 UTC)
|
Re: bytestring isn't a datatype, right?
Wolfgang Corcoran-Mathe
(07 Oct 2020 18:21 UTC)
|
Re: bytestring isn't a datatype, right?
Shiro Kawai
(07 Oct 2020 21:06 UTC)
|
Re: bytestring isn't a datatype, right?
Lassi Kortela
(08 Oct 2020 13:07 UTC)
|
Re: bytestring isn't a datatype, right?
Shiro Kawai
(08 Oct 2020 13:13 UTC)
|
Re: bytestring isn't a datatype, right? Marc Nieper-Wißkirchen (08 Oct 2020 13:24 UTC)
|
Re: bytestring isn't a datatype, right?
John Cowan
(10 Oct 2020 07:42 UTC)
|
Re: bytestring isn't a datatype, right?
Shiro Kawai
(10 Oct 2020 09:38 UTC)
|
Re: bytestring isn't a datatype, right?
Wolfgang Corcoran-Mathe
(10 Oct 2020 15:04 UTC)
|
Re: bytestring isn't a datatype, right?
John Cowan
(10 Oct 2020 20:40 UTC)
|
Re: bytestring isn't a datatype, right?
Wolfgang Corcoran-Mathe
(10 Oct 2020 23:08 UTC)
|
Re: bytestring isn't a datatype, right?
John Cowan
(11 Oct 2020 03:20 UTC)
|
Re: bytestring isn't a datatype, right?
Marc Nieper-Wißkirchen
(11 Oct 2020 08:26 UTC)
|
Re: bytestring isn't a datatype, right?
Daphne Preston-Kendal
(11 Oct 2020 08:39 UTC)
|
Re: bytestring isn't a datatype, right?
John Cowan
(11 Oct 2020 08:42 UTC)
|
Re: bytestring isn't a datatype, right?
Marc Nieper-Wißkirchen
(11 Oct 2020 09:10 UTC)
|
Optional features in SRFIs again, this time with syntax
Lassi Kortela
(11 Oct 2020 11:38 UTC)
|
Re: Optional features in SRFIs again, this time with syntax
John Cowan
(11 Oct 2020 13:01 UTC)
|
Re: bytestring isn't a datatype, right?
Wolfgang Corcoran-Mathe
(11 Oct 2020 18:22 UTC)
|
Re: bytestring isn't a datatype, right?
Marc Nieper-Wißkirchen
(11 Oct 2020 18:31 UTC)
|
Re: bytestring isn't a datatype, right?
Marc Nieper-Wißkirchen
(11 Oct 2020 17:20 UTC)
|
Re: bytestring isn't a datatype, right?
John Cowan
(14 Oct 2020 15:20 UTC)
|
Comparing two vectors
Lassi Kortela
(08 Oct 2020 13:13 UTC)
|
Re: Comparing two vectors
John Cowan
(08 Oct 2020 15:01 UTC)
|
Re: Comparing two vectors
Lassi Kortela
(08 Oct 2020 20:42 UTC)
|
Am Do., 8. Okt. 2020 um 15:13 Uhr schrieb Shiro Kawai <xxxxxx@gmail.com>: > On Thu, Oct 8, 2020 at 3:07 AM Lassi Kortela <xxxxxx@lassi.io> wrote: >> >> >> (bytestring<? bytevector1 bytevector2) could just as well be named >> `bytevector<?` unless I misunderstood something. > > > I feel it natural that bytevector<? behaves as (<? (make-default-comparator) bvec1 bvec2) --- that is, the default comparison order. > It differs from the proposed bytestring<? ordering. What is the actual use case for lexicographic comparison of vectors code points? If we have to deal with different encodings, the best (typesafe) way would be to define an actual new datatype called "bytestring", which bundles a bytevector together with an opaque (?) encoding marker. We can then have type-safe procedures (bytestring->string bs) and (string->bytestring encoding str) Comparison (bytestring<? a b) would then be equivalent to (string<? (bytestring->string a) (bytestring->string b)). A procedure read-bytestring will try to use the native encoding of the textual port. A procedure write-bytestring will signal an error if the port's encoding is not the same as the one of the bytestring.