How can I simply "run" lisp files

AnnanFay picture AnnanFay · Jun 7, 2010 · Viewed 22.8k times · Source

Python

When I learned Python I installed it on windows with a nice gui installer and all .py files would automatically run in python, from the command line or explorer.

I found this very intuitive and easy, because I could instantly make plain text files and run them.

Lisp

I'm starting to learn lisp and have decided (from reviews) that SBCL is not a bad lisp implementation.

Is there a way to setup SBCL to run .lisp files as easily as with Python?

Are there other lisp implementations that have this?

Answer

Rainer Joswig picture Rainer Joswig · Jun 7, 2010

Executables

SBCL can save executable images, as Greg Harman mentions (see the :EXECUTABLE keyword): http://www.sbcl.org/manual/index.html#Saving-a-Core-Image

Scripts

Lisp files can be executed as scripts, see: http://www.sbcl.org/manual/#Shebang-Scripts

Command Line Options

SBCL has command line options to evaluate/load lisp code on start: http://www.sbcl.org/manual/#Command-Line-Options

SLIME

SLIME is an Emacs interface for Common Lisp. One can use SBCL via SLIME from within Emacs. Many people prefer Emacs Lisp listeners over typical shell interfaces.

Most Common Lisp implementations have similar capabilities. For details consult their manual or ask here for specific implementations.