[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using the GNU GMP Library for Bignums in Emacs
From: |
Richard Stallman |
Subject: |
Re: Using the GNU GMP Library for Bignums in Emacs |
Date: |
Fri, 04 May 2018 00:22:51 -0400 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> We already have such a feature. For example, (format "%09x" 257) returns
> "000000101", which is 257 hexadecimal, expressed using leading zeros as
needed
> so that at least 9 digits are used. Once Emacs supports bignums, the same
> feature can print 40-hex-digit SHA-1 checksums by using (format "%040x" n).
Perhaps this way everything would work with all-positive hex numbers.
However, I think we also want a feature to signal an error if the
number doesn't fall in the range that the %x construct can represent.
If the Git hash code is 40 hex digits, any attempt to use as a Git hash code
a number that won't fit in 40 hex digits implies that there has already been
an error.
I suggest %!040x for this. The ! would mean, "Signal an error if the number
doesn't fit in the specified number of digits." It could be implemented
for all %-specs, but if that is a pain in the neck, it could be implemented
only for %x.
--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Skype: No way! See https://stallman.org/skype.html.
- Re: Using the GNU GMP Library for Bignums in Emacs, (continued)
- Re: Using the GNU GMP Library for Bignums in Emacs, Paul Eggert, 2018/05/03
- Re: Using the GNU GMP Library for Bignums in Emacs, Richard Stallman, 2018/05/04
- Re: Using the GNU GMP Library for Bignums in Emacs, Ken Raeburn, 2018/05/05
- Re: Using the GNU GMP Library for Bignums in Emacs, Richard Stallman, 2018/05/05
- Re: Using the GNU GMP Library for Bignums in Emacs, Ken Raeburn, 2018/05/07
- Re: Using the GNU GMP Library for Bignums in Emacs, Richard Stallman, 2018/05/07
- Re: Using the GNU GMP Library for Bignums in Emacs, Andreas Schwab, 2018/05/07
- Re: Using the GNU GMP Library for Bignums in Emacs, Helmut Eller, 2018/05/03
- Message not available
- Re: Using the GNU GMP Library for Bignums in Emacs, Helmut Eller, 2018/05/03
- Re: Using the GNU GMP Library for Bignums in Emacs, Paul Eggert, 2018/05/03
- Re: Using the GNU GMP Library for Bignums in Emacs,
Richard Stallman <=