[PATCH] Add cl-april.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Jacob MacDonald
Owner
unassigned
Submitted by
Jacob MacDonald
Severity
normal

Debbugs page

Jacob MacDonald wrote 3 years ago
(address . guix-patches@gnu.org)
CACy6W0BScWvmG+9ThPBTVwribdbp+wWJzxnBr7i1bYbFECyBjQ@mail.gmail.com
April is a subset of APL embedded in Common Lisp. The following series
of patches adds its dependencies and April itself to the end of
lisp-xyz.

This is the least trivial set of packages I have submitted, so I have
a few things I want to ensure I get right.
1. Licensing:
a. cl-decimals has no license file and is marked as CC0-licensed in
its system file.
b. simple-date-time has no license file and is marked as BSD-licensed
in its system file. I marked it as BSD-4.
c. MaxPC is licensed under the AGPL. This is an issue for the
Apache-licensed April
version of MaxPC is now bundled with April's source. Does building
April with MaxPC from source violate the AGPL? If so, the dependency
can be swapped out for the bundled one.
2. Bundling: April depends on two systems vex and aplesque. These are
defined in the same repository. I broke them out into three packages
based on the same version of the source.
a. I renamed vex as there is an existing vector math library with
that name. I threw the math library into the patchset as well; It
might not properly belong.
b. I tried to use the #:asd-files and #:asd-systems options to
restrict what got built, but kept getting build failures. I added a
phase to each package to delete unused system files. This works, but
seems brittle. I don't think I understand the ASDF build system.
3. Versioning: The latest April tag is a couple years old, while many
of its dependencies lack tags altogether. There is also a discrepancy
between the Git tag and the version numbers recorded in each system
file. Whether I wait for a new tag to bump the package or not, what's
the best way to version the package(s)?

Thanks much,

Jacob.
Jacob MacDonald wrote 3 years ago
[PATCH 1/7] gnu: Add cl-vex.
(address . 52387@debbugs.gnu.org)
CACy6W0APJobFPQktvTg0YbJYLKttPX858WcNZmG3Es9FS4-Rvg@mail.gmail.com

From 1a7c7f2c72fdaa0f5c31ce19581c4309c1dd4657 Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 18:00:49 -0600
Subject: [PATCH 1/7] gnu: Add cl-vex.

* gnu/packages/lisp-xyz.scm (sbcl-vex, cl-vex, ecl-vex): New variables.
---
gnu/packages/lisp-xyz.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 635f8e48cb..8786d60a4f 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -19949,3 +19949,34 @@ (define-public sbcl-cl-https-everywhere
(define-public cl-https-everywhere
(sbcl-package->cl-source-package sbcl-cl-https-everywhere))
+
+(define-public sbcl-vex
+ (let ((commit "18fb56a071d43474bb72f08739177a5d197ddf2d")
+ (revision "1"))
+ (package
+ (name "sbcl-vex")
+ (version (git-version "0.0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sjl/vex")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "156sfxb918zhx2wrs2zjfij6livk9d3k83aamvrdmhh4g3chwv6m"))))
+ (build-system asdf-build-system/sbcl)
+ (native-inputs `(("1am" ,sbcl-1am)))
+ (home-page "https://github.com/sjl/vex")
+ (synopsis "Yet another vector math library for Common Lisp")
+ (description
+ "This package is a vector math library for Common Lisp.
+
+Not ready yet, don't use it.")
+ (license license:expat))))
+
+(define-public cl-vex
+ (sbcl-package->cl-source-package sbcl-vex))
+
+(define-public ecl-vex
+ (sbcl-package->ecl-package sbcl-vex))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 2/7] gnu: Add cl-maxpc.
(address . 52387@debbugs.gnu.org)
CACy6W0CqO9QjqOE_g-b_PWo42piL9oysyaLiRfydSETcBUr9yA@mail.gmail.com

From 98c12934dd67d23f206144fffba8b900687e7bcc Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:53:39 -0600
Subject: [PATCH 2/7] gnu: Add cl-maxpc.

* gnu/packages/lisp-xyz.scm (sbcl-maxpc, cl-maxpc, ecl-maxpc): New variables.
---
gnu/packages/lisp-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 8786d60a4f..5f864656b7 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -19980,3 +19980,51 @@ (define-public cl-vex
(define-public ecl-vex
(sbcl-package->ecl-package sbcl-vex))
+
+(define-public sbcl-maxpc
+ (let ((commit "e5e58d053039517d30fd59ab2d128256b87790d5")
+ (revision "1"))
+ (package
+ (name "sbcl-maxpc")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eugeneia/maxpc")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "15wrjbr2js6j67c1dd4p2qxj49q9iqv1lhb7cwdcwpn79crr39gf"))))
+ (build-system asdf-build-system/sbcl)
+ (home-page "https://mr.gy/software/maxpc/api.html")
+ (synopsis "Library for writing parsers and lexers based on combinatory parsing")
+ (description
+ "@emph{Max’s Parser Combinators} is a simple and pragmatic library for
+writing parsers and lexers based on combinatory parsing. MaxPC is capable of
+parsing deterministic, context-free languages, provides powerful tools for
+parse tree transformation and error handling, and can operate on
+@dfn{sequences} and @dfn{streams}. It supports unlimited backtracking, but
+does not implement @url{http://pdos.csail.mit.edu/~baford/packrat/thesis/,
+Packrat Parsing}. Instead, MaxPC achieves good performance through its
+optimized primitives, and explicit separation of matching and capturing input.
+In practice, MaxPC parsers perform better on typical computer languages—when
+compared to Packrat parsers—at the expense of not producing linear-time
+parsers.
+
+@enumerate
+@item
+MaxPC is a complete rewrite of @url{https://github.com/eugeneia/mpc, MPC} with
+was in turn a fork of Drew Crampsie’s @url{http://smug.drewc.ca/, Smug}.
+@item
+See @url{https://mr.gy/blog/maxpc.html#section-3-1,
+MaxPC: Why? How? / Packrat Parsing} on why the book keeping costs of Packrat
+parsing diminish the gain in execution time for typical grammars and workloads.
+@end enumerate")
+ (license license:agpl3))))
+
+(define-public cl-maxpc
+ (sbcl-package->cl-source-package sbcl-maxpc))
+
+(define-public ecl-maxpc
+ (sbcl-package->ecl-package sbcl-maxpc))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 3/7] gnu: Add cl-vex-templates.
(address . 52387@debbugs.gnu.org)
CACy6W0Cfnw-KLRMqMpk1sP8Pir4ppPs1UzJubRPQFyetcTSQfQ@mail.gmail.com

From bf67d19fc0e5b366a2fca1991a250ee14b93070c Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 23:10:53 -0600
Subject: [PATCH 3/7] gnu: Add cl-vex-templates.

* gnu/packages/lisp-xyz.scm (sbcl-vex-templates, cl-vex-templates,
ecl-vex-templates): New variables.
---
gnu/packages/lisp-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 5f864656b7..e698f6bcf6 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20028,3 +20028,46 @@ (define-public cl-maxpc
(define-public ecl-maxpc
(sbcl-package->ecl-package sbcl-maxpc))
+
+(define-public sbcl-vex-templates
+ (package
+ (name "sbcl-vex-templates")
+ (version "0.9.55")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/phantomics/april")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0ijx1csrb1i2kw3fx8f08541b2zg4p72b8l0izkv278yk8cw44v5"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ `(("alexandria" ,sbcl-alexandria)
+ ("array-operations" ,sbcl-array-operations)
+ ("maxpc" ,sbcl-maxpc)
+ ("cl-ppcre" ,sbcl-cl-ppcre)
+ ("symbol-munger" ,sbcl-symbol-munger)
+ ("prove" ,sbcl-prove)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-build
+ (lambda _
+ (for-each delete-file
+ '("april.asd"
+ "aplesque/aplesque.asd"))
+ #t)))
+ #:asd-systems '("vex")))
+ (home-page "https://github.com/phantomics/april")
+ (synopsis "Templates for implementing your own vector programming language")
+ (description "This package provides a set of templates for implementing
+your own vector programming language that compiles to Common Lisp.")
+ (license license:asl2.0)))
+
+(define-public cl-vex-templates
+ (sbcl-package->cl-source-package sbcl-vex-templates))
+
+(define-public ecl-vex-templates
+ (sbcl-package->ecl-package sbcl-vex-templates))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 4/7] gnu: Add cl-aplesque.
(address . 52387@debbugs.gnu.org)
CACy6W0BpATfbpyA9U0y3spggoh+sarQVOZ6kqohbzk10=EjBLw@mail.gmail.com

From affbf997f27c08be4b4926b7674ab2b2ff25d469 Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 23:11:50 -0600
Subject: [PATCH 4/7] gnu: Add cl-aplesque.

* gnu/packages/lisp-xyz.scm (sbcl-aplesque, cl-aplesque, ecl-aplesque):
New variables.
---
gnu/packages/lisp-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index e698f6bcf6..bec529d5b0 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20071,3 +20071,31 @@ (define-public cl-vex-templates
(define-public ecl-vex-templates
(sbcl-package->ecl-package sbcl-vex-templates))
+
+(define-public sbcl-aplesque
+ (package
+ (inherit sbcl-vex-templates)
+ (name "sbcl-aplesque")
+ (inputs
+ `(("alexandria" ,sbcl-alexandria)
+ ("array-operations" ,sbcl-array-operations)
+ ("parse-number" ,sbcl-parse-number)
+ ("symbol-munger" ,sbcl-symbol-munger)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-build
+ (lambda _
+ (for-each delete-file
+ '("april.asd"
+ "vex/vex.asd"))
+ #t)))))
+ (synopsis "Array manipulation functions patterned after functions from APL")
+ (description "This package provides a collection of array manipulation
+functions patterned after functions from the APL language.")))
+
+(define-public cl-aplesque
+ (sbcl-package->cl-source-package sbcl-aplesque))
+
+(define-public ecl-aplesque
+ (sbcl-package->ecl-package sbcl-aplesque))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 5/7] gnu: Add cl-decimals.
(address . 52387@debbugs.gnu.org)
CACy6W0DZxh-U2Kpzq_uswZ+sWPpiMASW2TEKiax4_MDdKYUZzA@mail.gmail.com

From 09e1325ab5ccfcde07251bea6c07ad397849e039 Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:01:24 -0600
Subject: [PATCH 5/7] gnu: Add cl-decimals.

* gnu/packages/lisp-xyz.scm (sbcl-decimals, cl-decimals, ecl-decimals):
New variables.
---
gnu/packages/lisp-xyz.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index bec529d5b0..3af5e4ff29 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20099,3 +20099,32 @@ (define-public cl-aplesque
(define-public ecl-aplesque
(sbcl-package->ecl-package sbcl-aplesque))
+
+(define-public sbcl-decimals
+ (package
+ (name "sbcl-decimals")
+ (version "2021")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tlikonen/cl-decimals")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0wn5hq1pwd3wpjqqhpjzarcdk1q6416g8y447iaf55j5nbhlmbn6"))))
+ (build-system asdf-build-system/sbcl)
+ (home-page "https://github.com/tlikonen/cl-decimals")
+ (synopsis "Decimal number parser and formatting package for Common Lisp")
+ (description "This Common Lisp package offers functions for parsing and
+formatting decimal numbers. Package's main interface are functions
+@code{parse-decimal-number} and @code{format-decimal-number}. The former is
+for parsing strings for decimal numbers and the latter for pretty-printing
+them as strings.")
+ (license license:cc0)))
+
+(define-public cl-decimals
+ (sbcl-package->cl-source-package sbcl-decimals))
+
+(define-public ecl-decimals
+ (sbcl-package->ecl-package sbcl-decimals))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 6/7] gnu: Add cl-simple-date-time.
(address . 52387@debbugs.gnu.org)
CACy6W0AM2x38WYhBtkTV9++nS1B0uEDFQrctOGzmSr2YOta2nw@mail.gmail.com

From 66f615f17f57450a8cac6d417501cf7bd37f2275 Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:15:26 -0600
Subject: [PATCH 6/7] gnu: Add cl-simple-date-time.

* gnu/packages/lisp-xyz.scm (sbcl-simple-date-time, cl-simple-date-time,
ecl-simple-date-time): New variables.
---
gnu/packages/lisp-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 3af5e4ff29..ff5d280406 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20128,3 +20128,31 @@ (define-public cl-decimals
(define-public ecl-decimals
(sbcl-package->ecl-package sbcl-decimals))
+
+(define-public sbcl-simple-date-time
+ (let ((commit "d6992afddedf67a8172a0120a1deac32afcaa2e8")
+ (revision "1"))
+ (package
+ (name "sbcl-simple-date-time")
+ (version (git-version "0.1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/quek/simple-date-time")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06iwf13gcdyqhkzfkcsfdl8iqbdl44cx01c3fjsmhl0v1pp8h2m4"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs `(("cl-ppcre" ,sbcl-cl-ppcre)))
+ (home-page "https://github.com/quek/simple-date-time")
+ (synopsis "Date and time library for Common Lisp")
+ (description "This package is a simple date and time library.")
+ (license license:bsd-4))))
+
+(define-public cl-simple-date-time
+ (sbcl-package->cl-source-package sbcl-simple-date-time))
+
+(define-public ecl-simple-date-time
+ (sbcl-package->ecl-package sbcl-simple-date-time))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 7/7] gnu: Add cl-april.
(address . 52387@debbugs.gnu.org)
CACy6W0BbannNkFJUW-6otTDMeBgG6EJkwOZxH46pVNSxOtw38A@mail.gmail.com

From 1abeabe95c5594f5a71c065b3d9aae4aab022b0a Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:30:22 -0600
Subject: [PATCH 7/7] gnu: Add cl-april.

* gnu/packages/lisp-xyz.scm (sbcl-april, cl-april, ecl-april): New variables.
---
gnu/packages/lisp-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index ff5d280406..5f4beeab49 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20156,3 +20156,40 @@ (define-public cl-simple-date-time
(define-public ecl-simple-date-time
(sbcl-package->ecl-package sbcl-simple-date-time))
+
+(define-public sbcl-april
+ (package
+ (inherit sbcl-vex-templates)
+ (name "sbcl-april")
+ (inputs
+ `(("vex" ,sbcl-vex-templates)
+ ("aplesque" ,sbcl-aplesque)
+ ("array-operations" ,sbcl-array-operations)
+ ("alexandria" ,sbcl-alexandria)
+ ("cl-ppcre" ,sbcl-cl-ppcre)
+ ("decimals" ,sbcl-decimals)
+ ("parse-number" ,sbcl-parse-number)
+ ("symbol-munger" ,sbcl-symbol-munger)
+ ("prove" ,sbcl-prove)
+ ("simple-date-time" ,sbcl-simple-date-time)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'fix-build
+ (lambda _
+ (for-each delete-file
+ '("aplesque/aplesque.asd"
+ "vex/vex.asd"))
+ #t)))))
+ (synopsis "Array Programming Re-Imagined in Lisp")
+ (description "April compiles a subset of the APL programming language into
+Common Lisp. Leveraging Lisp's powerful macros and numeric processing
+faculties, it brings APL's expressive potential to bear for Lisp developers.
+Replace hundreds of lines of number-crunching code with a single line of
+APL.")))
+
+(define-public cl-april
+ (sbcl-package->cl-source-package sbcl-april))
+
+(define-public ecl-april
+ (sbcl-package->ecl-package sbcl-april))
--
2.34.0
Guillaume Le Vaillant wrote 3 years ago
Re: [bug#52387] [PATCH] Add cl-april.
(name . Jacob MacDonald)(address . jaccarmac@gmail.com)(address . 52387@debbugs.gnu.org)
87czm3thar.fsf@kitej
Jacob MacDonald <jaccarmac@gmail.com> skribis:

Toggle quote (10 lines)
> April is a subset of APL embedded in Common Lisp. The following series
> of patches adds its dependencies and April itself to the end of
> lisp-xyz.
>
> This is the least trivial set of packages I have submitted, so I have
> a few things I want to ensure I get right.
> 1. Licensing:
> a. cl-decimals has no license file and is marked as CC0-licensed in
> its system file.

Ok.


Toggle quote (3 lines)
> b. simple-date-time has no license file and is marked as BSD-licensed
> in its system file. I marked it as BSD-4.

Ok.


Toggle quote (7 lines)
> c. MaxPC is licensed under the AGPL. This is an issue for the
> Apache-licensed April
> (https://github.com/phantomics/april/issues/185), and an Apache
> version of MaxPC is now bundled with April's source. Does building
> April with MaxPC from source violate the AGPL? If so, the dependency
> can be swapped out for the bundled one.

According to [1] and [2], combining code under AGPL and code under
Apache License is possible, and the result would be under AGPL.
As the Guix package for April will only contain the things under Apache
License, I think we just need to use 'license:asl2.0'.
Unless the bundled MaxPC has modifications required for April to work,
you can add a snippet to the 'source' field to remove the "maxpc-apache"
directory, and use upstream's MaxPC.



Toggle quote (11 lines)
> 2. Bundling: April depends on two systems vex and aplesque. These are
> defined in the same repository. I broke them out into three packages
> based on the same version of the source.
> a. I renamed vex as there is an existing vector math library with
> that name. I threw the math library into the patchset as well; It
> might not properly belong.
> b. I tried to use the #:asd-files and #:asd-systems options to
> restrict what got built, but kept getting build failures. I added a
> phase to each package to delete unused system files. This works, but
> seems brittle. I don't think I understand the ASDF build system.

I don't think we need to make three packages in this case. Making just
one regular package for April should also build the vex and aplesque
subsystems automatically (if all the required dependencies are listed in
the 'inputs' field).


Toggle quote (6 lines)
> 3. Versioning: The latest April tag is a couple years old, while many
> of its dependencies lack tags altogether. There is also a discrepancy
> between the Git tag and the version numbers recorded in each system
> file. Whether I wait for a new tag to bump the package or not, what's
> the best way to version the package(s)?

It pretty common for Common Lisp libraries not to have tags (or only
very old tags), and we then use the commit hash and a revision number.
There are many examples of such packages in "lisp-xyz.scm".

Could you send an updated patch series?
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYbSkLA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j9waQD/ZWiP3RGC6xcHqwhELRD/BR0TOGuI7KLi5oC/
LYqVD2MA/39pJq/oVbBLvQrG3bDDHrvBvruathb02bmalFMKeP6m
=e/rU
-----END PGP SIGNATURE-----

Jacob MacDonald wrote 3 years ago
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 52387@debbugs.gnu.org)
CACy6W0C=P5NtquwobA04MUGmZ=OujmFryhivbyFZZvtx4drEtw@mail.gmail.com
On Sat, Dec 11, 2021 at 7:14 AM Guillaume Le Vaillant <glv@posteo.net> wrote:
Toggle quote (2 lines)
> Could you send an updated patch series?

Incoming.

Toggle quote (4 lines)
> It pretty common for Common Lisp libraries not to have tags (or only
> very old tags), and we then use the commit hash and a revision number.
> There are many examples of such packages in "lisp-xyz.scm".

I followed that example as I understand it. The linter doesn't love it
because the latest tag is higher than the system version.
Jacob MacDonald wrote 3 years ago
[PATCH 1/5] gnu: Add cl-maxpc.
(address . 52387@debbugs.gnu.org)
CACy6W0A3j_gYBWnx8Y5SmVB-SfvxR-aYYE-s58S=QjUQ5g6ovw@mail.gmail.com

From 8e3384c13c54c6e4c559c51c39763ffbef19c60a Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:53:39 -0600
Subject: [PATCH 1/5] gnu: Add cl-maxpc.

* gnu/packages/lisp-xyz.scm (sbcl-maxpc, cl-maxpc, ecl-maxpc): New variables.
---
gnu/packages/lisp-xyz.scm | 48 +++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index e25d0f5488..9cfd67d591 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20245,3 +20245,51 @@ (define-public sbcl-cl-https-everywhere
(define-public cl-https-everywhere
(sbcl-package->cl-source-package sbcl-cl-https-everywhere))
+
+(define-public sbcl-maxpc
+ (let ((commit "e5e58d053039517d30fd59ab2d128256b87790d5")
+ (revision "1"))
+ (package
+ (name "sbcl-maxpc")
+ (version (git-version "0.0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eugeneia/maxpc")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "15wrjbr2js6j67c1dd4p2qxj49q9iqv1lhb7cwdcwpn79crr39gf"))))
+ (build-system asdf-build-system/sbcl)
+ (home-page "https://mr.gy/software/maxpc/api.html")
+ (synopsis "Library for writing parsers and lexers based on combinatory parsing")
+ (description
+ "@emph{Max’s Parser Combinators} is a simple and pragmatic library for
+writing parsers and lexers based on combinatory parsing. MaxPC is capable of
+parsing deterministic, context-free languages, provides powerful tools for
+parse tree transformation and error handling, and can operate on
+@dfn{sequences} and @dfn{streams}. It supports unlimited backtracking, but
+does not implement @url{http://pdos.csail.mit.edu/~baford/packrat/thesis/,
+Packrat Parsing}. Instead, MaxPC achieves good performance through its
+optimized primitives, and explicit separation of matching and capturing input.
+In practice, MaxPC parsers perform better on typical computer languages—when
+compared to Packrat parsers—at the expense of not producing linear-time
+parsers.
+
+@enumerate
+@item
+MaxPC is a complete rewrite of @url{https://github.com/eugeneia/mpc, MPC} with
+was in turn a fork of Drew Crampsie’s @url{http://smug.drewc.ca/, Smug}.
+@item
+See @url{https://mr.gy/blog/maxpc.html#section-3-1,
+MaxPC: Why? How? / Packrat Parsing} on why the book keeping costs of Packrat
+parsing diminish the gain in execution time for typical grammars and workloads.
+@end enumerate")
+ (license license:agpl3))))
+
+(define-public cl-maxpc
+ (sbcl-package->cl-source-package sbcl-maxpc))
+
+(define-public ecl-maxpc
+ (sbcl-package->ecl-package sbcl-maxpc))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 2/5] gnu: Add cl-random-state.
(address . 52387@debbugs.gnu.org)
CACy6W0B27bTxe2Hcd7DaUeoUhA3wAu3kn58i9vZ=s-htUU6t3A@mail.gmail.com

From 35696cd20737a0f7d6b9e0714658dd66da630dca Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Mon, 13 Dec 2021 12:10:07 -0600
Subject: [PATCH 2/5] gnu: Add cl-random-state.

* gnu/packages/lisp-xyz.scm (sbcl-random-state, cl-random-state,
ecl-random-state): New variables.
---
gnu/packages/lisp-xyz.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (49 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 9cfd67d591..11c78a306c 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20293,3 +20293,42 @@ (define-public cl-maxpc
(define-public ecl-maxpc
(sbcl-package->ecl-package sbcl-maxpc))
+
+(define-public sbcl-random-state
+ (let ((commit "c270d4f15e0b66ba9680ca8734a5de56959cb118")
+ (revision "1"))
+ (package
+ (name "sbcl-random-state")
+ (version (git-version "0.1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Shinmera/random-state")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0r3bk6hqpr0qmpza93pknl8wpsd6y0yy9qg7vz751a7gzzww9vj6"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ `(("documentation-utils" ,sbcl-documentation-utils)))
+ (home-page "https://shinmera.github.io/random-state/")
+ (synopsis "Portable random number generation")
+ (description
+ "This library is a collection of @dfn{pseudo random number generators}.
+
+While Common Lisp does provide a @code{RANDOM} function, it does not allow the
+user to pass an explicit @code{SEED}, nor to portably exchange the random
+state between implementations. This can be a headache in cases like games,
+where a controlled seeding process can be very useful.
+
+For both curiosity and convenience, this library offers multiple algorithms to
+generate random numbers, as well as a bunch of generally useful methods to
+produce desired ranges.")
+ (license license:zlib))))
+
+(define-public cl-random-state
+ (sbcl-package->cl-source-package sbcl-random-state))
+
+(define-public ecl-random-state
+ (sbcl-package->ecl-package sbcl-random-state))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 3/5] gnu: Add cl-decimals.
(address . 52387@debbugs.gnu.org)
CACy6W0DBQW+Q2H67_89f-BsigKT-kWu1V72RX2ZQEddVQ8MUfA@mail.gmail.com

From c76de2fe54d7f0a174af3e9936df21f2fa78491c Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:01:24 -0600
Subject: [PATCH 3/5] gnu: Add cl-decimals.

* gnu/packages/lisp-xyz.scm (sbcl-decimals, cl-decimals, ecl-decimals):
New variables.
---
gnu/packages/lisp-xyz.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 11c78a306c..286eaba84a 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20332,3 +20332,32 @@ (define-public cl-random-state
(define-public ecl-random-state
(sbcl-package->ecl-package sbcl-random-state))
+
+(define-public sbcl-decimals
+ (package
+ (name "sbcl-decimals")
+ (version "2021")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tlikonen/cl-decimals")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0wn5hq1pwd3wpjqqhpjzarcdk1q6416g8y447iaf55j5nbhlmbn6"))))
+ (build-system asdf-build-system/sbcl)
+ (home-page "https://github.com/tlikonen/cl-decimals")
+ (synopsis "Decimal number parser and formatting package for Common Lisp")
+ (description "This Common Lisp package offers functions for parsing and
+formatting decimal numbers. Package's main interface are functions
+@code{parse-decimal-number} and @code{format-decimal-number}. The former is
+for parsing strings for decimal numbers and the latter for pretty-printing
+them as strings.")
+ (license license:cc0)))
+
+(define-public cl-decimals
+ (sbcl-package->cl-source-package sbcl-decimals))
+
+(define-public ecl-decimals
+ (sbcl-package->ecl-package sbcl-decimals))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 4/5] gnu: Add cl-simple-date-time.
(address . 52387@debbugs.gnu.org)
CACy6W0BvA3+R++auZzGrFD_Ni6ACSrBmhMNgfXgyAr4GyEfBtw@mail.gmail.com

Jacob MacDonald wrote 3 years ago
[PATCH 5/5] gnu: Add cl-april.
(address . 52387@debbugs.gnu.org)
CACy6W0AW7qLJLLZ+mz_OstZwUiG4dQ794gDPz3_m2z77c0aGvg@mail.gmail.com

From 21b5a3c79bb29a65f65c28175b5d0e920b2f4ad6 Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:30:22 -0600
Subject: [PATCH 5/5] gnu: Add cl-april.

* gnu/packages/lisp-xyz.scm (sbcl-april, cl-april, ecl-april): New variables.
---
gnu/packages/lisp-xyz.scm | 52 +++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (62 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 24aae8003c..84eeb05460 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20389,3 +20389,55 @@ (define-public cl-simple-date-time
(define-public ecl-simple-date-time
(sbcl-package->ecl-package sbcl-simple-date-time))
+
+(define-public sbcl-april
+ (let ((commit "963e2d8e5575a7d430c1fba7adedd15cb23c4ce8")
+ (revision "1"))
+ (package
+ (name "sbcl-april")
+ (version (git-version "0.9.3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/phantomics/april")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0v27fpss1ayca2r47k0zpqa9a423a86pv8s2mlgc3g5s48lgcmj3"))
+ (modules '((guix build utils)))
+ (snippet '(begin
+ ;; Remove Apache-relicensed MaxPC.
+ (delete-file-recursively "maxpc-apache")
+ ;; Ensure references are to upstream MaxPC.
+ (substitute* "vex/vex.asd"
+ (("maxpc-apache") "maxpc"))
+ #true))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ `(("alexandria" ,sbcl-alexandria)
+ ("array-operations" ,sbcl-array-operations)
+ ("maxpc-apache" ,sbcl-maxpc)
+ ("cl-ppcre" ,sbcl-cl-ppcre)
+ ("symbol-munger" ,sbcl-symbol-munger)
+ ("prove" ,sbcl-prove)
+ ("parse-number" ,sbcl-parse-number)
+ ("lparallel" ,sbcl-lparallel)
+ ("random-state" ,sbcl-random-state)
+ ("decimals" ,sbcl-decimals)
+ ("simple-date-time" ,sbcl-simple-date-time)
+ ("trivia" ,sbcl-trivia)))
+ (home-page "https://github.com/phantomics/april")
+ (synopsis "Array Programming Re-Imagined in Lisp")
+ (description "April compiles a subset of the APL programming language into
+Common Lisp. Leveraging Lisp's powerful macros and numeric processing
+faculties, it brings APL's expressive potential to bear for Lisp developers.
+Replace hundreds of lines of number-crunching code with a single line of
+APL.")
+ (license license:asl2.0))))
+
+(define-public cl-april
+ (sbcl-package->cl-source-package sbcl-april))
+
+(define-public ecl-april
+ (sbcl-package->ecl-package sbcl-april))
--
2.34.0
Jacob MacDonald wrote 3 years ago
[PATCH 4/5] gnu: Add cl-simple-date-time.
(address . 52387@debbugs.gnu.org)
CACy6W0AQ2v7Ya==4pUg89dnQWnosuR5Lzxv3o49_Vtm04XSw5g@mail.gmail.com

From bbbb29274385d74a8b66517f5f778c51f5adf80b Mon Sep 17 00:00:00 2001
From: Jacob MacDonald <jaccarmac@gmail.com>
Date: Wed, 8 Dec 2021 21:15:26 -0600
Subject: [PATCH 4/5] gnu: Add cl-simple-date-time.

* gnu/packages/lisp-xyz.scm (sbcl-simple-date-time, cl-simple-date-time,
ecl-simple-date-time): New variables.
---
gnu/packages/lisp-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 286eaba84a..24aae8003c 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -20361,3 +20361,31 @@ (define-public cl-decimals
(define-public ecl-decimals
(sbcl-package->ecl-package sbcl-decimals))
+
+(define-public sbcl-simple-date-time
+ (let ((commit "d6992afddedf67a8172a0120a1deac32afcaa2e8")
+ (revision "1"))
+ (package
+ (name "sbcl-simple-date-time")
+ (version (git-version "0.1.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/quek/simple-date-time")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06iwf13gcdyqhkzfkcsfdl8iqbdl44cx01c3fjsmhl0v1pp8h2m4"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs `(("cl-ppcre" ,sbcl-cl-ppcre)))
+ (home-page "https://github.com/quek/simple-date-time")
+ (synopsis "Date and time library for Common Lisp")
+ (description "This package is a simple date and time library.")
+ (license license:bsd-4))))
+
+(define-public cl-simple-date-time
+ (sbcl-package->cl-source-package sbcl-simple-date-time))
+
+(define-public ecl-simple-date-time
+ (sbcl-package->ecl-package sbcl-simple-date-time))
--
2.34.0
Guillaume Le Vaillant wrote 3 years ago
Re: [bug#52387] [PATCH 5/5] gnu: Add cl-april.
(name . Jacob MacDonald)(address . jaccarmac@gmail.com)(address . 52387-done@debbugs.gnu.org)
87r1ac7slx.fsf@kitej
Patches pushed as abd2aed92681594251f11cf65db813767c9552af and following
with a few modifications (added copyright line, changed 'inputs' fields
to use the new style).
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYbsUag8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j9ReAD7BFyAeCIyjOn6T4LTfd8+ssbVbX1lzZjZo3z3
iIj/d8kA/0OpTfMQiN2m6LnKFXr52Iu8mpeJbN0RFbBufLHzHUJn
=W14g
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 52387@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52387
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help