Re: Pretty print bytevectors with its content in hex format

2022-10-04 Thread Zhu Zihao
> Right. The Guile printer has no option of that sort yet. Quickly I > would think that this should work: > > (use-modules (oop goops)) > > (define-method (display (bv ) port) > (format port "#vu8(~{#x~x~})" (bytevector->u8-list bv))) > > but I haven't tested it. Thanks for your help! I test

Re: Pretty print bytevectors with its content in hex format

2022-09-30 Thread Developers list for Guile, the GNU extensibility library
On Fri, 30 Sep 2022, Zhu Zihao wrote: > 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 >

Pretty print bytevectors with its content in hex format

2022-09-30 Thread Zhu Zihao
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 optio