Talk:Mercury (programming language)
|WikiProject Free Software / Software / Computing|
The "logo" listed on this page is actually scanned from a 1940s ad for the [Mercury (automobile)|Ford Mecury]. It's not the logo of the programming language project. -- De Guerre 05:43, 8 April 2007 (UTC)
- Irregardless its origin, they do seem to be using the picture as their logo. Its alt-Tag also says "[Mercury Logo]" on the web-page. —Preceding unsigned comment added by 18.104.22.168 (talk) 18:00, 12 February 2008 (UTC)
- You are probably right about the source of the image but the fact that it appears on the language's main page means that the mercury project has chosen it as their logo and it is fair use for us to use it in the article to identify is as such. Please correct me if I am wrong. 4zimuth (talk) 03:57, 19 February 2008 (UTC)
The article could use a few more examples to illustrate Mercury's syntax. If anyone has any ideas on example programs that illustrate Mercury's functional/logical nature please post them. For now I'll add the Fibonacci numbers program from Ralph Becket's tutorial. 4zimuth (talk) 20:00, 17 February 2008 (UTC)
Fair use rationale for Image:Mercury logo.jpg
Image:Mercury logo.jpg is being used on this article. I notice the image page specifies that the image is being used under fair use but there is no explanation or rationale as to why its use in this Wikipedia article constitutes fair use. In addition to the boilerplate fair use template, you must also write out on the image description page a specific explanation or rationale for why using this image in each article is consistent with fair use.
Please go to the image description page and edit it to include a fair use rationale. Using one of the templates at Wikipedia:Fair use rationale guideline is an easy way to ensure that your image is in compliance with Wikipedia policy, but remember that you must complete the template. Do not simply insert a blank template on an image page.
If there is other fair use media, consider checking that you have specified the fair use rationale on the other images used on this page. Note that any fair use images lacking such an explanation can be deleted one week after being tagged, as described on criteria for speedy deletion. If you have any questions please ask them at the Media copyright questions page. Thank you.
Examples of difficulties introduced by declarativeness?
"can make certain programming constructs (such as a switch over a number of options, with a default) harder to express"
( Day = saturday, !, OpenHours = (8 - 15) ; Day = sunday, !, OpenHours = (9 - 13) ; OpenHours = (8 - 17) )
Mercury: For the same amount of compiler checking as the above, one could use an if-then-else structure:
( if Day = saturday then OpenHours = (8 - 15) else if Day = sunday then OpenHours = (9 - 13) else OpenHours = (8 - 17) ).
[Actually, for the above simple example one would probably use the functional form of if-then-else, i.e. OpenHours = ( if ... then (8 - 15) else if ... then (9 - 13) else (8 - 17) ).]
The above doesn't seem a good example of extra difficulty. I'm sure there better examples (maybe failure-driven I/O ?); can someone supply one? —Preceding unsigned comment added by Pjrm (talk • contribs) 12:04, 1 February 2009 (UTC)
- My guess is that something like this Prolog code might have been meant:
day_openhours(saturday, 8-15) :- !. day_openhours(sunday, 9-13) :- !. day_openhours(_OtherDay, 8-17). % possibly add a check that the first argument is in fact a day
- It's not very pretty, but it gets the job done, is deterministic, and is friendly to clause indexing (i.e., it can possibly compile to smart code that's more efficient than an if-else cascade). Without the cuts, the "default" rule would have to contain some kind of "not one of the days above" condition. That would mean more---redundant!---code, which might justify the "harder to express" judgement. 22.214.171.124 (talk) 19:04, 2 December 2009 (UTC)
- I find the Prolog construct cuts-in-all-cases-except-the-last more readable than the Mercury equivalent. But that's just my opinion which of course falls foul of WP:OR. But there is no issue of expressiveness. The claim "harder to express" needs removing or a reliable source. pgr94 (talk) 10:57, 3 December 2009 (UTC)
Mercury: What you really want is something like this:
( Day = saturday, OpenHours = (8 - 15) ; Day = sunday, OpenHours = (9 - 13) ; ( Day = monday ; Day = tuesday ; Day = wednesday ; Day = thursday ; Day = friday ), OpenHours = (8 - 17) ).
This is a switch whose third case is a multi-cons-id case, This gets compiled efficiently, expresses the computation clearly and (in the right context) uses the determinism checker to ensure that all days are covered exactly once. It can also be run in reverse where the OpenHours is ground and Day is free, where it would be nondeterministic. —Preceding unsigned comment added by 126.96.36.199 (talk) 01:56, 12 February 2010 (UTC)
It sounds a bit iffy to say that it's designed with "good" software engineering principles. This sounds like it's claiming that compiled, static-typed languages are always better than interpreted, dynamic-typed languages. -Qeny (talk) 00:40, 30 April 2009 (UTC)
Nothing (other than their inescapable humanity) prevents a computer programmer from employing good software engineering principles without the help of a strong static type system. However, for those of us that would rather have help, these guys have 'designed' the language with good 'software engineering principles' in mind. I do not think the word 'good' is strong enough to imply exclusion anyhow. Good does not mean better. — Preceding unsigned comment added by 188.8.131.52 (talk) 02:06, 8 October 2012 (UTC)
Is the Mercury project dead?
The website seems to be down more often that it is up (4 out of 5 attempts failed this month). The website looks dated and lacklustre. The forums/mailing lists are full of spam. Shame really, because it looks like an interesting language. pgr94 (talk) 14:51, 26 February 2010 (UTC)
- The current stable version dates from 2006 and the compiler does not compile with recent versions of gcc as supplied with modern linux distributions.  pgr94 (talk) 06:19, 27 February 2010 (UTC)
The project is definitely not dead, Melbourne Uni has at least a dozen postgrad + final year undergrad + staff working on the compiler, however i've been told by some friends working on the compiler that it is very difficult (read: impossible) to bootstrap as chunks of the build process assume that a working mercury implementation is available. —Preceding unsigned comment added by 184.108.40.206 (talk) 05:36, 13 May 2010 (UTC)
- Bootstrapping is really easy and works on any recent Linux, Windows or MacOS X System, please see: README.bootstrap for bootstrapping instructions. Sebgod (talk) 09:41, 26 April 2014 (UTC)
- Looks like the project has moved, which may explain why the old website hasn't been updated. De Guerre (talk) 06:59, 10 July 2013 (UTC)
- Yes, the project moved as no-one at the University was currently working on it (we all left the University). No it's not dead, although with only a handful of active developers development can be slow. Mercury is also used, and supported, commercially. (PaulBone (talk) 02:51, 29 October 2014 (UTC))
Release of the Day
Both the official website and the wikipedia page claim a daily snapshot, but the latest snapshot was built September 3rd, which at the time this was written was well over a month ago. This cannot be accurately classified as a daily snapshot. — Preceding unsigned comment added by 220.127.116.11 (talk) 23:03, 7 October 2012 (UTC)
What's with the Prolog interjections?
The way this article reads it's like someone wrote a puff piece for Mercury and someone else wrote margin notes with arrows pointing to circled text defensively saying "BUT PROLOG CAN DO THIS TOO!". This makes Wikipedia look like its editors belong on the short bus. —Preceding unsigned comment added by 18.104.22.168 (talk) 07:39, 31 December 2010 (UTC)