From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Zhu Zihao Newsgroups: gmane.lisp.guile.devel Subject: Pretty print bytevectors with its content in hex format Date: Fri, 30 Sep 2022 16:41:56 +0800 Message-ID: <86czbdp7xa.fsf@163.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13934"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.8.9; emacs 29.0.50 To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Sep 30 11:04:38 2022 Return-path: Envelope-to: guile-devel@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 1oeBwk-0003R0-4p for guile-devel@m.gmane-mx.org; Fri, 30 Sep 2022 11:04:38 +0200 Original-Received: from localhost ([::1]:52410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeBwj-0007Cp-6R for guile-devel@m.gmane-mx.org; Fri, 30 Sep 2022 05:04:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oeBtS-0004Lh-3Q for guile-devel@gnu.org; Fri, 30 Sep 2022 05:01:15 -0400 Original-Received: from mail-m973.mail.163.com ([123.126.97.3]:24845) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oeBtL-0002RA-Nc for guile-devel@gnu.org; Fri, 30 Sep 2022 05:01:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=neHii mJVwr9Ru3o3q1u5h39aDo7YCpveQBeiktKJUu4=; b=PvdvMQOmMbyn5AZouYgOV SLIiCh4EyyyzYLVWwOEJb/Ah831qI6rWYCou+Pfg3bTafP17CZHCyHkQ31B7+yFa Alxy/It3XxvGk0obGLVdi08l91ztvJJ6MJCZONsfY5tgvmok0okpyK1kHgmhNBf4 b/WwPmcDC+jVtNf9/QHAE0= Original-Received: from asus-laptop (unknown [163.125.249.136]) by smtp3 (Coremail) with SMTP id G9xpCgDHY5W6rDZjZEMzhg--.480S2; Fri, 30 Sep 2022 16:45:47 +0800 (CST) X-CM-TRANSID: G9xpCgDHY5W6rDZjZEMzhg--.480S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUbNVkUUUUU X-Originating-IP: [163.125.249.136] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/xtbBPRuMr2AZCiY+CwAAsl Received-SPF: pass client-ip=123.126.97.3; envelope-from=all_but_last@163.com; helo=mail-m973.mail.163.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.io gmane.lisp.guile.devel:21375 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, dear Guile users! I'm using Guile to play around with some binaries. In Guile, the bytevector prints its content in decimal format. Just like: #vu8(255 255 255 255) But, it's always more convenient if its content is printed in hex format like #vu8(#xff #xff #xff #xff) I don't see any option to toggle this, What should I do to custom how bytevector looks? Thanks! =2D-=20 Retrieve my PGP public key: gpg --recv-keys B3EBC086AB0EBC0F45E0B4D433DB374BCEE4D9DC Zihao --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQT4UAIrVkIEZilSHr2K2nJqP6LM8gUCYzasoRUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQitpyaj+izPJLpAD8DWzaD77rJIQE+vAnvk1yxLcjO7P4 krpM2IP8XWnJv28BAPrivJL2gu05ht+UWnx5FOPdBwnU3yIzEQbFVnv0zVsN =2Smc -----END PGP SIGNATURE----- --=-=-=--