* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
@ 2023-05-06 16:04 Liliana Marie Prikler
2023-05-06 13:41 ` [bug#63330] [PATCH 2/4] gnu: Add immer Liliana Marie Prikler
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-06 16:04 UTC (permalink / raw)
To: 63330
Hi Guix,
the following series adds a couple of packages that implement immutable
data structures, functional composition and all that good stuff.
Cheers
Liliana Marie Prikler (4):
gnu: Add c-rrb.
gnu: Add immer.
gnu: Add zug.
gnu: Add lager.
gnu/packages/c.scm | 25 ++++++++++++
gnu/packages/cpp.scm | 90 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 115 insertions(+)
base-commit: 7368020bef3bf5a44100c59a973412f9e254e7c6
--
2.39.2
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 2/4] gnu: Add immer.
2023-05-06 16:04 [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Liliana Marie Prikler
@ 2023-05-06 13:41 ` Liliana Marie Prikler
2023-05-07 15:30 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
2023-05-06 13:43 ` [bug#63330] [PATCH 3/4] gnu: Add zug Liliana Marie Prikler
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-06 13:41 UTC (permalink / raw)
To: 63330
* gnu/packages/cpp.scm (immer): New variable.
---
gnu/packages/cpp.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 023d1c0337..da3567b5ef 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -67,6 +67,7 @@ (define-module (gnu packages cpp)
#:use-module (gnu packages)
#:use-module (gnu packages assembly)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages bdw-gc)
#:use-module (gnu packages boost)
#:use-module (gnu packages build-tools)
#:use-module (gnu packages c)
@@ -1390,6 +1391,38 @@ (define-public libexpected
(home-page "https://tl.tartanllama.xyz/")
(license license:cc0)))
+(define-public immer
+ (package
+ (name "immer")
+ (version "0.8.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arximboldi/immer")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "11km3l5h3rgsbj8yfyzk3fnx9na55l6zs2sxpx922yvlvs2blh27"))
+ (modules '((guix build utils)))
+ (snippet #~(begin
+ (delete-file "tools/include/doctest.h")
+ (delete-file "tools/include/catch.hpp")
+ (substitute* (find-files "test" "\\.[cih]pp")
+ (("<catch.hpp>") "<catch2/catch.hpp>")
+ (("<doctest.h>") "<doctest/doctest.h>"))
+ (substitute* (find-files "test/oss-fuzz" "\\.cpp")
+ ;; someone used the wrong header :)
+ (("<fmt/printf.h>") "<fmt/ostream.h>"))))))
+ (build-system cmake-build-system)
+ (arguments (list #:test-target "check"))
+ (inputs (list boost libgc c-rrb))
+ (native-inputs (list catch2 doctest fmt pkg-config))
+ (home-page "https://sinusoid.es/immer")
+ (synopsis "Immutable data structures")
+ (description "Immer is a library of persistent and immutable data structures
+written in C++.")
+ (license license:boost1.0)))
+
(define-public atomic-queue
(package
(name "atomic-queue")
--
2.39.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-06 13:41 ` [bug#63330] [PATCH 2/4] gnu: Add immer Liliana Marie Prikler
@ 2023-05-07 15:30 ` Maxim Cournoyer
2023-05-07 15:51 ` Liliana Marie Prikler
0 siblings, 1 reply; 15+ messages in thread
From: Maxim Cournoyer @ 2023-05-07 15:30 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 63330
Hi,
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> * gnu/packages/cpp.scm (immer): New variable.
> ---
> gnu/packages/cpp.scm | 33 +++++++++++++++++++++++++++++++++
> 1 file changed, 33 insertions(+)
>
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index 023d1c0337..da3567b5ef 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -67,6 +67,7 @@ (define-module (gnu packages cpp)
> #:use-module (gnu packages)
> #:use-module (gnu packages assembly)
> #:use-module (gnu packages autotools)
> + #:use-module (gnu packages bdw-gc)
> #:use-module (gnu packages boost)
> #:use-module (gnu packages build-tools)
> #:use-module (gnu packages c)
> @@ -1390,6 +1391,38 @@ (define-public libexpected
> (home-page "https://tl.tartanllama.xyz/")
> (license license:cc0)))
>
> +(define-public immer
> + (package
> + (name "immer")
> + (version "0.8.0")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/arximboldi/immer")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "11km3l5h3rgsbj8yfyzk3fnx9na55l6zs2sxpx922yvlvs2blh27"))
> + (modules '((guix build utils)))
> + (snippet #~(begin
> + (delete-file "tools/include/doctest.h")
> + (delete-file "tools/include/catch.hpp")
> + (substitute* (find-files "test" "\\.[cih]pp")
> + (("<catch.hpp>") "<catch2/catch.hpp>")
> + (("<doctest.h>") "<doctest/doctest.h>"))
> + (substitute* (find-files "test/oss-fuzz" "\\.cpp")
> + ;; someone used the wrong header :)
> + (("<fmt/printf.h>") "<fmt/ostream.h>"))))))
Did you report the wrong header usage upstream? A less intrusive fix
for the catch/doctest include problem could be to add their include
subdirectories as -I directives to the CXXFLAGS environment variable, or
since that's CMake, via its CMAKE_CXX_FLAGS make options. See 'clara'
for an actual example.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-07 15:30 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
@ 2023-05-07 15:51 ` Liliana Marie Prikler
2023-05-07 17:12 ` Maxim Cournoyer
0 siblings, 1 reply; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-07 15:51 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 63330
Am Sonntag, dem 07.05.2023 um 11:30 -0400 schrieb Maxim Cournoyer:
> Hi,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > * gnu/packages/cpp.scm (immer): New variable.
> > ---
> > gnu/packages/cpp.scm | 33 +++++++++++++++++++++++++++++++++
> > 1 file changed, 33 insertions(+)
> >
> > diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> > index 023d1c0337..da3567b5ef 100644
> > --- a/gnu/packages/cpp.scm
> > +++ b/gnu/packages/cpp.scm
> > @@ -67,6 +67,7 @@ (define-module (gnu packages cpp)
> > #:use-module (gnu packages)
> > #:use-module (gnu packages assembly)
> > #:use-module (gnu packages autotools)
> > + #:use-module (gnu packages bdw-gc)
> > #:use-module (gnu packages boost)
> > #:use-module (gnu packages build-tools)
> > #:use-module (gnu packages c)
> > @@ -1390,6 +1391,38 @@ (define-public libexpected
> > (home-page "https://tl.tartanllama.xyz/")
> > (license license:cc0)))
> >
> > +(define-public immer
> > + (package
> > + (name "immer")
> > + (version "0.8.0")
> > + (source (origin
> > + (method git-fetch)
> > + (uri (git-reference
> > + (url "https://github.com/arximboldi/immer")
> > + (commit (string-append "v" version))))
> > + (file-name (git-file-name name version))
> > + (sha256
> > + (base32
> > "11km3l5h3rgsbj8yfyzk3fnx9na55l6zs2sxpx922yvlvs2blh27"))
> > + (modules '((guix build utils)))
> > + (snippet #~(begin
> > + (delete-file "tools/include/doctest.h")
> > + (delete-file "tools/include/catch.hpp")
> > + (substitute* (find-files "test"
> > "\\.[cih]pp")
> > + (("<catch.hpp>") "<catch2/catch.hpp>")
> > + (("<doctest.h>")
> > "<doctest/doctest.h>"))
> > + (substitute* (find-files "test/oss-fuzz"
> > "\\.cpp")
> > + ;; someone used the wrong header :)
> > + (("<fmt/printf.h>")
> > "<fmt/ostream.h>"))))))
>
> Did you report the wrong header usage upstream?
I must admit, I did not.
> A less intrusive fix for the catch/doctest include problem could be
> to add their include subdirectories as -I directives to the CXXFLAGS
> environment variable, or since that's CMake, via its CMAKE_CXX_FLAGS
> make options. See 'clara' for an actual example.
There are other packages that take the approach I used here. I do
think this is a CMakeFiles bug, but not one I want to fix.
Cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-07 15:51 ` Liliana Marie Prikler
@ 2023-05-07 17:12 ` Maxim Cournoyer
2023-05-07 19:40 ` Liliana Marie Prikler
0 siblings, 1 reply; 15+ messages in thread
From: Maxim Cournoyer @ 2023-05-07 17:12 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 63330
Hi,
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> Am Sonntag, dem 07.05.2023 um 11:30 -0400 schrieb Maxim Cournoyer:
>> Hi,
>>
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>> > * gnu/packages/cpp.scm (immer): New variable.
>> > ---
>> > gnu/packages/cpp.scm | 33 +++++++++++++++++++++++++++++++++
>> > 1 file changed, 33 insertions(+)
>> >
>> > diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
>> > index 023d1c0337..da3567b5ef 100644
>> > --- a/gnu/packages/cpp.scm
>> > +++ b/gnu/packages/cpp.scm
>> > @@ -67,6 +67,7 @@ (define-module (gnu packages cpp)
>> > #:use-module (gnu packages)
>> > #:use-module (gnu packages assembly)
>> > #:use-module (gnu packages autotools)
>> > + #:use-module (gnu packages bdw-gc)
>> > #:use-module (gnu packages boost)
>> > #:use-module (gnu packages build-tools)
>> > #:use-module (gnu packages c)
>> > @@ -1390,6 +1391,38 @@ (define-public libexpected
>> > (home-page "https://tl.tartanllama.xyz/")
>> > (license license:cc0)))
>> >
>> > +(define-public immer
>> > + (package
>> > + (name "immer")
>> > + (version "0.8.0")
>> > + (source (origin
>> > + (method git-fetch)
>> > + (uri (git-reference
>> > + (url "https://github.com/arximboldi/immer")
>> > + (commit (string-append "v" version))))
>> > + (file-name (git-file-name name version))
>> > + (sha256
>> > + (base32
>> > "11km3l5h3rgsbj8yfyzk3fnx9na55l6zs2sxpx922yvlvs2blh27"))
>> > + (modules '((guix build utils)))
>> > + (snippet #~(begin
>> > + (delete-file "tools/include/doctest.h")
>> > + (delete-file "tools/include/catch.hpp")
>> > + (substitute* (find-files "test"
>> > "\\.[cih]pp")
>> > + (("<catch.hpp>") "<catch2/catch.hpp>")
>> > + (("<doctest.h>")
>> > "<doctest/doctest.h>"))
>> > + (substitute* (find-files "test/oss-fuzz"
>> > "\\.cpp")
>> > + ;; someone used the wrong header :)
>> > + (("<fmt/printf.h>")
>> > "<fmt/ostream.h>"))))))
>>
>> Did you report the wrong header usage upstream?
> I must admit, I did not.
Could you please do so, if that's not too much to ask? Then include a
(see: URL) next to the substitution comment.
>> A less intrusive fix for the catch/doctest include problem could be
>> to add their include subdirectories as -I directives to the CXXFLAGS
>> environment variable, or since that's CMake, via its CMAKE_CXX_FLAGS
>> make options. See 'clara' for an actual example.
> There are other packages that take the approach I used here. I do
> think this is a CMakeFiles bug, but not one I want to fix.
I think catch2 is selfom used from the system (typically bundled), must
not ship with any pkg-config or proper support to be auto-detected at
configure time, which gives us the situation we're in.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-07 17:12 ` Maxim Cournoyer
@ 2023-05-07 19:40 ` Liliana Marie Prikler
0 siblings, 0 replies; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-07 19:40 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 63330
Hi,
Am Sonntag, dem 07.05.2023 um 13:12 -0400 schrieb Maxim Cournoyer:
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > Am Sonntag, dem 07.05.2023 um 11:30 -0400 schrieb Maxim Cournoyer:
> > > Did you report the wrong header usage upstream?
> > I must admit, I did not.
>
> Could you please do so, if that's not too much to ask? Then include
> a (see: URL) next to the substitution comment.
I sent a mail to the address in the README; let's wait for a reply.
> > > A less intrusive fix for the catch/doctest include problem could
> > > be to add their include subdirectories as -I directives to the
> > > CXXFLAGS environment variable, or since that's CMake, via its
> > > CMAKE_CXX_FLAGS make options. See 'clara' for an actual example.
> > There are other packages that take the approach I used here. I do
> > think this is a CMakeFiles bug, but not one I want to fix.
Correction to myself: I now see that we only need to edit those source
files because we remove the bundled ones, but that's an argument
towards keeping that within the snippet imho.
> I think catch2 is selfom used from the system (typically bundled),
> must not ship with any pkg-config or proper support to be auto-
> detected at configure time, which gives us the situation we're in.
Joke's on you, catch2 ships with both CMake's config stuff *and* pkg-
config. Vendoring it is next to pointless (that is, unless you regard
sneaking it onto ancient Debian as the point). Doctest also comes with
the usual CMake blurb.
Cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 3/4] gnu: Add zug.
2023-05-06 16:04 [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Liliana Marie Prikler
2023-05-06 13:41 ` [bug#63330] [PATCH 2/4] gnu: Add immer Liliana Marie Prikler
@ 2023-05-06 13:43 ` Liliana Marie Prikler
2023-05-07 15:25 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
2023-05-06 13:43 ` [bug#63330] [PATCH 4/4] gnu: Add lager Liliana Marie Prikler
2023-05-06 13:51 ` [bug#63330] [PATCH 1/4] gnu: Add c-rrb Liliana Marie Prikler
3 siblings, 1 reply; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-06 13:43 UTC (permalink / raw)
To: 63330
* gnu/packages/cpp.scm (zug): New variable.
---
gnu/packages/cpp.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index da3567b5ef..0ab7d0785b 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -1423,6 +1423,31 @@ (define-public immer
written in C++.")
(license license:boost1.0)))
+(define-public zug
+ (let ((commit "d7e814b45fceceee3cb1442997d8b46cee4764ec")
+ (revision "0"))
+ (package
+ (name "zug")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arximboldi/zug")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ww4prh763n81kzzijak8z495varlvqml4ip7i09klqnw6ya72fc"))
+ (modules '((guix build utils)))
+ (snippet #~(delete-file-recursively "tools"))))
+ (build-system cmake-build-system)
+ (arguments (list #:test-target "check"))
+ (native-inputs (list boost catch2))
+ (home-page "https://sinusoid.es/zug")
+ (synopsis "Higher-order sequence transformers")
+ (description "Zug is a C++ library providing transducers, that is composable
+sequential transformations.")
+ (license license:boost1.0))))
+
(define-public atomic-queue
(package
(name "atomic-queue")
--
2.39.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-06 13:43 ` [bug#63330] [PATCH 3/4] gnu: Add zug Liliana Marie Prikler
@ 2023-05-07 15:25 ` Maxim Cournoyer
0 siblings, 0 replies; 15+ messages in thread
From: Maxim Cournoyer @ 2023-05-07 15:25 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 63330
Hello,
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> * gnu/packages/cpp.scm (zug): New variable.
> ---
> gnu/packages/cpp.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index da3567b5ef..0ab7d0785b 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -1423,6 +1423,31 @@ (define-public immer
> written in C++.")
> (license license:boost1.0)))
>
> +(define-public zug
> + (let ((commit "d7e814b45fceceee3cb1442997d8b46cee4764ec")
> + (revision "0"))
> + (package
> + (name "zug")
> + (version (git-version "0.0.0" revision commit))
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/arximboldi/zug")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "1ww4prh763n81kzzijak8z495varlvqml4ip7i09klqnw6ya72fc"))
> + (modules '((guix build utils)))
> + (snippet #~(delete-file-recursively "tools"))))
> + (build-system cmake-build-system)
> + (arguments (list #:test-target "check"))
> + (native-inputs (list boost catch2))
> + (home-page "https://sinusoid.es/zug")
> + (synopsis "Higher-order sequence transformers")
> + (description "Zug is a C++ library providing transducers, that is composable
^,
I'd add a coma after "that is".
Otherwise LGTM.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 4/4] gnu: Add lager.
2023-05-06 16:04 [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Liliana Marie Prikler
2023-05-06 13:41 ` [bug#63330] [PATCH 2/4] gnu: Add immer Liliana Marie Prikler
2023-05-06 13:43 ` [bug#63330] [PATCH 3/4] gnu: Add zug Liliana Marie Prikler
@ 2023-05-06 13:43 ` Liliana Marie Prikler
2023-05-07 15:34 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
2023-05-06 13:51 ` [bug#63330] [PATCH 1/4] gnu: Add c-rrb Liliana Marie Prikler
3 siblings, 1 reply; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-06 13:43 UTC (permalink / raw)
To: 63330
* gnu/packages/cpp.scm (lager): New variable.
---
gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 0ab7d0785b..fe6a0edd31 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -101,6 +101,7 @@ (define-module (gnu packages cpp)
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:autoload (gnu packages serialization) (cereal)
#:use-module (ice-9 match))
(define-public argagg
@@ -1448,6 +1449,37 @@ (define-public zug
sequential transformations.")
(license license:boost1.0))))
+(define-public lager
+ (let ((commit "2016df38be90ee176bcb73ea414be2318bc1ef31")
+ (revision "0"))
+ (package
+ (name "lager")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/arximboldi/lager")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1b7zxwqrbm7db7wxqbsrk7jjd3znvvi1cwj7jg6zkmf0199071a5"))))
+ (build-system cmake-build-system)
+ (arguments (list #:test-target "check"
+ #:configure-flags #~(list "-Dlager_BUILD_EXAMPLES=no")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'delete-failing-tests
+ (lambda _
+ (delete-file-recursively "test/event_loop"))))))
+ (inputs (list boost immer zug))
+ (native-inputs (list cereal))
+ (home-page "https://sinusoid.es/lager")
+ (synopsis "Library for value-oriented design")
+ (description "Lager is a library for value-oriented design implementing
+the unidirectional data-flow architecture. Apart from a store and various
+event loops it also provides lenses and cursors.")
+ (license license:expat))))
+
(define-public atomic-queue
(package
(name "atomic-queue")
--
2.39.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-06 13:43 ` [bug#63330] [PATCH 4/4] gnu: Add lager Liliana Marie Prikler
@ 2023-05-07 15:34 ` Maxim Cournoyer
2023-05-07 15:57 ` Liliana Marie Prikler
0 siblings, 1 reply; 15+ messages in thread
From: Maxim Cournoyer @ 2023-05-07 15:34 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 63330
Hi Liliana,
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> * gnu/packages/cpp.scm (lager): New variable.
> ---
> gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> index 0ab7d0785b..fe6a0edd31 100644
> --- a/gnu/packages/cpp.scm
> +++ b/gnu/packages/cpp.scm
> @@ -101,6 +101,7 @@ (define-module (gnu packages cpp)
> #:use-module (gnu packages web)
> #:use-module (gnu packages xml)
> #:use-module (gnu packages xorg)
> + #:autoload (gnu packages serialization) (cereal)
> #:use-module (ice-9 match))
Does autoload buys us something here? Otherwise I'd stick with the
conventional use-module, to avoid future instances of cargo-culting :-).
In my opinion, that's a direction that should be pursued in Guile
(autoloading modules by default when declarative modules (no side
effects allowed) are used) rather than in every Guile applications out
there.
Otherwise this series LGTM, with the minor comments I left earlier taken
into account.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-07 15:34 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
@ 2023-05-07 15:57 ` Liliana Marie Prikler
2023-05-07 17:10 ` Maxim Cournoyer
0 siblings, 1 reply; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-07 15:57 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 63330
Am Sonntag, dem 07.05.2023 um 11:34 -0400 schrieb Maxim Cournoyer:
> Hi Liliana,
>
> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>
> > * gnu/packages/cpp.scm (lager): New variable.
> > ---
> > gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
> > 1 file changed, 32 insertions(+)
> >
> > diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
> > index 0ab7d0785b..fe6a0edd31 100644
> > --- a/gnu/packages/cpp.scm
> > +++ b/gnu/packages/cpp.scm
> > @@ -101,6 +101,7 @@ (define-module (gnu packages cpp)
> > #:use-module (gnu packages web)
> > #:use-module (gnu packages xml)
> > #:use-module (gnu packages xorg)
> > + #:autoload (gnu packages serialization) (cereal)
> > #:use-module (ice-9 match))
>
> Does autoload buys us something here? Otherwise I'd stick with the
> conventional use-module, to avoid future instances of cargo-culting
> :-).
It only frees us from the import cycle that would exist otherwise.
> In my opinion, that's a direction that should be pursued in Guile
> (autoloading modules by default when declarative modules (no side
> effects allowed) are used) rather than in every Guile applications
> out there.
Not sure I understand what you're saying, nor the impact of it.
Cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-07 15:57 ` Liliana Marie Prikler
@ 2023-05-07 17:10 ` Maxim Cournoyer
2023-05-11 13:23 ` Simon Tournier
0 siblings, 1 reply; 15+ messages in thread
From: Maxim Cournoyer @ 2023-05-07 17:10 UTC (permalink / raw)
To: Liliana Marie Prikler; +Cc: 63330
Hi,
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
> Am Sonntag, dem 07.05.2023 um 11:34 -0400 schrieb Maxim Cournoyer:
>> Hi Liliana,
>>
>> Liliana Marie Prikler <liliana.prikler@gmail.com> writes:
>>
>> > * gnu/packages/cpp.scm (lager): New variable.
>> > ---
>> > gnu/packages/cpp.scm | 32 ++++++++++++++++++++++++++++++++
>> > 1 file changed, 32 insertions(+)
>> >
>> > diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
>> > index 0ab7d0785b..fe6a0edd31 100644
>> > --- a/gnu/packages/cpp.scm
>> > +++ b/gnu/packages/cpp.scm
>> > @@ -101,6 +101,7 @@ (define-module (gnu packages cpp)
>> > #:use-module (gnu packages web)
>> > #:use-module (gnu packages xml)
>> > #:use-module (gnu packages xorg)
>> > + #:autoload (gnu packages serialization) (cereal)
>> > #:use-module (ice-9 match))
>>
>> Does autoload buys us something here? Otherwise I'd stick with the
>> conventional use-module, to avoid future instances of cargo-culting
>> :-).
> It only frees us from the import cycle that would exist otherwise.
OK, that's a good reason to have it.
>> In my opinion, that's a direction that should be pursued in Guile
>> (autoloading modules by default when declarative modules (no side
>> effects allowed) are used) rather than in every Guile applications
>> out there.
> Not sure I understand what you're saying, nor the impact of it.
I meant that it'd be nice if Guile gave us lazy loading by default
instead of relying on humans to use #:autoload where it makes sense.
--
Thanks,
Maxim
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-07 17:10 ` Maxim Cournoyer
@ 2023-05-11 13:23 ` Simon Tournier
2023-05-14 10:31 ` bug#63330: " Liliana Marie Prikler
0 siblings, 1 reply; 15+ messages in thread
From: Simon Tournier @ 2023-05-11 13:23 UTC (permalink / raw)
To: Maxim Cournoyer, Liliana Marie Prikler; +Cc: 63330
Hi,
On dim., 07 mai 2023 at 13:10, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>>> > + #:autoload (gnu packages serialization) (cereal)
>>> > #:use-module (ice-9 match))
>>>
>>> Does autoload buys us something here? Otherwise I'd stick with the
>>> conventional use-module, to avoid future instances of cargo-culting
>>> :-).
>> It only frees us from the import cycle that would exist otherwise.
>
> OK, that's a good reason to have it.
Maybe a comment would be helpful to remember that answer. :-)
Elsewhere, we use:
--8<---------------cut here---------------start------------->8---
(inputs
(list ;; XXX: We can't simply #:use-module due to a cycle somewhere.
(module-ref
(resolve-interface '(gnu packages engineering))
'cgns)
cli11
[...]
--8<---------------cut here---------------end--------------->8---
see paraview-5.9, d-tools, make-autoconf-wrapper, etc.
Cheers,
simon
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#63330: [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think!
2023-05-11 13:23 ` Simon Tournier
@ 2023-05-14 10:31 ` Liliana Marie Prikler
0 siblings, 0 replies; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-14 10:31 UTC (permalink / raw)
To: Simon Tournier, Maxim Cournoyer; +Cc: 63330-done
Am Donnerstag, dem 11.05.2023 um 15:23 +0200 schrieb Simon Tournier:
> Maybe a comment would be helpful to remember that answer. :-)
Point taken.
Pushed the series with a follow-up commit to add said comment.
Cheers
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#63330] [PATCH 1/4] gnu: Add c-rrb.
2023-05-06 16:04 [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Liliana Marie Prikler
` (2 preceding siblings ...)
2023-05-06 13:43 ` [bug#63330] [PATCH 4/4] gnu: Add lager Liliana Marie Prikler
@ 2023-05-06 13:51 ` Liliana Marie Prikler
3 siblings, 0 replies; 15+ messages in thread
From: Liliana Marie Prikler @ 2023-05-06 13:51 UTC (permalink / raw)
To: 63330
* gnu/packages/c.scm (c-rrb): New variable.
---
gnu/packages/c.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index b12aaf184a..b3d1b9a0d3 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -47,6 +47,7 @@ (define-module (gnu packages c)
#:use-module (guix store)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages bdw-gc)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages bison)
#:use-module (gnu packages check)
@@ -107,6 +108,30 @@ (define-public c-intro-and-ref
reference manual.")
(license license:fdl1.3+))))
+(define-public c-rrb
+ (let ((commit "d908617ff84515af90c454ff4d0f98675ae6b456")
+ (revision "0"))
+ (package
+ (name "c-rrb")
+ (version (git-version "0.1.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hypirion/c-rrb")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0zmha3xi80vgdcwzb4vwdllf97dvggjpjfgahrpsb5f5qi3yshxa"))))
+ (build-system gnu-build-system)
+ (inputs (list libgc))
+ (native-inputs (list autoconf automake libtool))
+ (home-page "https://github.com/hypirion/c-rrb")
+ (synopsis "Relaxed Radix Balanced Trees")
+ (description "Relaxed Radix Balanced Trees are an immutable vector-like
+data structure with good performance characteristics for concatenation and
+slicing.")
+ (license license:boost1.0))))
+
(define-public cproc
(let ((commit "70fe9ef1810cc6c05bde9eb0970363c35fa7e802")
(revision "1"))
--
2.39.2
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-05-14 10:32 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-06 16:04 [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Liliana Marie Prikler
2023-05-06 13:41 ` [bug#63330] [PATCH 2/4] gnu: Add immer Liliana Marie Prikler
2023-05-07 15:30 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
2023-05-07 15:51 ` Liliana Marie Prikler
2023-05-07 17:12 ` Maxim Cournoyer
2023-05-07 19:40 ` Liliana Marie Prikler
2023-05-06 13:43 ` [bug#63330] [PATCH 3/4] gnu: Add zug Liliana Marie Prikler
2023-05-07 15:25 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
2023-05-06 13:43 ` [bug#63330] [PATCH 4/4] gnu: Add lager Liliana Marie Prikler
2023-05-07 15:34 ` [bug#63330] [PATCH 0/4] Functional programming? In my C++?! It's more likely than you think! Maxim Cournoyer
2023-05-07 15:57 ` Liliana Marie Prikler
2023-05-07 17:10 ` Maxim Cournoyer
2023-05-11 13:23 ` Simon Tournier
2023-05-14 10:31 ` bug#63330: " Liliana Marie Prikler
2023-05-06 13:51 ` [bug#63330] [PATCH 1/4] gnu: Add c-rrb Liliana Marie Prikler
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.