Installing SICStusIn order to download and install SICStus, you will need a license. If you are a student at FEUP, you can use the ones provided to the FEUP community. All the required keys are located in the software repository, so go ahead and connect to VPN-FEUP. If you do not know how to do this, check my previous tutorial.
Afterwards, open following text file:
Go to SICStus Prolog download page and download the latest version for your system:
When prompted for a user and password, use the ones located on line number 7 from the previously opened text file:
Press CTRL+ALT+T to open the Terminal, navigate to the Downloads folder and extract the downloaded file using the following comand:
cat sp-4.3.0-x86_64-linux-glibc2.5.tar.gz | gzip -cd |tar xf -
Navigate to the extracted folder and run SICStus installer using the command:
The installer should start. When prompted with the question below, press Enter.
Press Enter again to install SICStus in /usr/local/sicstus4.3.0.
Press Enter again to confirm:
Now you will be prompted to enter some keys. Go to the text file we have previously opened: lines 54 to 57 have the information you need.
Afterwards, since we will not need any extra modules, answer no to the next four questions. In the previous questions, we pressed Enter to answer yes, but to answer no you really need to type no and only then press Enter.
When the installer finishes, it should look something like this:
Installing rlwrapWe are almost done. In order to use the arrow keys and history in SICStus, we will need to install rlwrap: execute the following command on the terminal:
sudo apt-get install rlwrap
Creating a link to SICStusAt this point, in order to run SICStus, we need to open the terminal, navigate to /usr/local/sicstus4.3.0 and only then run sicstus. This is quite exhausting.
At some point, it will be useful to open the terminal and be able to execute SICStus right away just by typing sicstus - this is very easy to achieve.
Open the terminal and type the following command:
sudo ln -s /usr/local/sicstus4.3.0/bin/sicstus /usr/bin/sicstusAfter that, you can type sicstus from anywhere and SICStus will start:
To exit SICStus, press CTRL+D.
Running SICStusYou may notice that when you run SICStus, you won't be able to use the arrow keys and weird stuff like ^[[A will start to come up instead:
That's really annoying and that's why we installed rlwrap. The correct way to launch SICStus is to type the following on the terminal:
rlwrap sicstusThat way you will be able to use the arrow keys like expected: