<?php include "HEADER.php" ?>

<h1>Common Lisp Notes</h1>

<p><a href="http://www.gigamonkeys.com/book/">Practical Common Lisp</a> is a very worthwhile book.</p>

<p>There are many fine implementations of Common Lisp. I'm using <a href="http://www.sbcl.org/">SBCL</a>.</p>

<p>SBCL has a REPL. However, it use readline, so we may want to invoke it like <code>rlwrap sbcl</code>.</p>

<pre>
* (+ 2 2)

4
* "Hello, world."

"Hello, world."
* (format t "Hello, world.")
Hello, world.
NIL
* (defun hello (who) (format t (concatenate 'string "Hello, " who)))

HELLO
* (hello "world")
Hello, world
NIL
* (load "~/tmp/mycode.lisp")

T
* (quit)</pre>

<p>Lisp source code files are traditionally named with the extension <code>.lisp</code> or sometimes <code>.cl</code>.</p>

<h2>Basic vim integration (yes, yes, I know about emacs)</h2>

<p>Pipe current buffer contents to the REPL like <code>:[range]w !sbcl --noinform</code>, and possibly add something like this to your .vimrc: <code>nmap <Leader>l :w !sbcl --noinform&lt;CR&gt;</code>.</p>

<?php include "../FOOTER.php" ?>
