unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#69023] [PATCH 0/5] gnu: package: Update cbqn.
@ 2024-02-10 23:23 aecepoglu
  2024-02-10 23:28 ` [bug#69023] [PATCH 1/5] gnu: bqn: Add singeli aecepoglu
                   ` (6 more replies)
  0 siblings, 7 replies; 20+ messages in thread
From: aecepoglu @ 2024-02-10 23:23 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu

Add new dependency (Singeli).
Update dependency versions.
Update bytecode generation scripts.
Make cbqn bootstrap itself.

aecepoglu (5):
  gnu: bqn: Add singeli.
  gnu: bqn: Update dbqn.
  gnu: bqn: Update bqn-sources.
  gnu: bqn: Update cbqn-bootstrap.
  gnu: bqn: Update cbqn.

 gnu/packages/bqn.scm | 198 ++++++++++++++++++++++++++-----------------
 1 file changed, 118 insertions(+), 80 deletions(-)


base-commit: b64862e5cb8209c92aa2eff4cec0be328e38c45d
-- 
2.43.0





^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 1/5] gnu: bqn: Add singeli.
  2024-02-10 23:23 [bug#69023] [PATCH 0/5] gnu: package: Update cbqn aecepoglu
@ 2024-02-10 23:28 ` aecepoglu
  2024-04-19 18:44   ` Liliana Marie Prikler
  2024-02-10 23:28 ` [bug#69023] [PATCH 2/5] gnu: bqn: Update dbqn aecepoglu
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: aecepoglu @ 2024-02-10 23:28 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu

Newer versions of BQN use Singeli

* gnu/packages/bqn.scm: Add singeli

Change-Id: I5a2ce84a2b96cdad0617af46978f44ef1a86047f
---
 gnu/packages/bqn.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 4d03385d21..acac2d45cc 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -34,6 +34,32 @@ (define-module (gnu packages bqn)
   #:use-module (gnu packages java)
   #:use-module (gnu packages compression))
 
+(define-public singeli
+  (let ((commit "5f9cbd46c265491ff167a5d9377d1462539dbdd8")
+        (revision "1"))
+    (package
+      (name "singeli")
+      (version (git-version "0.1.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/mlochbaum/Singeli.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "13mfxkb29n4phpqxiwfcd43mcg8773n03nml8d9rhbdb6s5jrixb"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:install-plan '(("." "lib"))))
+      (synopsis "Language to generate performant C codes with")
+      (description
+       "Singeli is a domain-specific language for building high-performance
+algorithms with abstractions over code that corresponds to individual instructions.
+It's implemented in BQN, with a frontend that emits IR and a backend that converts it to C.")
+      (home-page "https://github.com/mlochbaum/Singeli")
+      (license license:isc))))
+
 (define-public dbqn
   (let ((commit "88f2b43966a75cc2c382421218eb30003bb16f4a")
         (revision "1"))
-- 
2.43.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 2/5] gnu: bqn: Update dbqn.
  2024-02-10 23:23 [bug#69023] [PATCH 0/5] gnu: package: Update cbqn aecepoglu
  2024-02-10 23:28 ` [bug#69023] [PATCH 1/5] gnu: bqn: Add singeli aecepoglu
@ 2024-02-10 23:28 ` aecepoglu
  2024-04-19 18:44   ` Liliana Marie Prikler
  2024-02-10 23:28 ` [bug#69023] [PATCH 3/5] gnu: bqn: Update bqn-sources aecepoglu
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 20+ messages in thread
From: aecepoglu @ 2024-02-10 23:28 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu

* gnu/packages/bqn.scm (dbqn): Update dbqn version.

Change-Id: Ia538f6b4b6f21e99121d5b65c3da11fd24c1a2c2
---
 gnu/packages/bqn.scm | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index acac2d45cc..b4d141fc7a 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -61,25 +61,25 @@ (define-public singeli
       (license license:isc))))
 
 (define-public dbqn
-  (let ((commit "88f2b43966a75cc2c382421218eb30003bb16f4a")
-        (revision "1"))
+  (let ((commit "ba14bcf1e1d0f90fe90906a6dd7b921460f070f6")
+        (revision "2"))
     (package
       (name "dbqn")
       (version (git-version "0.2.1" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/dzaima/BQN")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "06mzvv7kmandhgwb6jwz3rivsj4ic549sy8afnb5zr6mfn5isyg5"))))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/dzaima/BQN")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0p09fb7h9c6qvhyfamak0dv9dzqyifkqps6ywcyrybv34xkgckfy"))))
       (build-system gnu-build-system)
       (arguments
        (list
-        #:imported-modules `(,@%gnu-build-system-modules
-                             (guix build ant-build-system))
+        #:imported-modules `(,@%gnu-build-system-modules (guix build
+                                                          ant-build-system))
         #:modules `((guix build gnu-build-system)
                     ((guix build ant-build-system)
                      #:prefix ant:)
-- 
2.43.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 3/5] gnu: bqn: Update bqn-sources.
  2024-02-10 23:23 [bug#69023] [PATCH 0/5] gnu: package: Update cbqn aecepoglu
  2024-02-10 23:28 ` [bug#69023] [PATCH 1/5] gnu: bqn: Add singeli aecepoglu
  2024-02-10 23:28 ` [bug#69023] [PATCH 2/5] gnu: bqn: Update dbqn aecepoglu
@ 2024-02-10 23:28 ` aecepoglu
  2024-02-10 23:28 ` [bug#69023] [PATCH 4/5] gnu: bqn: Update cbqn-bootstrap aecepoglu
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-02-10 23:28 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu

* gnu/packages/bqn.scm (bqn-sources): Update bqn-sources version.

Change-Id: Ia17dfbc3d6d73fdf3203c99a229eccc6634eca2a
---
 gnu/packages/bqn.scm | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index b4d141fc7a..9623fd5b57 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -135,17 +135,16 @@ (define-public dbqn
 
 (define bqn-sources
   ;; Aside from dbqn above, the main bqn repository is used by other
-  ;; implementations as a "known good" set of sources. CBQN uses dbqn to
-  ;; generate an intermediate bytecode for its own compilation.
-    (let ((commit "71ce36141aaacfa714edca2e408ca522a3bc5554"))
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-              (url "https://github.com/mlochbaum/BQN")
-              (commit commit)))
-        (file-name (git-file-name "bqn-sources" commit))
-        (sha256
-         (base32 "060a3r5m7hynzxj4iz1av2kj5jf8w3j8yswzzx9wkx31rdrsiv2c")))))
+  ;; implementations as a "known good" set of sources.
+  ;; CBQN initially uses dbqn to bootstrap itself.
+  ;; We use cbqn-bootstrap to build BQN for the end-users
+  (let ((commit "6f651be3e09f0628c7d47ddb7ce819a1755529ca"))
+    (origin
+      (method git-fetch)
+      (uri (git-reference (url "https://github.com/mlochbaum/BQN")
+                          (commit commit)))
+      (file-name (git-file-name "bqn-sources" commit))
+      (sha256 (base32 "0jhrazwp4s1a0pzrzyxi7szpchp4avqsvpmslfsgk3c88wf57q6b")))))
 
 (define cbqn-bootstrap
   (let* ((revision "2")
-- 
2.43.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 4/5] gnu: bqn: Update cbqn-bootstrap.
  2024-02-10 23:23 [bug#69023] [PATCH 0/5] gnu: package: Update cbqn aecepoglu
                   ` (2 preceding siblings ...)
  2024-02-10 23:28 ` [bug#69023] [PATCH 3/5] gnu: bqn: Update bqn-sources aecepoglu
@ 2024-02-10 23:28 ` aecepoglu
  2024-02-10 23:28 ` [bug#69023] [PATCH 5/5] gnu: bqn: Update cbqn aecepoglu
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-02-10 23:28 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu

gnu/packages/bqn.scm (cbqn-bootstrap): Update cbqn-bootstrap version.
Pass make flags to disable git submodules, disable REPLXX dependency.
Update system invocation to generate bytecode.
Add 'install phase (carried over from cbqn) so other packages can use
cbqn-bootstrap to generate bytecode.

Change-Id: I115737006ef56a90e643c00009155b02a22bf0b1
---
 gnu/packages/bqn.scm | 88 ++++++++++++++++++++++++--------------------
 1 file changed, 49 insertions(+), 39 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 9623fd5b57..6d3ec43a0f 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -147,47 +147,57 @@ (define bqn-sources
       (sha256 (base32 "0jhrazwp4s1a0pzrzyxi7szpchp4avqsvpmslfsgk3c88wf57q6b")))))
 
 (define cbqn-bootstrap
-  (let* ((revision "2")
-         (commit "66584ce1491d300746963b8ed17170348b2a03e6"))
-    (package
-      (name "cbqn-bootstrap")
-      (version (git-version "0" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/dzaima/CBQN")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "13gg96aa56b8k08bjvv8i0f5nxrah2sij7g6pg7i21fdv08rd9iv"))))
-      (build-system gnu-build-system)
-      (arguments
-       (list
-        #:tests? #f                     ; skipping tests for bootstrap
-        #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
-        #:phases
-        #~(modify-phases %standard-phases
-            (delete 'configure)
-            (add-before 'build 'generate-bytecode
-              (lambda* (#:key inputs #:allow-other-keys)
-                (system (string-append #+dbqn
-                                       "/bin/dbqn ./genRuntime "
-                                       #+bqn-sources))))
-            (replace 'install
-              (lambda* (#:key outputs #:allow-other-keys)
-                (mkdir-p (string-append #$output "/bin"))
-                (chmod "BQN" #o755)
-                (rename-file "BQN" "bqn")
-                (install-file "bqn" (string-append #$output "/bin")))))))
-      (native-inputs (list dbqn bqn-sources))
-      (inputs (list icedtea-8 libffi))
-      (synopsis "BQN implementation in C")
-      (description "This package provides the reference implementation of
+  (package
+    (name "cbqn-bootstrap")
+    (version "0.6.0")
+    (outputs '("out"))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dzaima/CBQN")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qh5hv76bj55ajna8smwniqfa1nmnyqahk40in5bzjsx3vvikpw5"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f
+      #:make-flags #~(list (string-append "version="
+                                          #$version)
+                           (string-append "CC="
+                                          #$(cc-for-target)) "REPLXX=0"
+                           "nogit=1" "notui=1")
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-before 'build 'generate-bytecode
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (mkdir-p (string-append "./build/bytecodeLocal/gen"))
+                         (system (string-append #+dbqn
+                                  "/bin/dbqn ./build/genRuntime "
+                                  #+bqn-sources " " "./build/bytecodeLocal")))))
+                   (add-after 'generate-bytecode 'symlink-singeli
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (symlink (string-append (assoc-ref inputs "singeli")
+                                               "/lib") "build/singeliLocal")))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (mkdir-p (string-append #$output "/bin"))
+                       (chmod "BQN" #o755)
+                       (rename-file "BQN" "bqn")
+                       (install-file "bqn"
+                                     (string-append #$output "/bin")))))))
+    (native-inputs (list singeli dbqn bqn-sources))
+    (inputs (list icedtea-8 libffi))
+    (synopsis "BQN implementation in C")
+    (description
+     "This package provides the reference implementation of
 @uref{https://mlochbaum.github.io/BQN/, BQN}, a programming language inspired
 by APL.")
-      (home-page "https://mlochbaum.github.io/BQN/")
-      (license license:gpl3))))
+    (home-page "https://mlochbaum.github.io/BQN/")
+    (license license:gpl3)))
 
 (define-public cbqn
   (package
-- 
2.43.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 5/5] gnu: bqn: Update cbqn.
  2024-02-10 23:23 [bug#69023] [PATCH 0/5] gnu: package: Update cbqn aecepoglu
                   ` (3 preceding siblings ...)
  2024-02-10 23:28 ` [bug#69023] [PATCH 4/5] gnu: bqn: Update cbqn-bootstrap aecepoglu
@ 2024-02-10 23:28 ` aecepoglu
  2024-03-31  4:22   ` aecepoglu
  2024-04-19 18:47   ` Liliana Marie Prikler
       [not found] ` <handler.69023.B.17076072547491.ack@debbugs.gnu.org>
  2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
  6 siblings, 2 replies; 20+ messages in thread
From: aecepoglu @ 2024-02-10 23:28 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu

* gnu/packages/bqn.scm (cbqn): Update cbqn.
Update version.
Override 'generate-bytecode to rely on cbqn-bootstrap instead of dbqn.

Change-Id: I1660d218960e7395f4c10983d840e3fa4b451d14
---
 gnu/packages/bqn.scm | 37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 6d3ec43a0f..66c70a8516 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -209,9 +209,16 @@ (define-public cbqn
                                     (list #:tests?)
                                     (package-arguments cbqn-bootstrap))
        ((#:make-flags flags #~(list))
-        #~(cons* "shared-o3" "o3" #$flags))
+        #~(append #$flags '("shared-o3" "o3")))
        ((#:phases phases #~%standard-phases)
         #~(modify-phases #$phases
+            (replace 'generate-bytecode
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (mkdir-p (string-append "./build/bytecodeLocal/gen"))
+                         (system (string-append #+cbqn-bootstrap
+                                  "/bin/bqn ./build/genRuntime "
+                                  #+bqn-sources " ./build/bytecodeLocal")))))
             (replace 'check
               (lambda* (#:key inputs tests? #:allow-other-keys)
                 (when tests?
@@ -219,25 +226,21 @@ (define-public cbqn
                                          #+bqn-sources
                                          "/test/this.bqn\""))
                   (map (lambda (x)
-                         (system (string-append "./BQN ./test/" x
-                                                ".bqn")))
+                         (system (string-append "./BQN ./test/" x ".bqn")))
                        '("cmp" "equal" "copy" "random"))
                   (system "make -C test/ffi"))))
-            (replace 'install
-              (lambda* (#:key outputs #:allow-other-keys)
-                (let* ((bin (string-append (assoc-ref outputs "out")
-                                           "/bin"))
-                       (lib (string-append (assoc-ref outputs "lib")
-                                           "/lib"))
-                       (include (string-append (assoc-ref outputs "lib")
-                                           "/include")))
-                  (mkdir-p bin)
-                  (rename-file "BQN" "bqn")
-                  (install-file "bqn" bin)
-                  (install-file "libcbqn.so" lib)
-                  (install-file "include/bqnffi.h" include))))))))
-    (native-inputs (list dbqn
+            (add-after 'install 'install-lib-stuff
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((lib (string-append (assoc-ref outputs "lib")
+                                                  "/lib"))
+                              (include (string-append (assoc-ref outputs "lib")
+                                                      "/include")))
+                         (install-file "libcbqn.so" lib)
+                         (install-file "include/bqnffi.h" include))))))))
+    (native-inputs (list cbqn-bootstrap
+                         singeli
                          bqn-sources
                          libffi))
+    (inputs (list libffi))
     (properties
      `((tunable? . #t)))))
-- 
2.43.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 5/5] gnu: bqn: Update cbqn.
  2024-02-10 23:28 ` [bug#69023] [PATCH 5/5] gnu: bqn: Update cbqn aecepoglu
@ 2024-03-31  4:22   ` aecepoglu
  2024-04-19 18:47   ` Liliana Marie Prikler
  1 sibling, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-03-31  4:22 UTC (permalink / raw)
  To: 69023

Can we get this reviewed please? The extra FFI capabilities it brings is critical in developing more libraries in BQN.

On Sat, 10 Feb 2024, at 11:28 PM, aecepoglu wrote:
> * gnu/packages/bqn.scm (cbqn): Update cbqn.
> Update version.
> Override 'generate-bytecode to rely on cbqn-bootstrap instead of dbqn.
>
> Change-Id: I1660d218960e7395f4c10983d840e3fa4b451d14
> ---
>  gnu/packages/bqn.scm | 37 ++++++++++++++++++++-----------------
>  1 file changed, 20 insertions(+), 17 deletions(-)
>
> diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
> index 6d3ec43a0f..66c70a8516 100644
> --- a/gnu/packages/bqn.scm
> +++ b/gnu/packages/bqn.scm
> @@ -209,9 +209,16 @@ (define-public cbqn
>                                      (list #:tests?)
>                                      (package-arguments cbqn-bootstrap))
>         ((#:make-flags flags #~(list))
> -        #~(cons* "shared-o3" "o3" #$flags))
> +        #~(append #$flags '("shared-o3" "o3")))
>         ((#:phases phases #~%standard-phases)
>          #~(modify-phases #$phases
> +            (replace 'generate-bytecode
> +                     (lambda* (#:key outputs #:allow-other-keys)
> +                       (let ((out (assoc-ref outputs "out")))
> +                         (mkdir-p (string-append "./build/bytecodeLocal/gen"))
> +                         (system (string-append #+cbqn-bootstrap
> +                                  "/bin/bqn ./build/genRuntime "
> +                                  #+bqn-sources " ./build/bytecodeLocal")))))
>              (replace 'check
>                (lambda* (#:key inputs tests? #:allow-other-keys)
>                  (when tests?
> @@ -219,25 +226,21 @@ (define-public cbqn
>                                           #+bqn-sources
>                                           "/test/this.bqn\""))
>                    (map (lambda (x)
> -                         (system (string-append "./BQN ./test/" x
> -                                                ".bqn")))
> +                         (system (string-append "./BQN ./test/" x ".bqn")))
>                         '("cmp" "equal" "copy" "random"))
>                    (system "make -C test/ffi"))))
> -            (replace 'install
> -              (lambda* (#:key outputs #:allow-other-keys)
> -                (let* ((bin (string-append (assoc-ref outputs "out")
> -                                           "/bin"))
> -                       (lib (string-append (assoc-ref outputs "lib")
> -                                           "/lib"))
> -                       (include (string-append (assoc-ref outputs "lib")
> -                                           "/include")))
> -                  (mkdir-p bin)
> -                  (rename-file "BQN" "bqn")
> -                  (install-file "bqn" bin)
> -                  (install-file "libcbqn.so" lib)
> -                  (install-file "include/bqnffi.h" include))))))))
> -    (native-inputs (list dbqn
> +            (add-after 'install 'install-lib-stuff
> +                     (lambda* (#:key outputs #:allow-other-keys)
> +                       (let* ((lib (string-append (assoc-ref outputs "lib")
> +                                                  "/lib"))
> +                              (include (string-append (assoc-ref outputs "lib")
> +                                                      "/include")))
> +                         (install-file "libcbqn.so" lib)
> +                         (install-file "include/bqnffi.h" include))))))))
> +    (native-inputs (list cbqn-bootstrap
> +                         singeli
>                           bqn-sources
>                           libffi))
> +    (inputs (list libffi))
>      (properties
>       `((tunable? . #t)))))
> -- 
> 2.43.0




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] Acknowledgement ([PATCH 0/5] gnu: package: Update cbqn.)
       [not found] ` <handler.69023.B.17076072547491.ack@debbugs.gnu.org>
@ 2024-04-14  8:26   ` aecepoglu
  2024-04-14  8:47     ` aecepoglu
  0 siblings, 1 reply; 20+ messages in thread
From: aecepoglu @ 2024-04-14  8:26 UTC (permalink / raw)
  To: 69023

It has been 2 months. Can someone look at this please?

Thank you.

On Sat, 10 Feb 2024, at 11:21 PM, GNU bug Tracking System wrote:
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 69023@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> -- 
> 69023: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69023
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] Acknowledgement ([PATCH 0/5] gnu: package: Update cbqn.)
  2024-04-14  8:26   ` [bug#69023] Acknowledgement ([PATCH 0/5] gnu: package: Update cbqn.) aecepoglu
@ 2024-04-14  8:47     ` aecepoglu
  0 siblings, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-04-14  8:47 UTC (permalink / raw)
  To: 69023; +Cc: liliana.prikler

cc'ing a prior reviewer

On Sun, 14 Apr 2024, at 9:26 AM, aecepoglu wrote:
> It has been 2 months. Can someone look at this please?
>
> Thank you.
>
> On Sat, 10 Feb 2024, at 11:21 PM, GNU bug Tracking System wrote:
>> Thank you for filing a new bug report with debbugs.gnu.org.
>>
>> This is an automatically generated reply to let you know your message
>> has been received.
>>
>> Your message is being forwarded to the package maintainers and other
>> interested parties for their attention; they will reply in due course.
>>
>> Your message has been sent to the package maintainer(s):
>>  guix-patches@gnu.org
>>
>> If you wish to submit further information on this problem, please
>> send it to 69023@debbugs.gnu.org.
>>
>> Please do not send mail to help-debbugs@gnu.org unless you wish
>> to report a problem with the Bug-tracking system.
>>
>> -- 
>> 69023: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69023
>> GNU Bug Tracking System
>> Contact help-debbugs@gnu.org with problems




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 1/5] gnu: bqn: Add singeli.
  2024-02-10 23:28 ` [bug#69023] [PATCH 1/5] gnu: bqn: Add singeli aecepoglu
@ 2024-04-19 18:44   ` Liliana Marie Prikler
  0 siblings, 0 replies; 20+ messages in thread
From: Liliana Marie Prikler @ 2024-04-19 18:44 UTC (permalink / raw)
  To: aecepoglu, 69023

Am Samstag, dem 10.02.2024 um 23:28 +0000 schrieb aecepoglu:
> Newer versions of BQN use Singeli
This comment is kinda gratuitous, but if you need it, please make it a
full sentence.

> * gnu/packages/bqn.scm: Add singeli
Missing final dot.

> Change-Id: I5a2ce84a2b96cdad0617af46978f44ef1a86047f
> ---
>  gnu/packages/bqn.scm | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
> index 4d03385d21..acac2d45cc 100644
> --- a/gnu/packages/bqn.scm
> +++ b/gnu/packages/bqn.scm
> @@ -34,6 +34,32 @@ (define-module (gnu packages bqn)
>    #:use-module (gnu packages java)
>    #:use-module (gnu packages compression))
>  
> +(define-public singeli
> +  (let ((commit "5f9cbd46c265491ff167a5d9377d1462539dbdd8")
> +        (revision "1"))
> +    (package
> +      (name "singeli")
> +      (version (git-version "0.1.1" revision commit))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/mlochbaum/Singeli.git")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32
> "13mfxkb29n4phpqxiwfcd43mcg8773n03nml8d9rhbdb6s5jrixb"))))
> +      (build-system copy-build-system)
> +      (arguments
> +       '(#:install-plan '(("." "lib"))))
This… looks weird.  Particularly given that the layout of Singeli looks
like a source tree with all kinds of things.
> +      (synopsis "Language to generate performant C codes with")
I'd prefer "Domain-specific language for high-performance algorithms".
WDYT?
> +      (description
> +       "Singeli is a domain-specific language for building high-
> performance
> +algorithms with abstractions over code that corresponds to
> individual instructions.
> +It's implemented in BQN, with a frontend that emits IR and a backend
> that converts it to C.")
> +      (home-page "https://github.com/mlochbaum/Singeli")
> +      (license license:isc))))
> +
>  (define-public dbqn
>    (let ((commit "88f2b43966a75cc2c382421218eb30003bb16f4a")
>          (revision "1"))

Cheers




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 2/5] gnu: bqn: Update dbqn.
  2024-02-10 23:28 ` [bug#69023] [PATCH 2/5] gnu: bqn: Update dbqn aecepoglu
@ 2024-04-19 18:44   ` Liliana Marie Prikler
  0 siblings, 0 replies; 20+ messages in thread
From: Liliana Marie Prikler @ 2024-04-19 18:44 UTC (permalink / raw)
  To: aecepoglu, 69023

Am Samstag, dem 10.02.2024 um 23:28 +0000 schrieb aecepoglu:
> * gnu/packages/bqn.scm (dbqn): Update dbqn version.
> 
> Change-Id: Ia538f6b4b6f21e99121d5b65c3da11fd24c1a2c2
> ---
>  gnu/packages/bqn.scm | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)
> 
> diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
> index acac2d45cc..b4d141fc7a 100644
> --- a/gnu/packages/bqn.scm
> +++ b/gnu/packages/bqn.scm
> @@ -61,25 +61,25 @@ (define-public singeli
>        (license license:isc))))
>  
>  (define-public dbqn
> -  (let ((commit "88f2b43966a75cc2c382421218eb30003bb16f4a")
> -        (revision "1"))
> +  (let ((commit "ba14bcf1e1d0f90fe90906a6dd7b921460f070f6")
> +        (revision "2"))
>      (package
>        (name "dbqn")
>        (version (git-version "0.2.1" revision commit))
> -      (source (origin
> -                (method git-fetch)
> -                (uri (git-reference
> -                      (url "https://github.com/dzaima/BQN")
> -                      (commit commit)))
> -                (file-name (git-file-name name version))
> -                (sha256
> -                 (base32
> -                 
> "06mzvv7kmandhgwb6jwz3rivsj4ic549sy8afnb5zr6mfn5isyg5"))))
> +      (source
> +       (origin
> +         (method git-fetch)
> +         (uri (git-reference
> +               (url "https://github.com/dzaima/BQN")
> +               (commit commit)))
> +         (file-name (git-file-name name version))
> +         (sha256
> +          (base32
> "0p09fb7h9c6qvhyfamak0dv9dzqyifkqps6ywcyrybv34xkgckfy"))))
>        (build-system gnu-build-system)
>        (arguments
>         (list
> -        #:imported-modules `(,@%gnu-build-system-modules
> -                             (guix build ant-build-system))
> +        #:imported-modules `(,@%gnu-build-system-modules (guix build
> +                                                          ant-build-
> system))
>          #:modules `((guix build gnu-build-system)
>                      ((guix build ant-build-system)
>                       #:prefix ant:)
The reformatter did you dirty.  Just update the version and the hash :)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH 5/5] gnu: bqn: Update cbqn.
  2024-02-10 23:28 ` [bug#69023] [PATCH 5/5] gnu: bqn: Update cbqn aecepoglu
  2024-03-31  4:22   ` aecepoglu
@ 2024-04-19 18:47   ` Liliana Marie Prikler
  1 sibling, 0 replies; 20+ messages in thread
From: Liliana Marie Prikler @ 2024-04-19 18:47 UTC (permalink / raw)
  To: aecepoglu, 69023

Am Samstag, dem 10.02.2024 um 23:28 +0000 schrieb aecepoglu:
> * gnu/packages/bqn.scm (cbqn): Update cbqn.
> Update version.
> Override 'generate-bytecode to rely on cbqn-bootstrap instead of
> dbqn.
> 
> Change-Id: I1660d218960e7395f4c10983d840e3fa4b451d14
Due to inheritance, I think this change might be merged with the one
before.

I don't see anything grossly weird atm, but I only glanced over this
patch, given that the rest of the series also needs some help.

Cheers




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn.
  2024-02-10 23:23 [bug#69023] [PATCH 0/5] gnu: package: Update cbqn aecepoglu
                   ` (5 preceding siblings ...)
       [not found] ` <handler.69023.B.17076072547491.ack@debbugs.gnu.org>
@ 2024-04-30  0:50 ` aecepoglu
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 1/5] gnu: bqn: Add singeli aecepoglu
                     ` (5 more replies)
  6 siblings, 6 replies; 20+ messages in thread
From: aecepoglu @ 2024-04-30  0:50 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu, liliana.prikler

Applied feedback received.

I am not sure on how to package Singeli differently. It's a directory tree of BQN code that the author would like to think is a library. I think it functions better as an executable, one that relies on BQN itself.
Is this an issue we can revisit later?

Let me know how to proceed.

aecepoglu (5):
  gnu: bqn: Add singeli.
  gnu: bqn: Update dbqn.
  gnu: bqn: Update bqn-sources.
  gnu: bqn: Update cbqn-bootstrap.
  gnu: bqn: Update cbqn.

 gnu/packages/bqn.scm | 176 ++++++++++++++++++++++++++-----------------
 1 file changed, 107 insertions(+), 69 deletions(-)


base-commit: b64862e5cb8209c92aa2eff4cec0be328e38c45d
-- 
2.44.0





^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 1/5] gnu: bqn: Add singeli.
  2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
@ 2024-04-30  0:50   ` aecepoglu
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 2/5] gnu: bqn: Update dbqn aecepoglu
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-04-30  0:50 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu, liliana.prikler

* gnu/packages/bqn.scm: Add singeli.

Change-Id: I5a2ce84a2b96cdad0617af46978f44ef1a86047f
---
 gnu/packages/bqn.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 4d03385d21..eb5e3af6d9 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -34,6 +34,32 @@ (define-module (gnu packages bqn)
   #:use-module (gnu packages java)
   #:use-module (gnu packages compression))
 
+(define-public singeli
+  (let ((commit "5f9cbd46c265491ff167a5d9377d1462539dbdd8")
+        (revision "1"))
+    (package
+      (name "singeli")
+      (version (git-version "0.1.1" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/mlochbaum/Singeli.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "13mfxkb29n4phpqxiwfcd43mcg8773n03nml8d9rhbdb6s5jrixb"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:install-plan '(("." "lib"))))
+      (synopsis "Domain-specific language for high-performance algorithms")
+      (description
+       "Singeli is a domain-specific language for building high-performance
+algorithms with abstractions over code that corresponds to individual instructions.
+It's implemented in BQN, with a frontend that emits IR and a backend that converts it to C.")
+      (home-page "https://github.com/mlochbaum/Singeli")
+      (license license:isc))))
+
 (define-public dbqn
   (let ((commit "88f2b43966a75cc2c382421218eb30003bb16f4a")
         (revision "1"))
-- 
2.44.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 2/5] gnu: bqn: Update dbqn.
  2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 1/5] gnu: bqn: Add singeli aecepoglu
@ 2024-04-30  0:50   ` aecepoglu
  2024-04-30  5:55     ` Liliana Marie Prikler
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 3/5] gnu: bqn: Update bqn-sources aecepoglu
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: aecepoglu @ 2024-04-30  0:50 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu, liliana.prikler

* gnu/packages/bqn.scm (dbqn): Update dbqn version.

Change-Id: Ia538f6b4b6f21e99121d5b65c3da11fd24c1a2c2
---
 gnu/packages/bqn.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index eb5e3af6d9..4252f9508e 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -61,8 +61,8 @@ (define-public singeli
       (license license:isc))))
 
 (define-public dbqn
-  (let ((commit "88f2b43966a75cc2c382421218eb30003bb16f4a")
-        (revision "1"))
+  (let ((commit "ba14bcf1e1d0f90fe90906a6dd7b921460f070f6")
+        (revision "2"))
     (package
       (name "dbqn")
       (version (git-version "0.2.1" revision commit))
-- 
2.44.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 3/5] gnu: bqn: Update bqn-sources.
  2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 1/5] gnu: bqn: Add singeli aecepoglu
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 2/5] gnu: bqn: Update dbqn aecepoglu
@ 2024-04-30  0:50   ` aecepoglu
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 4/5] gnu: bqn: Update cbqn-bootstrap aecepoglu
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-04-30  0:50 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu, liliana.prikler

* gnu/packages/bqn.scm (bqn-sources): Update bqn-sources version.

Change-Id: Ia17dfbc3d6d73fdf3203c99a229eccc6634eca2a
---
 gnu/packages/bqn.scm | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index 4252f9508e..e6cc2aeef1 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -135,17 +135,16 @@ (define-public dbqn
 
 (define bqn-sources
   ;; Aside from dbqn above, the main bqn repository is used by other
-  ;; implementations as a "known good" set of sources. CBQN uses dbqn to
-  ;; generate an intermediate bytecode for its own compilation.
-    (let ((commit "71ce36141aaacfa714edca2e408ca522a3bc5554"))
-      (origin
-        (method git-fetch)
-        (uri (git-reference
-              (url "https://github.com/mlochbaum/BQN")
-              (commit commit)))
-        (file-name (git-file-name "bqn-sources" commit))
-        (sha256
-         (base32 "060a3r5m7hynzxj4iz1av2kj5jf8w3j8yswzzx9wkx31rdrsiv2c")))))
+  ;; implementations as a "known good" set of sources.
+  ;; CBQN initially uses dbqn to bootstrap itself.
+  ;; We use cbqn-bootstrap to build BQN for the end-users
+  (let ((commit "6f651be3e09f0628c7d47ddb7ce819a1755529ca"))
+    (origin
+      (method git-fetch)
+      (uri (git-reference (url "https://github.com/mlochbaum/BQN")
+                          (commit commit)))
+      (file-name (git-file-name "bqn-sources" commit))
+      (sha256 (base32 "0jhrazwp4s1a0pzrzyxi7szpchp4avqsvpmslfsgk3c88wf57q6b")))))
 
 (define cbqn-bootstrap
   (let* ((revision "2")
-- 
2.44.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 4/5] gnu: bqn: Update cbqn-bootstrap.
  2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
                     ` (2 preceding siblings ...)
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 3/5] gnu: bqn: Update bqn-sources aecepoglu
@ 2024-04-30  0:50   ` aecepoglu
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 5/5] gnu: bqn: Update cbqn aecepoglu
  2024-04-30  4:55   ` [bug#69023] [PATCH v2 0/5] " Liliana Marie Prikler
  5 siblings, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-04-30  0:50 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu, liliana.prikler

gnu/packages/bqn.scm (cbqn-bootstrap): Update cbqn-bootstrap version.
Pass make flags to disable git submodules, disable REPLXX dependency.
Update system invocation to generate bytecode.
Add 'install phase (carried over from cbqn) so other packages can use
cbqn-bootstrap to generate bytecode.

Change-Id: I115737006ef56a90e643c00009155b02a22bf0b1
---
 gnu/packages/bqn.scm | 88 ++++++++++++++++++++++++--------------------
 1 file changed, 49 insertions(+), 39 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index e6cc2aeef1..aca30f38b7 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -147,47 +147,57 @@ (define bqn-sources
       (sha256 (base32 "0jhrazwp4s1a0pzrzyxi7szpchp4avqsvpmslfsgk3c88wf57q6b")))))
 
 (define cbqn-bootstrap
-  (let* ((revision "2")
-         (commit "66584ce1491d300746963b8ed17170348b2a03e6"))
-    (package
-      (name "cbqn-bootstrap")
-      (version (git-version "0" revision commit))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://github.com/dzaima/CBQN")
-                      (commit commit)))
-                (file-name (git-file-name name version))
-                (sha256
-                 (base32
-                  "13gg96aa56b8k08bjvv8i0f5nxrah2sij7g6pg7i21fdv08rd9iv"))))
-      (build-system gnu-build-system)
-      (arguments
-       (list
-        #:tests? #f                     ; skipping tests for bootstrap
-        #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
-        #:phases
-        #~(modify-phases %standard-phases
-            (delete 'configure)
-            (add-before 'build 'generate-bytecode
-              (lambda* (#:key inputs #:allow-other-keys)
-                (system (string-append #+dbqn
-                                       "/bin/dbqn ./genRuntime "
-                                       #+bqn-sources))))
-            (replace 'install
-              (lambda* (#:key outputs #:allow-other-keys)
-                (mkdir-p (string-append #$output "/bin"))
-                (chmod "BQN" #o755)
-                (rename-file "BQN" "bqn")
-                (install-file "bqn" (string-append #$output "/bin")))))))
-      (native-inputs (list dbqn bqn-sources))
-      (inputs (list icedtea-8 libffi))
-      (synopsis "BQN implementation in C")
-      (description "This package provides the reference implementation of
+  (package
+    (name "cbqn-bootstrap")
+    (version "0.6.0")
+    (outputs '("out"))
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dzaima/CBQN")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qh5hv76bj55ajna8smwniqfa1nmnyqahk40in5bzjsx3vvikpw5"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list
+      #:tests? #f
+      #:make-flags #~(list (string-append "version="
+                                          #$version)
+                           (string-append "CC="
+                                          #$(cc-for-target)) "REPLXX=0"
+                           "nogit=1" "notui=1")
+      #:phases #~(modify-phases %standard-phases
+                   (delete 'configure)
+                   (add-before 'build 'generate-bytecode
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (mkdir-p (string-append "./build/bytecodeLocal/gen"))
+                         (system (string-append #+dbqn
+                                  "/bin/dbqn ./build/genRuntime "
+                                  #+bqn-sources " " "./build/bytecodeLocal")))))
+                   (add-after 'generate-bytecode 'symlink-singeli
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (symlink (string-append (assoc-ref inputs "singeli")
+                                               "/lib") "build/singeliLocal")))
+                   (replace 'install
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (mkdir-p (string-append #$output "/bin"))
+                       (chmod "BQN" #o755)
+                       (rename-file "BQN" "bqn")
+                       (install-file "bqn"
+                                     (string-append #$output "/bin")))))))
+    (native-inputs (list singeli dbqn bqn-sources))
+    (inputs (list icedtea-8 libffi))
+    (synopsis "BQN implementation in C")
+    (description
+     "This package provides the reference implementation of
 @uref{https://mlochbaum.github.io/BQN/, BQN}, a programming language inspired
 by APL.")
-      (home-page "https://mlochbaum.github.io/BQN/")
-      (license license:gpl3))))
+    (home-page "https://mlochbaum.github.io/BQN/")
+    (license license:gpl3)))
 
 (define-public cbqn
   (package
-- 
2.44.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 5/5] gnu: bqn: Update cbqn.
  2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
                     ` (3 preceding siblings ...)
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 4/5] gnu: bqn: Update cbqn-bootstrap aecepoglu
@ 2024-04-30  0:50   ` aecepoglu
  2024-04-30  4:55   ` [bug#69023] [PATCH v2 0/5] " Liliana Marie Prikler
  5 siblings, 0 replies; 20+ messages in thread
From: aecepoglu @ 2024-04-30  0:50 UTC (permalink / raw)
  To: 69023; +Cc: aecepoglu, liliana.prikler

* gnu/packages/bqn.scm (cbqn): Update cbqn.
Update version.
Override 'generate-bytecode to rely on cbqn-bootstrap instead of dbqn.

Change-Id: I1660d218960e7395f4c10983d840e3fa4b451d14
---
 gnu/packages/bqn.scm | 37 ++++++++++++++++++++-----------------
 1 file changed, 20 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
index aca30f38b7..23c5253046 100644
--- a/gnu/packages/bqn.scm
+++ b/gnu/packages/bqn.scm
@@ -209,9 +209,16 @@ (define-public cbqn
                                     (list #:tests?)
                                     (package-arguments cbqn-bootstrap))
        ((#:make-flags flags #~(list))
-        #~(cons* "shared-o3" "o3" #$flags))
+        #~(append #$flags '("shared-o3" "o3")))
        ((#:phases phases #~%standard-phases)
         #~(modify-phases #$phases
+            (replace 'generate-bytecode
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let ((out (assoc-ref outputs "out")))
+                         (mkdir-p (string-append "./build/bytecodeLocal/gen"))
+                         (system (string-append #+cbqn-bootstrap
+                                  "/bin/bqn ./build/genRuntime "
+                                  #+bqn-sources " ./build/bytecodeLocal")))))
             (replace 'check
               (lambda* (#:key inputs tests? #:allow-other-keys)
                 (when tests?
@@ -219,25 +226,21 @@ (define-public cbqn
                                          #+bqn-sources
                                          "/test/this.bqn\""))
                   (map (lambda (x)
-                         (system (string-append "./BQN ./test/" x
-                                                ".bqn")))
+                         (system (string-append "./BQN ./test/" x ".bqn")))
                        '("cmp" "equal" "copy" "random"))
                   (system "make -C test/ffi"))))
-            (replace 'install
-              (lambda* (#:key outputs #:allow-other-keys)
-                (let* ((bin (string-append (assoc-ref outputs "out")
-                                           "/bin"))
-                       (lib (string-append (assoc-ref outputs "lib")
-                                           "/lib"))
-                       (include (string-append (assoc-ref outputs "lib")
-                                           "/include")))
-                  (mkdir-p bin)
-                  (rename-file "BQN" "bqn")
-                  (install-file "bqn" bin)
-                  (install-file "libcbqn.so" lib)
-                  (install-file "include/bqnffi.h" include))))))))
-    (native-inputs (list dbqn
+            (add-after 'install 'install-lib-stuff
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((lib (string-append (assoc-ref outputs "lib")
+                                                  "/lib"))
+                              (include (string-append (assoc-ref outputs "lib")
+                                                      "/include")))
+                         (install-file "libcbqn.so" lib)
+                         (install-file "include/bqnffi.h" include))))))))
+    (native-inputs (list cbqn-bootstrap
+                         singeli
                          bqn-sources
                          libffi))
+    (inputs (list libffi))
     (properties
      `((tunable? . #t)))))
-- 
2.44.0





^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn.
  2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
                     ` (4 preceding siblings ...)
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 5/5] gnu: bqn: Update cbqn aecepoglu
@ 2024-04-30  4:55   ` Liliana Marie Prikler
  5 siblings, 0 replies; 20+ messages in thread
From: Liliana Marie Prikler @ 2024-04-30  4:55 UTC (permalink / raw)
  To: aecepoglu, 69023

Am Dienstag, dem 30.04.2024 um 01:50 +0100 schrieb aecepoglu:
> Applied feedback received.
> 
> I am not sure on how to package Singeli differently. It's a directory
> tree of BQN code that the author would like to think is a library. I
> think it functions better as an executable, one that relies on BQN
> itself.
> Is this an issue we can revisit later?
I would also like to have it as an executable relying on BQN.  There's
a few things you can do if you need them for bootstrapping.  You could
for example take (package-source singeli) as an input where only the
sources are required.

For packaging singeli itself; assuming you don't need to AOT-compile,
I'd suggest you go with a plan along the lines of

singeli → bin (don't forget to wrap-program)
include → include/singeli
doc → doc/singeli
data → share/singeli
*.bqn → lib/bqn

The singeli bin is possibly somewhat special, as you need to also
supply bqn.  Not sure what the smartest move here is; I'd personally
try to use $(which bqn) with a fallback to a known good one.

Cheers




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [bug#69023] [PATCH v2 2/5] gnu: bqn: Update dbqn.
  2024-04-30  0:50   ` [bug#69023] [PATCH v2 2/5] gnu: bqn: Update dbqn aecepoglu
@ 2024-04-30  5:55     ` Liliana Marie Prikler
  0 siblings, 0 replies; 20+ messages in thread
From: Liliana Marie Prikler @ 2024-04-30  5:55 UTC (permalink / raw)
  To: aecepoglu, 69023

Am Dienstag, dem 30.04.2024 um 01:50 +0100 schrieb aecepoglu:
> * gnu/packages/bqn.scm (dbqn): Update dbqn version.
> 
> Change-Id: Ia538f6b4b6f21e99121d5b65c3da11fd24c1a2c2
> ---
>  gnu/packages/bqn.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gnu/packages/bqn.scm b/gnu/packages/bqn.scm
> index eb5e3af6d9..4252f9508e 100644
> --- a/gnu/packages/bqn.scm
> +++ b/gnu/packages/bqn.scm
> @@ -61,8 +61,8 @@ (define-public singeli
>        (license license:isc))))
>  
>  (define-public dbqn
> -  (let ((commit "88f2b43966a75cc2c382421218eb30003bb16f4a")
> -        (revision "1"))
> +  (let ((commit "ba14bcf1e1d0f90fe90906a6dd7b921460f070f6")
> +        (revision "2"))
>      (package
>        (name "dbqn")
>        (version (git-version "0.2.1" revision commit))
Hash where?




^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2024-04-30  5:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-10 23:23 [bug#69023] [PATCH 0/5] gnu: package: Update cbqn aecepoglu
2024-02-10 23:28 ` [bug#69023] [PATCH 1/5] gnu: bqn: Add singeli aecepoglu
2024-04-19 18:44   ` Liliana Marie Prikler
2024-02-10 23:28 ` [bug#69023] [PATCH 2/5] gnu: bqn: Update dbqn aecepoglu
2024-04-19 18:44   ` Liliana Marie Prikler
2024-02-10 23:28 ` [bug#69023] [PATCH 3/5] gnu: bqn: Update bqn-sources aecepoglu
2024-02-10 23:28 ` [bug#69023] [PATCH 4/5] gnu: bqn: Update cbqn-bootstrap aecepoglu
2024-02-10 23:28 ` [bug#69023] [PATCH 5/5] gnu: bqn: Update cbqn aecepoglu
2024-03-31  4:22   ` aecepoglu
2024-04-19 18:47   ` Liliana Marie Prikler
     [not found] ` <handler.69023.B.17076072547491.ack@debbugs.gnu.org>
2024-04-14  8:26   ` [bug#69023] Acknowledgement ([PATCH 0/5] gnu: package: Update cbqn.) aecepoglu
2024-04-14  8:47     ` aecepoglu
2024-04-30  0:50 ` [bug#69023] [PATCH v2 0/5] gnu: bqn: Update cbqn aecepoglu
2024-04-30  0:50   ` [bug#69023] [PATCH v2 1/5] gnu: bqn: Add singeli aecepoglu
2024-04-30  0:50   ` [bug#69023] [PATCH v2 2/5] gnu: bqn: Update dbqn aecepoglu
2024-04-30  5:55     ` Liliana Marie Prikler
2024-04-30  0:50   ` [bug#69023] [PATCH v2 3/5] gnu: bqn: Update bqn-sources aecepoglu
2024-04-30  0:50   ` [bug#69023] [PATCH v2 4/5] gnu: bqn: Update cbqn-bootstrap aecepoglu
2024-04-30  0:50   ` [bug#69023] [PATCH v2 5/5] gnu: bqn: Update cbqn aecepoglu
2024-04-30  4:55   ` [bug#69023] [PATCH v2 0/5] " Liliana Marie Prikler

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).