unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26926: [PATCH] gnu: update Mes to 0.6.
@ 2017-05-14 16:11 Jan Nieuwenhuizen
  2017-05-16 20:06 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2017-05-14 16:11 UTC (permalink / raw)
  To: 26926

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

Hi!

Mes 0.6 for Guix.  Nyacc is now unbundled.  Mescc works with vanilla
Nyacc.  Mescc behaves more like a regular C compiler and now passes
33/55 tests of the tinycc test2 test suite.

Mescc can also be used as a Nyacc C compiler backend for Guile (x86 only).

Greetings,
janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-update-Mes-to-0.6.patch --]
[-- Type: text/x-patch, Size: 2775 bytes --]

From f84c29fa5947051033d022dcb02496d8f8e14d28 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sun, 14 May 2017 11:35:30 +0200


* gnu/packages/mes.scm (mes): Update to 0.6.
---
 gnu/packages/mes.scm | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 84d6f8ff7..e1bae78ef 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -54,30 +54,35 @@ extensive examples, including parsers for the Javascript and C99 languages.")
     (license (list gpl3+ lgpl3+))))
 
 (define-public mes
-  (let ((commit   "a437c173b9da1949ad966fd50dd4f26e522a910a")
+  (let ((commit "d4420bbcc9f994e2cce430cf156f383dc4092bca")
         (revision "0")
-        (triplet  "i686-unknown-linux-gnu"))
+        (triplet "i686-unknown-linux-gnu")
+        (version "0.6"))
     (package
       (name "mes")
-      (version (string-append "0.5-" revision "." (string-take commit 7)))
+      (version (string-append version "-" revision "." (string-take commit 7)))
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
                       (url "https://gitlab.com/janneke/mes")
                       (commit commit)))
                 (file-name (string-append name "-" version))
-                ;; TODO: Unbundle nyacc.
                 (sha256
-                 (base32 "1ynr0hc0k15307sgzv09k3y5rvy46h0wbh7zcblx1f9v7y8k90zv"))))
+                 (base32 "0qqywk3siyhf08v7xac08lqldklrqfndlp495wgy6ii9fn93197k"))))
       (build-system gnu-build-system)
-      (supported-systems '("x86_64-linux"))
+      (supported-systems '("i686-linux" "x86_64-linux"))
+      (propagated-inputs
+       `(("nyacc" ,nyacc)))
       (native-inputs
        `(("guile" ,guile-2.2)
-         ;; Use cross-compiler rather than #:system "i686-linux" to get
-         ;; MesCC 64 bit .go files installed ready for use with Guile.
-         ("i686-linux-binutils" ,(cross-binutils triplet))
-         ("i686-linux-gcc" ,(let ((triplet triplet)) (cross-gcc triplet)))
-         ("perl" ,perl)))                       ;build-aux/gitlog-to-changelog
+         ,@(if (or (equal? (%current-system) "x86_64-linux")
+                   (equal? (%current-target-system) "x86_64-linux"))
+               ;; Use cross-compiler rather than #:system "i686-linux" to get
+               ;; MesCC 64 bit .go files installed ready for use with Guile.
+               `(("i686-linux-binutils" ,(cross-binutils triplet))
+                 ("i686-linux-gcc" ,(cross-gcc triplet)))
+               '())
+         ("perl" ,perl)))               ;build-aux/gitlog-to-changelog
       (arguments
        `(#:phases
          (modify-phases %standard-phases
-- 
2.12.2


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

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

* bug#26926: [PATCH] gnu: update Mes to 0.6.
  2017-05-14 16:11 bug#26926: [PATCH] gnu: update Mes to 0.6 Jan Nieuwenhuizen
@ 2017-05-16 20:06 ` Ludovic Courtès
  2017-05-16 21:33   ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-05-16 20:06 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 26926

Hi Jan!

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> Mes 0.6 for Guix.  Nyacc is now unbundled.  Mescc works with vanilla
> Nyacc.  Mescc behaves more like a regular C compiler and now passes
> 33/55 tests of the tinycc test2 test suite.

Woow, really impressive progress.

> Mescc can also be used as a Nyacc C compiler backend for Guile (x86 only).

I got stuck in a meta-circular attempt to understand the meaning of this
sentence.  What does this mean in very explicit terms?  :-)

> From f84c29fa5947051033d022dcb02496d8f8e14d28 Mon Sep 17 00:00:00 2001
> From: Jan Nieuwenhuizen <janneke@gnu.org>
> Date: Sun, 14 May 2017 11:35:30 +0200
>
>
 ^ extra line :-)

> * gnu/packages/mes.scm (mes): Update to 0.6.

[...]

> +         ,@(if (or (equal? (%current-system) "x86_64-linux")
> +                   (equal? (%current-target-system) "x86_64-linux"))

Note that %current-system is a “system type” like “x86_64-linux”
whereas %current-target-system is a GNU triplet like
“x86_64-linux-pc-gnu”.  Thus, the second line should be

  (string-prefix? (%current-target-system) "x86_64-linux")

OK with this change!

I’ve added you as a member of the group on Savannah so you can push it
yourself.  :-)

Please read ‘HACKING’ for the details.  Before pushing, can you reply to
this message and sign your reply with the OpenPGP key that you’ll use
to sign commits?  Also please upload your OpenPGP key to Savannah.

Thank you!

Ludo’.

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

* bug#26926: [PATCH] gnu: update Mes to 0.6.
  2017-05-16 20:06 ` Ludovic Courtès
@ 2017-05-16 21:33   ` Jan Nieuwenhuizen
  2017-05-17  7:32     ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Nieuwenhuizen @ 2017-05-16 21:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 26926

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ludovic Courtès writes:

>> Mes 0.6 for Guix.  Nyacc is now unbundled.  Mescc works with vanilla
>> Nyacc.  Mescc behaves more like a regular C compiler and now passes
>> 33/55 tests of the tinycc test2 test suite.
>
> Woow, really impressive progress.

Thanks!

>> Mescc can also be used as a Nyacc C compiler backend for Guile (x86 only).
>
> I got stuck in a meta-circular attempt to understand the meaning of this
> sentence.  What does this mean in very explicit terms?  :-)

What I call Mescc is a Scheme program that can be executed (interpreted)
by Mes, but it can also be run by Guile.  Like so:

    guix package -i nyacc mes
    guile -c '(use-modules (language c99 compiler)) (with-input-from-string "int main () {return printf (\"Hi Mescc\n\");}" c99-input->elf)' > a.out
    chmod +x a.out
    ./a.out

       => Hi Mescc

Does this make it more explicit?

>> From f84c29fa5947051033d022dcb02496d8f8e14d28 Mon Sep 17 00:00:00 2001
>> From: Jan Nieuwenhuizen <janneke@gnu.org>
>> Date: Sun, 14 May 2017 11:35:30 +0200
>>
>>
>  ^ extra line :-)

Weird I think this is a mailing thing, the commit looks fine.

>> +         ,@(if (or (equal? (%current-system) "x86_64-linux")
>> +                   (equal? (%current-target-system) "x86_64-linux"))
>
> Note that %current-system is a “system type” like “x86_64-linux”
> whereas %current-target-system is a GNU triplet like
> “x86_64-linux-pc-gnu”.  Thus, the second line should be
>
>   (string-prefix? (%current-target-system) "x86_64-linux")

Ah...ok.  As an aside: would we want to to change one of these names?

> OK with this change!

Yay!

> I’ve added you as a member of the group on Savannah so you can push it
> yourself.  :-)

Great.

> Please read ‘HACKING’ for the details.  Before pushing, can you reply to
> this message and sign your reply with the OpenPGP key that you’ll use
> to sign commits?  Also please upload your OpenPGP key to Savannah.

Okay, great!

janneke

- -- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQTRDCIV/LL7b0kRcwqngbapL1xx1gUCWRtwKQAKCRCngbapL1xx
1gbuAJ9p6uqKDp2uyU4fyHKM/vsVtyFIRwCgkdokPA4GjklWThXuW5oeGgEWkSQ=
=w12i
-----END PGP SIGNATURE-----

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

* bug#26926: [PATCH] gnu: update Mes to 0.6.
  2017-05-16 21:33   ` Jan Nieuwenhuizen
@ 2017-05-17  7:32     ` Ludovic Courtès
  0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-05-17  7:32 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 26926

Heya,

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> What I call Mescc is a Scheme program that can be executed (interpreted)
> by Mes, but it can also be run by Guile.  Like so:
>
>     guix package -i nyacc mes
>     guile -c '(use-modules (language c99 compiler)) (with-input-from-string "int main () {return printf (\"Hi Mescc\n\");}" c99-input->elf)' > a.out
>     chmod +x a.out
>     ./a.out
>
>        => Hi Mescc
>
> Does this make it more explicit?

Yes, thanks!  It looks very exciting.

>>> +         ,@(if (or (equal? (%current-system) "x86_64-linux")
>>> +                   (equal? (%current-target-system) "x86_64-linux"))
>>
>> Note that %current-system is a “system type” like “x86_64-linux”
>> whereas %current-target-system is a GNU triplet like
>> “x86_64-linux-pc-gnu”.  Thus, the second line should be
>>
>>   (string-prefix? (%current-target-system) "x86_64-linux")
>
> Ah...ok.  As an aside: would we want to to change one of these names?

You mean like renaming ‘%current-target-system’ to
‘%current-target-triplet’ for example?  Why not, it would probably help
avoid this confusion.

>> Please read ‘HACKING’ for the details.  Before pushing, can you reply to
>> this message and sign your reply with the OpenPGP key that you’ll use
>> to sign commits?  Also please upload your OpenPGP key to Savannah.
>
> Okay, great!

Awesome, that was long overdue.

Thank you!

Ludo’.

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

end of thread, other threads:[~2017-05-17  7:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-14 16:11 bug#26926: [PATCH] gnu: update Mes to 0.6 Jan Nieuwenhuizen
2017-05-16 20:06 ` Ludovic Courtès
2017-05-16 21:33   ` Jan Nieuwenhuizen
2017-05-17  7:32     ` Ludovic Courtès

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).