Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How viable is emacs LISP aside from editing emacs? [closed]

Tags:

emacs

lisp

elisp

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?

like image 963
Kizaru Avatar asked Oct 26 '10 23:10

Kizaru


6 Answers

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

like image 54
Paul Nathan Avatar answered Nov 18 '22 23:11

Paul Nathan


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.

like image 24
Trey Jackson Avatar answered Nov 18 '22 23:11

Trey Jackson


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?

like image 4
Johan Kotlinski Avatar answered Nov 19 '22 01:11

Johan Kotlinski


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 indicate the system is also mature and sufficient enough for productive "real world" use.

like image 4
Alex Stoddard Avatar answered Nov 19 '22 00:11

Alex Stoddard


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.

like image 3
crasic Avatar answered Nov 19 '22 01:11

crasic


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.

like image 3
Burton Samograd Avatar answered Nov 18 '22 23:11

Burton Samograd