Introduction
In this section I will cover some brief introduction & how to install it. Let’s understand why LISP is so special & why you should learn it.
What is so special about lisp?
Based on Lambda Calculus, lisp takes a very different model. It says that with a function, in the mathematical sense, and a few properties, like allowing the function to call itself, you can compute the same things that you can with the Turing model. Due to this, it leads to more of a functional style of programming.
Apart from that massive difference, Lisp was first to invent Dynamicism, where you don’t specify types when you code. It was first to introduce the idea of interpreted languages, where the compilation happens at runtime, so you can write macros, or program altering functions which alter the program at runtime.
Lisp was first to introduce homoiconicity, a syntax that mimics the AST of a language, which means it was first to be composed of only expressions, no statements. It was also the first to introduce the concept of a repl, where you can interactively write code at a command prompt.
Please check [what is so special about lisp]
Installation
Let’s install lisp from sbcl
apt-get install sbcl
IDE for Lisp
First of all get an IDE for lisp, the most popular one is slime on emacs. So, let’s install emacs editor then slime.
apt-get update install emacs
Let;s install slime using quicklisp
. The complete guide on installing quicklisp can be found here. After you are done with the installation of quicklisp, its time to install slime.
sbcl (ql:quickload "quicklisp-slime-helper") (quit)
Copy the content show in sbcl and paste it in the .emacs file as show below. Save & quit .emacs.
Now, let’s launch emacs & install slime. launch from command line using the command,
emacs -nw
Give alt+x (note: use the alt button on the right hand side) and then type slime. That’s it! this will install slime & you should have the below screen.