diff mbox series

[bug#58261,01/11] gnu: Add fast-float.

Message ID 36cffcc5a0f65b1ed2f8fe34efd31a8d08a56d55.1664725832.git.david.elsing@posteo.net
State Accepted
Headers show
Series Add rdkit. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

David Elsing Oct. 3, 2022, 12:19 a.m. UTC
* gnu/packages/cpp.scm (fast-float): New variable.
---
 gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Liliana Marie Prikler Oct. 4, 2022, 6:57 a.m. UTC | #1
Am Montag, dem 03.10.2022 um 00:19 +0000 schrieb David Elsing:
> * gnu/packages/cpp.scm (fast-float): New variable.
> ---
>  gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index d03e0bc7e1..e597dba40c 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -29,6 +29,7 @@
>  ;;; Copyright © 2022 muradm <mail@muradm.net>
>  ;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
>  ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
> +;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1907,3 +1908,26 @@ (define-public cpp-mustache
>  templated string type for compatibility with any STL-like string
> (std::string,
>  std::wstring, etc).")
>      (license license:boost1.0)))
> +
> +(define-public fast-float
> +  (package
> +    (name "fast-float")
> +    (version "3.5.1")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/fastfloat/fast_float")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +               
> "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g"))))
> +    (build-system cmake-build-system)
> +    (arguments
> +     ;; Tests require downloading a lot of additional data
> +     (list #:tests? #f))
I'm not quite sure how much you mean by "a lot" – it seems to be one
repo [1], but more importantly, you could try to disable the tests that
require external fetches.
> +    (home-page "https://github.com/fastfloat/fast_float")
> +    (synopsis "Fast and exact implementation of the C++ from_chars
> functions")
I'd call this a "Floating point number parser" or if you prefer the
verb form "Parse floating point numbers".
> +    (description "@code{fast_float} is a header-only C++ library
> which provides fast
> +implementations of the from_chars functions for float and double
> types.")
"@code{fast_float} is a header-only C++ library for parsing floating
point numbers from strings."  If you want to mention its speed, add
"Benchmarks show that it is several times faster than strtod."
> +    (license (list license:asl2.0 license:expat)))) ; dual licensed
Weird choice, but okay.

Cheers
David Elsing Oct. 7, 2022, 3:08 p.m. UTC | #2
Liliana Marie Prikler <liliana.prikler@tugraz.at> writes:

> Am Montag, dem 03.10.2022 um 00:19 +0000 schrieb David Elsing:
>> * gnu/packages/cpp.scm (fast-float): New variable.
>> ---
>>  gnu/packages/cpp.scm | 24 ++++++++++++++++++++++++
>>  1 file changed, 24 insertions(+)
>> 
>> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
>> index d03e0bc7e1..e597dba40c 100644
>> --- a/gnu/packages/cpp.scm
>> +++ b/gnu/packages/cpp.scm
>> @@ -29,6 +29,7 @@
>>  ;;; Copyright © 2022 muradm <mail@muradm.net>
>>  ;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
>>  ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
>> +;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -1907,3 +1908,26 @@ (define-public cpp-mustache
>>  templated string type for compatibility with any STL-like string
>> (std::string,
>>  std::wstring, etc).")
>>      (license license:boost1.0)))
>> +
>> +(define-public fast-float
>> +  (package
>> +    (name "fast-float")
>> +    (version "3.5.1")
>> +    (source (origin
>> +              (method git-fetch)
>> +              (uri (git-reference
>> +                    (url "https://github.com/fastfloat/fast_float")
>> +                    (commit (string-append "v" version))))
>> +              (file-name (git-file-name name version))
>> +              (sha256
>> +               (base32
>> +               
>> "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g"))))
>> +    (build-system cmake-build-system)
>> +    (arguments
>> +     ;; Tests require downloading a lot of additional data
>> +     (list #:tests? #f))
> I'm not quite sure how much you mean by "a lot" – it seems to be one
> repo [1], but more importantly, you could try to disable the tests that
> require external fetches.
It's 262 MiB, so not too much. Oh sorry, I didn't notice that it was
just one test, but now I included the test data anyway.
>> +    (home-page "https://github.com/fastfloat/fast_float")
>> +    (synopsis "Fast and exact implementation of the C++ from_chars
>> functions")
> I'd call this a "Floating point number parser" or if you prefer the
> verb form "Parse floating point numbers".
>> +    (description "@code{fast_float} is a header-only C++ library
>> which provides fast
>> +implementations of the from_chars functions for float and double
>> types.")
> "@code{fast_float} is a header-only C++ library for parsing floating
> point numbers from strings."  If you want to mention its speed, add
> "Benchmarks show that it is several times faster than strtod."
Is it better now? I don't think it's necessary to mention speed.
>> +    (license (list license:asl2.0 license:expat)))) ; dual licensed
> Weird choice, but okay.
>
> Cheers
diff mbox series

Patch

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index d03e0bc7e1..e597dba40c 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -29,6 +29,7 @@ 
 ;;; Copyright © 2022 muradm <mail@muradm.net>
 ;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
 ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1907,3 +1908,26 @@  (define-public cpp-mustache
 templated string type for compatibility with any STL-like string (std::string,
 std::wstring, etc).")
     (license license:boost1.0)))
+
+(define-public fast-float
+  (package
+    (name "fast-float")
+    (version "3.5.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/fastfloat/fast_float")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0z3rxxd0pwvw70dbnv63rm67biw829vdqf50y16isxm6g3sbrz8g"))))
+    (build-system cmake-build-system)
+    (arguments
+     ;; Tests require downloading a lot of additional data
+     (list #:tests? #f))
+    (home-page "https://github.com/fastfloat/fast_float")
+    (synopsis "Fast and exact implementation of the C++ from_chars functions")
+    (description "@code{fast_float} is a header-only C++ library which provides fast
+implementations of the from_chars functions for float and double types.")
+    (license (list license:asl2.0 license:expat)))) ; dual licensed