Talk:Mercury (programming language)
Logo
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 78.48.165.159 (talk) 18:00, 12 February 2008 (UTC)
- As the poster above mentioned, the picture is the official logo as displayed on their website. 4zimuth (talk) 19:51, 17 February 2008 (UTC)
- I'm afraid I can't counter that due to the WP:NOR rule, but back in the day, I was in the office next to the guy who scanned the picture and put it on the official web page. --De Guerre (talk) 23:08, 17 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)
Examples
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.
BetacommandBot (talk) 14:43, 8 March 2008 (UTC)
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"
Prolog:
( 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. 77.117.184.155 (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 210.84.17.212 (talk) 01:56, 12 February 2010 (UTC)
"Good" principles
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)
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. [1] 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 131.170.170.135 (talk) 05:36, 13 May 2010 (UTC)