installationjvmcommon-lispabcl

How to run Armed Bear Common Lisp in Eclipse?


I want to learn Common Lisp and I have some experience with Java. I heard that Armed Bear is a dialect of CL that runs on the JVM, thus allowing me to use Java libraries. But I don't know how to install it so that I can do exercises.

Is there a plugin I can install in Eclipse in order to run Common Lisp code? I already read on the internet and there are no guides for doing anything of this.


Solution

  • Common Lisp is a language whose compilers and interpreters (including Armed Bear, which is a full (standard) Common Lisp implementation, not a dialect) come with an interactive environment, called REPL (Read-Eval-Print Loop), which is normally used both by learners of the language, to learn by writing and immediately testing small pieces of codes, as well as by expert developers, by building systems in an incremental way, by adding new features to the language, or even interacting with a running system to inspect and change its behaviour (for instance through a remote connection).

    So, the paradigm of developing a program in Common Lisp is in general different from the classical paradigm of compiled languages, like Java, and for this reason IDEs like Eclipse and NetBeans are rarely used, unless Lisp code, developed maybe through the “Lisp way”, must be integrated with the code of some compiled language, like C or Java (and Armed Bear is particularly well suited to the task of writing systems with a mix of Java and Common Lisp).

    So, in summary, my advice is the following. To learn the basics of Common Lisp, it is better (a) to use the interactive environment from any Common Lisp implementation, possibly (b) with the help of a text editor which can assist you in writing Lisp code, and, best of all, (c) together with some tool that increases the capabilities of code debugging/inspecting already present in the REPL. When you are familiar with the language, you can start to use (d) some IDE like Eclipse to integrate Lisp with Java or other languages and run the compiled code (note: I am not aware of a plugin for editing Common Lisp files in Eclipse).

    So, to remain in the realm of free software, for (a) you could use a system like CLISP, SBCL, CCL, or even ABCL, and for (b) and (c) you have the choice to use a tool like Emacs, with slime, as a comment suggests, or a free version of one of the commercial products (like Allegro CL Free Express Edition and LispWorks Personal Edition) or, in case you have a Macintosh, the graphical environment of CCL.