GNU bug report logs - #57090
'guix style' pretty-printer always renders integers as base10

Previous Next

Package: guix;

Reported by: Christopher Rodriguez <yewscion <at> gmail.com>

Date: Tue, 9 Aug 2022 20:52:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 57090 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: "(" <paren <at> disroot.org>
Cc: 57090 <at> debbugs.gnu.org, Christopher Rodriguez <yewscion <at> gmail.com>,
 Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: bug#57090: [BUG] Default Notation for chmod in guix style?
Date: Tue, 09 Aug 2022 23:12:20 +0200
Hi,

"(" <paren <at> disroot.org> skribis:

> On Tue Aug 9, 2022 at 9:59 PM BST, Maxime Devos wrote:
>> 'chmod' is not mentioned anywhere in (guix scripts style), so I'd think 
>> it's just an oversight. The authority on the matter would be Ludovic 
>> Courtès <ludo <at> gnu.org>
>
> Is it possible that (guix read-print) stores octal numbers directly as
> Scheme numbers, with no way to distinguish them from decimal numbers,
> which means when they are printed they are just treated as base10? I
> poked around a bit in the module but couldn't find the code for number
> reading.

Indeed, the reader is basically a wrapper around ‘read’.  It preserves
comments and vertical space, but it doesn’t attempt to preserve the
style of numbers (base, etc.), strings (whether \n & co. are escaped or
literal), and so on.  I think that’d be a bit too much honestly.

Now, we could tweak the pretty printer so that it recognizes patterns
where numbers or strings should be printed in a certain way.

Help welcome! :-)

Ludo’.




This bug report was last modified 2 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.