Good IDE to get started with prolog [closed] - prolog

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I need to start learning Prolog for my job.
I haven't used Prolog before and my company needs to build a program that will use Prolog.
So the program will be used commercially.
So some questions:
1) Does Prolog use a compiler to compile the programs. Like gcc does for c?
2) Is there commercial standard of Prolog? I have only heard of SWI Prolog.
3) I have been using GNU Emacs with Linux for many years. I am thinking of using the Prolog.el package? Any comments on that?
Many thanks for any answers,

The most elaborate Prolog IDE I'm familiar with is the Eclipse-based IDE for Amzi! Prolog. This is a commercial product, but the IDE can be downloaded and used for free in the Student Edition. It might be ideal for a beginning Prolog programmer. Disclaimer: I may be biased because I supply a lot of free advice at Amzi!'s support forum. I think there's an open source Eclipse plugin that supports some of the open source Prolog implementations as well. Update (May, 2016) Amzi! Prolog v. 10 has now become open source using an MIT-like license.
Although SWI-Prolog is open source (GPL), it is possible to develop commercial applications with it, as with several other open source Prolog implementations like GNU Prolog and YAP. Besides Amzi! Prolog there are several other commercial products. Visual Prolog is different enough from the ISO standard for Prolog that most Prolog programmers do not consider it "real prolog". SICStus Prolog is an ISO compliant commercial Prolog implementation. There are some others that are Prolog-like but with substantial extensions, such as ECLiPSe (not to be confused with the IDE) and Mercury. A number of commercial implementations of Prolog have become obsolete over the years, as when IF Prolog was superseded by MINERVA. Here's a list of implementations from 2006.
I know many programmers who speak highly of the Prolog mode for GNU EMACS. However I'd think a beginner would benefit from an integrated debugger/editor such as Amzi! Prolog offers. SWI-Prolog has a graphical IDE under construction based on XPCE, which is the graphical interface library SWI-Prolog has chosen for cross-platform development. Almost all programmer editors will supply syntax highlighting for Prolog, with the right definitions file installed.

SICStus Prolog has an IDE based on Eclipse. The SICStus IDE has many advanced features not found in competing products, free or commercial. Among other things it detects syntax errors and other common mistakes as you type, which can be especially valuable for a beginner.
SICStus also has an Emacs mode but it does not offer all of the functionality of the Eclipse-based IDE.
You can download an evaluation of SICStus Prolog from the home page.
I am biased, I am one of the SICStus Prolog developers and the developer of the SICStus Prolog IDE.

You can generally compile your prolog project. However, depending on the prolog environment you are using, it might be an intermediate code and not directly executable code.
SWI Prolog and Sicstus prolog both allow to generate an executable of this form (embedding the interpreter along with you compiled intermediate code).
Other prologs like Arity Prolog/32 compiles directly to an x86 executable. There is a page on Wikipedia that compares various prolog systems.
There is an ISO standard for prolog. However almost every prolog system will be mostly compatible with each other, requiring minor changes to port the code from one prolog system to another.

In addition to what gusbro already said: SWI-Prolog is, I think, the best Prolog for learning. It may not be the fastest implementation, but is has quite a few bells & whistles such as command line editing and a built-in Emacs-like editor, it's free software and it's easy to install on both Windows and Linux (and Mac OS X, too, I reckon). It's implemented as a bytecode compiler for a virtual machine, like most Prologs; even the ones that produce native code often use a virtual machine at some point.
The basics of Prolog are much the same among implementations; non-standard extensions such as extra libraries, OS interfaces, constraint programming etc. tend to be a little different.
Various Prolog-Java and Prolog-C# interfaces interfaces exist. SWI has extensions that allow it to function as a web server.

I'm using the swi-prolog built in ide for commercial development.
Depending on your os, you might need to start with swipl-win.exe or xpce
to get the graphic environment

I am using an eclipse IDE plug-in called PDT. The installation is fairly easy and I think it is a nice environment. After installation, you can follow the instructions at the "getting started page" to finish your installation and get you up and running.

if you are used to work in an emacs environment you should try using the Ciao distribution. It has many interesting and powerful features, libraries, and is also GNU LGPL license. Highly documented and supported.
Go to http://ciaohome.org/

Related

SWI-Prolog Editor for OS X

I was searching for a SWI-Prolog editor for Mac OS X but i could not find one, so is there one or do I have to use another editor to build Prolog files?
Thanks
I do not use mac OS-X myself, but there are two very good SWI-Prolog editors that are cross-platform (thus also work on OS-X):
PDT works with the Eclipse IDE. It has good syntax coloring, an in-IDE Prolog console, a dynamically generated visualization of the call graph, to name only a few of the many features it has. See http://sewiki.iai.uni-bonn.de/research/pdt/docs/v2.1/start I believe refactoring of Prolog code is not there yet, but the developers plan to add that cool feature in the future as well.
PCE Emacs, an Emacs implementation by Jan Wielemaker that uses SWI-Prolog's graphical library XPCE. The UI elements look very Windows '95-ish, but don't be fooled by mere appearances here. PCE Emacs is completely tuned to SWI-Prolog and is probably the most versatile editor for SWI-Prolog out there. You can simply run it from within the SWI-Prolog console by typing emacs.
Hope this helps!
Assuming that you're considering not only IDEs but also text editors, the Logtalk distribution includes support for a large number of text editors that is also usable for editing Prolog source code. See https://github.com/LogtalkDotOrg/logtalk3/tree/master/coding for a list of all supported text editors.
I use OS X and work in Emacs with prolog-mode.
This version has all the features one would expect, including syntax highlighting, auto indent, and full interaction with an inferior Prolog process. The mode supports in principle any Prolog system, though it is primarily maintained with SWI Prolog in mind.
It lacks many of the features of PCE Emacs, but has all of the features of GNU Emacs, and I'm pretty happy with it.

Best ide for using win-prolog

I have to understand an existing code in prolog which is written for win-prolog 4.800, and then build my work on that. The problem is the ide supplied along with win-prolog is very clumsy. I searched internet, but did not find better substitue for that. So i want someway (ide or something) that lets me
Understand (trace through) the code. Atleast, something like ctags will be helpful.
Have proper syntax color highlighting facility.
Have some sort of debugger if possible.
Have some interface where i can readily fire predicates and see output.
Note:- I can use Vim, if it is configurable for Win-prolog. Please let me know if using the default ide supplied along with win-prolog is the only best available way and you too could not discover better way.
Unless the existing code is very simple, it's quite likely that it will contain e.g. calls to WinProlog proprietary predicates and use WinProlog proprietary control constructs, not to mention syntax differences between WinProlog and de facto and official Prolog standards. Thus, it's unlikely that you will be able to use a Prolog implementation other than WinProlog to debug and trace through the code.
For syntax highlight, you have plenty of choices besides Vim. Several other text editors either include support for Prolog syntax highlighting or some plug-in is available that provide that service. See the Prolog FAQ for more information.
Likely only after porting the code or making it portable to other Prolog implementations you will be able to use IDEs written for those Prolog implementations. If that's not your goal, you're likely restricted to IDE provided by WinProlog.

Learning "The Art of Prolog"

To those of you familiar with "The Art of Prolog", which software tools (e.g. IDEs, editors, compilers, etc.) would you suggest for following the book?
SWI-Prolog is a free Prolog implementation that comes with an integrated editor (an Emacs clone written in Prolog) and graphical debugger and profiler.
If you decide to go for SWI-Prolog, I would suggest to use PDT (The Prolog Development Tool), that is a Prolog IDE. It also works for the multi-paradigm language Logtalk that uses Prolog implementation as back end compilers.
You can find PDT here

Which programming languages meet these criteria for GUI app development? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm trying to find a programming language I feel really comfortable learning and using for desktop/GUI application development. I realize it's unlikely that any language meets ALL of these criteria, but I'd like to find one that meets as many as possible. I've listed the following features ROUGHLY in order from most desirable/important to least.
Ideal Language Features:
Code Style: C/Java-like
GUI Development: Easy, elegant, and platform-Native styling
Community: Widely documented, active development, friendly & helpful, unity of focus
Object-oriented
Garbage Collection, no worrying about pointers, etc
Native compilation, NO 3rd-party runtimes like GTK or .NET
Multi-platform (can be compiled on *nix, Windows, Mac)
Reasonably fast
Mixed typing (soft-typed, OR both soft- and strict-typed -- i.e. Pike)
Background:
Most importantly, I need something that is straight foward and reasonably familiar, and something that isn't going to require a deep understanding of platform-specific APIs. I can't afford to spend a lot of time learning to develop Win32 apps in C++ for example. I've used wxWidgets, and liked the basic usage, but I'm really wanting to use a language with garbage collection, dynamic typing, and so on.
My frustration with Java, C#, and others is the need for a 3rd party runtime. I don't want end users to have to worry about installing and maintaining a separate platform.
Now then. Ideas??
Haha, due to the constraints you imposed you are now left with HTML and javascript. Good luck :)
The answer to your question is simply: None.
You excluded all desirable languages and platforms in your question.
I'd suggest you throw away your aversion against .NET and go with Delphi Prism. It's not C#, it is cross-platform compatible (everything is officially supported on Mono) and you can create applications that bring the runtime with them (Mono as part of your application).
I'd suggest Groovy and Griffon. Groovy is a dynamic language (like Ruby / Python) that runs on the JVM and integrates with millions of Java libraries out there easily. Griffon is a high-productivity RAILS-like framework for developing GUIs. Groovy has been around for 5 years and has a robust community and is supported by SpringSource (now division of VMWare). Griffon is a bit younger, but also has a fairly robust community.
These seem to fit your criteria.
I know I switched from Java to Grails (web framework written in Groovy that's similar to Rails), and haven't looked back.
Have you looked at QT? It's a really great GUI library and there are bindings for just about every language in common usage. There is a ton of documentation and a wide community. You mention that you want to do something in a language with garbage collection and dynamic typing, but rule out Python and Ruby, which are the 2 most popular languages that fit this criteria (also, they both have great QT bindings, I use pyQT4 and it is just awesome). They really aren't that far from what you do in Java/C, you just end up writing a lot less.
Wow you really limit your choices. I'm going to jump on the QT bandwagon and recommend C++.
Most of the objects in QT inherit from another object that sort of does it's own garbage collection.
There is incredible documentation out there for it.
QT is extremely powerful and has most of the elements you would like, and is extensible if you want to modify elements yourself.
If you do a static build for your release build the people you give the application to won't need distribute any other libraries as they will all be built into the .exe file.
The next iteration of Delphi is said to be cross-platform (Windows, Mac, Linux). I think it meets all your requirements except garbage collection.
No language meets all of those restrictions. Technically, it sounds like you're asking for something almost identical to Java but then explicitly disallow Java for unstated reasons. Conceptually, it sounds like you're looking for Python or Ruby but disallow them for using slightly different syntax.
Given the order of priorities, I think the closest you'll find in existing languages might be C with the Boehm GC and GTK+ for the GUI (and GLib for the object system). You do say "No GTK" under "No third-party runtime required", but I'm not sure what "runtime" you refer to here, since IIRC it's just a bunch of C libraries.
Given the specificity of the requirements, I think your best bet is to write your own language. Compilers really aren't that hard to write anymore. There are off-the-shelf tools to help with parsing and code generation and math and text processing and GC and so on. Once you get started you'll probably find people willing to help port it. Many existing cross-platform GUI libraries (like wxWidgets) use C/C++ so if you have a decent FFI you can use that, too. You want "support" and "documented" but if you're the primary author you'll understand it better than anybody. The hardest part about a language is design, and it sounds like you have a picture in your head of exactly what the language should be already.
There are a few if you can accept either WxWindows or GTK or QT as a toolkit.
In the order of my personal preference would be:
Eiffel Studio
D with the D-GTK binding
F#
javascript?
might be not the fastest one and doesn't fully address all your needs, but hey... its everywhere and easy to learn
didn't read after the list, but with prism You can probably achieve most your goals.
or You can try Qt and c++ autopointers
Silverlight could actually give you enough cross-platform availability to use C#/.NET, but I am not sure it fits all your requirements.
Sounds like Action Script 3 will make you happy. But it's more web oriented but you could try to make a projector or an Air application. I think it's a good solution because you can do anything with AS3 (image, video, text, sound video text keyboard and mouse input, pear to pear and 3d since flash 10, ...) and it's cross platform and you can use it on the web or your desktop :)
If you are a pure root coder (using vim and only command line for ex) you can make your whole app without using the flash ide, by just writing your as files and compiling them with mxmlc (that comes with the free flex sdk).
I suggest Python. Although it doesn't fit your first requirement of coding style, but it fits all your other requirements!
GUI Development: Easy, elegant, and platform-Native styling --> Yes
I'd suggest that you try wxPython (wxWidgets for Python). This is so "native" on Python that about 90% of all the wxWidgets code examples on the Internet are for Python! I've personally used TkInter, Gtk and wxPython. All of them are well supported on Python. My personal choice is wx.
Community: Widely documented, active development, friendly & helpful, unity of focus --> YES
Object-oriented --> Yes
Garbage Collection, no worrying about pointers, etc --> Yes
Native compilation, NO 3rd-party runtimes like GTK or .NET --> Yes. - You can eiter:
pack a single dll with your code - or
use py2exe which is able to create a single executable out of your project
Multi-platform (can be compiled on *nix, Windows, Mac) --> Yes.
Reasonably fast --> Yes. Well, it's not the fastest out there, but close enough that some serious projects are done in Python only.
Mixed typing (soft-typed, OR both soft- and strict-typed -- i.e. Pike) --> Yes.
Regarding your first requirement I'd say that you should give Python at least a try. It requires very little effort to get started. There is a 2-hour tutorial which gives you a serious introduction. There's a Basic to Advanced tutorial where I'd almost guarantee that you'll be writing your first application on the second day.
I also feel your pain Brian. Most time when I ask questions about desktop GUIs the only answer I get is: "Make it Web". You really nailed it, since your question is still open inspite some really non-constructive answers...
I've been watching closely JavaFX 2, it solves some of Swing problems and seems very promising. This may be the only thing Oracle did right since getting Java from Sun.
UPDATE:
.NET is finally becoming an open-source, cross-platform solution. .NET Core allows native compilation for multiple devices.
The new .NET experience is exactly what I was looking for when I asked this question several years ago.
Original:
Lots of good suggestions, despite being salted with negativity throughout.
I think I'm going to go with C# and Mono. I like C# well enough syntactically (I've been accused often of being shallow, but the syntax of a language is just as important to me as its features, because I spend a lot of time writing in that particular syntax). Although similar to Java, it has a few unique features that I appreciate, and I think the community seems more open-minded.
My biggest complaint about Java besides performance, frankly, is the community. It seems infected with an excess of arrogance, and it also seems to be very fragmented in terms of support for and development on various overlapping libraries, tools, and so on. The community surrounding Mono seems much more organized.
Actually, so does .NET itself, for that matter. Sun is a big enterprise company that seems every bit as confused about what it IS and what it DOES as Microsoft or IBM, yet they seem to be doing an even worse job of leading and organizing their platform than Microsoft, which is pretty tragic.

What is the best Scheme or LISP implementation for OS X? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am looking for a version of Scheme or even LISP that I can use to recover some lost Lisp development skills. Some web capabilities would be nice but not essential.
I've looked at Plt and MIT scheme and, while both look pretty good, the Plt seems to be more feature rich. I've also looked at Lisp implementations but all of the seem quite expensive.
I favor free/inexpensive implementations as this is truly likely to just be occasional hobby programming. What recommendations would you have?
I'd go with Racket. It may not be as fast as SBCL, but it does have excellent libraries and documentation, as well as an integrated environment that's designed to get you developing and running Scheme programs right out of the gate. What I really like about Racket's IDE, DrRacket, is what you don't have to do—you don't have to learn Emacs, you don't have to learn SLIME, you don't have to worry about hunting down third-party libraries, as virtually all libraries meant for Racket can be found in packages. All in all, it really cuts down on the learning curve and allows you to focus on the actual task at hand: writing great code.
Also, it comes with a web server if you want to make Racket-powered websites (which I'm currently looking into).
I did quite a bit of experimenting with this.
Clozure Common Lisp (née Open MCL) is by far the fastest; 25-30 percent faster than the next competitor on my intel Mac Mini.
MIT Scheme works quite nicely on a Mac. I think I eventually compiled it myself, but there are binaries at that site. PLT Scheme is also nice, and possibly a little better integrated into the Mac world. (PLT Scheme is now known as Racket, but I haven't experimented with it after the change.)
I'm a huge fan of Clojure, SBCL, and Clozure CL. They are all fantastic, but they are also overkill if all you want to do is refresh your Lisping chops. They all require absurd amounts of info hunting, mailing list searching, package installing, irc lurking, etc.
Dr Scheme just installs and runs. I finished the first 3 chapters of SICP four and half years ago using Dr Scheme. Nothing was more profound than defining a Scheme evaluator in itself. Once you get your head around that you'll have a lot more patience for the industrial strength brethren.
For Scheme, DrRacket is awesome (included in Racket).
For Common Lisp, Ready Lisp is great. A single dmg with SBCL, Aquamacs and Slime working out of the box.
From the Web site:
Ready Lisp is a binding together of several popular Common Lisp packages especially for Mac OS X, including: Aquamacs, SBCL and SLIME. Once downloaded, you’ll have a single application bundle which you can double-click — and find yourself in a fully configured Common Lisp REPL.
It’s ideal for OS X users who want to try out the beauty of Common Lisp with a minimum of hassle. It could also be used by teachers to give their Mac students a free, complete Common Lisp environment to take home with them.
Requirements
The current version of Ready Lisp is 20090127 and requires Mac OS X 10.5 (Leopard).
It includes the following component software versions:
Aquamacs 1.6
SBCL 1.0.24
SLIME 2009-01-23
CL-FAD 0.6.2
CL-PPCRE 2.0.1
LOCAL-TIME 0.9.3
SERIES 2.2.10
CL HyperSpec 7.0
paredit.el 20
redshank.el 1
cldoc.el 1.16
I've just started playing with Clojure. It apparently has a nice web framework, and compiles to JVM bytecode.
I also use DrScheme quite a lot. It's a simple yet useful IDE.
Depending how you define "Lisp", Clojure may fit the bill. It runs on OS X fine (it runs anywhere the JVM runs). It has web capabilities and it's free.
It also has the benefit of being new and fresh and fun to use. Might be ideal for hobby programming. It's easy to write web apps or GUI apps (using Java's Swing or even Qt).
I haven't used it myself, but Steel Bank Common Lisp has received some favourable buzz over at reddit. It's open source and free so the price is right for some hobby programming.
In the past, I've had GNU Common Lisp running on my macbook pro.
If you are looking for Scheme you can take a look at just released JazzScheme.
I do recommend Racket to new-comers, since it provides one of the nicest IDE's for Scheme beginners (or rather, programming beginners who happen to be using Scheme, or better still, working their way through HtDP).
http://racket-lang.org/
Another option, for people who are more interested in a small Scheme system in order to modify it themselves or read its source code, is Larceny Scheme, which is of interest largely because its JIT compiler, Twobit, is itself implemented entirely in Scheme.
http://www.larcenists.org/
Update: In addition, Chez Scheme has recently been open sourced:
https://github.com/cisco/ChezScheme
(It may not be as "small" as Larceny, but it has a very aggressive optimizing compiler.)
If you're just hobby programming, LispWorks has a free, personal version which is quite powerful and sophisticated. It's biggest issue is a run time limit of several hours. So, you won't be writing any long running servers in it, but that doesn't mean it's not a useful tool.
CLISP runs on most everything, and is quite nice actually, it just doesn't do threads. (Important if you want to write an actual server, but as PHP and Perl have shown us, Apache + [insert language] is a very viable platform.)
You might want to look at what's at the Association of Lisp Users or the Common Lisp Wiki to see what's there. I set myself up with Steel Bank Common Lisp and Emacs, but have done little with it so far.
Clozure CL is available for free from the mac store!
http://itunes.apple.com/us/app/clozure-cl/id489900618
I have found that Chicken works well for Scheme and is available through homebrew.
brew install chicken
Most of the code from SICP works with minor modifications.
I've been asking myself the same question lately. Having used DrScheme on OS X it would be my first choice of Scheme distribution for any platform. Very nice IDE, debugging features and a good set of libraries/frameworks (including a very nice GUI toolkit that 'just works... even on Mac' ;-) )
However, I'm now looking for a similarly comfortable environment for Common Lisp. It came down to CCL (OpenMCL) versus SBCL. SBCL seems to be the popular choice but I read that on OS X is doesn't support threading. (Is this really an issue?). Clozure CL, on the other hand, boasts good support for native threads, the obcj-bridge, etc...
I'm finding CCL a little odd but I'm going to stick at it for a while - It still looks like the logical choice for integration.
I use Emacs 23 (built from source using --with-ns) and Slime as an environment and this works well for me. :-)
Go with Racket. I'm very happy with it!

Resources