Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customize the SBCL REPL?

Is there a way to customize the SBCL REPL in a way that makes it work similar to the CLISP REPL. The standard SBCL REPL isn't really usable on Mac OS X. I can't use the arrow keys or backspace.

like image 381
Jan Deinhard Avatar asked Jun 19 '12 20:06

Jan Deinhard


People also ask

How does Sbcl work?

SBCL provides a recursive event loop ( serve-event ) for doing non-blocking IO on multiple streams without using threads. SBCL allows restricting the execution time of individual operations or parts of a computation using :timeout arguments to certain blocking operations, synchronous timeouts and asynchronous timeouts.

How do I exit Sbcl?

To quit SBCL, type (quit) .

What is REPL Lisp?

REPL stands for READ EVAL PRINT LOOP: (loop (print (eval (read)))). Each of the four above functions are primitive Lisp functions. In Lisp the REPL is not a command line interpreter (CLI). READ does not read commands and the REPL does not execute commands.


4 Answers

You could use rlwrap

If you have MacPorts installed you can get it with

sudo port install rlwrap

The invoke sbcl with

rlwrap sbcl
like image 75
Doug Currie Avatar answered Oct 20 '22 16:10

Doug Currie


Most of the people use SBCL REPL with SLIME. It gives it by far much more features, then readline, that is used in CLISP. If you aren't comfortable with using Emacs, you can try ABLE (available through quicklisp) - a very simple editor, that supports some basic REPL features on par with readline, but as well has basic code highlighting and built-in Hyperspec.

like image 41
Vsevolod Dyomkin Avatar answered Oct 20 '22 16:10

Vsevolod Dyomkin


There's vim+slime (slimv) too, for vim users.

like image 44
Clayton Stanley Avatar answered Oct 20 '22 16:10

Clayton Stanley


You can try linedit which is available via Quicklisp. That said, Emacs+SLIME is a real beast. In fact, Firebug is the only thing close to it that I'm aware of.

like image 44
Daimrod Avatar answered Oct 20 '22 18:10

Daimrod