views:

1055

answers:

11

Hi,
I've been wanting to teach myself Lisp for a while. However, all the interpreters of which I've heard involve some flavor of emacs. Are there any command line interpreters, such that I could type this into the command line:

lispinterpret sourcefile.lisp

just like I can run perl or python.

While I'd also like to become more familiar with Emacs (if only not to be frustrated when I work with somebody who uses Emacs), I'd rather decouple learning Emacs from learning Lisp.

Edit: I actually want to follow SICP which uses Scheme, so an answer about Scheme would be more useful. I'm just not that familiar with the differences.

+3  A: 

Checkout CLISP wiki-link that ie. was used by Paul Graham

Direct link

epatel
clisp is specially good for interactive use when compiled with ncurses support (TAB-completion bash style) fetching of documentation from hyperspec, etc.
dsm
If with "ie." you mean "i.e.": that says "id est" (in english: "that is"). I think that you want to say "e.g." (exempli gratia = for example).
Svante
+1  A: 

Did you try Allegro CL from http://www.franz.com/?

kokos
at $599? A bit much to spend on learning, isn't it?
crashmstr
@crashmstr: Allegro has a free trial version that should be entirely adequate if you want to learn that language.
Pillsy
+8  A: 

You could also try DrScheme, which whilst not exactly a standalone interpreter, isn't emacs :)

It's basically a simple IDE that has an area to type in code that can be executed as a file, and then another area that is the running interpreter that you can interact with.

(Also, find the UC Berkeley CS61A podcasts and listen to them, as well as reading SICP)

Matthew Schinckel
If you're using PLT with SICP:http://www.neilvandyke.org/sicp-plt/
Eli Barzilay
+5  A: 

It looks like Steel Bank Common Lisp (SBCL) also caters to what you want:

http://www.sbcl.org/manual/Shebang-Scripts.html#Shebang-Scripts

SBCL is both top rate and open source.

John the Statistician
Link is no longer valid. sbcl --script; #http://www.sbcl.org/manual/Shebang-Scripts.html#Shebang-Scripts
Thanks, hopefully fixed.
John the Statistician
+1  A: 

@Nathan: I've upmodded the Common Lisp links, because you asked about Lisp (especially with reference to Emacs Lisp). However, Common Lisp is very different from Scheme. A program written for one is unlikely to run on the other.

As you mentioned, SICP is for learning Scheme, not Lisp (or at least, not Common Lisp and not Emacs Lisp). There are some overlap in principles, however you can't simply cut and paste code from SICP and expect it to run on any Common Lisp or Emacs Lisp system. :-)

Chris Jester-Young
A: 

Another good dialect of lisp is cmucl. They used to love to brag about being the "fastest" lisp.

David
+1  A: 

The most widely used IDE for Common Lisp, particularly in the free software subset of the community, is in fact SLIME, which runs on Emacs. You can use whatever CL compiler you prefer and invoke Lisp source files the way you describe, but if you do that, you won't be taking advantage of many of Lisps dynamic features that are so incredibly useful while developing your application.

I suggest you take a look at this SLIME demonstration video to see what I mean, even though it might be a bit outdated at this point.

If the problem is that you (think you) don't like Emacs, I seriously suggest you try to learn it. Seriously. No, really, I mean that. However, there are alternatives, such as the IDEs provided by commercial Lisp implementations such as Allegro and Lispworks (free trials available), or an Eclipse plug-in called Cusp.

Luís Oliveira
+3  A: 

I often write lisp shell scripts which start with this line:

#!/usr/bin/clisp

Then you don't even need to type "lispinterpret" on the command-line. Just mark the script executable and run it directly.

fdesmet
A: 

No "interpreter" requires emacs.

Also, emacs can run elisp in a headless manner.

Marcin
+4  A: 

If you are looking for Scheme to work with the SICP, take a look at MIT/GNU Scheme

http://groups.csail.mit.edu/mac/projects/scheme/

http://www.gnu.org/software/mit-scheme/index.html

crashmstr
+1  A: 

It seems like scheme shell is suitable for your purpose. Take a look at http://www.scsh.net/index.html

fincomus