1

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.

Rainer Joswig
  • 136,269
  • 10
  • 221
  • 346
Theodor Berza
  • 573
  • 3
  • 12
  • I would suggest to use [SBCL](http://sbcl.org/) under [emacs](https://www.gnu.org/software/emacs/) with [slime](https://common-lisp.net/project/slime/) (preferably on Linux). If you need a Lisp-like language for a JVM learn [Clojure](http://clojure.org/). Not everything is JVM and/or Eclipse based, thanks God! – Basile Starynkevitch Sep 20 '15 at 16:06
  • 1
    ABCL has a mailing list for its users. Probably the best place to ask tool-related questions: https://mailman.common-lisp.net/listinfo/armedbear-devel – Rainer Joswig Sep 21 '15 at 08:01
  • On Windows, CCL works beter than SBCL – PuercoPop Sep 21 '15 at 17:13

2 Answers2

1

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.

Renzo
  • 26,848
  • 5
  • 49
  • 61
  • So, I understand that CL JVM dialects are still in a primitive state and it's hard for a beginner to develop a working program in them especially if they come from a language like Java. I will follow Basile advice and use Clojure! – Theodor Berza Sep 22 '15 at 12:05
  • Given your familiarity with Java, I think using Clojure is an excellent choice. – Renzo Sep 22 '15 at 12:13
0

There is CUSP[2]. although it looks unmaintained. Can't say if it is in a working. I'd recommend sly or slime inestead. One can enable cua-mode and use Emacs as notepad so as to not distract oneself with Emacs while learning CL.

PuercoPop
  • 6,707
  • 4
  • 30
  • 40