From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Newsgroups: gmane.lisp.guile.user Subject: Re: bytevector-string-ref Date: Sun, 18 Dec 2022 14:19:39 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FNz4z8F+mspiUmBa" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20371"; mail-complaints-to="usenet@ciao.gmane.io" To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Sun Dec 18 14:20:34 2022 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p6taj-00051S-Md for guile-user@m.gmane-mx.org; Sun, 18 Dec 2022 14:20:33 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6ta5-0006kl-Ab; Sun, 18 Dec 2022 08:19:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6tZw-0006jT-3f for guile-user@gnu.org; Sun, 18 Dec 2022 08:19:49 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6tZt-0001yE-Sl for guile-user@gnu.org; Sun, 18 Dec 2022 08:19:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=From:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=yhww3s2lx2dg0XjXTS3tkFN5N/HFTitpZxeaiUZstYQ=; b=RfKwSYgR2h9WnZYYqBeAGkWU7B iPEIbCDKj+MehpOZsZ9qoxmYscIeVfYBWjDJzvguiwcqUv3gq9G2m8IrqrBjZzOsa9WH4Fh7NkRF8 a7YKI6GU0QgArChQxuj3DCfIb5tXhx9+7wsW3zevcP5sGCtuGNDRgUnkLRLMeHtPTlQvct4YnRtn3 NzJm0bo+unKhsmf1LrJ5s9QxlGqneledwW1R771MQ/aebZ6i87/dMqDMBLESlYPctrhp40dvcr30j 9fT92lMmNd79Y6bD/DQnQL1r3aGJZKxY6JuZSb1MyNfqV+JBF2r66PqEKHBR6I854N7ywmp/u3esa 5AN/5mjw==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.94.2) (envelope-from ) id 1p6tZr-00072x-F8 for guile-user@gnu.org; Sun, 18 Dec 2022 14:19:39 +0100 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:18781 Archived-At: --FNz4z8F+mspiUmBa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 18, 2022 at 01:12:57PM +0100, Sascha Ziemann wrote: > I am wondering if something like bytevector-string-ref is missing in the = API. > Or is there any other way to extract a string from a byte vector, without > copying the data twice? Alas, it's more complicated than this. There's a whole colourful world of encodings in between :-) I think "6.6.5.13 Representing Strings as Bytes" in the Guile manual is the relevant part, here on the Intrawebs. Cheers [1] https://www.gnu.org/software/guile/manual/html_node/Representing-String= s-as-Bytes.html --=20 t --FNz4z8F+mspiUmBa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRp53liolZD6iXhAoIFyCz1etHaRgUCY58TYwAKCRAFyCz1etHa RvmhAJ4lbTbFeIKBL/2k8NL/iw4AfdsFvACdE2VvLnRbnTzthLY4VhnrjlzDHKA= =6sN/ -----END PGP SIGNATURE----- --FNz4z8F+mspiUmBa--