Portacle

Portacle is a complete IDE for Common Lisp. It includes all the bells and whistles that you will need. Versions for Mac OS, Linux and Windows are available. This document will help you installing Portacle and configuring it for use with the Babel toolkit.

Installing Portacle

Installing Portacle is very easy. Installation instructions for different operating systems are described on the Portacle website. Please follow the instructions for your operating system and verify that Portacle is installed correctly.

Configuring Portacle

Once Portacle is up and running, we need to configure it to work with Babel. This can be done in two simple steps:

  1. We need to make sure that Portacle has access to the tools installed earlier. To do this, we need Portacle to load the PATH environment variable. Navigate to the /portacle/config directory. There, create or edit a file called user.el.

    1. MacOS: The tools installed through Homebrew will be located at /usr/local/bin. Add this to the PATH variable like this:
       (setenv "PATH" (concat (getenv "PATH") ":/usr/local/bin"))
       (setq exec-path (append exec-path '("/usr/local/bin")))
      
    2. Linux: Add the location of the installed binaries to the PATH variable. Here, we assume these are located in /bin, but depending on your installation these could be located in /opt or somewhere else.
       (setenv "PATH" (concat (getenv "PATH") ":/bin"))
       (setq exec-path (append exec-path '("/bin")))
      
    3. Windows: Add the location of the gnuplot and GraphViz binaries to the PATH variable. If you followed along with the installation of these tools, these will be located in C:\Program Files (x86)\.
       (setenv "PATH" (concat (getenv "PATH") ":C:\Program Files (x86)\GraphvizX.XX\bin;C:\Program Files (x86)\gnuplot\bin"))
       (setq exec-path (append exec-path '("C:\Program Files (x86)\GraphvizX.XX\bin" "C:\Program Files (x86)\gnuplot\bin")))
      
  2. In the user.el file, we also set the Babel directory as the default working directory. Add the following line to user.el:
    (setq default-directory "/path/to/Babel/")
    

    Note: Windows user should use backslash (\) instead of forward slash here.

  3. We want to load Babel every time we open Portacle. To enable this, add the following line to /portacle/config/sbcl-init.lisp, filling in the path to your Babel folder:
     (load "/path/to/Babel/init-babel")
    

Now, when you open Portacle, it should automatically load Babel and print the following message:

* Initializing BABEL.
  The BABEL path is: /path/to/Babel