Lisp/Scheme interpreter without Emacs?

2019-03-09 03:59发布

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.

标签: lisp scheme
12条回答
Luminary・发光体
2楼-- · 2019-03-09 04:27

@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. :-)

查看更多
太酷不给撩
3楼-- · 2019-03-09 04:31

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)

查看更多
做自己的国王
4楼-- · 2019-03-09 04:32

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

查看更多
We Are One
5楼-- · 2019-03-09 04:33

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

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

SBCL is both top rate and open source.

查看更多
我欲成王,谁敢阻挡
6楼-- · 2019-03-09 04:33

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

Direct link

查看更多
别忘想泡老子
7楼-- · 2019-03-09 04:35

No "interpreter" requires emacs.

Also, emacs can run elisp in a headless manner.

查看更多
登录 后发表回答