Common Lisp IDE for C# Developer?
Asked Answered
M

7

7

UPDATE

I've decided to go with Clojure for now.

LispDev isn't ready, and Eclipse/cusp wasn't stable enough for me to feel comfortable.

As for Clojure, after a long, very frustrating, very annoying process trying to get Eclipse/CCW, Netbeans/Enclojure and IntelliJ/La Clojure working, I finally got Eclipse/CCW working. The rest are still in mostly-broken states.

(If I get around to it, I'll document what it took for me to get Eclipse/CCW working.)

So for now, I'm going to use that. I may dip back into CL, and check out LispWorks and AllegroLisp's free versions, but Clojure feels like a more natural step for me from working within the Microsoft CLR environment.

Thanks everyone for the help.


Original Question

I'm a C# developer very familiar with Visual Studio (with Resharper).

I'm new to Lisps. I've taken an interest in both Common Lisp and Clojure recently, and found plenty of good material on both of them.

I've tried Emacs + Slime, but it feels like a very backwards, dated solution. I have no doubts about its power, but it's usability is nothing like what I'm used to. I don't want to struggle with an IDE in addition to the language.

There are Eclipse plugins for both Clojure and CL. There's also a couple more options I've seen for Clojure. Since I'm not a Java dev, I know nothing about these IDEs.

Is Eclipse a good place to start? Are there other good options?

EDIT:

Here's the features I'm used to:

  • Syntax highlighting and autoindentation (everyone has this, so it's a moot point)
  • Autocomplete of functions and variable names
  • Realtime displays of all function overloads and parameters and the ability to arrow up/down through the list while typing in parameters
  • Syntax suggestions for code improvement, with the ability to do them for you ("use a const", "convert to LINQ expression (FP)", "variable will never be assigned to", "variable will never be used", "variable could be null", "function will never be used", etc.)
  • Extract Method/Function refactoring: select a block of text, and it can be extracted into a new function
  • Create Variable Refactoring: select a block of text and create a variable (e.g., a let)
  • Rename Refactoring: rename a function or variable declaration and all other functions using it will be updated (automated search/replace)
  • Go to Definition of a method/function, variable
  • Find Usages/References to a particular method/function, variable
  • Integrated folder-based project management tools and build tools
  • "Move class to new file" which creates a new file based on the class name, and containing all of its methods
  • "Rename file based on class type" which renames the file if you change the class name
  • F9/Click to the left of the line to add/remove breakpoints
  • F10/F11 to step into or over code when debugging, along with an arrow and highlighting to show which code is currently executing (step into a func execution, or just execute it here)

Most everything is available in a right-click context menu, or as a hovering combobox or textbox as you're typing.

I'm not saying emacs/slime can't do that, but if it does, it doesn't use anything similar in terms of usability techniques.

Milissa answered 18/2, 2011 at 14:39 Comment(3)
Most of these features you're used to are fairly specific to C#-type languages. Common Lisp has classes, but you probably won't use them very often. Common Lisp has a condition system and a repl, which tends to lead to a different way of debugging. No matter what you choose (Emacs or IDE), you're probably not going to be very happy if you try to do C#-style development in Lisp. Lisp is never going to be a better C# than C#.Urena
@Ken: In Common Lisp libraries and applications classes are used very often.Clamorous
Rainer: Maybe I'm using the wrong libraries and writing my code wrong? I think I see a defclass every (order of magnitude) 1000 lines, while in C# I see class every 100 lines.Urena
U
7

If you're used to Visual Studio and want a similar product for Lisp, the equivalent is probably going to be a similar commercial IDE. The big ones I know of are Allegro and Lispworks.

I've not personally used either one for real work (i.e., a big project), though I've tried demos. They seemed nice enough, if a bit complex and with weird UIs, but not so much better than Slime to be worth the money to me. But if you want something like VS, they may be just what you're looking for.

FWIW, I do both C# and Common Lisp in Emacs, and I find Slime to be 10 times better than any set of modes I've found for editing C# so far. Come to think of it, I don't know of any development environment for any language or platform I'd rather use -- it's that good.

One issue you may have is that Lisp itself is a different enough language than what you're used to that old ways of doing things no longer apply, so any IDE may seem "backwards" to you. (I learned Lisp long before C#, and C# seems backwards and dated to me!) So instead of learning a few Slime commands (there's not many you really need), you're learning IDE commands, which might not really be any easier for you, since the concepts are the same and don't necessarily map to VS-like IDE features.

But good luck with whatever you choose!

Urena answered 18/2, 2011 at 15:9 Comment(3)
Yeah, I can understand C# in a non-VS environment being, well, subpar. Older versions of Visual Studio somewhat pale to even using a Vim instance to edit and a command window to build C#. However, VS 2010 + Resharper is a killer combination. I think I might edit the post to specifically point out the features I'm looking for in an environment.Milissa
I've updated the question to mention the features I'm used to, since I'm assuming most Lisp devs don't know what VS 2010 + Resharper offers.Milissa
I don't think their IDEs are 'weird'.Clamorous
C
4

C# is mostly used in a batch mode. The IDE shows this. It knows the syntax of a fixed language, invokes a compiler and uses the output from various tools, like the compiler.

Common Lisp is slightly different. The IDEs are either integrated into Common Lisp (Allegro CL, LispWorks, CCL) or are in something like Emacs and connect to a running Lisp (SLIME / Emacs). The major mode of development is interactive. A program is running and the IDE modifies it.

For Emacs one uses SLIME with the extensions Paredit and Redshank. See: Editing Lisp Code with Emacs.

  • Syntax highlighting and autoindentation (everyone has this, so it's a moot point)

    This is provided by the IDEs.

  • Autocomplete of functions and variable names

    This is provided by the IDEs.

  • Realtime displays of all function overloads and parameters and the ability to arrow up/down through the list while typing in parameters

    Common Lisp does not have 'overloads'. It is possible to browse generic functions (CLOS) in IDEs.

  • Syntax suggestions for code improvement, with the ability to do them for you ("use a const", "convert to LINQ expression (FP)", "variable will never be assigned to", "variable will never be used", "variable could be null", "function will never be used", etc.)

    Lisp compilers output hints and warnings. There are also style suggestions by some.

    CL-USER 15 > (defun foo (a b) a) FOO

    CL-USER 16 > (compile 'foo) ;;;* Warning in FOO: B is bound but not referenced FOO

    Implementations like LispWorks can browse the set of warnings and errors.

  • Extract Method/Function refactoring: select a block of text, and it can be extracted into a new function.

    Tools may do that. See for example Redshank.

  • Create Variable Refactoring: select a block of text and create a variable (e.g., a let)

    Reshank.

  • Rename Refactoring: rename a function or variable declaration and all other functions using it will be updated (automated search/replace)

    Use the search and replace tools of the IDE. Note that since Lisp has a programmable syntax the problem is not solvable in a general way.

  • Go to Definition of a method/function, variable

    Meta-. , Meta-X Edit definition

  • Find Usages/References to a particular method/function, variable

    Who calls feature in IDEs.

  • Integrated folder-based project management tools and build tools

    See System Tools.

  • "Move class to new file" which creates a new file based on the class name, and containing all of its methods

    Common Lisp does not work this way. Methods and Classes are not connected like in C#.

  • "Rename file based on class type" which renames the file if you change the class name

    Common Lisp does not work this way. One does not write a file for a class.

  • F9/Click to the left of the line to add/remove breakpoints

    Depends on the IDE. Use the function BREAK otherwise.

  • F10/F11 to step into or over code when debugging, along with an arrow and highlighting to show which code is currently executing (step into a func execution, or just execute it here)

    Use the function STEP or the IDE tool.

  • Most everything is available in a right-click context menu, or as a hovering combobox or textbox as you're typing.

    Yes.

I would think you need to check out SLIME in more detail, since it does a lot what you describe in combination with usual Common Lisp features like STEP, BREAK and TRACE.

It might also be useful to read the manual of the LispWorks IDE, which provides the equivalent features in a portable GUI and more:

Lispworks for Windows, IDE User Guide

  • I'm not saying emacs/slime can't do that, but if it does, it doesn't use anything similar in terms of usability techniques.

    SLIME is based on Emacs, so it is shaped by its UI. LispWorks for example uses the Emacs ideas mostly only for the editor component (which is based on an Emacs-like editor written in Common Lisp). LispWorks uses GUI tools for class browsing, generic function browsing, system management, the debugger, inspector, etc.

Clamorous answered 19/2, 2011 at 14:3 Comment(1)
Thanks for the item-by-item explanation. It sounds like I just need to dig in deeper, and get over the fact that it "feels" different. (re: the other thread, I didn't mean for it to be argumentative; I'm just trying to learn and understand)Milissa
V
3

Maybe you should give Jabberwocky a try.

There's also LispIDE, and Lisp Studio.

Viscometer answered 18/2, 2011 at 14:48 Comment(3)
Unfortunately Jabberwocky is no longer in development. The last version came out in September 2007.Breathing
Sometimes software just works and doesn't need to be updated. :P I guess I should give him more options, tho'Viscometer
I've updated the question to mention the features I'm used to, since I'm assuming most Lisp devs don't know what VS 2010 + Resharper offers.Milissa
B
2

Allegro Common Lisp has an IDE supplied with it which may be of interest (although I'm not sure if you can use it with other Lisps). The Eclipse plugin is called Cusp and can be found here, although there's a fork of it here called lispdev which may have been updated more recently.

There may be some useful stuff over at the Lisp Game Wiki, especially the Useful Applications page here.

Personally I like using Emacs+Slime with some of the emacs tools which are designed to make it more IDE like.

Breathing answered 18/2, 2011 at 14:52 Comment(5)
Wow, it looks like Franz caught up with the 90s. I haven't seen MDI like that since Windows 3.1 and early versions of NT. - But thanks for the links. I'll take a look at the Lisp Game Wiki and cusp.Milissa
Allegro's kinda neat awfully pricey.Viscometer
I think lispdev has a more recent version than cusp, but even that hasn't been updated since September 2010.Breathing
I've updated the post to mention the features I'm used to, since I'm assuming most Lisp devs don't know what VS 2010 + Resharper offers.Milissa
Ishpeck: I tend to agree, but he says he's used to VS2010 with Resharper. According to their respective webpages, Allegro starts at $599, and VS2010 starts at $549 and Resharper at $149, so it seems comparably priced.Urena
M
2

If you are new to Lisp and not an emacs user presently, then I would strongly recommend the free editions of either Allegro Lisp or LispWorks. Or, if you are going the Scheme route, PLT Scheme (which is now called Racket).

All three have very feature rich IDE's. Calling trees, type ahead, in-editor breakpoints, and most of the things you are used to from traditional IDE's.

Mooneyham answered 22/2, 2011 at 2:39 Comment(0)
E
2

While this question is old, and the OP has turned to Clojure, I think this is still a valid question, especially for those looking to learn Common Lisp and are either reluctant to switch from Visual Studio or just want to learn something new with a tool they are familiar with, to at least reduce the barrier to entry into such a great language, the same reasons why this question was asked.

I wrote an article explaining exactly how to achieve this, using Visual Studio as a Lisp IDE, which would be an almost great substitution for EMACS + SLIME combination.

The steps to achieve this setup are:

  1. Visual Studio 2015 (Obviously the main ingredient)
  2. Lisp Integration Visual Studio Extension.
  3. Have ConEmu already installed and grab the ConEmuIntegration Visual Studio Extension.
  4. A Common Lisp implementation of your choice, set in your %PATH% (via Environment Settings)

With that setup above, you will have an embedded REPL, and hovering the mouse over the Lisp functions/macros will give you tooltips with the signatures and definitions. This should accomplish most of the features requested in the original question.

It may have been unfortunate that at the time this question was asked, these tools weren't mature enough/created to be fully integrated as it is now, OR no one was aware or interested enough at the time.

As a bonus, if you are already familiar with C++, my recommendation would be to check out Embeddable Common Lisp (ECL), as that allows you to embed Lisp into your C++ code or call C++ from Lisp, how great is that combined with Visual Studio?

Eduard answered 3/6, 2017 at 20:18 Comment(0)
G
1

I know this is an old question but - for Clojure - how about Nightcode? I similarly didn't want to waste language-learning time learning a new editor (i.e. Emacs/SLIME) too. I found Nightcode very usable.

https://nightcode.info/

I find myself now wanting Nightcode to support Common Lisp (maybe in the form of ABCL) too!

Gabrielgabriela answered 22/7, 2014 at 16:28 Comment(1)
I'm glad someone posted this. Not only is Nightcode amazing (and more beginner-friendly than LightTable in my opinion), but they even have a zero-setup cloud-based version at nightcoders.netHag

© 2022 - 2024 — McMap. All rights reserved.