[slim-vim] ECL Slime, first cut

Brad Beveridge brad.beveridge at gmail.com
Sun Apr 23 19:12:05 CDT 2006


Hello all,
I've spent a little time in the past week playing with slime written
in Vim.  I started with the partial slime implementation from Armed
Bear Common Lisp (http://armedbear.org/abcl.html).
The code from ABCL is circa 2004, and basically didn't work at all -
but was a really good place for me to start.
So I've made the code work to a degree, I can successfully send
expressions to Swank and get answers back.  The code can also accept
the *standard-output* stream from Swank.
I've not run this within Vim yet.  I have Vim running with ViLisp
piping code into ECL.  In another console I am running Swank in SBCL.

Some points
 - ECL is a recent CVS build, but I see no reason why 0.9h won't work.
 - Slime is CVS, v2.0 should be OK too.  I did most of the work
against Slime CVS from about 1 month ago and only just quickly tested
v2.0 now - there may be some slight breakage.
 - Swank is running inside SBCL 0.9.10.37, though any supported Slime
backend ought to be OK
 - My SBCL hasn't got threading support, so I am using fd signals to
communicate, you may need to change
swank-<lisp-name>.lisp:preferred-communication-style so it returns
:fd-handler.  Regular Slime from Emacs should still work with the
:fd-handler style.

How do you use it?
 1) Run your Swank host lisp in a console, and start swank (see near
the bottom of scraps.lisp)
 2) Run ECL in another console hooked into ViLisp
 3) Run the first 11 lines of scraps.lisp in order (in ECL)
 4) use (listen *stream*) to see if Swank has anything to say
 5) use (handle-single-input) to process Swank input
 6) use the (emacs-rex ...) lines to send code to Swank

Where to from now?
 - The slime.lisp code needs cleaning, and ought to mirror slime.el
for the functional chunks so we can more easily track changes to
mainline slime.
 - Many more protocol s-expressions need to be handled, look for
destructure-case and dispatch-event in slime.el and swank.lisp
 - Need Vim integration (Laaaaary :)  This will be a bit down the
track, we need the important protocol objects sorted first.

I really don't have a plan for how to proceed, I'm just picking the
interesting protocol bits as I go.  I welcome any and all feedback.

Cheers
Brad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecl-slime.tgz
Type: application/x-gzip
Size: 6931 bytes
Desc: not available
Url : http://www.lispniks.com/pipermail/slim-vim/attachments/20060423/1594fc23/ecl-slime.tgz


More information about the slim-vim mailing list