tags:

views:

228

answers:

6

I'm in my second year of my CS major, and I've only had courses in C (first course and then a polymorphic data structures course), C++ (OOP focus), MIPS assembly, and a compiler course. I worked in WinForms and C# over the summer. I worked through the Little Schemer and I'm really interested in learning some sort of LISP.

Emacs is my editor of choice--Emacs LISP should be a great place to start.

Aside from customizing emacs, where else could I use emacs LISP? Creating an executable out of elisp code seems almost impossible according to link text. What other limitations are there?

Should I learn Scheme or Common Lisp instead?

+7  A: 

Emacs is a text editor. Emacs Lisp is - at heart - a text editing language.

Pinnacles of elisp today - IMO - are ERC, the emacs IRC client, and org-mode, a very nice organizing system. There is also an email client for emacs.

So for building text editing plugins, I don't think you can beat elisp/emacs.

For actual standalone application development, Common Lisp is probably your best bet. I favor the CLISP implementation, but SBCL is also very popular. There are a plethora of Lisp implementations. Someone once joked recently that there are more Lisp compilers than there are Lisp-using companies. :-o

Paul Nathan
SBCL seems to be the most popular these days, e.g., Xach's recent survey (which included both free and commercial compilers) saw over 80% using SBCL.
Ken
+4  A: 

This is of course subjective, but I think learning Common Lisp or (standard) Scheme is generally more useful, just for the simple fact that you then will not be limited to one compiler. It is hard to foresee everything you might want to do with your code, so why lock yourself down to one implementation?

kotlinski
+2  A: 

Emacs Lisp is more of a scripting language that is specific to the Emacs environment, useful to learn if you want to rival Stallman in your grasp of Emacs or wish to write extensions.

Common Lisp is the de facto standard for Lisp. Scheme is more pedagogical, primarily due to its association with the famous MIT class and book (SICP), although it is powerful on its own.

They are different however. By some regards Scheme is one of the smallest computer languages out there (in terms of the standard library). The language definition is some six pages. Common Lisp is one of the largest computer languages out there.

There are also more interesting examples. A few years back I was playing around with a Lisp dialect that had support for inline C and Python code, as well as importing and using C and Python objects and calling functions from them directly. However, it seems to have faded into obscurity since I can't find a reference to it on Google.

crasic
+4  A: 

As others have said, Emacs lisp contains many primitives for building a text editor.

That said, it's all still lisp, and getting comfortable using lisp (Emacs, common, or scheme) is about the same in all.

You can use the common lisp package to get access to much of the common lisp macros if you want to use them.

You can use Emacs lisp to write shell scripts (see this question), if that's of interest. The inferior process handling is useful if you want do connect to other running processes (see comint).

Find a project you want to work on, and then let your decision flow from that. If Emacs lisp fits well, use it, if common lisp works well, use that.

Trey Jackson
+2  A: 

I would reccomend chicken scheme (http://www.call-cc.org) if you're interested in learning some Lisp. It's got very good documentation, is actively developed, works on a variety of platforms and has a great extension system called 'eggs' that contain a lot of libraries for actaul coding that scheme doesn't directly specify.

On the other hand, emacs is a great development environment for learning emacs lisp, which is a very useful for scripting and (obviously) customizing emacs. Having documentation for functions and variables only a C-h f, C-h v and C-h A away makes development a lot easier; that is once you learn some of the more obscure naming conventions that elisp has created over the years.

Burton Samograd
+2  A: 

It sounds like you are looking to learn a lisp. For that scheme is often recommended, and you say you are reading The Little Schemer.

PLT Racket which was formerly PLT Scheme is a very good scheme development and learning environment. The original primary focus of PLT Scheme was didactic, the renaming from Scheme to Racket is a bad pun but is intended to indict the system is also mature and sufficient enough for productive "real world" use.

Alex Stoddard