<div dir="auto">I've set up a Gentoo-based (amd64 branch) Docker image with a functional version of Mercury (current github dev code with a few weeks' lag) and common dev tools. I'll be uploading it to github in the first days of January just in case it should be of any use.<div dir="auto">Fabrice Nicol<br><div dir="auto"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 21 déc. 2021 à 5:21 PM,  <<a href="mailto:users-request@lists.mercurylang.org">users-request@lists.mercurylang.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send users mailing list submissions to<br>
        <a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.mercurylang.org/listinfo/users" rel="noreferrer noreferrer" target="_blank">https://lists.mercurylang.org/listinfo/users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:users-request@lists.mercurylang.org" target="_blank" rel="noreferrer">users-request@lists.mercurylang.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:users-owner@lists.mercurylang.org" target="_blank" rel="noreferrer">users-owner@lists.mercurylang.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Re: Mercury Development Docker, and Bisecting Debugger?<br>
      (Paul Bone)<br>
   2. Re: Mercury Development Docker, and Bisecting Debugger?<br>
      (Volker Wysk)<br>
   3. Re: Mercury Development Docker, and Bisecting Debugger?<br>
      (Zoltan Somogyi)<br>
   4. Re: Mercury Development Docker, and Bisecting Debugger?<br>
      (Volker Wysk)<br>
   5. Useful predicates for loops of IO actions (Volker Wysk)<br>
   6. Re: Useful predicates for loops of IO actions (Zoltan Somogyi)<br>
   7. Possiblt stupid list question.... (Sean Charles (emacstheviking))<br>
   8. Re: Useful predicates for loops of IO actions (Volker Wysk)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 21 Dec 2021 12:13:56 +1100<br>
From: "Paul Bone" <<a href="mailto:paul@bone.id.au" target="_blank" rel="noreferrer">paul@bone.id.au</a>><br>
To: Prolog Rules <<a href="mailto:prologrules@gmail.com" target="_blank" rel="noreferrer">prologrules@gmail.com</a>><br>
Cc: <a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a><br>
Subject: Re: [m-users.] Mercury Development Docker, and Bisecting<br>
        Debugger?<br>
Message-ID: <20211221011356.GA16396@sulfur><br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
<br>
Hi, I published a docker image here: <a href="https://hub.docker.com/r/paulbone/mercury" rel="noreferrer noreferrer" target="_blank">https://hub.docker.com/r/paulbone/mercury</a><br>
<br>
It's built around the debian packages.  If you're using a Debian/Ubuntu<br>
system just use those directly <a href="http://dl.mercurylang.org/deb/" rel="noreferrer noreferrer" target="_blank">http://dl.mercurylang.org/deb/</a><br>
<br>
Pretty sure this is a slightly older version of Mercury. Updating it is on<br>
my TODO list ;-)<br>
<br>
Good luck.<br>
<br>
<br>
-- <br>
Paul Bone<br>
<a href="http://paul.bone.id.au" rel="noreferrer noreferrer" target="_blank">http://paul.bone.id.au</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 21 Dec 2021 08:56:06 +0100<br>
From: Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>><br>
To: Peter Wang <<a href="mailto:novalazy@gmail.com" target="_blank" rel="noreferrer">novalazy@gmail.com</a>>, Prolog Rules<br>
        <<a href="mailto:prologrules@gmail.com" target="_blank" rel="noreferrer">prologrules@gmail.com</a>><br>
Cc: <a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a><br>
Subject: Re: [m-users.] Mercury Development Docker, and Bisecting<br>
        Debugger?<br>
Message-ID:<br>
        <<a href="mailto:e6d959f0e220664fbebbcfeaee15e83a4a010724.camel@volker-wysk.de" target="_blank" rel="noreferrer">e6d959f0e220664fbebbcfeaee15e83a4a010724.camel@volker-wysk.de</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Am Dienstag, dem 21.12.2021 um 11:34 +1100 schrieb Peter Wang:<br>
> asm_fast.gc.decldebug.stseg is the one you will need to use the<br>
> declarative debugger. <br>
<br>
Is the declarative debugger different from the normal debugger, "mdb"?<br>
<br>
Bye, Volker<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 833 bytes<br>
Desc: This is a digitally signed message part<br>
URL: <<a href="http://lists.mercurylang.org/archives/users/attachments/20211221/866a50f2/attachment-0001.sig" rel="noreferrer noreferrer" target="_blank">http://lists.mercurylang.org/archives/users/attachments/20211221/866a50f2/attachment-0001.sig</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 21 Dec 2021 19:08:16 +1100 (AEDT)<br>
From: "Zoltan Somogyi" <<a href="mailto:zoltan.somogyi@runbox.com" target="_blank" rel="noreferrer">zoltan.somogyi@runbox.com</a>><br>
To: "Volker Wysk" <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>><br>
Cc: users <<a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a>><br>
Subject: Re: [m-users.] Mercury Development Docker, and Bisecting<br>
        Debugger?<br>
Message-ID: <E1mzaC0-00061h-1b@rmmprod06.runbox><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
<br>
<br>
On Tue, 21 Dec 2021 08:56:06 +0100, Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>> wrote:<br>
<br>
> Am Dienstag, dem 21.12.2021 um 11:34 +1100 schrieb Peter Wang:<br>
> > asm_fast.gc.decldebug.stseg is the one you will need to use the<br>
> > declarative debugger. <br>
> <br>
> Is the declarative debugger different from the normal debugger, "mdb"?<br>
<br>
Yes and no. It is invoked from within mdb, via the "dd" command,<br>
but it is quite different. Within the declarative debugger, the debugger itself<br>
decides what to look at next, though you can control it. If you know military<br>
terminology, think of yje as the debugger being a tactician that executes<br>
your chosen strategy.<br>
<br>
Also, to make full use of the declarative debugger, you have to compile<br>
your program in a grade whose name contains "decldebug", not just<br>
"debug". This puts into the executable the extra info that the declarative<br>
debugger can use but non-dd mdb does not.<br>
<br>
See section 7.11 of the Mercury users' guide.<br>
<br>
Zoltan.<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 21 Dec 2021 09:11:24 +0100<br>
From: Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>><br>
To: <a href="mailto:zoltan.somogyi@runbox.com" target="_blank" rel="noreferrer">zoltan.somogyi@runbox.com</a><br>
Cc: users <<a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a>><br>
Subject: Re: [m-users.] Mercury Development Docker, and Bisecting<br>
        Debugger?<br>
Message-ID:<br>
        <<a href="mailto:836b8a0960fab5c72a583f239245956709001a55.camel@volker-wysk.de" target="_blank" rel="noreferrer">836b8a0960fab5c72a583f239245956709001a55.camel@volker-wysk.de</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Am Dienstag, dem 21.12.2021 um 19:08 +1100 schrieb Zoltan Somogyi:<br>
> <br>
> On Tue, 21 Dec 2021 08:56:06 +0100, Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>> wrote:<br>
> <br>
> > Am Dienstag, dem 21.12.2021 um 11:34 +1100 schrieb Peter Wang:<br>
> > > asm_fast.gc.decldebug.stseg is the one you will need to use the<br>
> > > declarative debugger. <br>
> > <br>
> > Is the declarative debugger different from the normal debugger, "mdb"?<br>
> <br>
> Yes and no. It is invoked from within mdb, via the "dd" command,<br>
> but it is quite different. Within the declarative debugger, the debugger itself<br>
> decides what to look at next, though you can control it. If you know military<br>
> terminology, think of yje as the debugger being a tactician that executes<br>
> your chosen strategy.<br>
<br>
This sounds interesting.  :-)<br>
<br>
> Also, to make full use of the declarative debugger, you have to compile<br>
> your program in a grade whose name contains "decldebug", not just<br>
> "debug". This puts into the executable the extra info that the declarative<br>
> debugger can use but non-dd mdb does not.<br>
> <br>
> See section 7.11 of the Mercury users' guide.<br>
<br>
Okay, thanks. I'll read the user's guide.<br>
<br>
Cheers,<br>
Volker<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 833 bytes<br>
Desc: This is a digitally signed message part<br>
URL: <<a href="http://lists.mercurylang.org/archives/users/attachments/20211221/35e21661/attachment-0001.sig" rel="noreferrer noreferrer" target="_blank">http://lists.mercurylang.org/archives/users/attachments/20211221/35e21661/attachment-0001.sig</a>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Tue, 21 Dec 2021 16:18:48 +0100<br>
From: Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>><br>
To: Mercury Users <<a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a>><br>
Subject: [m-users.] Useful predicates for loops of IO actions<br>
Message-ID:<br>
        <<a href="mailto:02f305e17818d6170a68b98855a3d85b70c7d5b5.camel@volker-wysk.de" target="_blank" rel="noreferrer">02f305e17818d6170a68b98855a3d85b70c7d5b5.camel@volker-wysk.de</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Mercury developers!<br>
<br>
I'm using four meta-predicates which deal with loops and IO, and I find them<br>
useful. Maybe you want to include them in the Mercury libraries? They<br>
correspond to map, foldl and filter, but they additonally thread through an<br>
IO state. They are the same as Haskell's "mapM", "mapM_", "foldM" and<br>
"filterM" combinators.<br>
<br>
Here are the IO-versions for map. In the first one, the IO-predicate's<br>
result is collected and returned as a list. In the second one, the IO-<br>
predicate doesn't have a return value. It's just the threading of the IO<br>
state that's is wanted:<br>
<br>
:- pred map_io(pred(T, U, io, io)::in(pred(in, out, di, uo) is det),<br>
               list(T)::in,<br>
               list(U)::out,<br>
               io::di, io::uo)<br>
   is det.<br>
<br>
:- pred map_io(pred(T, io, io)::in(pred(in, di, uo) is det),<br>
               list(T)::in,<br>
               io::di, io::uo)<br>
   is det.<br>
<br>
This is the IO-version of foldl:<br>
<br>
:- pred fold_io(pred(T, A, A, io, io)::in(pred(in, in, out, di, uo) is det),<br>
                list(T)::in,<br>
                A::in,<br>
                A::out,<br>
                io::di, io::uo)<br>
   is det.<br>
<br>
And the IO version of list.filter/4:<br>
<br>
:- pred filter_io(<br>
    pred(T, bool, io, io)::in(pred(in, out, di, uo) is det),<br>
    list(T)::in,<br>
    list(T)::out,<br>
    list(T)::out,<br>
    io::di, io::uo)<br>
   is det.<br>
<br>
If you'd like to include these predicates, I'd provide proper comments and,<br>
of course, the implementation.<br>
<br>
Happy hacking, Volker<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 833 bytes<br>
Desc: This is a digitally signed message part<br>
URL: <<a href="http://lists.mercurylang.org/archives/users/attachments/20211221/5fc5c861/attachment-0001.sig" rel="noreferrer noreferrer" target="_blank">http://lists.mercurylang.org/archives/users/attachments/20211221/5fc5c861/attachment-0001.sig</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Wed, 22 Dec 2021 02:51:28 +1100 (AEDT)<br>
From: "Zoltan Somogyi" <<a href="mailto:zoltan.somogyi@runbox.com" target="_blank" rel="noreferrer">zoltan.somogyi@runbox.com</a>><br>
To: "Volker Wysk" <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>><br>
Cc: Mercury Users <<a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a>><br>
Subject: Re: [m-users.] Useful predicates for loops of IO actions<br>
Message-ID: <E1mzhQG-00057t-T7@rmmprod06.runbox><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
<br>
<br>
On Tue, 21 Dec 2021 16:18:48 +0100, Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>> wrote:<br>
> I'm using four meta-predicates which deal with loops and IO, and I find them<br>
> useful. Maybe you want to include them in the Mercury libraries?<br>
<br>
Three out of the four are already there, in more general forms. Instead of<br>
the last pair of arguments required to be I/O states, they can be any type,<br>
and their modes do not have to be di/uo; they can be e.g. in/out.<br>
<br>
> :- pred map_io(pred(T, U, io, io)::in(pred(in, out, di, uo) is det),<br>
>                list(T)::in,<br>
>                list(U)::out,<br>
>                io::di, io::uo)<br>
>    is det.<br>
<br>
This is list.map_foldl.<br>
<br>
> :- pred map_io(pred(T, io, io)::in(pred(in, di, uo) is det),<br>
>                list(T)::in,<br>
>                io::di, io::uo)<br>
>    is det.<br>
<br>
This is list.foldl.<br>
<br>
> This is the IO-version of foldl:<br>
> <br>
> :- pred fold_io(pred(T, A, A, io, io)::in(pred(in, in, out, di, uo) is det),<br>
>                 list(T)::in,<br>
>                 A::in,<br>
>                 A::out,<br>
>                 io::di, io::uo)<br>
>    is det.<br>
<br>
This is list.foldl2.<br>
<br>
> And the IO version of list.filter/4:<br>
> <br>
> :- pred filter_io(<br>
>     pred(T, bool, io, io)::in(pred(in, out, di, uo) is det),<br>
>     list(T)::in,<br>
>     list(T)::out,<br>
>     list(T)::out,<br>
>     io::di, io::uo)<br>
>    is det.<br>
<br>
This is not in the Mercury standard library, and I don't think<br>
I have ever needed a predicate like this. (If I had, I *would* have<br>
added it to the library.)<br>
<br>
> If you'd like to include these predicates, I'd provide proper comments and,<br>
> of course, the implementation.<br>
<br>
Thanks, but that is not necessary; for predicate signatures like this,<br>
the code practically writes itself.<br>
<br>
Zoltan.<br>
<br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Tue, 21 Dec 2021 16:21:06 +0000<br>
From: "Sean Charles (emacstheviking)" <<a href="mailto:objitsu@gmail.com" target="_blank" rel="noreferrer">objitsu@gmail.com</a>><br>
To: users <<a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a>><br>
Subject: [m-users.] Possiblt stupid list question....<br>
Message-ID: <<a href="mailto:F298BCE6-AEE9-4C24-85B3-A7221E532F7B@gmail.com" target="_blank" rel="noreferrer">F298BCE6-AEE9-4C24-85B3-A7221E532F7B@gmail.com</a>><br>
Content-Type: text/plain;       charset=utf-8<br>
<br>
If I have a list of strings I can use<br>
<br>
        string.join_list(Separator, Strings)<br>
<br>
but if I have a list of things, and I want to separate them all with a list of another thing within the same type…?<br>
<br>
I have a formatted output system, it encapsulates text in various type constructors<br>
<br>
        t(string)<br>
        tnl(string)<br>
        etc<br>
<br>
so given a list<br>
<br>
        [ t(“arg1”), t(“arg2”) ]<br>
<br>
how do I arrive at<br>
<br>
        [ t(“arg1”), t(“, “), t(“arg2”) ]<br>
<br>
I COULD introduce a new type constructor called csv() but …. just asking for a friend etc.<br>
<br>
<br>
Thanks<br>
Sean<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Tue, 21 Dec 2021 17:21:22 +0100<br>
From: Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>><br>
To: <a href="mailto:zoltan.somogyi@runbox.com" target="_blank" rel="noreferrer">zoltan.somogyi@runbox.com</a><br>
Cc: Mercury Users <<a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a>><br>
Subject: Re: [m-users.] Useful predicates for loops of IO actions<br>
Message-ID:<br>
        <<a href="mailto:11e856719255a98c9723c3d9c5bc537ecf0bf503.camel@volker-wysk.de" target="_blank" rel="noreferrer">11e856719255a98c9723c3d9c5bc537ecf0bf503.camel@volker-wysk.de</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Am Mittwoch, dem 22.12.2021 um 02:51 +1100 schrieb Zoltan Somogyi:<br>
> <br>
> On Tue, 21 Dec 2021 16:18:48 +0100, Volker Wysk <<a href="mailto:post@volker-wysk.de" target="_blank" rel="noreferrer">post@volker-wysk.de</a>> wrote:<br>
> > I'm using four meta-predicates which deal with loops and IO, and I find them<br>
> > useful. Maybe you want to include them in the Mercury libraries?<br>
> <br>
> Three out of the four are already there, in more general forms. Instead of<br>
> the last pair of arguments required to be I/O states, they can be any type,<br>
> and their modes do not have to be di/uo; they can be e.g. in/out.<br>
<br>
Now I'm feeling bashful... :) In the future, I'll make it a habit to read<br>
the documentation more thoroughly. It's, in part, because I didn't fully<br>
understand what was meant by "accumulator". (I have a different<br>
understanding of it).<br>
<br>
Bye, Volker<br>
<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: signature.asc<br>
Type: application/pgp-signature<br>
Size: 833 bytes<br>
Desc: This is a digitally signed message part<br>
URL: <<a href="http://lists.mercurylang.org/archives/users/attachments/20211221/f903cf12/attachment.sig" rel="noreferrer noreferrer" target="_blank">http://lists.mercurylang.org/archives/users/attachments/20211221/f903cf12/attachment.sig</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@lists.mercurylang.org" target="_blank" rel="noreferrer">users@lists.mercurylang.org</a><br>
<a href="https://lists.mercurylang.org/listinfo/users" rel="noreferrer noreferrer" target="_blank">https://lists.mercurylang.org/listinfo/users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of users Digest, Vol 88, Issue 6<br>
************************************<br>
</blockquote></div>