Difference between revisions of "Slime"

From ArchWiki
Jump to: navigation, search
Line 1: Line 1:
 +
{{stub}}
 
[[Category:Development_(English)]]  
 
[[Category:Development_(English)]]  
  
 
==Introduction==
 
==Introduction==
Here is one way to get a lisp programming environment using emacs and slime and sbcl.  Common Lisp was used to build viaweb by Paul Graham with 3 coders in 1995.  It sold to yahoo for 50M us $ and became yahoo store.  Lisp also powers orbitz.com.  Other Lisp resources include scsh, drscheme, the book SICP, and Practical Common Lisp by Peter Seibel(free online), as well as ANSI common lisp and On lisp(free online) by Paul Graham.  A gentle introduction to symbolic computation by Touretsky is free online as well. Happy hacking!!!
+
Here is one way to get a lisp programming environment using emacs and slime and sbcl.  Common Lisp was used to build viaweb by Paul Graham with 3 coders in 1995.  It sold to yahoo for 50M us $ and became yahoo store.  Lisp also powers orbitz.com.  Other Lisp resources include scsh, drscheme, the book SICP, and Practical Common Lisp by Peter Seibel(free online), as well as ANSI common lisp and On lisp(free online) by Paul Graham.  A gentle introduction to symbolic computation by Touretsky is free online as well. Happy hacking!
  
*emacs - editor
+
* '''emacs''' - editor
*slime - lisp mode for emacs
+
* '''slime''' - lisp mode for emacs
*sbcl - a common lisp implementation (clisp is another good one, just substitute clisp for sbcl in the following)
+
* '''sbcl''' - a common lisp implementation (clisp is another good one, just substitute clisp for sbcl in the following)
 
 
==External Resources==
 
*To get excited about lisp and programming: http://www.paulgraham.com is recommended.
 
*http://www.cliki.net is a great lisp site
 
  
 
==Installation==
 
==Installation==
 
The Arch repositories have emacs and sbcl packages:
 
The Arch repositories have emacs and sbcl packages:
#su - root
+
# <code>$ su - root</code>
#pacman -Sy emacs sbcl
+
# <code># pacman -Sy emacs sbcl</code>
#cd /home/userX
+
# <code># cd /home/userX</code>
#wget http://aur.archlinux.org/packages/slime/slime.tar.gz  
+
# <code># wget http://aur.archlinux.org/packages/slime/slime.tar.gz</code>
#tar xzvf slim--.tar.gz
+
# <code># tar xzvf slim--.tar.gz</code>
#cd slime
+
# <code># cd slime</code>
#makepkg
+
# <code># makepkg</code>
#pacman -U slime-XX.tar.gz
+
# <code># pacman -U slime-XX.tar.gz</code>
  
 
==Configuration==
 
==Configuration==
Now to setup emacs to use slime by creating a .emacs file:
+
Now to setup emacs to use slime, change user to userX and go to /home/userX. Now to edit your .emacs file, run:  
change user to userX and in /home/userX to create your .emacs file, vi .emacs; mine is:  
+
$ vi .emacs
# vi .emacs (now paste the below into this file, changing g to whatever you userX is, then ESC, :wq to save, apologies if you are a vi whiz!)
+
Now paste the below into this file, changing <code>g</code> to whatever you userX is.
  (setq inferior-lisp-program "/usr/bin/sbcl")
+
(setq inferior-lisp-program "/usr/bin/sbcl")
  (add-to-list 'load-path "/home/g/slime/pkg/usr/share/emacs/site-lisp/slime/")
+
(add-to-list 'load-path "/home/g/slime/pkg/usr/share/emacs/site-lisp/slime/")
  (require 'slime)
+
(require 'slime)
  (slime-setup)
+
(slime-setup)
  
 +
My userX is g, and /usr/bin/sbcl is path to steel bank common lisp (switch to clisp or CMU lisp if you like, which are other great common lisp implementations).
  
--my userX is g, and /usr/bin/sbcl is path to steel bank common lisp (switch to clisp or CMU lisp if you like, which are other great common lisp implementations)
+
Then save [:wq], and [emacs & enter] to launch emacs, [ALT-x slime -return-] to enter slime mode, which takes like 10s to load, and there you are a nice working lisp dev environment.  Emacs has its own tutorial built in and www.sbcl.org has info on sbcl..enjoy..
 
--then save [:wq], and [emacs & enter] to launch emacs, [ALT-x slime -return-] to enter slime mode, which takes like 10s to load, and there you are a nice working lisp dev environment.  Emacs has its own tutorial built in and www.sbcl.org has info on sbcl..enjoy..
 
  
====FOR 64 BIT:====
+
==For 64-bit==
 
*As root: pacman -S emacs clisp
 
*As root: pacman -S emacs clisp
 
*wget slime from slime website
 
*wget slime from slime website
Line 44: Line 40:
 
*start emacs, ALT-x slime
 
*start emacs, ALT-x slime
  
Thats all there is to it....
+
==External Resources==
 +
*To get excited about lisp and programming: http://www.paulgraham.com is recommended.
 +
*http://www.cliki.net is a great lisp site

Revision as of 12:42, 13 December 2008

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Slime#)

Introduction

Here is one way to get a lisp programming environment using emacs and slime and sbcl. Common Lisp was used to build viaweb by Paul Graham with 3 coders in 1995. It sold to yahoo for 50M us $ and became yahoo store. Lisp also powers orbitz.com. Other Lisp resources include scsh, drscheme, the book SICP, and Practical Common Lisp by Peter Seibel(free online), as well as ANSI common lisp and On lisp(free online) by Paul Graham. A gentle introduction to symbolic computation by Touretsky is free online as well. Happy hacking!

  • emacs - editor
  • slime - lisp mode for emacs
  • sbcl - a common lisp implementation (clisp is another good one, just substitute clisp for sbcl in the following)

Installation

The Arch repositories have emacs and sbcl packages:

  1. $ su - root
  2. # pacman -Sy emacs sbcl
  3. # cd /home/userX
  4. # wget http://aur.archlinux.org/packages/slime/slime.tar.gz
  5. # tar xzvf slim--.tar.gz
  6. # cd slime
  7. # makepkg
  8. # pacman -U slime-XX.tar.gz

Configuration

Now to setup emacs to use slime, change user to userX and go to /home/userX. Now to edit your .emacs file, run:

$ vi .emacs

Now paste the below into this file, changing g to whatever you userX is.

(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path "/home/g/slime/pkg/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(slime-setup)

My userX is g, and /usr/bin/sbcl is path to steel bank common lisp (switch to clisp or CMU lisp if you like, which are other great common lisp implementations).

Then save [:wq], and [emacs & enter] to launch emacs, [ALT-x slime -return-] to enter slime mode, which takes like 10s to load, and there you are a nice working lisp dev environment. Emacs has its own tutorial built in and www.sbcl.org has info on sbcl..enjoy..

For 64-bit

  • As root: pacman -S emacs clisp
  • wget slime from slime website
  • chown -R user: /usr/bin/clisp and slime dir
  • untar slime, follow readme by creating .emacs file in your users home....
  • start emacs, ALT-x slime

External Resources