Lisp IDEs (where for art thou?)

Lately, I’ve been trying to learn Lisp, working my way through the great “Land of Lisp” book by Conrad Barski. One of the first things Conrad tells you to do is to install CLISP, and explains a bit about the REPL. This is all well and good, but not a word is said about using a text-editor or IDE, leaving the user to figure out for themselves how to save their programs. I think the reason for this is simple: Conrad’s book is about Lisp and he doesn’t want to spend time explaining how to use Emacs – which seems to be the only serious free choice for Lisp programming.

Not being an Emacs user, I tried a few different possibilities. I tried to get the impressive sounding slimv Vim plug-in working, but had no joy. I think the issue was that I was using Windows and needed to install some more python (yes, python) libs, but the lack of error messages made me wonder if I was wasting my time. This plug-in also won’t appeal to anyone who doesn’t want to invest in learning vi.

After giving up on slimv, I tried the CUSP plug-in for Eclipse. This plug-in pleasantly surprised me, given that the web pages for it don’t inspire confidence. It worked straight away on my Windows box, providing a decent REPL/editor integration. However, it does have a few issues:

  • It’s tied to SBCL rather than allowing you to choose a Lisp implementation (and it currently uses an old version of SBCL)
  • There seems to be two “official” webpages; one at sergeykolos.com and one at www.bitfauna.com, neither of which really inspire confidence. Sergey Kolos’s site includes an Eclipse update site for installing straight from Eclipse, but it seems to be older than the download from bitfauna, despite suggestions on the bitfauna page to the contrary.
  • I’m having problems getting it to work under Linux currently.

There is another Eclipse plug-in called Dandelion which claims to work with both CLISP and SBCL, but I never managed to get it to connect to the REPL and had problems with the text-editor hanging.

A few more options are hinted at by this stackoverflow question, but none of them look very promising, with the exception of Emacs.

This leaves newcomers to Lisp with the following choices:

  • learn Emacs (boo!)
  • pound an Eclipse plug-in into submission and ignore/work-around any shortcomings
  • use a standard text editor and figure out the best way to communicate with a REPL
  • pay for LispWorks or use the crippled “Personal” edition.

Which isn’t the greatest set of choices. Why is this the case for a programming language with such a long and illustrious history?

If you’re considering learning Lisp, this may well present a considerable dilemma to you. If you don’t want to learn Emacs (and why should you have to?), I suggest trying CUSP. I also just found the Lispdev fork of CUSP, which I’m hoping may solve some of the issues with CUSP.

36 Responses to “Lisp IDEs (where for art thou?)”

  1. aerique Says:

    Your third option \use a standard text editor and figure out the best way to communicate with a REPL\ is actually the easiest if you’re starting out with Lisp and don’t want to use Emacs (or Vim).

    The \figuring out\ part is not hard at all assuming you’re using CLISP as Conrad Barski suggested. This is because CLISP comes with command line history and tab completion by default.

    So if you’re using your favourite text editor to edit \lol.lisp\ you only have to type in \(load \/path/to/lol.lisp\)\ once and from then on you can reload quickly by using the command line history.

    Also the Python problem is a Vim issue and has nothing to do with Lisp.

  2. aerique Says:

    Hm, all my double quotes have been stripped and replaced by backslashes.

  3. Anonymouse Says:

    “Wherefore art thou” is the quote I think you’re thinking of. And it doesn’t mean ‘where are you’ it means ‘why’ are you or ‘for what purpose’ are you.

  4. Christoffer Sawicki Says:

    Just for the record: Allegro Common Lisp also comes with an IDE.
    http://www.franz.com/products/allegrocl/acl_ide.lhtml

  5. Jean-Christophe Helary Says:

    You don’t need to “learn” emacs. Check Lispbox, a project started by Peter Seibel that now lives on common-lisp.net:
    http://common-lisp.net/project/lispbox/

    You should be able to use a lot of “common” shortcuts for most of your work. And emacs is not _that_ difficult to handle when all you need is to remember a few editing commands.

  6. Daniel Collin Says:

    I’m currently also learning lisp (rewriting some old c++ tools in lisp as a good way of learning it)

    I’m a vim user so I always want to use vim if possible. First I started to use Emacs (with the viper + vimpulse plugins to enable vi/vim bindings) + slime. I really don’t like emacs anyway even with that setup so I just switched to vim + slimv

    For me slimv has worked great under windows (it doesn’t start correct under Mac OS X for me but I can start it manually and it works fine) Slimv isn’t as capable as slime for emacs but still works pretty good for me so far.

    The author of slimv has been very helpful when I have reported some issues so if you really want to use vim + slimv try to make a bug report to the author and I bet he will try to help you out.

    Cheers!

  7. yada yada Says:

    Emacs is all you need.
    Learn it and leave the sorry land of vi behind (tongue in cheek for religious vi users)
    The notion of IDE is meaningless in the land of parentheses.

  8. Adrian Mouat Says:

    @aerique, You’re right about the CLISP REPL, it is pretty good. I was actually using this suggestion last night when CUSP wasn’t working for me. I still don’t consider it a fulfilling solution though. Sorry about the quote issue – i’ll look into it.

    @anonymouse, a quick google search suggests plenty of people have used “where art thou”, which isn’t to say your wrong, but I don’t feel the need to change the title.

    @Cristoffer, thanks for the pointer, I’ve not had a look at that one.

    @Jean-Christophe, I just don’t want to use Emacs. Whether you like it or not, it’s as much a religion as Vi and not something I want to deal with when learning a new language. I certainly don’t think it’s a bad editor or not powerful enough, I just want another option.

  9. John Says:

    Using a “standard text editor” (such an nano, ne, joe, etc.) won’t give you the smart indenting (args align vertically) like Emacs does.

    > Why is this the case for a programming language with such a long and illustrious history?

    My guess is because most people just use Emacs for Lisp.

    Getting started with Emacs is pretty easy — it’s just getting used to some new keyboard shortcuts. However, note that the standard GUI version of Emacs recognizes all the standard named keys like Home/End, PgUp/PgDn, and arrow keys (even Ctrl-arrow keys work as expected), and has a helpful (and dynamic) GUI menu bar, so getting going with Emacs is pretty easy.

  10. Lee Nguyen Says:

    “learn Emacs (boo!)”

    What’s wrong with Emacs? You haven’t mentioned “why” you don’t want to use it. Is it a specific feature or lack of feature that bothers you with it?

  11. Bruce Lewis Says:

    Using emacs won’t be any more annoying than using eclipse if you just use http://emacswiki.org/CuaMode

  12. Adrian Mouat Says:

    @aerique, just to be completely clear, the python issue was to do with the way slimv is written, not Vim or Lisp.

  13. Tommy Says:

    Emacs with SLIME is a wonderful thing.

    But why don’t you settle for LispWorks Personal Edition till you feel more comfortable? I don’t see what the problem with that could be.

  14. Adrian Mouat Says:

    @Tommy, I looked at LispWorks Personal Edition, but it’s crippleware – it actually quits without saving after 5 hours:

    http://www.lispworks.com/downloads/index.html

    So I’m not going anywhere near it.

    I’m a bit surprised with all the “Just use Emacs” comments. I don’t want to use Emacs. I don’t like it. It hurts my fingers.

  15. Scott Says:

    Another option is to use DrRacket at racket-lang.org. You’ll have to tweak the examples in slightly but it shouldn’t be to bad. I was in you shoes a couple of years ago with the “The Little Schemer”, which is a great book. The DrRacket (used to be DrScheme) IDE is really simple and documentation/help desk that comes with is first class.

  16. Tommy Says:

    I know about the limitations in the Personal Edition, but I’ve used it many times despite not having the intention to buy it. It worked nice for me. :)

    When I used Windows I used either LispWorks or Emacs with CLisp(there were no port of SBCL back then).

  17. Daniel Collin Says:

    @Adrian Mouat, Like I wrote above. If you want to use vim I suggest you try to contact the author as slimv is working fine for me (it has bugs sure, but not bad enough to stop me from using it)

  18. Adrian Mouat Says:

    @Daniel Collin, yes I think I probably could get going with slimv if I persevered. Perhaps it would be easier under Linux. The author seems to be actively supporting it, which is a great sign. It just all seems a little more difficult than it should be. It’s good to hear of other people using it successfully.

  19. quasi Says:

    The reason why so many people suggest Emacs is that the difference between using Emacs and not using Emacs (with lisp) is significant. Use the best tools, eh? If you use acquamacs or emacs-on-windows the standard key bindings like Command-C Command-V Command-S / Ctr-C Ctr-V Ctr-S work fine. Which leaves you with a standard editor with a menu bar on top to do the rest. Why this should hurt your fingers more than any other standard editor I am at a loss to know. Unless it is an ego thingie. With this standard notepadish editor you have now available, you have the option to unleash more (lots) power as and if you require. There is nothing close to SLIME for lisp development really.

  20. Michael Says:

    Just use emacs. In the time you’ve taken trying to find an alternative, you could have already come up to speed.

    Do not go the Lispworks route. Lispworks is a good lisp, but its IDE is no better than emacs+slime (the only part of Lispworks’ IDE I actually use is the inspector).

  21. aerique Says:

    Adrian, if Emacs hurts your fingers you should change the keybindings to something you’re used to. M-x global-set-key is your friend here.

    I’m repeating myself across multiple forums and blogs but the Emacs default keybindings suck and are IMHO the biggest failing of Emacs for new users (but I can understand them being the default considering its history).

  22. Peter Says:

    Emacs+Slime+Lisp is the best dev. environment I know, but it can be a big pain to learn and set up (worth it though, IMO).

    An alternative might be to use Clozure CL because it comes with its own nice UI, including a graphical REPL and syntax aware editor. It’s also a really nice, free Lisp!

  23. Hugh Shannon Myers Says:

    There just aren’t any is the short answer. That said, (and assuming you want to skip REPLs bound to religious wars, ) It breaks down into two broad categories. Common Lisp on one side and everything else on the other. While learning CL, I used Franz’s Express Lisp—-nice ide and not crippled (can’t use some advanced offerings from Franz, but that hardly counts as being crippled.) While hanging out on the other side of the aisle, I ported the same project to DR Racket (then DR Scheme) and newLISP, again both with ide/REPLs joined together. I’m sure purists would have trouble with newLISP but so what else is new. If you feel you must follow some of the advice given here, then try the various ‘In a Box’ versions of slime+editor. They have worked without problems in my experience. At worst, remember that most (all?) Lisp-en have some sort of REPL, so an open editor on one side and a REPL on the other can (somewhat painfully) emulate an ide…

  24. srpelissier Says:

    IMHO DrRacket is an ideal IDE. I also bought LandOfLisp and have been using SciTE. If only I was more confident about my being to ‘tweak the examples’ according to Scott… I tried EMACS too and I may be facing the same issue with the default bindings. But the way it handles the code (indentation) is so perfect! AFAIK there is a book on DrRacket in preparation. I want it to be both LandOfLisp an OnLisp.

  25. Doug Putnam Says:

    @michael hits the nail on the head. When learning new skill we try to use our old comfortable skills. Java/C++ developers lean on their Netbeans/Eclipse/IDEA IDEs, but that turns out to be a waste of time. Eventually you have to go to Emacs. If you’re serious you gotta bite the Emacs bullet and do the right thing. It’s the same with other languages: if you want to do Java, you don’t use Emacs — you use IDEA. The right tool for the job…

  26. Be Seeing You Says:

    Being somewhat tool agnostic, I tend to concur with the comments on find what works for you or prepare to have a learning curve. There are GUI versions of Emacs for Windows, and honestly, Emacs+Slime is really the easiest way to learn Lisp, in my opinion. I suppose that one could figure out how to integrate a REPL into Visual Studio, but that seems to be overkill to me. If you really can’t get Emacs and Slime to work, then use your favorite text editor and keep a command line with a REPL open in a separate window.

    I’ll opine that IDEs get in my way more often than not, so I write my code in a text editor. However, your mileage may vary…

    Be Seeing you

  27. Larry Clapp Says:

    I don’t know if it’s still maintained, but you might take a look at Limp. http://www.vim.org/scripts/script.php?script_id=2219. In December the author expressed hope that he could get back into it (http://groups.google.com/group/limp-devel/browse_thread/thread/1b0bf21f68bc348d).

  28. Daniel Collin Says:

    @Adrian Mouat: New version of slimv has just been released (that fixes one bug that I have reported and also has some python fixes included) You might want to try it out.

  29. Jordan Says:

    Adrian,

    I’ve been going through this same exercise for a little while, too. As someone who spends his days in Visual Studio, trying to pick up emacs in my spare time has been a little bit of a chore. I have to presume at some point it just “clicks”… the downside is if you’re only using emacs recreationally , that “click” probably takes a while longer to develop, which is discouraging.

    That’s not to say I would consider emacs “inferior” or anything of the sort. I’m sure it has stuck around as long as it has because it is a good tool. For those commenting here (and on reddit) that “you can’t learn to program by clicking buttons”, I don’t think that is what Adrian is arguing. Some people find it easier to learn by poking around at things in the interface, rather than reading manuals. I don’t think that’s necessarily a “wrong” way to learn.

    Anyway, quicklisp has been really helpful for me in getting up and going with emacs + SLIME.

  30. Vladimir Sedach Says:

    There’s a (somewhat) comprehensive list of options on CLiki: http://www.cliki.net/development

    Mac users seem to have it particularly good in terms of alternatives. The Clozure IDE is OS X only, as is MCLIDE (http://mclide.in-progress.com/)

    I haven’t touched the Racket IDE long before it became known as Racket, but if you’re looking at things that aren’t Common Lisp, there’s a very VS/Eclipse-like IDE called Jedi that comes with JazzScheme (http://www.jazzscheme.org/). I use it at my day job, although I have to admit that I do most of my actual editing in Emacs.

    I don’t like telling people to use Emacs because I don’t like it when people tell me to use toy GUI IDEs when I’m programming in other languages, but it’s really true, once you learn how you don’t really want to bother with anything else.

  31. Clartak Says:

    Adrian,

    I feel so much sympathy for you. I’ve attempted to (re)learn Lisp and use emacs several times but it failed to stick. My last attempt was using LispBox with Practical Common Lisp, but that didn’t stick for some reason — hated using emacs.

    This time, after buying Land of Lisp and starting to work through the examples, things seem to have “clicked”. I tried using LispBox, but it wouldn’t work for some reason and I started down the usual configuration rabbit hole. Then I came across Lisp Cabinet (http://lispcabinet.sourceforge.net/) and things just … changed. It’s Windows only, but you end up with well-configured emacs+slime+Lisp where Lisp can be CLISP, SBCL, Clojure, or others.

    I went back to PCL to review some of the elementary keystrokes needed and that seemed to be enough. Learning a few more keystrokes every week. And I’m enjoying emacs now. Unbelievable.

  32. Adrian Mouat Says:

    @Jordan & Clartak. Thanks – good to hear from people with similar experiences.

    @Vladimir Thanks for the links; JazzScheme sounds interesting but I think I’ll stick to Common Lisp for the moment.

    I never meant this post to become about Emacs and I certainly never meant to criticise Emacs – a lot of people are very happy with it, which is all well and good, I’m just not one of them. However, I would argue that it is clear that some people are put off learning Lisp because of Emacs.

    I feel a little bad this post got so much attention as it’s essentially a whine – I think I’ll try to write a more positive/constructive post on the same (or a similar) subject in a few weeks.

  33. Chris Martin Says:

    I find the combination of Emacs + Slime + viper to be really the best combination. viper gives you the vi style modal editing commands in text buffers which is so handy if your muscle memory is tied to vi, as mine is.

    On OS X you can use it with Aquamacs which comes with slime, and you can install ccl.
    On Windows you can use it with Lisp Cabinet, mentioned above, which also comes with ccl, sbcl, and some other lisps. It also installs auto complete mode (optional) which gives you intellisense style auto completion. I haven’t been able to get that to work with aquamacs, however.

    After trying on and off to learn lisp, this is the setup that I’ve found is actually the best for me.

  34. Adrian Mouat Says:

    Not sure what happened with the quotes – “works for me” – but clearly you had problems. If anyone knows what caused this, please let me know!

  35. Seren Seraph Says:

    Back somewhere in the 80s I had a class on a Symbolics machine. Practically ruined me for paying computer gigs. It was great! So what the hell happened? We have a LOT faster machines now so you don’t need a lisp machine to have very effective lisp environment. So why has no one bothered to do a really really good Lisp IDE beyond the wonders of slime in emacs? Is there some reason nearly all lispers just aren’t interested enough to take it on?

  36. Sofia Cardita Says:

    I’m going through land of lisp as well and after trying vim+slimv (it would suddenly quit unexpectedly) I installed http://ccl.clozure.com/ and have been using the built-in editor ever since – for those starting it’s been simple and out of the way.

Leave a Reply