The Mercury logic-programming language — which provides Java, Erlang and C# compilations — is now available as 11.07 from http://www.mercury.csse.unimelb.edu.au/download/release.html
No binary downloads are available so *nix requires a GNU C build and Windows requires Cygwin or MSYS.
Both x86-32 and x86-64 are supported.
Showing posts with label Mercury. Show all posts
Showing posts with label Mercury. Show all posts
Thursday, December 22, 2011
Sunday, March 27, 2011
Mercury programming
There is a new blog to follow on the Mercury logic programming project: http://adventuresinmercury.blogspot.com/
It has a specific focus and is sure welcome.
It has a specific focus and is sure welcome.
Friday, November 5, 2010
Seven Languages and a few questions
Pragmatic Programmer has published Bruce Tate's Seven Languages. I have some reservations.
The languages are Clojure, Haskell, Io, Prolog, Scala, Erlang, and Ruby. Looks cool. But look again.
Clojure is something of a Lisp reincarnate. Io and Ruby are botrh Smalltalk in another guise: Ruby is Smalltalk in files à la Perl; Dekorte's Io is Smalltalk-2 (Self) + actor (but not morphic - for which see one brand of Squeak Smalltalk.)
Erlang is best understood as Prolog reduced. So what would have been beyond 1974 Prolog? Oz. Or Mercury. Or XSB. Or think outside the box with a chapter on Logtalk instead.
Scala Traits come from Squeak Smalltalk, btw.
I have no quarrel with Haskell being there, though some would argue for OCaml.
But if LISP is not there, what is Prolog doing there? Why not JESS or Drools instead? And not a single expression-based language (Rebol, ICON/UNICON ( and now ObjectIcon and Converge) or MIT Curl, the language (ww.curl.com.)
With Ruby there, we at least have a reminder that performance matters - so maybe it should have been JRuby. But I can imagine how Pythonists might feel incensed.
I would suggest 12 languages in 12 months or 3 languages in 3 months.
Take a moment to look at the comments on the Prolog N-Queens code. Is Tate claiming that the two files in question are his copyrighted code? Compare the ICON code for N-Queens and ask whether you wouldn't be better looking there for an alternative language on your shelf. And Rebol 3 is really starting to take shape over at Rebol.net, Rebol.org and Rebol.com
Most CS folks recall the course in which they were required to do some Prolog. But would they skip a chapter on JESS or Logtalk?
The real story in Prolog in the past 25 years is constraint resolution, and that can be seen best in Oz. But the reader will have to use emacs. Oops.
I don't mean to knock Amzi! Prolog for Eclipse or many of the excellent Prolog projects such as swi-prolog.org (now with UNICODE and constraint-handling rules) but I would argue that what makes SWI interesting is Logtalk - and if there is RDF in the picture, that points to XSB.
Clojure, Haskell, Io, XSB, Scala, Erlang, JESS and JRuby in 8 weeks. Ok, now I'm more likely to recommend a book.
"Clojure, F#, Io, Oz, Scala, Erlang, and JRuby in 7 months". Call it "between vacations reading-and-testing-and-coding-and-designing". And you would have my attention.
And whatever became of Tcl ( it only gave us Tk, Expect, Sqlite and now TclOO.) Oops.
Oh, and Mercury now generates Erlang in addition to C or Java.
PS
Isn't concurrency coming to UNICON? Isn't Oz now distributed Oz? Isn't ObjectIcon at code.google.com/p/objecticon
Oh - right. The cool factor. And Smalltalk itself - after giving us so much and then the RefactoringBrowser and then UnitTest and pair-programming and eXtreme Programming and the wiki at c2.com ... is not yet cool again. Might as well wait for Hermes2 on a non-Linux OS.
Oh - and Rebol is already PEG-equivalent at 300+ Kb core running with a claim to a whole 15 Mb of working memory. Hmmm.
The languages are Clojure, Haskell, Io, Prolog, Scala, Erlang, and Ruby. Looks cool. But look again.
Clojure is something of a Lisp reincarnate. Io and Ruby are botrh Smalltalk in another guise: Ruby is Smalltalk in files à la Perl; Dekorte's Io is Smalltalk-2 (Self) + actor (but not morphic - for which see one brand of Squeak Smalltalk.)
Erlang is best understood as Prolog reduced. So what would have been beyond 1974 Prolog? Oz. Or Mercury. Or XSB. Or think outside the box with a chapter on Logtalk instead.
Scala Traits come from Squeak Smalltalk, btw.
I have no quarrel with Haskell being there, though some would argue for OCaml.
But if LISP is not there, what is Prolog doing there? Why not JESS or Drools instead? And not a single expression-based language (Rebol, ICON/UNICON ( and now ObjectIcon and Converge) or MIT Curl, the language (ww.curl.com.)
With Ruby there, we at least have a reminder that performance matters - so maybe it should have been JRuby. But I can imagine how Pythonists might feel incensed.
I would suggest 12 languages in 12 months or 3 languages in 3 months.
Take a moment to look at the comments on the Prolog N-Queens code. Is Tate claiming that the two files in question are his copyrighted code? Compare the ICON code for N-Queens and ask whether you wouldn't be better looking there for an alternative language on your shelf. And Rebol 3 is really starting to take shape over at Rebol.net, Rebol.org and Rebol.com
Most CS folks recall the course in which they were required to do some Prolog. But would they skip a chapter on JESS or Logtalk?
The real story in Prolog in the past 25 years is constraint resolution, and that can be seen best in Oz. But the reader will have to use emacs. Oops.
I don't mean to knock Amzi! Prolog for Eclipse or many of the excellent Prolog projects such as swi-prolog.org (now with UNICODE and constraint-handling rules) but I would argue that what makes SWI interesting is Logtalk - and if there is RDF in the picture, that points to XSB.
Clojure, Haskell, Io, XSB, Scala, Erlang, JESS and JRuby in 8 weeks. Ok, now I'm more likely to recommend a book.
"Clojure, F#, Io, Oz, Scala, Erlang, and JRuby in 7 months". Call it "between vacations reading-and-testing-and-coding-and-designing". And you would have my attention.
And whatever became of Tcl ( it only gave us Tk, Expect, Sqlite and now TclOO.) Oops.
Oh, and Mercury now generates Erlang in addition to C or Java.
PS
Isn't concurrency coming to UNICON? Isn't Oz now distributed Oz? Isn't ObjectIcon at code.google.com/p/objecticon
Oh - right. The cool factor. And Smalltalk itself - after giving us so much and then the RefactoringBrowser and then UnitTest and pair-programming and eXtreme Programming and the wiki at c2.com ... is not yet cool again. Might as well wait for Hermes2 on a non-Linux OS.
Oh - and Rebol is already PEG-equivalent at 300+ Kb core running with a claim to a whole 15 Mb of working memory. Hmmm.
Wednesday, November 4, 2009
What's new in what was once Borland Turbo Prolog?
PDC Visual Prolog has a page on what's new in 7.2
What stood out for me was anonymous predicates or "nameless clauses" as the Prolog response to "anonymous functions".
If you are interested in Tokyo Cabinet, you might want to glance back at PDC over the years and their features offering internal and external databases. While I have been more excited about XSB and Logtalk in recent years, I have always enjoyed working in PDC.
There is something of an equivalent PROLOG in the Mercury project: both are distinctive in having a type system and in how they track determinism. Both PDC and Mercury would like to appeal to programmers with a hankering for a functional style.
There are many active Prolog projects: the SWI-Prolog project is likely the most active in opensource and offers RDF parsing - somewhat different from that offered by XSB.
It is odd that with all the interest in Joe Armstrong and Erlang that there seems to be no up-tick in interest in Prolog and Constraint Logic Programming: the acquisition of ILog by IBM and the move of Drools into JBoss seem not to float any other boats.
Like Prologia (Prolog IV) in France, PDC now focuses on their software application offerings and not the language - but you wonder what would have happened if Apple or Microsoft had offered a Prolog to compete with Borland back in the late 80's ... but you could say the same of Smalltalk (in fairness, Apple's Objective-C is like Smalltalk and for some time Apple was home to some Smalltalk researchers.) At least PROLOG never suffered the fate of Self and Strongtalk at the hands of SUN.
PDC was an early advocate of DSL's (Domain Specific Languages) but I do not know if these feature prominently in their own commercial packages.
Meanwhile, over at Strawberry Prolog a Windows prolog has been in a Beta for version 3.0 for almost a year: it was to contain a major innovation in the design of Prolog compilers, but I am still back at 2.9.2
If you like Eclipse, you might like AMZI Prolog 8 which comes as an Eclipse environment. Amzi! is a pleasure to use and has great documentation if you have been away from logic programming for awhile. But there are other options for Prologs which interface with Java and many "small" prolog interpreters about.
One way to glimpse which Prolog implementations are active is to see which are supported by Logtalk - but that would exclude some of those which come with their own OOP frameworks .. such as PDC.
For other recent changes in PROLOG, see xsb.com and XSB at sourceforge.
If you are tracking any other PROLOG innovations, please add a comment and a link. I have a note on Distributed Oz 1.4.0 elsewhere ...
What stood out for me was anonymous predicates or "nameless clauses" as the Prolog response to "anonymous functions".
If you are interested in Tokyo Cabinet, you might want to glance back at PDC over the years and their features offering internal and external databases. While I have been more excited about XSB and Logtalk in recent years, I have always enjoyed working in PDC.
There is something of an equivalent PROLOG in the Mercury project: both are distinctive in having a type system and in how they track determinism. Both PDC and Mercury would like to appeal to programmers with a hankering for a functional style.
There are many active Prolog projects: the SWI-Prolog project is likely the most active in opensource and offers RDF parsing - somewhat different from that offered by XSB.
It is odd that with all the interest in Joe Armstrong and Erlang that there seems to be no up-tick in interest in Prolog and Constraint Logic Programming: the acquisition of ILog by IBM and the move of Drools into JBoss seem not to float any other boats.
Like Prologia (Prolog IV) in France, PDC now focuses on their software application offerings and not the language - but you wonder what would have happened if Apple or Microsoft had offered a Prolog to compete with Borland back in the late 80's ... but you could say the same of Smalltalk (in fairness, Apple's Objective-C is like Smalltalk and for some time Apple was home to some Smalltalk researchers.) At least PROLOG never suffered the fate of Self and Strongtalk at the hands of SUN.
PDC was an early advocate of DSL's (Domain Specific Languages) but I do not know if these feature prominently in their own commercial packages.
Meanwhile, over at Strawberry Prolog a Windows prolog has been in a Beta for version 3.0 for almost a year: it was to contain a major innovation in the design of Prolog compilers, but I am still back at 2.9.2
If you like Eclipse, you might like AMZI Prolog 8 which comes as an Eclipse environment. Amzi! is a pleasure to use and has great documentation if you have been away from logic programming for awhile. But there are other options for Prologs which interface with Java and many "small" prolog interpreters about.
One way to glimpse which Prolog implementations are active is to see which are supported by Logtalk - but that would exclude some of those which come with their own OOP frameworks .. such as PDC.
For other recent changes in PROLOG, see xsb.com and XSB at sourceforge.
If you are tracking any other PROLOG innovations, please add a comment and a link. I have a note on Distributed Oz 1.4.0 elsewhere ...
Labels:
Logtalk,
Mercury,
PDC,
PROLOG,
Stawberry Prolog,
Visual Prolog,
XSB
Sunday, August 12, 2007
Documenting a Curl Surge Lab Interface class
Surge Lab had been marketed as the name for the Curl IDE. The IDE has a feature that you may recognize if you use eclipse or Aptana: you can flip from one perspective to another. But the IDE gives only a glimpse of Curl interaction for the developer because, like Smalltalk Seaside 'halos' on a web page, Curl offers a Ctrl-Right-Click which opens text and graphic inspectors on objects embedded in a 'live' web page.
The ctrl-right-click pop-up menu includes viewing and editing the Curl source, inspecting objects and both 'Start Profiling' and 'Start HTTP Monitoring'. (Curl also offers test-coverage tools for HP's Mercury QTP.)
The inspectors are toolbar driven and almost feel like a Smalltalk object inspector becuase one toolbar item is 'Evaluate' which is just like the JavaScript popup in FireFox developer tools. Unfortunately, the inspectors lack some features of a typical Smalltalk inspector. The first that I would add to be Curl-ish would be a 'select-text-F1' event-handler to get the fine Curl doc viewer to popup.
What I will do this morning is include a Curl snippet of what you might browse in such a popup; it demonstatrates how the doc viewer is driven.
The following snippet is copied from
The behavior of the default Curl editor is not my favorite side of Curl at the moment: high-lighting a '{' offers a context popup to view the '{' in a class browser instead of the handy behavior when you add a '}' which is to blink the matching '{' in red.
Adding a '}' and then placing a CR in front has the disconcerting behavior of aligning the '}' with the matching '{'. This is annoying if it is your habit to end a line using a 'do' with an opening brace ( as required by many script interpreters such as Tcl and which is {script-style} for many programmers.)
But the little annoyances in the default editor come to nothing because there is an interface for external editors.
Over at eclectic-pencil I will add a page with a working HTML example of an embedded Curl {example} macro using a TreeControl object. Install the plugin and Ctrl-Right-Click. Cool.
The ctrl-right-click pop-up menu includes viewing and editing the Curl source, inspecting objects and both 'Start Profiling' and 'Start HTTP Monitoring'. (Curl also offers test-coverage tools for HP's Mercury QTP.)
The inspectors are toolbar driven and almost feel like a Smalltalk object inspector becuase one toolbar item is 'Evaluate' which is just like the JavaScript popup in FireFox developer tools. Unfortunately, the inspectors lack some features of a typical Smalltalk inspector. The first that I would add to be Curl-ish would be a 'select-text-F1' event-handler to get the fine Curl doc viewer to popup.
What I will do this morning is include a Curl snippet of what you might browse in such a popup; it demonstatrates how the doc viewer is driven.
The following snippet is copied from
Snippet:I:\Curl RTE\Surge\6\ide\editor-interface EditorInterface.scurl
{doc-next {purpose This class defines the interface that an editor must support to be integrated with Surge Lab. } {details An external editor needs to implement this class, and define a top-level variable named {monospace surge-lab-editor} which is an instance of its implementation of this class. } } {define-class public open abstract EditorInterface {doc-next {purpose Initialize the editor. An interface back to Surge Lab is provided for the editor. } } {method public open abstract {initialize surge-lab-interface:SurgeLabInterface }:void }
The behavior of the default Curl editor is not my favorite side of Curl at the moment: high-lighting a '{' offers a context popup to view the '{' in a class browser instead of the handy behavior when you add a '}' which is to blink the matching '{' in red.
Adding a '}' and then placing a CR in front has the disconcerting behavior of aligning the '}' with the matching '{'. This is annoying if it is your habit to end a line using a 'do' with an opening brace ( as required by many script interpreters such as Tcl and which is {script-style} for many programmers.)
But the little annoyances in the default editor come to nothing because there is an interface for external editors.
Over at eclectic-pencil I will add a page with a working HTML example of an embedded Curl {example} macro using a TreeControl object. Install the plugin and Ctrl-Right-Click. Cool.
Subscribe to:
Posts (Atom)