[m-users.] Mercury Crash Course
Philip White
philipwhite at cedarville.edu
Tue Aug 6 11:33:03 AEST 2019
Quoting Julian Fondren (2019-08-05 01:14:50)
> On 2019-08-02 20:14, Julian Fondren wrote:
> > Hello list,
> >
> > I've posted a Mercury tutorial here:
> >
> > https://mercury-in.space/crash.html
Random thoughts on improving discoverability of documentation:
TL;DR
- Good job on the crash course
- Why not to use a function?
- Something on the website should explain how to search the mailing
list.
- Document how to search for documentation.
First I've seen of this; just read through the entire thing and quite
enjoyed it. Thank you for writing this.
Boring thing I noticed. In section 5.1 you are missing the word "not",
if I'm understanding correctly:
You would want to loop over valid solutions with the 'solutions' module
and print the solutions out, and this relatively mundane code would
[not] be very different in Mercury.
I think my biggest hurdle in learning Mercury is that I constantly
wonder why things are the way they are and how I should choose between
different ways of doing things (perhaps it's not the case, but it feels
like Mercury provides many ways of doing the same thing, and that often
certain ways are way better than others) . The crash course does quite a
good job answering these questions, so good job.
One thing I'm wondering follows from 3.9. Functions are just a specific
kind of predicate, but with more convenient syntax. If a predicate
satisfies the conditions of a function, is there ever downside to making
it a function? I would think no. If this is correct, perhaps add a
warning for predicates that could be functions (opt-in to avoid warning
overload).
Unrelated to the crash course, but related to learning material: I
imagine this mailing list has a lot of questions that have been answered
(from my short experience in the past couple days, the answers are high
quality as well). The website says that the archives are searchable,
- but I don't know how to without finding some other websites that index
- mailing lists.
+ but there isn't a builtin search interface. I just realized I can use
+ google filters to get good search results.
+
+ site:http://lists.mercurylang.org/archives/users determinism
Perhaps the crash course could have a section on how to find
documentation; that is always a trouble for me it seems. Ways I've been
doing it are:
1. Search through the compiler source code
2. Read the language reference manual
3. Read the Ralph Becket tutorial (not very complete).
4. Hope google has an answer for me (never works).
It would also be nice to have an easy way to constantly keep a full
archive of the mailing list offline for quick grepping and bash-fu. Does
anybody know of tools for this?
After searching, I found this -
https://github.com/matthicksj/mailman-download - if you don't mind
random scripts from the internet (it's not too long, so you could just
read through it).
More information about the users
mailing list