Sunday, January 30, 2011

Lisp installation on windows 7

********************
This was supposed to be posted 5 months back :) . Better late than never. Might post some more stuff related to LISP if I get time.
********************

LISP installation on windows 7
I am currently doing a course on AI, which required me to work with LISP. (From what I read in the first tutorial, once you learn LISP, everything will be clearer. Well honestly as now I have not done much work on LISP and am still doing basic programming. So NEO is yet to see the code!!! :)
I tried working with LISPBOX which as the name suggests, packages everything you need for LISP (SBCL, EMACS and SLIME) into one box. Download it and run the lispbox.bat file which fires up the EMACS editor. Its the easiest way to run LISP for a beginner. BUT for some reason, it will not evaluate even common expression sometimes (Just goes to the next line, and i am still not able to figure out how to "quit" from it without killing the entire EMACS editor.)
Which brings us to the installation of SBCL and SLIME separately. Found a tutorial which explains installation of SBCL, EMACS, SLIME on windows xp. I tried using the same.
There were a few hiccups. I do not remember the issues exactly but will try to list them down.
--> follow the procedure given in the tutorial as much as you can. I did not understand the use of the folder info, docs etc under the HOME directory.
--> Do restart your system as mentioned in the tutorial. Else you might get the error "Spawning child process: invalid argument". Read this post for more info.
--> In windows 7 the emacs file is located at C:\Users\[USER]\AppData\Roaming. Well there is no need to physically locate the file since you can always access the file by searching it. use C-x C-f and then search for "~/.emacs"
--> The folder mentioned in previous step is important since for some reason I am able to load my lisp files only from this folder. (Have to look into it further and I might post a way to change the settings so that it lisp files can be accessed from other folders also.)
Settings in EMACS file.
(setq inferior-lisp-program "sbcl")
(add-to-list 'load-path "c:/home/bin/emacs/site-lisp/slime/")
(require 'slime)
(slime-setup)
I will try to post detailed tutorial explaining the steps for installation. But as of now (quit) . :)