[m-dev.] Mercury's "Time to Hello World"

Matt Giuca matt.giuca at gmail.com
Mon Mar 25 17:37:50 AEDT 2013

To add a counter-point to this ..

On Mon, Mar 25, 2013 at 5:15 PM, Julien Fischer <jfischer at opturion.com>wrote:

> What makes you think those grades are unnecessary?  The problem with just
> installing a single grade sufficient to build hello world is this:
> immediately
> after building hello world a lot of users try the following:
>      $ mmc --debug hello
> or
>      $ mmc --decldebug hello
> or
>      $ mmc --parallel hello
> or
>      $ mmc --java hello
> etc etc.

I build Mercury with --disable-most-grades because of the excessive build
time, and I have never needed any of the above. (Sure, the debug might have
been useful a few times, but I've always lived without it.) I have been
programming in Mercury for five years, four of those full time, and I have
only ever used the default grade.

I would argue that it is a *far* bigger turn-off to have a huge compile
time before I can even try out the language, than it is to not have those
grades initially. You don't need a debugger, or a parallel build, for hello
world. You only need those once you have developed software of sufficient
complexity to need them. Which is why the author's article is titled "mean
time to Hello World" (rather than "mean time to writing software of
sufficient complexity and then needing a debugger or parallel build"). The
point of the article being that if I am at least a bit invested in a
language when I run into trouble, I will take the time to fix those issues.
But if I can't easily get Hello World running, then I'm not going to bother
at all.

IMO, there isn't really a good solution to this.  Installing just a single
> grade
> isn't going to solve anything; you're just going to annoy a different
> set of users.

Again, the article's point is that you are better off annoying your more
advanced users than annoying beginners, because beginners will just give up
at the first sign of trouble.

I like that the compile step has a --disable-most-grades option. Perhaps it
should be the default?

Another set of users that are harmed by the slow build is users who need to
build Mercury just to build something written in Mercury. They do not need
a debugger, for instance (though they may need a parallel build). I tell my
have to build Mercury in order to build my compiler) to build Mercury
with --disable-most-grades.

I have to say that one of the main pain points for me when I setup a new
computer or wipe my computer is rebuilding Mercury. It is literally the
only piece of non-game software I use that is not in the Ubuntu Software
Centre, and the build takes around 2 hours for me on a 1-year-old laptop
with --disable-most-grades. (I haven't tried without this flag on my most
recent machine, however. Or with -j4. Maybe that will help.) I'd say that
having a Debian package is probably the single most important thing for
getting people to try it out, at least on Linux.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/developers/attachments/20130325/91a9830a/attachment.html>

More information about the developers mailing list