Re: [m-users.] users Digest, Vol 125, Issue 2
Ted Stock <[email protected]> Sun, 26 Oct 2025 11:40:31 +0100
| Newsgroups | gmane.comp.lang.mercury.general |
|---|---|
| Message-ID | <[email protected]> |
--===============1810390027714401927== Content-Type: multipart/alternative; boundary="Apple-Mail=_D64AAD0B-E6F2-4F49-A52D-E42AE3BB09E6" --Apple-Mail=_D64AAD0B-E6F2-4F49-A52D-E42AE3BB09E6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Tomas, Feel free to reach out to me directly if you=E2=80=99d prefer not to = fill the list with AI discussion, but here are a few notes from my = experience. I used Claude to build a Python-style regular expression module with a C = PCRE2 backend. I was pleasantly surprised by Claude=E2=80=99s clauses = (sorry). The whole process took about three hours, including some light = testing. Claude did wander down a few blind alleys and needed occasional = redirection, but given my rusty C skills, it still saved me close to a = week of work. For those interested, the (currently unpolished) = repository is here: https://github.com/testock/mercury-re A few tips: 1. When working with Claude and Mercury, make sure it has access to the = compiler source. This lets you point it to relevant examples it can use = to model its output. 2. Claude doesn=E2=80=99t always interpret compiler errors correctly, so = you=E2=80=99ll need to keep an eye out for cases where it gets = =E2=80=9Cconfused.=E2=80=9D Overall, I found Claude quite helpful for the more tedious parts of = writing Mercury-C wrappers, though I haven=E2=80=99t used it for more = substantial Mercury development. I suspect AI assistants will prove = particularly effective for Hindley-Milner languages like Mercury, where = strong typing and compiler guarantees reduce the need for extensive code = review. My use case doesn=E2=80=99t benefit from that as much, since = interfacing with C is inherently less type-safe. Best regards, Ted > On Oct 26, 2025, at 02:00, [email protected] wrote: >=20 > Send users mailing list submissions to > [email protected] >=20 > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.mercurylang.org/listinfo/users > or, via email, send a message with subject or body 'help' to > [email protected] >=20 > You can reach the person managing the list at > [email protected] >=20 > When replying, please edit your Subject line so it is more specific > than "Re: Contents of users digest..." >=20 >=20 > Today's Topics: >=20 > 1. (cough) "AI" (Tomas By) >=20 >=20 > ---------------------------------------------------------------------- >=20 > Message: 1 > Date: Sat, 25 Oct 2025 22:31:47 +0200 > From: Tomas By <[email protected]> > To: Mercury Users <[email protected]> > Subject: [m-users.] (cough) "AI" > Message-ID: <[email protected]> > Content-Type: text/plain; charset=3DUS-ASCII >=20 > Hi all, >=20 > Just read this on Slashdot: >=20 > | I'm a programmer who started out hesitant about AI, and at first I > | thought all that it could do was auto-complete better. > | Then I tried Claude Code, and it really is like having your own > | personal junior dev assisting you're every need. Like a junior, it > | makes mistakes, but using the *massive* amount of good code that it > | creates, and fixing what's left, is so much faster than writing it > | all from scratch yourself. > = https://slashdot.org/story/25/10/25/0324244/meet-the-people-who-dare-to-sa= y-no-to-ai >=20 > and wonder if anybody has tried this with Mercury? >=20 > I suspect that (1) this person uses C[*]/Java, and (2) the usefulness > of this "AI" stuff for Mercury will be proportionally less in a > similar magnitude as code length for same functionality, ie a factor > ten or so. >=20 > Anybody has any experiences? >=20 > /Tomas >=20 >=20 > ------------------------------ >=20 > Subject: Digest Footer >=20 > _______________________________________________ > users mailing list > [email protected] > https://lists.mercurylang.org/listinfo/users >=20 >=20 > ------------------------------ >=20 > End of users Digest, Vol 125, Issue 2 > ************************************* --Apple-Mail=_D64AAD0B-E6F2-4F49-A52D-E42AE3BB09E6 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;"><div><p = data-start=3D"220" data-end=3D"232">Hi Tomas,</p><p data-start=3D"234" = data-end=3D"375">Feel free to reach out to me directly if you=E2=80=99d = prefer not to fill the list with AI discussion, but here are a few notes = from my experience.</p><p data-start=3D"377" data-end=3D"863">I used = Claude to build a Python-style regular expression module with a C PCRE2 = backend. I was pleasantly surprised by Claude=E2=80=99s clauses (sorry). = The whole process took about three hours, including some light testing. = Claude did wander down a few blind alleys and needed occasional = redirection, but given my rusty C skills, it still saved me close to a = week of work. For those interested, the (currently unpolished) = repository is here: <a = href=3D"https://github.com/testock/mercury-re">https://github.com/testock/= mercury-re</a></p><p data-start=3D"865" data-end=3D"882"><span = data-start=3D"865" data-end=3D"880">A few tips:</span></p><p = data-start=3D"865" data-end=3D"882">1. When working with Claude and = Mercury, make sure it has access to the compiler source. This lets you = point it to relevant examples it can use to model its output.</p><p = data-start=3D"865" data-end=3D"882">2. Claude doesn=E2=80=99t always = interpret compiler errors correctly, so you=E2=80=99ll need to keep an = eye out for cases where it gets =E2=80=9Cconfused.=E2=80=9D</p><p = data-start=3D"1183" data-end=3D"1637">Overall, I found Claude quite = helpful for the more tedious parts of writing Mercury-C wrappers, though = I haven=E2=80=99t used it for more substantial Mercury development. I = suspect AI assistants will prove particularly effective for = Hindley-Milner languages like Mercury, where strong typing and compiler = guarantees reduce the need for extensive code review. My use case = doesn=E2=80=99t benefit from that as much, since interfacing with C is = inherently less type-safe.</p><p data-start=3D"1639" = data-end=3D"1660">Best regards,<br data-start=3D"1652" = data-end=3D"1655">Ted</p></div><div><br></div><div><div><br><blockquote = type=3D"cite"><div>On Oct 26, 2025, at 02:00, = [email protected] wrote:</div><br = class=3D"Apple-interchange-newline"><div><div>Send users mailing list = submissions to<br><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>[email protected]<br><br>To subscribe or unsubscribe = via the World Wide Web, visit<br><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>https://lists.mercurylang.org/listinfo/users<br>or, via email, = send a message with subject or body 'help' to<br><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>[email protected]<br><br>You can reach the = person managing the list at<br><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>[email protected]<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. = (cough) "AI" (Tomas = By)<br><br><br>-----------------------------------------------------------= -----------<br><br>Message: 1<br>Date: Sat, 25 Oct 2025 22:31:47 = +0200<br>From: Tomas By <[email protected]><br>To: Mercury Users = <[email protected]><br>Subject: [m-users.] (cough) = "AI"<br>Message-ID: = <[email protected]><br>Content-Type: text/plain; = charset=3DUS-ASCII<br><br>Hi all,<br><br>Just read this on = Slashdot:<br><br>| I'm a programmer who started out hesitant about AI, = and at first I<br>| thought all that it could do was auto-complete = better.<br>| Then I tried Claude Code, and it really is like having your = own<br>| personal junior dev assisting you're every need. Like a junior, = it<br>| makes mistakes, but using the *massive* amount of good code that = it<br>| creates, and fixing what's left, is so much faster than writing = it<br>| all from scratch = yourself.<br>https://slashdot.org/story/25/10/25/0324244/meet-the-people-w= ho-dare-to-say-no-to-ai<br><br>and wonder if anybody has tried this with = Mercury?<br><br>I suspect that (1) this person uses C[*]/Java, and (2) = the usefulness<br>of this "AI" stuff for Mercury will be proportionally = less in a<br>similar magnitude as code length for same functionality, ie = a factor<br>ten or so.<br><br>Anybody has any = experiences?<br><br>/Tomas<br><br><br>------------------------------<br><b= r>Subject: Digest = Footer<br><br>_______________________________________________<br>users = mailing = list<br>[email protected]<br>https://lists.mercurylang.org/listi= nfo/users<br><br><br>------------------------------<br><br>End of users = Digest, Vol 125, Issue = 2<br>*************************************<br></div></div></blockquote></d= iv><br></div></body></html>= --Apple-Mail=_D64AAD0B-E6F2-4F49-A52D-E42AE3BB09E6-- --===============1810390027714401927== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KdXNlcnMgbWFp bGluZyBsaXN0CnVzZXJzQGxpc3RzLm1lcmN1cnlsYW5nLm9yZwpodHRwczovL2xpc3RzLm1lcmN1 cnlsYW5nLm9yZy9saXN0aW5mby91c2Vycwo= --===============1810390027714401927==--