[PATCH] patch series: Update Raku ecosystem

  • Open
  • quality assurance status badge
Details
3 participants
  • Daniel Sockwell
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Daniel Sockwell
Severity
normal
D
D
Daniel Sockwell wrote on 30 Aug 2022 18:31
(address . guix-patches@gnu.org)
b7d3322144715c3f38fe1f99d543ec64@codesections.com
Hi all,

I am working on updating Guix's version of the compiler/related tools
for the Raku programming language. The current versions are from March
of 2019, which makes them pretty out-of-date given Raku's monthly
release cadence.

This first patch is for MoarVM (the virtual machine that Raku runs on)
which is a dependency for later packages. I note that, unfortunately,
the output of this package is currently non-deterministic; however, the
same is true of the 2019 version so that non-determinism isn't a
regression.

This is my first Guix package so I'd welcome any feedback you might
have. I will follow up shortly with three additional patches that
Guix needs in order to provide an up-to-date Raku compiler.

Thanks in advance!

Best,
Daniel


From 18919edeb7ba1f3e3a18e710a715eec899f1910c Mon Sep 17 00:00:00 2001
Message-Id: <18919edeb7ba1f3e3a18e710a715eec899f1910c.1661876717.git.daniel@codesections.com>
From: Daniel Sockwell <daniel@codesections.com>
Date: Tue, 30 Aug 2022 12:23:21 -0400
Subject: [PATCH] Update moarvm 2019.03->2022.07

---
gnu/packages/perl6.scm | 88 +++++++++++++++++++++---------------------
1 file changed, 45 insertions(+), 43 deletions(-)

Toggle diff (128 lines)
diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm
index dab9dd477b..9b3d98987a 100644
--- a/gnu/packages/perl6.scm
+++ b/gnu/packages/perl6.scm
@@ -22,11 +22,13 @@ (define-module (gnu packages perl6)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages)
+ #:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix build-system rakudo)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
+ #:use-module (gnu packages perl)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages tls))
@@ -34,29 +36,27 @@ (define-module (gnu packages perl6)
(define-public moarvm
(package
(name "moarvm")
- (version "2019.03")
+ (version "2022.07")
(source
- (origin
- (method url-fetch)
- (uri (string-append "https://moarvm.org/releases/MoarVM-"
- version ".tar.gz"))
- (sha256
- (base32
- "017w1zvr6yl0cgjfc1b3ddlc6vjw9q8p7alw1vvsckw95190xc14"))
- (modules '((guix build utils)))
- (snippet
- '(begin
- ;(delete-file-recursively "3rdparty/dynasm") ; JIT
- (delete-file-recursively "3rdparty/dyncall")
- (delete-file-recursively "3rdparty/freebsd")
- (delete-file-recursively "3rdparty/libatomicops")
- (delete-file-recursively "3rdparty/libuv")
- (delete-file-recursively "3rdparty/libtommath")
- (delete-file-recursively "3rdparty/msinttypes")
- #t))))
- (build-system perl-build-system)
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://moarvm.org/releases/MoarVM-" version ".tar.gz"))
+ (sha256 (base32 "0ijvdd7jyq990zyxrlv8pqhf53q20qhbjly6cnagj9pq2r6z0zik"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin (for-each
+ delete-file-recursively
+ '(;"3rdparty/dyncall" ; upstream prefers dyncall to libffi
+ ;"3rdparty/dynasm" ; needed for JIT
+ ;"3rdparty/freebsd" ; freebsd/memmem.o is used on linux
+ "3rdparty/libatomicops"
+ "3rdparty/libtommath"
+ "3rdparty/libuv"
+ "3rdparty/msinttypes"))))))
+ (build-system gnu-build-system)
(arguments
- '(#:phases
+ '(#:test-target "test"
+ #:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
@@ -65,34 +65,36 @@ (define-public moarvm
(setenv "CFLAGS" "-fcommon")
(setenv "LDFLAGS" (string-append "-Wl,-rpath=" out "/lib"))
(invoke "perl" "Configure.pl"
- "--prefix" out
- "--pkgconfig" (string-append pkg-config "/bin/pkg-config")
- "--has-libtommath"
+ "--mimalloc"
"--has-libatomic_ops"
- "--has-libffi"
- "--has-libuv")))))))
+ "--has-libtommath"
+ "--has-libuv"
+ ;"--has-dyncall" ; TODO: package dyncall for guix
+ "--toolchain" "gnu"
+ "--os" "linux"
+ "--pkgconfig" (string-append pkg-config "/bin/pkg-config")
+ "--prefix" out)))))))
(home-page "https://moarvm.org/")
;; These should be inputs but moar.h can't find them when building rakudo
- (propagated-inputs
- (list libatomic-ops libffi libtommath-1.0 libuv))
- (native-inputs
- (list pkg-config))
- (synopsis "VM for NQP And Rakudo Perl 6")
+ (propagated-inputs (list libatomic-ops libtommath libuv))
+ (native-inputs (list pkg-config perl))
+ (synopsis "Virtual machine for the Raku programming language")
(description
- "Short for \"Metamodel On A Runtime\", MoarVM is a modern virtual machine
-built for the Rakudo Perl 6 compiler and the NQP Compiler Toolchain. Highlights
-include:
+ "MoarVM (\"Metamodel On A Runtime\") is a modern virtual machine built for
+the Raku programming language, NQP, and the Rakudo Raku compiler. MoarVM's
+features include:
@itemize
-@item Great Unicode support, with strings represented at grapheme level
-@item Dynamic analysis of running code to identify hot functions and loops, and
-perform a range of optimizations, including type specialization and inlining
-@item Support for threads, a range of concurrency control constructs, and
-asynchronous sockets, timers, processes, and more
-@item Generational, parallel, garbage collection
-@item Support for numerous language features, including first class functions,
-exceptions, continuations, runtime loading of code, big integers and interfacing
-with native libraries.
+@item Just-in-time compilation of running code, allowing MoarVM to identify
+and optimize hot functions/loops. Optimizations include type specialization,
+code inlining/elimination, and on-stack replacement.
+@item Unusually strong Unicode support enabled by strings represented at
+grapheme level and an embedded copy of the Unicode Character Database
+@item Support for numerous Raku language features, such as delimited
+continuations, first-class functions, resumable exceptions, runtime code
+loading, bounded serialization, and native calling/pointer manipulation.
+@item The low-level concurrency primitives required to implement Raku's
+high level concurrency system.
@end itemize")
(license license:artistic2.0)))
--
2.37.2
D
D
Daniel Sockwell wrote on 30 Aug 2022 18:45
(address . 57491@debbugs.gnu.org)
6f2a4c710fdcc9f71a4b5982afff76f8@codesections.com
This second patch adds nqp-configure. Please see the commit message
for an explanation of why it makes sense to factor this out to its
own package.

Best,
Daniel

From 76d8df0bd8042e4da035772d5e8e3e6c22374b0a Mon Sep 17 00:00:00 2001
Message-Id: <76d8df0bd8042e4da035772d5e8e3e6c22374b0a.1661877430.git.daniel@codesections.com>
From: Daniel Sockwell <daniel@codesections.com>
Date: Tue, 30 Aug 2022 12:33:33 -0400
Subject: [PATCH] Add nqp-configure

This package adds nqp-configure, a utility package that both NQP (the
Raku subset used for compiler writing) and Rakudo (the compiler) depend
on. Adding it as a seperate package avoids the need for those two
packages to pull the script down directly from GitHub (as the upstream
instructions provide).
---
gnu/packages/perl6.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm
index 9b3d98987a..086fc9d2e2 100644
--- a/gnu/packages/perl6.scm
+++ b/gnu/packages/perl6.scm
@@ -23,6 +23,7 @@ (define-module (gnu packages perl6)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system perl)
#:use-module (guix build-system rakudo)
#:use-module (gnu packages bdw-gc)
@@ -98,6 +99,30 @@ (define-public moarvm
@end itemize")
(license license:artistic2.0)))
+(define-public nqp-configure
+ (let ((commit "9b98931e0bfb8c4aac61590edf5074e63aa8ea4b" )
+ (revision "0"))
+ (package
+ (name "nqp-configure")
+ (version (git-version "0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url "https://github.com/Raku/nqp-configure")
+ (commit commit)))
+ (sha256 (base32 "1vc1q11kjb964jal9dhgf5vwp371a3rfw7gj987n33kzli7a10n0"))
+ (file-name (git-file-name name version))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan
+ '(("lib" "lib")
+ ("bin" "bin"))))
+ (synopsis "Configuration utility for NQP and Rakudo installations")
+ (description "A utility that simplifies the process of compiling and
+installing NQP (Not Quite Perl) and the Rakudo Raku compiler.")
+ (license license:artistic2.0)
+ (home-page "https://github.com/Raku/nqp-configure" ))))
+
(define-public nqp
(package
(name "nqp")
--
2.37.2
D
D
Daniel Sockwell wrote on 30 Aug 2022 18:49
(address . 57491@debbugs.gnu.org)
209b7ee5a4550c6de4495ef66584f718@codesections.com
The third patch in this series updates NQP, the sub-language that
the Raku compiler depends on.

Best,
Daniel

From 924cc46a38b103906d534e9554fca9499315e12c Mon Sep 17 00:00:00 2001
Message-Id: <924cc46a38b103906d534e9554fca9499315e12c.1661878022.git.daniel@codesections.com>
From: Daniel Sockwell <daniel@codesections.com>
Date: Tue, 30 Aug 2022 12:46:51 -0400
Subject: [PATCH] nqp 2019.03->2022.07

---
.../nqp.do-not-pull-files-via-git.patch | 26 +++++++
gnu/packages/perl6.scm | 73 +++++++++----------
2 files changed, 61 insertions(+), 38 deletions(-)
create mode 100644 gnu/packages/patches/nqp.do-not-pull-files-via-git.patch

Toggle diff (143 lines)
diff --git a/gnu/packages/patches/nqp.do-not-pull-files-via-git.patch b/gnu/packages/patches/nqp.do-not-pull-files-via-git.patch
new file mode 100644
index 0000000000..b99919286f
--- /dev/null
+++ b/gnu/packages/patches/nqp.do-not-pull-files-via-git.patch
@@ -0,0 +1,26 @@
+# Don't fetch nqp-configure from git (Guix supplies it as an input)
+diff --git a/Configure.pl b/Configure.patched.pl
+index ded227d..1fd59c8 100755
+--- a/Configure.pl
++++ b/Configure.patched.pl
+@@ -11,20 +11,6 @@ use File::Spec;
+ use File::Path;
+ use FindBin;
+
+-BEGIN {
+- # Download / Update submodules
+- my $set_config = !qx{git config nqp.initialized};
+- if ( !-e '3rdparty/nqp-configure/LICENSE' ) {
+- my $code = system($^X, 'tools/build/update-submodules.pl', Cwd::cwd(), @ARGV);
+- exit 1 if $code >> 8 != 0;
+- $set_config = 1;
+- }
+- if ($set_config) {
+- system("git config submodule.recurse true");
+- system("git config nqp.initialized 1");
+- }
+-}
+-
+ use lib ( "$FindBin::Bin/tools/lib",
+ "$FindBin::Bin/3rdparty/nqp-configure/lib", );
+ use NQP::Config qw<system_or_die>;
diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm
index 086fc9d2e2..5f43cd59aa 100644
--- a/gnu/packages/perl6.scm
+++ b/gnu/packages/perl6.scm
@@ -26,6 +26,7 @@ (define-module (gnu packages perl6)
#:use-module (guix build-system copy)
#:use-module (guix build-system perl)
#:use-module (guix build-system rakudo)
+ #:use-module (gnu packages)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
@@ -126,19 +127,20 @@ (define-public nqp-configure
(define-public nqp
(package
(name "nqp")
- (version "2019.03")
+ (version "2022.07")
(source
- (origin
- (method url-fetch)
- (uri (string-append "https://rakudo.perl6.org/downloads/nqp/nqp-"
- version ".tar.gz"))
- (sha256
- (base32
- "183zhll13fx416s3hkg4bkvib77kyr857h0nydgrl643fpacxp83"))
- (modules '((guix build utils)))
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/Raku/nqp/releases/download/2022.07/nqp-"
+ version ".tar.gz"))
+
+ (sha256 (base32 "0s124fl2kjahbhr52n92pw9gv1flr099kmlg04358ak7dl81q22q"))
+ (patches (search-patches "nqp.do-not-pull-files-via-git.patch"))
+ (modules '((guix build utils)))
(snippet
'(begin
- (delete-file-recursively "3rdparty") #t))))
+ (delete-file-recursively "3rdparty")))))
(build-system perl-build-system)
(arguments
'(#:phases
@@ -149,42 +151,37 @@ (define-public nqp
"tools/build/gen-js-cross-runner.pl"
"tools/build/gen-js-runner.pl"
"tools/build/install-js-runner.pl"
- "tools/build/install-moar-runner.pl"
- "tools/build/gen-moar-runner.pl"
"t/nqp/111-spawnprocasync.t"
"t/nqp/113-run-command.t")
- (("/bin/sh") (which "sh")))
- #t))
- (add-after 'unpack 'patch-source-date
- (lambda _
- (substitute* "tools/build/gen-version.pl"
- (("gmtime") "gmtime(0)"))
- #t))
- (add-after 'unpack 'remove-failing-test
- ;; One subtest fails for unknown reasons
- (lambda _
- (delete-file "t/nqp/019-file-ops.t")
- #t))
+ (("/bin/sh") (which "sh")))))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (moar (assoc-ref inputs "moarvm")))
+ (let ((out (assoc-ref outputs "out"))
+ (moar (assoc-ref inputs "moarvm"))
+ (nqp-config (assoc-ref inputs "nqp-configure")))
+ (setenv "PERL5LIB" (string-append
+ nqp-config "/lib:" (or (getenv "PERL5LIB")
+ "")))
+ ; MoarVM has some M_AST files that NQP expects to share
+ (copy-recursively (string-append moar "/share/nqp/lib")
+ (string-append out "/share/nqp/lib"))
(invoke "perl" "Configure.pl"
"--backends=moar"
"--with-moar" (string-append moar "/bin/moar")
"--prefix" out)))))))
- (inputs
- (list moarvm))
- (home-page "https://github.com/perl6/nqp")
- (synopsis "Not Quite Perl")
- (description "This is \"Not Quite Perl\" -- a lightweight Perl 6-like
-environment for virtual machines. The key feature of NQP is that it's designed
-to be a very small environment (as compared with, say, perl6 or Rakudo) and is
-focused on being a high-level way to create compilers and libraries for virtual
-machines like MoarVM, the JVM, and others.
-
-Unlike a full-fledged implementation of Perl 6, NQP strives to have as small a
-runtime footprint as it can, while still providing a Perl 6 object model and
+
+ (inputs (list moarvm))
+ (native-inputs (list nqp-configure))
+ (home-page "https://github.com/Raku/nqp")
+ (synopsis "Small programming language built for writing compilers and VMs")
+ (description "NQP is \"Not Quite Perl\", a lightweight Raku-like programming
+language that's designed to provide a high-level way to create compilers and
+libraries for virtual machines. NQP is used to implement the Rakudo compiler
+and to integrate Rakudo with various virtual machines, including MoarVM and the
+Java Virtual Machine.
+
+Unlike a full-fledged implementation of Raku, NQP strives to have as small a
+runtime footprint as it can while still providing Raku's object model and
regular expression engine for the virtual machine.")
(license license:artistic2.0)))
--
2.37.2
D
D
Daniel Sockwell wrote on 30 Aug 2022 18:59
(address . 57491@debbugs.gnu.org)
2dfb67c93f7d2cfabf26c89298c7386d@codesections.com
The fourth (and, for now, last) patch in this series updates Rakudo,
the primary Raku compiler.

Finally, I also want to note that one of the major changes in the Raku
ecosystem in the last few years is Raku's name: Raku was previously known
as "Perl 6" and the Guix module name refers to by that old name. I'm not
sure if there's any way to update Guix's name (or add an alias?) without
breaking things. But I wanted to bring the issue to the attention of
people who might know the best way to proceed.

I look forward to any feedback you might have and/or to being able to
`guix install` an up-to-date version of Raku soon!

Best,
Daniel

From fcdc70a2ec483c6f1abe0c6230ad0aa9a29a2443 Mon Sep 17 00:00:00 2001
Message-Id: <fcdc70a2ec483c6f1abe0c6230ad0aa9a29a2443.1661878694.git.daniel@codesections.com>
From: Daniel Sockwell <daniel@codesections.com>
Date: Tue, 30 Aug 2022 12:58:09 -0400
Subject: [PATCH] rakudo 2019.03->2022.07

---
.../rakudo.do-not-pull-files-via-git.patch | 26 +++++
gnu/packages/perl6.scm | 98 ++++++++++++-------
2 files changed, 88 insertions(+), 36 deletions(-)
create mode 100644 gnu/packages/patches/rakudo.do-not-pull-files-via-git.patch

Toggle diff (172 lines)
diff --git a/gnu/packages/patches/rakudo.do-not-pull-files-via-git.patch b/gnu/packages/patches/rakudo.do-not-pull-files-via-git.patch
new file mode 100644
index 0000000000..4edf67dd0d
--- /dev/null
+++ b/gnu/packages/patches/rakudo.do-not-pull-files-via-git.patch
@@ -0,0 +1,26 @@
+# Don't fetch nqp-configure from git (Guix supplies it as an input)
+diff --git a/Configure.pl b/Configure.after.pl
+index b315704..e4e3668 100755
+--- a/Configure.pl
++++ b/Configure.after.pl
+@@ -11,20 +11,6 @@ use Cwd;
+ use FindBin;
+
+
+-BEGIN {
+- # Download / Update submodules
+- my $set_config = !qx{git config rakudo.initialized};
+- if ( !-e '3rdparty/nqp-configure/LICENSE' ) {
+- my $code = system($^X, 'tools/build/update-submodules.pl', Cwd::cwd(), @ARGV);
+- exit 1 if $code;
+- $set_config = 1;
+- }
+- if ($set_config) {
+- system("git config submodule.recurse true");
+- system("git config rakudo.initialized 1");
+- }
+-}
+-
+ use lib ( "$FindBin::Bin/tools/lib",
+ "$FindBin::Bin/3rdparty/nqp-configure/lib" );
+ use NQP::Config qw<system_or_die slurp>;
diff --git a/gnu/packages/perl6.scm b/gnu/packages/perl6.scm
index 5f43cd59aa..3fedf08f6d 100644
--- a/gnu/packages/perl6.scm
+++ b/gnu/packages/perl6.scm
@@ -27,6 +27,7 @@ (define-module (gnu packages perl6)
#:use-module (guix build-system perl)
#:use-module (guix build-system rakudo)
#:use-module (gnu packages)
+ #:use-module (gnu packages gcc)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
@@ -188,64 +189,89 @@ (define-public nqp
(define-public rakudo
(package
(name "rakudo")
- (version "2019.03.1")
+ (version "2022.07")
(source
- (origin
- (method url-fetch)
- (uri (string-append "https://rakudo.perl6.org/downloads/rakudo/rakudo-"
- version ".tar.gz"))
- (sha256
- (base32
- "1nllf69v8xr6v3kkj7pmryg11n5m3ajfkr7j72pvhrgnjy8lv3r1"))))
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://rakudo.perl6.org/dl/rakudo/rakudo-"
+ version ".tar.gz"))
+ (sha256 (base32 "1bchc3r0axrif2mfgpbadcgi8vgkdq8syksv0lm7klp1akbcjfvs"))
+ (patches (search-patches "rakudo.do-not-pull-files-via-git.patch"))))
(build-system perl-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'patch-source-date
- (lambda _
- (substitute* "tools/build/gen-version.pl"
- (("gmtime") "gmtime(0)"))
- #t))
(add-after 'patch-source-shebangs 'patch-more-shebangs
(lambda _
(substitute* '("tools/build/create-js-runner.pl"
- "tools/build/create-moar-runner.p6"
"tools/build/create-jvm-runner.pl"
- "src/core/Proc.pm6")
- (("/bin/sh") (which "sh")))
- #t))
+ "src/core.c/Proc.pm6")
+ (("/bin/sh")
+ (which "sh")))))
(replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (nqp (assoc-ref inputs "nqp")))
- (invoke "perl" "./Configure.pl"
+ (let ((out (assoc-ref outputs "out"))
+ (nqp (assoc-ref inputs "nqp"))
+ (nqp-config (assoc-ref inputs "nqp-configure")))
+ (setenv "RAKULIB" (string-append nqp-config "/lib:"
+ (or (getenv "RAKULIB") "")))
+ (invoke "perl"
+ "./Configure.pl"
"--backend=moar"
"--with-nqp" (string-append nqp "/bin/nqp")
"--prefix" out))))
- ;; This is the recommended tool for distro maintainers to install perl6
+ (add-before 'check 'setup-for-rakudo-tests
+ (lambda _
+ ;; fudging tests requires downloading the Roast spectests
+ (substitute* "Makefile"
+ (("M_HARNESS5_WITH_FUDGE) --verbosity=1")
+ "M_HARNESS5) --verbosity=1"))
+ (setenv "HOME" "/tmp/")
+ (mkdir-p "/tmp/.raku/short") ;needed for t/05-messages/03-errors.t
+ (substitute* "t/09-moar/01-profilers.t"
+ (("ok.*\\$htmlpath" html-test-text)
+ (string-append "todo \"harness5 fails to write html profile\";"
+ html-test-text)))))
+ ;; This is the recommended tool for distro maintainers to install Raku
;; modules systemwide. See: https://github.com/ugexe/zef/issues/117
(add-after 'install 'install-dist-tool
(lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
+ (let* ((out (assoc-ref outputs "out"))
(dest (string-append out "/share/perl6/tools")))
(install-file "tools/install-dist.p6" dest)
- (substitute* (string-append dest "/install-dist.p6")
- (("/usr/bin/env perl6")
- (string-append out "/bin/perl6"))))
- #t)))))
+ (install-file "tools/install-dist.raku" dest)
+ (substitute* `(,(string-append dest "/install-dist.raku")
+ ,(string-append dest "/install-dist.p6"))
+ (("/usr/bin/env raku")
+ (string-append out "/bin/raku")))))))))
(inputs
- (list moarvm nqp openssl))
+ (list libatomic-ops ;\
+ libuv ; for NativeCall
+ libtommath ;/
+ gcc ; could be a native-input, but needed for NativeCall in practice
+ nqp))
+ (native-inputs
+ (list nqp-configure))
(home-page "https://rakudo.org/")
(native-search-paths
- (list (search-path-specification
- (variable "PERL6LIB")
- (separator ",")
- (files '("share/perl6/lib"
- "share/perl6/site/lib"
- "share/perl6/vendor/lib")))))
- (synopsis "Perl 6 Compiler")
- (description "Rakudo Perl is a compiler that implements the Perl 6
-specification and runs on top of several virtual machines.")
+ (list (search-path-specification
+ (variable "RAKULIB")
+ (separator ",")
+ (files '("share/nqp/lib"
+ "share/perl6/lib" "share/raku/lib"
+ "share/perl6/site/lib" "share/raku/site/lib"
+ "share/perl6/vendor/lib" "share/raku/vendor/lib")))))
+ (synopsis "Compiler for the Raku programming language")
+ (description "Rakudo is a compiler for Raku, a programming language
+that prioritizes expressiveness and is optimized for fun. More specifically,
+Raku is an omni-paradigm, open source, concurrency friendly, metaprogrammable,
+JIT- and AOT-compiled, interoperable, linguistically inspired, and gradually
+typed programming language with Regex/Unicode superpowers. Raku's initial
+design was lead by Larry Wall and Raku was formerly known as Perl 6.
+
+Rakudo is written primarily in Raku, with lower-level features in NQP;
+Rakudo implements the Roast specification suite for Raku compilers and
+targets multiple virtual machines including MoarVM.")
(license license:artistic2.0)))
(define-public perl6-grammar-debugger
--
2.37.2
D
D
Daniel Sockwell wrote on 7 Sep 2022 18:26
(address . 57491@debbugs.gnu.org)
c59044d0c5aed20019b0b2b4e477ef0e@codesections.com
Ping on the below patch series from last week.

I don't mean to be a pest, but I'd like to be able to keep Rakudo/etc
as up to date as possible and Rakudo's monthly-ish release cadence
means that this patch could fall behind upstream fairly soon.

Thanks for your time/attention!
Best,
Daniel
M
M
Maxime Devos wrote on 7 Sep 2022 23:56
e01718cc-4ff3-d82f-c450-1948a529b8aa@telenet.be
Toggle quote (3 lines)
> -@item Great Unicode support, with strings represented at grapheme level
> +@item Unusually strong Unicode support enabled by strings represented at
> +grapheme level and an embedded copy of the Unicode Character Database
IIUC, this means that previously, it didn't include a copy, and now it
does? If so, that's bundling, which is to be avoided in Guix such that
there is only a single copy to keep up-to-date. From (guix)Submitting
Patches:
Toggle quote (12 lines)
>   8. Make sure the package does not use bundled copies of software
>      already available as separate packages.
>
>      Sometimes, packages include copies of the source code of their
>      dependencies as a convenience for users.  However, as a
>      distribution, we want to make sure that such packages end up using
>      the copy we already have in the distribution, if there is one.
>      This improves resource usage (the dependency is built and stored
>      only once), and allows the distribution to make transverse changes
>      such as applying security updates for a given software package in a
>      single place and have them affect the whole system—something that
>      bundled copies prevent.
(If this was already the case in the previous version, that's still bad,
but then it can be left for later, being independent of this patch.)
I noticed you removed the mention of the garbage collector, is this
intentional? Seems a useful feature to me ...
On nqp-configure: Are you sure that 'bin' should be installed in
'.../bin'? Looking at the Git repository, make.nqp does not have a
shebang and can hence not be directly run, maybe you should add a shebang?
Also, is there appear to be some tests in 't', why aren't they run? 
There is a 'rakudo-build-system', maybe this rakudo-build-system can
properly build this package (including tests, maybe it even adds a
shebang for the make.nqp)?
On nqp: why the switch from downloading the source code from the
apparent official site "rakudo.perl6.org" to GitHub?
Toggle quote (4 lines)
> + (substitute* "t/09-moar/01-profilers.t"
> + (("ok.*\\$htmlpath" html-test-text)
> + (string-append "todo \"harness5 fails to write html profile\";"
> + html-test-text)))))
What's the issue here? Is it a limitation of the Guix packaging, or
could it perhaps be an upstream bug? If the latter, upstream needs to be
informed such that they can fix the bug.
On the new package description: everything in Guix is free software, the
"open source" is superfluous. The information on who designed it is
interesting from a historical perspective, but I don't think it is
useful information for package descriptions. It's getting close to
marketing phrases (see (guix)Synopses and Descriptions) with
"prioritizes expressiveness", "optimised for fun" and "superpowers",
"linguistically inspired" (I mean, doesn't every new language try to
gain those properties, and how would you objectively-ish verify those
compared to other languages (ignoring C and assembly and such), and what
does "linguistically inspired" even mean?).  The other things can stay I
suppose.
I've noticed the environment variable changed (PERL6LIB -> RAKULIB), but
(guix build rakudo-build-system) hasn't changed PERL6LIB to RAKULIB. 
Can you verify that our various perl6-... libraries still build, and
that when doing, say, "guix shell rakudo perl6-json-name --
whatever-rakudos-binary-name-is", you can still use perl6-json-name in
whatever is rakudo's name for a REPL?
You add some patches, but they need to be registered in gnu/local.mk as
well, please do so.
On the patch file name: it looks a little suspect, perhaps if you run
the linter on the packages it will have a comment about the file names.
On commit messages: they don't follow our conventions.  Running "git
log" will result in plenty of examples, also see
tend to be a bit terse, but you can always add additional information to
them even when not strictly required.)
A new copyright line can also be added.
Greetings,
Maxime.
Attachment: file
Attachment: OpenPGP_signature
D
D
Daniel Sockwell wrote on 8 Sep 2022 04:18
6a94445eadf207371de0d4639c0a194a@codesections.com
Thanks so much for the feedback. I've answered a few questions inline
below and I'll follow up with revised patches in the next few days.

September 7, 2022 5:56 PM, "Maxime Devos" <maximedevos@telenet.be> wrote:
Toggle quote (3 lines)
> IIUC, this means that previously, it didn't include a copy [of the
> Unicode Character Database], and now it does?

No, it did previously as well; the description just didn't mention it

Toggle quote (3 lines)
> (If this was already the case in the previous version, that's still bad,
> but then it can be left for later, being independent of this patch.)

Understood. I'll put that on the to-do list for future patches (though
pinning specific versions of MoarVM/Rakudo to specific versions of the UCD
is important, so unbundling might mean including more up-to-date versions
of the UCD, unless Guix already stays very current there).

Toggle quote (3 lines)
> I noticed you removed the mention of the garbage collector, is this
> intentional?

I cut the GC from the list of features in an effort to stay within Guix's
length guidelines for descriptions (and because having a GC doesn't do much
to distinguish Raku from Perl/Python/nearly all Lisps/JS, etc.) But the GC
is very much still present :)

Toggle quote (8 lines)
> On nqp-configure: Are you sure that 'bin' should be installed in '.../bin'?
> Looking at the Git repository, make.nqp does not have a shebang and can hence
> not be directly run, maybe you should add a shebang?
>
> Also, is there appear to be some tests in 't', why aren't they run? There is a
> 'rakudo-build-system', maybe this rakudo-build-system can properly build this
> package

I'll double check the above.

Toggle quote (3 lines)
> On nqp: why the switch from downloading the source code from the apparent official site
> "rakudo.perl6.org" to GitHub?

The Rakudo site no longer hosts NQP, just Rakudo. See https://rakudo.perl6.org/downloads


Toggle quote (9 lines)
>> + (substitute* "t/09-moar/01-profilers.t"
>> + (("ok.*\\$htmlpath" html-test-text)
>> + (string-append "todo \"harness5 fails to write html profile\";"
>> + html-test-text)))))
>
> What's the issue here? Is it a limitation of the Guix packaging, or could it perhaps
> be an upstream bug? If the latter, upstream needs to be informed such that they can
> fix the bug.

I'm honestly unsure. I can't understand why it would be a Guix-specific issue, but I've
also never had that test fail when building from source on other distros. More investigation
is called for.


Toggle quote (2 lines)
> On the new package description: ... It's getting close to marketing phrases

Thanks. I could tell I was getting a bit close to that line and guess I let my enthusiasm
carry me away a bit; I'll rein it in.

Toggle quote (4 lines)
> Can you verify that our various perl6-... libraries still build, and that when doing, say,
> "guix shell rakudo perl6-json-name -- whatever-rakudos-binary-name-is", you can still use
> perl6-json-name in whatever is rakudo's name for a REPL?

Will do. (Everything *should* be backwards compatible, but it's 100% worth checking)

Toggle quote (2 lines)
> You add some patches, but they need to be registered in gnu/local.mk as well, please do so.

Will do.

Toggle quote (3 lines)
> On the patch file name: it looks a little suspect, perhaps if you run the linter on the
> packages it will have a comment about the file names.

I ran the linter and its only comment was that patches need to start with the package name.
Is there another rule?

Toggle quote (2 lines)
> On commit messages: they don't follow our conventions. ... A new copyright line can also be added.

Will fix.
Toggle quote (2 lines)
> Greetings,

Thanks! I'm glad to be able to help with a small corner of Guix :)
M
M
Maxime Devos wrote on 8 Sep 2022 11:15
ff7008b4-ade3-2dc1-1dc7-59cde0ffffad@telenet.be
On 08-09-2022 04:18, Daniel Sockwell wrote:
Toggle quote (6 lines)
> (If this was already the case in the previous version, that's still bad,
>> but then it can be left for later, being independent of this patch.)
> Understood. I'll put that on the to-do list for future patches (though
> pinning specific versions of MoarVM/Rakudo to specific versions of the UCD
> is important, so unbundling might mean including more up-to-date versions
> of the UCD, unless Guix already stays very current there).
If having a specific version (and not just a sufficiently recent version)
is important, you can look at the 'ucd-next' package and make a similar
package variant, except for whatever version MoarVM and Rakudo need
Toggle quote (6 lines)
>> I noticed you removed the mention of the garbage collector, is this
>> intentional?
> I cut the GC from the list of features in an effort to stay within Guix's
> length guidelines for descriptions (and because having a GC doesn't do much
> to distinguish Raku from Perl/Python/nearly all Lisps/JS, etc.) But the GC
> is very much still present :)
OK.
Toggle quote (13 lines)
>> On nqp-configure: Are you sure that 'bin' should be installed in '.../bin'?
>> Looking at the Git repository, make.nqp does not have a shebang and can hence
>> not be directly run, maybe you should add a shebang?
>>
>> Also, is there appear to be some tests in 't', why aren't they run? There is a
>> 'rakudo-build-system', maybe this rakudo-build-system can properly build this
>> package
> I'll double check the above.
>
>> On nqp: why the switch from downloading the source code from the apparent official site
>> "rakudo.perl6.org" to GitHub?
> The Rakudo site no longer hosts NQP, just Rakudo. See https://rakudo.perl6.org/downloads
>
OK.
Toggle quote (10 lines)
>>> + (substitute* "t/09-moar/01-profilers.t"
>>> + (("ok.*\\$htmlpath" html-test-text)
>>> + (string-append "todo \"harness5 fails to write html profile\";"
>>> + html-test-text)))))
>> What's the issue here? Is it a limitation of the Guix packaging, or could it perhaps
>> be an upstream bug? If the latter, upstream needs to be informed such that they can
>> fix the bug.
> I'm honestly unsure. I can't understand why it would be a Guix-specific issue, but I've
> also never had that test fail when building from source on other distros. More investigation
> is called for.
OK, I suppose it isn't a blocker.
Toggle quote (8 lines)
>> On the new package description: ... It's getting close to marketing phrases
> Thanks. I could tell I was getting a bit close to that line and guess I let my enthusiasm
> carry me away a bit; I'll rein it in.
>
>> Can you verify that our various perl6-... libraries still build, and that when doing, say,
>> "guix shell rakudo perl6-json-name -- whatever-rakudos-binary-name-is", you can still use
>> perl6-json-name in whatever is rakudo's name for a REPL?
> Will do. (Everything *should* be backwards compatible, but it's 100% worth checking)
I meant, the rakudo-build-system expects PERL6LIB, but the package now has a
RAKULIB search path instead.
Toggle quote (6 lines)
>> You add some patches, but they need to be registered in gnu/local.mk as well, please do so.
> Will do.
>
>> On the patch file name: it looks a little suspect, perhaps if you run the linter on the
>> packages it will have a comment about the file names.
> I ran the linter and its only comment was that patches need to start with the package name.
Possibly it expects the package name to be followed by a - instead of a .
Toggle quote (1 lines)
> Is there another rule?
Patches should have a comment at the top explaining what they are for,
but you already did that.
Greetings,
Maxime
Attachment: OpenPGP_signature
L
L
Ludovic Courtès wrote on 8 Sep 2022 16:21
control message for bug #57491
(address . control@debbugs.gnu.org)
87illyeyl6.fsf@gnu.org
tags 57491 + moreinfo
quit
?