Install_with_Emacs_and_slime
In order to install Obvius you should have the following thibgs installed
- a CommonLisp System e.g. SBCL
- Emacs with SLIME or Sly
- quicklisp
If you want to install Obvius, the best for now is to download the repository and put it in your quicklisp/local-projects folder. I f you have no clue what i am talking about go the Vanilla Install section.
This section assumes you have neither a CommonLisp system nor emacs and quicklisp installed. So first thing to make sure is you are not afraid of emacs and prepared to work with parenthesis.
We need to install
- Common Lisp
- Git
- Quicklisp
- Emacs
- Sly/Slime
- Obvius
If you are on Ubuntu open up a terminal and type
install sbcl
sudo apt-get install sbcl
after that install Git a version control tool.
sudo apt-get install git
Quicklisp is a package management systems which automatically downloads packages and their dependencies.
Open firefox (or a browser of your choice) and go to:
https://www.quicklisp.org/beta
Click on the download link for the quicklisp-lisp file
https://beta.quicklisp.org/quicklisp.lisp
and save it in your home directory.
start sbcl form your home directory (or the directory you stored the quicklisp file)
open a terminal and type:
sbcl
in sbcl type
(load "quicklisp.lisp")
install quicklisp via
(quicklisp-quickstart:install)
and finally to load quicklisp every time you start sbcl
(ql:add-to-init-file)
close sbcl by
(quit)
The next thing is to install Emacs the editor of Choice for Common Lisp. Of course, you can choose any other editor that has REPL support.
Open a terminal and type
sudo apt-get install emacs
close the terminal and start emacs
Slime is the REPL (Read-Eval-Print-Loop) which is the main interaction with Common Lisp.
If you know how to install packages in emacs just follow the instructions here: https://common-lisp.net/project/slime/doc/html/Installation.html#Installation
Otherwise take the following steps
Start Emacs
when emacs has started type
M-x package-install RET slime RET
where M-x means hold down <ALt>-key and <x>-key together. RET means RETURN
if this works fine - go to Start Slime
sometimes the following error occurs,
if it does switch to the scratch buffer in Emacs with C-x scratch RET. You know already C-x means hold down <Control> and x together.
In the scratch buffer type the following
(package-initialize)
place the cursor directly behind the closing parenthesis and type C-x C-e. That is hold down Control together with x, release and then press Control together with e and release.
After that type
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
again place the cursor directly behind the closing paren and press C-x C-e again.
Then again try
M-x package-install RET slime RET
At first we must tell SLIME what CommonLisp implementatio we are using. So change to the scratch buffer (C-x b scratch) and type
(setq inferior-lisp-program "sbcl")
place the cursor directly behind the closing parenthesis and press C-x C-e.
Additionally we coudl get a fancier REPL, for that type into the scratch buffer:
(setq slime-contribs '(slime-fancy))
place the cursor behind the closing parenthesis and evaluate by C-x C-e.
In the scratch buffer type M-x slime and the following screen should occur
and after a while the REPL (Read Eval Print Loop) occurs. Switch to the Repl buffer.
The first thing we have to do is to download the oObvius source files: You have two options to download the Obvius source files.
Open up a terminal and go to the quicklisp directory with local projects
cd quicklisp/local-projects/
then copy the following command or type it
git clone https://github.com/thicksteadTHpp/Obvius.git
This will download the Obvius source files to a place where Quicklisp can find it.
When we load Obvius for the first time from the REPL quicklisp will download all dependencies which will take while.
To load Obvius go to the REPL in EMACS and type
(ql:quickload "obvius")
You will see a lot of downloads and compiling. After all went well you should see following screen.
Now switch into the Obvius package by typing
(in-package :obv)
and press RETURN.
You should see that the prompt has changed to OBV>. Now load some test images from the obvius source code.
(make-test-images)
Now test the grapics backend by displaying one of the images. Type
(display einstein)
and press RETURN. After that you should see somthing like that:
From here you should walk through the tutorials.