dev-serveez
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dev-serveez] serveez binary type and guile-2.0


From: Thien-Thi Nguyen
Subject: Re: [dev-serveez] serveez binary type and guile-2.0
Date: Wed, 29 Feb 2012 23:30:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

() Mike Gran <address@hidden>
() Sat, 13 Aug 2011 13:03:39 -0700 (PDT)

   Really the only remaining Guile-2.x showstopper is the serveez
   binary type.

   For guile-2.0 we could

   1/ have functions that use the binary type use bytevectors
      instead and just not have serveez-binaries when compiled
      with guile-2.0

   2/ reimplement the serveez-bin type to use bytevectors under
      the hood so that a serveez-bin is interchangeable with a
      bytevector

   3/ or, keep the current implementation plus add functions to
      convert binary->bytevector and bytevector->binary

   If the serveez-binary type is kept, one has to decide what to
   do with reference to string encodings.

   4/ for string->binary and binary->string, we should probably
      assume that the binary is a Latin-1 encoded version of the
      string, and throw an error if the string has non-Latin-1
      characters

   5/ this would suggest adding a utf8-binary->string and
      string->utf8-binary function pair as well

I prefer 1/, 2/ or 3/ with ‘s/bytevector/u8vector/g’.  This way,
any Guile that has SRFI 4 support (i.e., 1.4 and up) can benefit.
This is mostly due to ignorance of Guile 2 bytevectors, i suppose.

How does SRFI 4 u8vectors compare against Guile 2 bytevectors?
(I confess to just only recently being able to finally compile
Guile 2.0.5 on my computer.  It took all afternoon!)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]