Stas, Thanks much for your tips here. The "eval-when" function and rlwrap worked well for me. I found the cliki has some example configurations:

http://www.cliki.net/rlwrap



On Jun 30, 2010 1:16am, Stas Boukarev <stassats@gmail.com> wrote:
> Kevin Smith k2msmith@gmail.com> writes:
>
>
>
> > Please bear with me as I am a beginner with sbcl and lisp environments in general.  I am using SBCL 1.0.39 compiled on Mac OSX from macports. The primary packages I am interested in using with SBCL right now are asdf, slime, cl-opengl (and cl-glu, cl-glut which come with it and cffi (for building wrappers on "c" code functions).
>
> >
>
> >
>
> > Question 1
>
> >
>
> > All seems to be working.  I have written some test code as well as loaded a few example files from cl-opengl file and things seem to work - although I am wondering if I have asdf and my package collection properly installed.
>
> >
>
> > When I execute function from the sbcl prompt:  (compile-file "intro.lisp"), I get
>
> >
>
> > ; compiling file "/Users/kevinsmith/intro.lisp" (written 29 JUN 2010 04:58:26 PM):
>
> > ; compiling (REQUIRE :ASDF)
>
> > ; compiling (REQUIRE (QUOTE CL-OPENGL))
>
> > ; compiling (REQUIRE (QUOTE CL-GLU))
>
> > ; compiling (REQUIRE (QUOTE CL-GLUT));
>
> > ; compilation unit aborted
>
> > ;   caught 1 fatal ERROR condition
>
> > ;
>
> > ; compilation aborted because of fatal error:
>
> > ;   SB-INT:SIMPLE-READER-PACKAGE-ERROR at 231 (line 6, column 32) on #
> > ;                                                                      for "file /Users/kevinsmith/intro.lisp"
>
> > ;                                                                      {100381E971}>:
>
> > ;     package "GLUT" not found
>
> > ;
>
> > ; compilation aborted after 0:00:00.005
>
> > NIL
>
> > T
>
> >
>
> > an excerpt of the source file looks like this:
>
> >
>
> > (require :asdf)                 ; need ASDF to load other things
>
> > (require 'cl-opengl)   ; load OpenGL bindings
>
> > (require 'cl-glu)      ; load GLU bindings
>
> > (require 'cl-glut)     ; load GLUT bindings
>
> >
>
> > (defclass my-window (glut:window)
>
> >   ()
>
> >   (:default-initargs :width 400 :height 300
>
> >                      :title "My Window Title"
>
> >                      :x 100 :y 100
>
> >                      :mode '(:double :rgb :depth)))
>
> >
>
> Put all your requires inside (eval-when (:compile-toplevel :load-toplevel :execute) ...)
>
>
>
> > Question 2
>
> >
>
> > What are my options for the sbcl shell/evaluation loop ?   With no arrow keys for history and the annoying way it handles errors, requiring you to type in a different number to go back to the previous state, it makes it a bit rough for me. Running everything through emacs seems to be the only alternative, but a nicer shell (similar to haskell shell or others) would be nice if available.  (or maybe something like the inspector window in other lisps I've seen).
>
> Try rlwrap (http://utopia.knoware.nl/~hlub/rlwrap/ )
>
>
>
> --
>
> With Best Regards, Stas.
>