From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fdi5K-0004Jn-52 for guix-patches@gnu.org; Thu, 12 Jul 2018 16:21:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fdi5G-0001Y3-Ug for guix-patches@gnu.org; Thu, 12 Jul 2018 16:21:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49496) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fdi5G-0001Xp-MY for guix-patches@gnu.org; Thu, 12 Jul 2018 16:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fdi5G-00053s-Gh for guix-patches@gnu.org; Thu, 12 Jul 2018 16:21:02 -0400 Subject: [bug#31999] [PATCH 3/7] gnu: Add libbytesize. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20180628213527.23318-2-ambrevar@gmail.com> References: <20180628213527.23318-1-ambrevar@gmail.com> <20180628213527.23318-2-ambrevar@gmail.com> Date: Thu, 12 Jul 2018 22:20:43 +0200 Message-ID: <87lgag6w9w.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Pierre Neidhardt , 31999@debbugs.gnu.org --=-=-= Content-Type: text/plain Pierre Neidhardt writes: > * gnu/package/c.scm (libbytesize): New variable. [...] > + (description > + "The goal of this project is to provide a tiny library that would > +facilitate the common operations with sizes in bytes. Many projects need to > +work with sizes in bytes (be it sizes of storage space, memory...) and all of > +them need to deal with the same issues like: > + > +@itemize > +@item How to get a human-readable string for the given size? > +@item How to store the given size so that no significant information is lost? > +@item If we store the size in bytes, what if the given size gets over the > +MAXUINT64 value? > +@item How to interpret sizes entered by users according to their locale and > +typing conventions? > +@item How to deal with the decimal/binary units (MB vs. MiB) ambiguity? > +@end itemize > + > +Some projects have all the above questions/concerns addressed well, some have > +them addressed partially some simply don't care. However, having (partial) > +solutions implemented in multiple places every time with a different set of > +bugs, differences in behaviour and this or that missing is a waste of time and > +effort. We need a generally usable solution that could be used by every > +project that needs to deal with sizes in bytes. > + > +Since the goal is to provide a solution as much generally usable as possible > +the implementation has to be small, fast and written in a language that can be > +easily interfaced from other languages. The current obvious choice is the C > +language with thin bindings for other languages.") Woah. I wonder if we should shorten this a bit (for once!). It's a lot to digest for the curious user. Can you try to provide a summary? :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAltHuBsACgkQoqBt8qM6 VPp9QAf/dLMMYA5f3AyYia5vVF8g6AUM/hhuVFtFwp9cAlsydtOuc4m8RgRkg0I8 z9Bt43xFcdGmplTBSBCHh5qjBAROVeNnTN3H5qgAzyZTTRPMwgQhjgPyCg2mRWA1 PNKCgdiV8W8dMvDbJjxAZJZQNky4d0CrtRoA5p/4uLRW2vXA9IabQL9crNZ62Llu kYjiKsOUAu265/sxu5LGsM9OUc0xcCmzAyfDRcRw9meZAfraWqNsy1aB6e2jEr56 bIfInJVB2ZkjeM/Nbm6p0IQWR2Y3H0YSBVtGZWiaxksjLJi9oxf26XGHNvNnfczz emFnkm4uQ+fQ/QLkfG6NuT66n85jDg== =ncMS -----END PGP SIGNATURE----- --=-=-=--