Showing posts with label Logtalk. Show all posts
Showing posts with label Logtalk. Show all posts

Monday, December 27, 2010

Logtalk 2.42.1

Logtalk 2.42.1 for most Prolog implementations was released on Dec 22, 2010.

To quote from logtalk.org
Logtalk is an object-oriented logic programming language that can use most Prolog implementations as a back-end compiler. As a multi-paradigm language, it includes support for both prototypes and classes, protocols (interfaces), component-based programming through category-based composition, event-driven programming, and high-level multi-threading programming.
The release notes report (among other things)
includes portability updates for B-Prolog, SICStus Prolog, SWI-Prolog, XSB, and YAP

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.

Sunday, July 4, 2010

RDFa Drupal Open Graph

 I have added a page to collect RDFa links over at http://aule-browser.com/rdf/index.html.

There will be a separate parsing section for PEG's, Icon 9.5, ObjectIcon 2.3, Rebol 3, Logtalk and PROLOG (and SNOBOL in C ?)

The number of essential links is now near twenty - and this is in English only.

It is still not clear to me how searchmonkey will fare as Yahoo! moves to using Bing for search.

SearchMonkey for documents was already infuriating for me due to SearchMonkey being restricted to Flash documents ( given my work in Curl markup for literary documents as http://aule-browser.com/poets/ and http://aule-browser.com/phil/ .)

I still have to get a post together on RDF with Curl documents.  RDF is largely associated with the one XML syntax - but there is nothing about RDF triples that requires XML.  Curl documents which are embedded in HTML pose no problem in general since the RDF can be expressed in the embedding object element.  Curl documents which are themselves .curl applet files offer unrestricted tagging in the initial {applet } expression so the Curl runtime itself could be adapted to export RDF.  The matter is less obvious for the {include } of documents which are .scurl text files at the top-level within applet files.

The root Curl document, when unspecified, is a TextFlowBox, but with Curl 7.0 there are now ParagraphVisual and TextVisual classes. To quote from the documentation for the parent class,
This class provides a public API for accessing the contents of text-containing objects to be rendered by text containers such as TextFlowBox.
At the moment there is no option available for a popup action such as "Print" which would offer RDF triples rather than the content - and these for the Visual container "hit" as opposed to the entire "page". A Visual would need an option such as exports-rdf? and possibly a tie to a triples validator.

The whole matter ties back to whether Curl is suited for CMS - if a suitable server-side partner emerges as IT continues its slouch towards HTML5.  Or Flash 12.1 or ...

I had thought that Drupal could be a candidate, but after some exploratory efforts I lean towards a Gemstone + Seaside 3.0 option ( pul-ease do not mention Scala Lift ... )  I still keep an eye on Wicket (Hippo?), Zope/Plone and Ruby candidates such as Nesta.

Saturday, July 3, 2010

Oblog or not (Prolog Logtalk)

Sometime ago I added some bits to en.wikipedia.org on Logtalk (since updated by the author of Logtalk himself.)  In the Prolog wikipedia article, I now see mention of Oblog. Or not.

Every link on the web that I can see says the same thing of Margaret McDougall, Oblog, object-oriented Prolog and EdCAAD.

Now I believe that EdCAAD is ESALA.

And Oblog?  A wiki obus and not an opus?

Tuesday, June 29, 2010

Visual Prolog 7.3

Prolog Development Center has just released version 7.3 of Visual Prolog.

VIP was once known as Borland Turbo Prolog and was one of my favorite tools alongside Borland C++ for OS/2.

PDC Prolog has its counterpart in the Mercury project: a typed Prolog.

So what is new in 7.3? Well, Visual Prolog is getting ready to go 64-bit.  That and more are detailed at the 7.3 page.

For a while I thought the Prolog would go behind the scenes at PDC as it did when Air Liquide acquired Prologia in France (the home of Prolog IV as CLP.)   Happily PDC now is back to showcasing at least AI and not just smart software applications.

But what will the fate of this Prolog prove to be?  In a decade or two, projects such as Oz and Mercury may be in other hands - but a small commercial venture?

In my experience the strength of Visual Prolog was not the IDE or the GUI-building tools but the debugging.  And that has been further strengthened in the 7.3 release.

There is a "personal version" available for download and extensive examples come with it.

Prolog is part of the Adobe world in the ILOG arena (an IBM acquisition) and in an age of multi-processor 64-bit hardware, Prolog should come into its own in the RDF processing needs of the semantic web (in which regard, see Logtalk and the XSB project as well as http://www.swi-prolog.org/ for alternatives to PDC.)

A typed-Prolog should present no problem to ActionScript Flex developers at home with a typed ECMAScript variant - and "declarative" MXML UI layout.

Other languages superbly suited to processing text: ObjectIcon, Icon 9.5, Rebol, Oz.

Other Prolog implementations of merit: Eclipse-housed AMZI! Prolog.

For OOP for almost any other Prolog than PDC, see http://www.logtalk.org/

When the ICON language was named, Ralph Griswold could not have suspected that computing would come to have an "iconic" interface.  Curl has suffered a similar fate due to haxx.se and cURL.  Sadly, XML has a "prolog" and not a "prologue" so without RDF, searching for news on Prolog and XML is vexing.  So far, Rebol fares best and Oz much better.  As for Mercury and Alice, what's in a name?

http://www.logiquewerks.com/index.html

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 ...

Friday, August 24, 2007

Rebol dialects and Groovy builders

I am working on a blog post over at eclectic-pencil on DSL (domain-specific languages) in Rebol and Groovy. It is an area that the folks at PDC Prolog got into a few years back and that I first explored using Java + Amzi! Prolog with DCG's in Eclipse. I hope to get a piece up on Groovy and categories as mix-ins in comparison to exploring categories and protocols in Logtalk. In the meantime there is a great deal of activity on the SWI-Prolog mailing list often relating to their Java programming interface. And Plone has a new release just as I wait for Rebol3. And I have a new version of the Curl 5.0 Web SDK to check out. And the MindTouch Deki-Wiki up on VMWare as I watch for the Gemstone/S + Seaside beta. Too much!
My opinion of the out-of-print 'Official Guide' to Rebol 2.3 keeps improving: I wish I could say the same of Manning's 'Groovy In Action' or the APress 'Grails' book. Neither of my favorite bookstores had 'Programming Groovy' on the shelves, which might have been a better choice than the former. Of course there is no book on Logtalk to recommend ... yet.

Tuesday, July 24, 2007

PDC Visual Prolog 7.1 released

If you recall the days of Borland Turbo Prolog (there were books on Turbo Prolog in bookstores and libraries back then) you may not be aware that it lived on as PDC Prolog (Prolog Development Center)

Much like the first home of Prolog at prologia.fr, this is a web site that does no appear to be the site of a language implementation, let alone Prolog.

Prologia IV is a language for Constraint Logic Programming in which Prolog is a limiting case. The company now focuses on industrial applications. The same is true at PDC. The other notable company with a Prolog more widely used is ILog with JRules.

PDC has focused on domain specific languages (DSL). Visual Prolog itself has fostered another company, EZY Prolog which looks to simplify using VIP.

Visual Prolog for Windows GUI has always required as much knowledge of Windows GUI programming as would be required of a C++ developer although much better suited to RAD.

What makes Visual Prolog worth exploring is the way in which OOP has been brought to a declarative language with hooks to user interaction. It is an implementation which continues to evolve as an industrial strength framework. It is worth comparing to the Logtalk framework which brings a remarkably flexible OOP option to almost any Prolog implementation (PDC and Strawberry are notable exceptions.)

Logtalk can be employed to specify a prototype-based framework: it lives in symbiosis with a prolog implementation. PDC Prolog is fundamentally class-based, but its specification of interfaces is so flexible that nothing much is lost: a interface can be used in an implementation of a class even if not declared by the class - which provides almost as much as working with objects as prototypes. There are other type-based OOP projects with a similar strength: TiScript and the XOTcl extension to Tcl which allows an object of a class to also declare its own attributes.

Some years ago I built a dynamic aerobatic squadron generator for a flight simulator in PDC Prolog without objects ( takeoff from any airport, perform manoeuvres, land at an airport. It used to run at the home airfield museum display of an aerobat team. That was done in Prolog without an object-framework or constraints (but at least did not require XML, being in Prolog.) If I ever find time or a sponsor to re-write it, it would be hard-sell to move to Oz if that meant losing the object-flexibility of PDC7.1 or Logtalk with any Prolog with constraint resolution.

The PDC install ran flawlessly (an installer for a smart language should be as smart) which certainly is not always the case with interesting languages, e.g., Python or its CMS, Plone.

PDC also comes with its own external database framework which has always been a favorite feature with me and worked very well for my dynamic squadron generator.

Even if you don't remember Turbo Prolog, check out PDC. If you use Eclipse, checkout AMZI! Both sites have great instructional resources. If you need open-source, there is, of course, Logtalk+SWI+java

halt.