all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#53833] [PATCH] gnu: Add qbe.
@ 2022-02-07  1:13 jgart via Guix-patches via
  2022-02-07  9:47 ` Liliana Marie Prikler
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: jgart via Guix-patches via @ 2022-02-07  1:13 UTC (permalink / raw)
  To: 53833; +Cc: jgart

* gnu/packages/c.scm (qbe): New variable.
---
 gnu/packages/c.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 459d996fa2..8966b7b8d0 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -142,6 +142,36 @@ (define-public pcc
     ;; preferred.  See http://pcc.ludd.ltu.se/licenses/ for more details.
     (license (list license:bsd-2 license:bsd-3))))
 
+(define-public qbe
+  (let ((commit "2ca6fb25a238842418019a3f9ee8d1beb1327f7e")
+        (revision "0"))
+    (package
+      (name "qbe")
+      (version (git-version "0.0" revision commit))
+      (source
+        (origin
+          (method git-fetch)
+          (uri
+            (git-reference
+              (url "git://c9x.me/qbe")
+              (commit commit)))
+          (file-name (git-file-name name version))
+          (sha256
+           (base32
+            "0qbnsrwk10v0s42vzxy2wvksd8xl8bmxfzqv2a4j4zjaklqgfd6j"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; Tests require a running qemu?
+         #:make-flags (list (string-append "CC=" ,(cc-for-target))
+                            (string-append "PREFIX=" %output))
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure))))
+      (synopsis "Backend compiler")
+      (description "@code{qbe} is a compiler backend.")
+      (home-page "https://c9x.me/compile/")
+      (license license:expat))))
+
 (define-public libbytesize
   (package
     (name "libbytesize")
-- 
2.35.0





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

* [bug#53833] [PATCH] gnu: Add qbe.
  2022-02-07  1:13 jgart via Guix-patches via
@ 2022-02-07  9:47 ` Liliana Marie Prikler
  2022-02-08 21:10   ` jgart via Guix-patches via
  2022-04-25 20:08 ` paren--- via Guix-patches via
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Liliana Marie Prikler @ 2022-02-07  9:47 UTC (permalink / raw)
  To: jgart, 53833

Am Sonntag, dem 06.02.2022 um 20:13 -0500 schrieb jgart:
> * gnu/packages/c.scm (qbe): New variable.
> ---
>  gnu/packages/c.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
> index 459d996fa2..8966b7b8d0 100644
> --- a/gnu/packages/c.scm
> +++ b/gnu/packages/c.scm
> @@ -142,6 +142,36 @@ (define-public pcc
>      ;; preferred.  See http://pcc.ludd.ltu.se/licenses/ for more
> details.
>      (license (list license:bsd-2 license:bsd-3))))
>  
> +(define-public qbe
> +  (let ((commit "2ca6fb25a238842418019a3f9ee8d1beb1327f7e")
> +        (revision "0"))
> +    (package
> +      (name "qbe")
> +      (version (git-version "0.0" revision commit))
From the homepage: "QBE is in constant change. It is a young project
and I still have many ideas to try."  As always, I don't think it's too
good of an idea to package projects that tell you "this edge will make
you bleed".  Or in the words of the manual

> Occasionally, we package snapshots of upstream’s version control
> system (VCS) instead of formal releases.  This should remain
> exceptional, because it is up to upstream developers to clarify what
> the stable release is.
I think upstream is very clear here that QBE is not yet stable and
therefore not something you'd want in a distro.  Of course, since the
recipe is a rather simple one, you can easily maintain it in your own
channel -- or not package it at all and use it from source with just a
C compiler.

> +      (source
> +        (origin
> +          (method git-fetch)
> +          (uri
> +            (git-reference
> +              (url "git://c9x.me/qbe")
> +              (commit commit)))
> +          (file-name (git-file-name name version))
> +          (sha256
> +           (base32
> +           
> "0qbnsrwk10v0s42vzxy2wvksd8xl8bmxfzqv2a4j4zjaklqgfd6j"))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       `(#:tests? #f ; Tests require a running qemu?
You should be able to add qemu to native-inputs if that's all it takes.
> +         #:make-flags (list (string-append "CC=" ,(cc-for-target))
> +                            (string-append "PREFIX=" %output))
> +         #:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure))))
> +      (synopsis "Backend compiler")
> +      (description "@code{qbe} is a compiler backend.")
It'd be nice if the description was more descriptive :)
Also the synopsis should probably not invert the ordering of "compiler"
and "backend".
> +      (home-page "https://c9x.me/compile/")
> +      (license license:expat))))
> +
>  (define-public libbytesize
>    (package
>      (name "libbytesize")

Cheers




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

* [bug#53833] [PATCH] gnu: Add qbe.
  2022-02-07  9:47 ` Liliana Marie Prikler
@ 2022-02-08 21:10   ` jgart via Guix-patches via
  0 siblings, 0 replies; 9+ messages in thread
From: jgart via Guix-patches via @ 2022-02-08 21:10 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: 53833

On Mon, 07 Feb 2022 10:47:08 +0100 Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> wrote:
> Am Sonntag, dem 06.02.2022 um 20:13 -0500 schrieb jgart:
> > * gnu/packages/c.scm (qbe): New variable.
> > ---
> >  gnu/packages/c.scm | 30 ++++++++++++++++++++++++++++++
> >  1 file changed, 30 insertions(+)
> > 
> > diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
> > index 459d996fa2..8966b7b8d0 100644
> > --- a/gnu/packages/c.scm
> > +++ b/gnu/packages/c.scm
> > @@ -142,6 +142,36 @@ (define-public pcc
> >      ;; preferred.  See http://pcc.ludd.ltu.se/licenses/ for more
> > details.
> >      (license (list license:bsd-2 license:bsd-3))))
> >  
> > +(define-public qbe
> > +  (let ((commit "2ca6fb25a238842418019a3f9ee8d1beb1327f7e")
> > +        (revision "0"))
> > +    (package
> > +      (name "qbe")
> > +      (version (git-version "0.0" revision commit))
> From the homepage: "QBE is in constant change. It is a young project
> and I still have many ideas to try."  As always, I don't think it's too
> good of an idea to package projects that tell you "this edge will make
> you bleed".  Or in the words of the manual
> 
> > Occasionally, we package snapshots of upstream’s version control
> > system (VCS) instead of formal releases.  This should remain
> > exceptional, because it is up to upstream developers to clarify what
> > the stable release is.
> I think upstream is very clear here that QBE is not yet stable and
> therefore not something you'd want in a distro.  Of course, since the
> recipe is a rather simple one, you can easily maintain it in your own
> channel -- or not package it at all and use it from source with just a
> C compiler.

Hi lilyp,

Thanks for the review. It's much appreciated.

Here's a recent talk from FOSDEM 2022 on qbe by Drew Devault in case
you're interested in finding out more about it:

https://fosdem.org/2022/schedule/event/lg_qbe/

I already have qbe in Guix 'R Us along with cproc:

https://git.sr.ht/~whereiseveryone/guixrus/tree/master/item/guixrus/packages/qbe.scm#L43

If maintainers think it will be ready for Guix in the future ping me or
feel free to send an update as you see fit.

all best,

jgart

https://whereiseveryone.srht.site/
gemini://whereiseveryone.srht.site/

https://sr.ht/~mcf/cproc




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

* [bug#53833] [PATCH] gnu: Add qbe.
  2022-02-07  1:13 jgart via Guix-patches via
  2022-02-07  9:47 ` Liliana Marie Prikler
@ 2022-04-25 20:08 ` paren--- via Guix-patches via
  2022-04-26 18:16 ` paren--- via Guix-patches via
  2022-05-07 17:09 ` (unmatched-parenthesis via Guix-patches via
  3 siblings, 0 replies; 9+ messages in thread
From: paren--- via Guix-patches via @ 2022-04-25 20:08 UTC (permalink / raw)
  To: 53833

QBE is now being used in one reasonably mature project: https://harelang.org https://harelang.org/ 

While it's not at 1.0 yet, it's been in development for ~2 (i think) years now.




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

* [bug#53833] [PATCH] gnu: Add qbe.
       [not found] <454d4c514fc4485670cf8f2ec891034c9014edc0@disroot.org>
@ 2022-04-26  7:43 ` Liliana Marie Prikler
  2022-05-01 13:16   ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Liliana Marie Prikler @ 2022-04-26  7:43 UTC (permalink / raw)
  To: paren, 53833; +Cc: ludo

Am Montag, dem 25.04.2022 um 20:05 +0000 schrieb paren@disroot.org:
> QBE is now being used in one reasonably mature project:
> https://harelang.org
> 
> While it's not at 1.0 yet, it's been in development for ~2 (i think)
> years now.
I'm not asking for a 1.0, I'd be fine with a 0.1 or even a 0.0.1.  As
it stands, every place I look at says "this is experimental" rather
than "you can use this and it ought to work as intended at least for
these sample programs".

Cheers




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

* [bug#53833] [PATCH] gnu: Add qbe.
  2022-02-07  1:13 jgart via Guix-patches via
  2022-02-07  9:47 ` Liliana Marie Prikler
  2022-04-25 20:08 ` paren--- via Guix-patches via
@ 2022-04-26 18:16 ` paren--- via Guix-patches via
  2022-05-07 17:09 ` (unmatched-parenthesis via Guix-patches via
  3 siblings, 0 replies; 9+ messages in thread
From: paren--- via Guix-patches via @ 2022-04-26 18:16 UTC (permalink / raw)
  To: Liliana Marie Prikler, 53833

> I'm not asking for a 1.0, I'd be fine with a 0.1 or even a 0.0.1. As
> it stands, every place I look at says "this is experimental" rather
> than "you can use this and it ought to work as intended at least for
> these sample programs".

Ah, I think you misunderstood slightly: I was saying that Hare was not yet at 1.0 yet (although QBE isn't either.) Regardless, I think it is mature enough for Guix, especially as a stable programming language uses it now.

By the way, https://c9x.me/compile is really outdated, so its estimate on QBE's stability is probably inaccurate by now.




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

* [bug#53833] [PATCH] gnu: Add qbe.
  2022-04-26  7:43 ` [bug#53833] [PATCH] gnu: Add qbe Liliana Marie Prikler
@ 2022-05-01 13:16   ` Ludovic Courtès
  2022-05-02  6:33     ` Liliana Marie Prikler
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2022-05-01 13:16 UTC (permalink / raw)
  To: Liliana Marie Prikler; +Cc: paren, 55151, 53833

Hi,

Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> skribis:

> Am Montag, dem 25.04.2022 um 20:05 +0000 schrieb paren@disroot.org:
>> QBE is now being used in one reasonably mature project:
>> https://harelang.org
>> 
>> While it's not at 1.0 yet, it's been in development for ~2 (i think)
>> years now.
> I'm not asking for a 1.0, I'd be fine with a 0.1 or even a 0.0.1.  As
> it stands, every place I look at says "this is experimental" rather
> than "you can use this and it ought to work as intended at least for
> these sample programs".

But that’s fine: having a web page at all, or one that doesn’t read
“experimental”, has never been a criterion for getting a package in
Guix.

There’s now a second patch for qbe:

  https://issues.guix.gnu.org/55151

I propose to go ahead and apply it, adding anything missing from paren’s
initial patch.

Thanks,
Ludo’.




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

* [bug#53833] [PATCH] gnu: Add qbe.
  2022-05-01 13:16   ` Ludovic Courtès
@ 2022-05-02  6:33     ` Liliana Marie Prikler
  0 siblings, 0 replies; 9+ messages in thread
From: Liliana Marie Prikler @ 2022-05-02  6:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: paren, Jon Eskin, jgart, 55151, 53833

Hi Ludo,

Am Sonntag, dem 01.05.2022 um 15:16 +0200 schrieb Ludovic Courtès:
> Hi,
> 
> Liliana Marie Prikler <liliana.prikler@ist.tugraz.at> skribis:
> 
> > Am Montag, dem 25.04.2022 um 20:05 +0000 schrieb paren@disroot.org:
> > 
> > > QBE is now being used in one reasonably mature project:
> > > https://harelang.org
> > > 
> > > While it's not at 1.0 yet, it's been in development for ~2 (i
> > > think) years now.
> > I'm not asking for a 1.0, I'd be fine with a 0.1 or even a 0.0.1. 
> > As it stands, every place I look at says "this is experimental"
> > rather than "you can use this and it ought to work as intended at
> > least for these sample programs".
> 
> But that’s fine: having a web page at all, or one that doesn’t read
> “experimental”, has never been a criterion for getting a package in
> Guix.
That's not my criterion either.  My critierion is more or less "Will we
have to revision-bump this package daily/every few days because people
want to play with the latest stuff?"  With upstream having seen no
commit for three weeks at this point, I guess it might be fine.

> There’s now a second patch for qbe:
> 
>   https://issues.guix.gnu.org/55151
> 
> I propose to go ahead and apply it, adding anything missing from
> paren’s initial patch.
IMHO, paren's initial patch is slightly better in quality than 55151,
but there are two (three) things lacking.  First, the synopsis and
description are subpar.  55151 has a slightly better synopsis, don't
feel too sure about the description though.  Second, the "fix-cc" phase
from 55151 should be added after unpack ("patch-test-script" sounds
like a better phase name).  It might be better to use (cc-for-target)
in the substitution rather than gcc, but note that this substitution
only applies for native compilation anyway.

cproc too seems to grow at a slower pace now.  Might be worth moving
stuff over from guixrus now.  Note that the cproc package has #:tests
#f without an explanation, though, so it needs some polishing.

Cheers




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

* [bug#53833] [PATCH] gnu: Add qbe.
  2022-02-07  1:13 jgart via Guix-patches via
                   ` (2 preceding siblings ...)
  2022-04-26 18:16 ` paren--- via Guix-patches via
@ 2022-05-07 17:09 ` (unmatched-parenthesis via Guix-patches via
  3 siblings, 0 replies; 9+ messages in thread
From: (unmatched-parenthesis via Guix-patches via @ 2022-05-07 17:09 UTC (permalink / raw)
  To: 53833; +Cc: (unmatched-parenthesis

* gnu/packages/c.scm (qbe): New variable.

Signed-off-by: (unmatched-parenthesis <paren@disroot.org>
---
 gnu/packages/c.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index da034d5fd9..1e3296dae1 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -1064,3 +1064,36 @@ (define-public utf8-h
 C and C++.  The functions it provides are like those from the C header
 string.h, but with a utf8* prefix instead of the str* prefix.")
       (license license:unlicense))))
+
+(define-public qbe
+  (let ((commit "2caa26e388b1c904d2f12fb09f84df7e761d8331")
+        (revision "1"))
+   (package
+    (name "qbe")
+    (version (git-version "0.0" revision commit))
+    (source
+     (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "git://c9x.me/qbe")
+            (commit commit)))
+      (file-name (git-file-name name version))
+      (patches (search-patches "qbe-makefile-add-target.patch"))
+      (sha256
+       (base32 "1gv03ym0gqrl4wkbhysa82025xwrkr1fg44z814b6vnggwlqgljc"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; Tests require a running qemu
+       #:make-flags ,#~(list (string-append "CC=" #$(cc-for-target))
+                             (string-append "PREFIX=" #$output)
+                             (string-append "TARGET=" #$(or (%current-target-system)
+                                                            (%current-system))))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux"))
+    (synopsis "Simple, straightforward backend compiler")
+    (description "QBE is a compiler backend with the goal of reaching 70% of the
+performance of advanced compilers such as LLVM and GCC in only 10% of the code.")
+    (home-page "https://c9x.me/compile/")
+    (license license:expat))))
-- 
2.36.0





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

end of thread, other threads:[~2022-05-07 17:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <454d4c514fc4485670cf8f2ec891034c9014edc0@disroot.org>
2022-04-26  7:43 ` [bug#53833] [PATCH] gnu: Add qbe Liliana Marie Prikler
2022-05-01 13:16   ` Ludovic Courtès
2022-05-02  6:33     ` Liliana Marie Prikler
2022-02-07  1:13 jgart via Guix-patches via
2022-02-07  9:47 ` Liliana Marie Prikler
2022-02-08 21:10   ` jgart via Guix-patches via
2022-04-25 20:08 ` paren--- via Guix-patches via
2022-04-26 18:16 ` paren--- via Guix-patches via
2022-05-07 17:09 ` (unmatched-parenthesis via Guix-patches via

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.