all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: elaexuotee@wilsonb.com, Maxime Devos <maximedevos@telenet.be>
Cc: 48463@debbugs.gnu.org
Subject: [bug#48463] gnu: Add j.
Date: Wed, 12 Jan 2022 20:55:21 +0100	[thread overview]
Message-ID: <72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@gmail.com> (raw)
In-Reply-To: <2P322C327XW0Q.21O5A4IFGMNDI@wilsonb.com>

Hi,

> +(define-module (gnu packages jsoftware)
> +  #:use-module ((guix build utils))
> + [...]

Double bracketing is pointless, use it only when needed.

> +(define* (make-j #:key
> +                 (builder "guix.gnu.org")
> +                 vername
> +                 revision
> +                 hash
> +                 (type 'release)
> +                 commit
> +                 (patches '())
> +                 (extra-inputs '())
> +                 (extra-envars '()))
> + (package
> +   (name (jname "jsoftware-j" type))
> +   (version (jversion->string vername revision))
> +   (source
> +    (origin
> +      (method git-fetch)
> +      (uri (git-reference
> +            (url "https://github.com/jsoftware/jsource")
> +            (commit (or commit (jinfo->git-tag vername type
> revision))))
Vername sounds a little weird, make that version-base or something
clearer.  Also, the argument #:commit is used in an unclear fashion --
if you were to pass an actual commit hash to it, it'd still be treated
as a release and not be using git-version. 

On a related note
> +(define (jversion->string version revision)
> +  "Return a string representation of a J version and (optional)
> revision pair."
> +  (let ((postfix (if (not revision) ""
> +                   (string-append "." revision))))
> +    (string-append version postfix)))
should also take commit and revision should probably be dashed.  In
that way, when packaging commits between releases we can use
"jrevision.guix-revision" as the complete revision.

In short, I'd add a #:tag argument to override the tag and treat commit
like a let-bound commit.

> +    `(#:modules (((ice-9 ftw) #:select (scandir))
> +                 ((ice-9 popen) #:select (open-pipe* close-pipe))
> +                 ((ice-9 regex) #:select (match:substring string-
> match))
> +                 ((ice-9 threads) #:select (parallel par-for-each))
> +                 ((srfi srfi-26) #:select (cut))
> +                 ((srfi srfi-1) #:select (fold))
> +                 ,@%gnu-build-system-modules)
It's nice that you annotated all those, but note that it probably
wouldn't have been needed.  If you notice this list getting longer and
longer as you update, consider dropping the #:selects.

> +        (replace 'build
> +          (lambda _
> +            (setenv "USE_OPENMP" "1")
> +            (setenv "USE_THREAD" "1")
> +            (for-each (lambda (var-val) (apply setenv var-val))
> +                      (quote ,extra-envars))
> +            ;; The build scripts assume that PWD is make2.
> +            (with-directory-excursion "make2"
> +              (let* ((platform ,(if (target-arm?) "raspberry"
> "linux"))
> +                     (jplat (string-append "jplatform=" platform))
> +                     (target-bit ,(if (target-64bit?) "64" "32"))
> +                     (jbit (string-append "j64x=" "j" target-bit))
> +                     (jbit-avx (string-append jbit "avx"))
> +                     (jbit-avx2 (string-append jbit "avx2")))
> +                (parallel
> +                  ;; Since jconsole doesn't depend on AVX features,
> we just
> +                  ;; build it once.
> +                  (invoke "env" jplat jbit "./build_jconsole.sh")
> +                  (invoke "env" jplat jbit "./build_libj.sh")
> +                  (if ,(target-64bit?)
> +                    (parallel
> +                      (invoke "env" jplat jbit-avx
> "./build_libj.sh")
> +                      (invoke "env" jplat jbit-avx2
> +                              "./build_libj.sh"))))))))
Maxime already made a comment w.r.t. 32bit AVX here, but I think this
would be a prime example to use the CPU tuning that was recently
landed.  

Most of the above (except the semantics of the make-j keyword
arguments) are not blockers in my opinion.

Cheers




  reply	other threads:[~2022-01-12 19:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 10:54 [bug#48463] gnu: Add j elaexuotee--- via Guix-patches via
2021-05-16 14:30 ` Leo Prikler
2021-05-24 13:37   ` elaexuotee--- via Guix-patches via
2021-05-24 14:39     ` Leo Prikler
2021-05-25  3:57       ` elaexuotee--- via Guix-patches via
2021-10-01 15:31         ` Liliana Marie Prikler
2022-01-12  9:47           ` elaexuotee--- via Guix-patches via
2022-01-12 11:06             ` Maxime Devos
2022-01-12 11:10             ` Maxime Devos
2022-01-12 12:07               ` elaexuotee--- via Guix-patches via
2022-01-12 19:55                 ` Liliana Marie Prikler [this message]
2022-01-13  7:51                   ` elaexuotee--- via Guix-patches via
2022-01-13 17:51                     ` Liliana Marie Prikler
2022-01-15 14:05                       ` elaexuotee--- via Guix-patches via
2022-01-15 15:08                         ` Liliana Marie Prikler
2022-01-16  5:29                           ` elaexuotee--- via Guix-patches via
2022-01-16  8:04                             ` Liliana Marie Prikler
2022-01-16 15:19                               ` elaexuotee--- via Guix-patches via
2022-01-16 19:53                                 ` Liliana Marie Prikler
2022-01-17  1:24                                   ` elaexuotee--- via Guix-patches via
2022-01-17 21:12                                     ` Liliana Marie Prikler
2022-01-18  4:01                                       ` elaexuotee--- via Guix-patches via
2022-01-18  8:04                                         ` Liliana Marie Prikler
2022-01-18 10:40                                           ` elaexuotee--- via Guix-patches via
2022-01-18 11:33                                             ` Liliana Marie Prikler
2022-05-28 12:44 ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72aff035c93f9f91afa54ef5b51c7381b0b02ccb.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=48463@debbugs.gnu.org \
    --cc=elaexuotee@wilsonb.com \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.