How to Install LISP on MacOS?
Lisp is one of the oldest programming languages. It was invented back in the 1950s by John McCarthy. Lisp is a so-called meta-programming language or a symbolic programming language. It can be used for any sort of task. It’s a general-purpose language. It is the second-oldest high-level programming language. In this tutorial, we are going to see how we can install LISP on macOS.
Installing LISP on macOS :
Install the SBCL, a lisp compiler by running the following command:
SBCL stands for Still Bank Common Lisp, it is a compiler for common lisp programming language.
brew install sbcl
Output:
Run the following command in the terminal to install lisp onto your macOS :
brew install clisp
Output:
Running a lisp program:
Open up any text editor and write the following hello world program and save it with extension as a .lisp.
; hello world program using the CLISP language (print "Welcome to w3wiki")
Save it as a .lisp extension. E.g. save it as Beginner.lisp.
Now to execute the code, run the following command:
sbcl --script Beginner.lisp
Output:
Here, sbcl is a compiler, and the –script flag represents that we are going to run a lisp script file.
Contact Us