The newLISP on Rockets Blog

Currently running newLISP on Rockets version: 0.48

New! Simple one-button installer for Rockets on Ubuntu 14 LTS

Post #: 112
Date: 2015-08-21 14:43:43.000
Author: Rocket Man

It's been a while since I've updated this site, but it's not because I haven't been working on Rockets! In fact, I've been using and improving it at my job, and I'm doing work for not only the 1.0 release but some design work for what I want to see in Rockets 2.0!

In the mean time, I've made a new script that will do all the installation and configuring for Rockets on a bare-bones Ubuntu 14 LTS server. All you have to do is add the "LAMP" stack (and OpenSSH server) at installation time when you're creating your server, then log in via SSH, type


Then make the script executable:

sudo chmod +x

And then run the script:

sudo ./

And that's it! It takes care of all the fiddly bits (downloading newlisp, downloading Rockets, getting Bootstrap and the libraries and images, fixing the crypto library, setting permissions, etc) and leaves you with a fully-working Rockets system.


Comments (5)

Views: 2561

Compiling newlisp from source on CentOS 6.5

Post #: 110
Date: 2014-04-08 14:44:37.000
Author: Rocket Man

Pre-compiled binaries for newlisp are available for Ubuntu and Debian, but getting a RPM for CentOS is a bit harder. Another option is to compile from source, which is always fun. I tried this recently on CentOS 6.5.

First, get the source. Go to and go to the Downloads page. You will find something that looks like "download from newLISP v.10.6.0 source". Right click on that link and copy the URL to the clipboard.

Then, from an SSH shell, type

wget <right click to paste the link here>

This will download the source code in tgz format. Unzip it by typing:

tar zxvf newlisp-10.6.0.tgz

Then cd to the new directory. This is where you'll compile and build the source code.

First, however, you will need some essential libraries, and you'll have to add some links so that the makefile knows where to find them.

sudo yum install libffi-devel
sudo yum install readline-devel
cd /usr/include
sudo ln -s /usr/lib64/libffi-3.0.5/include/ffi.h
sudo ln -s /usr/lib64/libffi-3.0.5/include/ffitarget.h

You should have all the dependencies you need, so time to compile!

sudo ./configure
sudo make
sudo make test
sudo make install

You can now run newlisp by typing "newlisp" at the command line. But first, let's fix a few modules in preparation for installing Rockets:

Edit file: /usr/share/newlisp/modules/sqlite3.lsp

(set 'files (list
"/usr/lib64/" ; CentOS <<<<<<<< add this
"/usr/lib/" ; SuSE Linux
"/usr/local/lib/" ; Linux, BSD, Solaris
"/usr/pkg/lib/" ; NetBSD
"/usr/local/lib/" ; OpenBSD 4.6
"/usr/lib/libsqlite3.0.dylib" ; Mac OSX Darwin
(string (env "PROGRAMFILES") "/sqlite3/sqlite3.dll") ; Win32/MinGW

Edit file: /usr/share/newlisp/modules/crypto.lsp

(set 'files '(
"C:/Program Files/gnuwin32/bin/libeay32.dll" ; XP
"C:/Program Files (x86)/gnuwin32/bin/libeay32.dll" ; 7
"/usr/lib64/" ; CentOS <<<<<<<<< add this
"/usr/lib/x86_64-linux-gnu/" ; Ubuntu 12.04 LTS
"/usr/lib/i386-linux-gnu/"; Ubuntu 12.04
"/lib/i386-linux-gnu/" ; UBUNTU Linux 13.04
"/usr/lib64/" ; Fedora, CentOS 6.x
"/usr/lib/" ; OpenBSD 4.6
"/usr/lib/" ; OpenBSD 5.0

You can see above that we've added a couple of lines to these files. Use your favorite text editor (I used nano in this case)

And that's it! You now have a freshly installed build of newlisp, ready to go on your CentOS 6.5 system.

Comments (1)

Views: 3029

A new cover page for Rockets!

Post #: 101
Date: 2013-07-16 17:22:47.000
Author: Rocket Man

The little cartoon rocket was cute, but I think it's time for a more exciting image for the front page.

I modeled and rendered the rocket image in Blender and made the textures in Photoshop. The background is a photo from NASA.

Comments (1)

Views: 4894

Setting up a new site with newLISP on Rockets!

Post #: 99
Date: 2014-02-14 00:27:18.000
Author: Rocket Man

I've been setting up a lot of new sites lately using newLISP on Rockets. Here's the process for making a brand new site from scratch.

This assumes you've already got Linux and Apache installed on the server. This is easy to do with Ubuntu Server-- just select "LAMP" at install time. All these instructions are for Ubuntu but they should work on other Debian-based Linuxes.

Your web directory should be in /var/www.

1. Install newLISP

* Download newLISP Debian package by going to, finding the most recent newLISP .deb package, and typing

wget url-of-most-recent-newLISP-package

NOTE: This is the 32-bit version of newLISP. If you want the 64-bit version, you will need to compile it yourself, or get one of the unsupported 64-bit Debian installers (do a Google search for the most recent version). Also, the version numbers may change in the future-- go to the Downloads page at to get the current version.

Then install it using the following command:

sudo dpkg -i newlisp_10.5.4-1_i386.deb

2. Install SQLite

SQLite is the database used for all permanent storage in newLISP on Rockets. To install it, type:

sudo apt-get install sqlite3

3. (OPTIONAL) Set up a new site in /etc/apache2/sites-available

NOTE: This step is only if you want multiple websites (multiple URLs) on your Ubuntu install. If you don't need this, you still have to edit your /etc/apache2/sites-available/default file and add "+ExecCGI" to the Options line under <Directory /var/www/>

Add a new site file, in this case we're calling it "" which is the URL of the new site. Make it look something like this:

<VirtualHost *:80>
DocumentRoot /var/www/starscene
<Directory />
Options FollowSymLinks +ExecCGI
AllowOverride All
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride All
Order allow,deny
allow from all

4. (OPTIONAL) Make a new subdirectory in your web root and enable the site, edit permissions

NOTE: Again, this step is only if you are creating multiple sites on your Ubuntu server. If you have just one site, you can skip this step.

enable site sudo a2ensite
cd /var/www
mkdir sitename
sudo chown www-data sitename

5. Get newLISP on Rockets

cd /var/www/sitename (if you have only one site, type "cd /var/www" instead to go to the root directory of your web server)
sudo wget
sudo unzip (if you get a message about unzip not installed, just type "sudo apt-get install unzip" first)
cd newLISP-on-Rockets-master
sudo cp -R * ..

6. Fix the crypto library!

Unfortunately, the library is always changing version numbers, and newLISP often doesn't know where to find it. So you have to find it yourself.

cd /
sudo find . name libcrypto*

You should get something back like "./lib/i386-linux-gnu/"

Now, you have to tell newLISP where to find this cryptic cryptography file:

cd /usr/share/newlisp/modules
sudo nano crypto.lsp

Page down a couple of times to get to the long list of places to find the library, and add "/lib/i386-linux-gnu/" or whatever you found from before to the end of this list.

Some day, I'm going to write a script to do this automatically.

7. Run the setup script

cd /var/www (or cd /var/www/sitename if you've set up multiple sites)
sudo newlisp setup-rockets.lisp
sudo chown www-data *.db

If it works, it will ask you for some names and email addresses and such, and then spit out a list that is the first entry in the new database for Rockets, ending in "nil nil)". Don't worry about those nils. They are good nils.

8. Get Bootstrap

NOTE: Rockets uses an older version of Bootstrap. I'm working on updating it to work with the newer version, but for now, use the following tools to grab the CSS

cd /var/www (or cd /var/www/sitename if you've set up multiple sites)
sudo mkdir css
cd css
sudo wget
sudo wget
sudo wget
sudo wget
cd ..
sudo mkdir js
cd js
sudo wget
sudo wget
sudo wget

9. Get images!

cd /var/www (or cd /var/www/sitename if you've set up multiple sites)
sudo mkdir images
cd images
sudo wget
sudo wget
sudo wget
sudo wget
sudo mkdir avatars
cd avatars
sudo wget

And you should be good to go! Set your DNS to point to the IP of your web server, and Apache will automatically redirect any links to the site to the sub-directory and run index.cgi, which loads Rockets and redirects to rockets-main.lsp, the main page.


I get a 'crypto library not found' error!

You have to find the libcrypto library and add it to /usr/share/newlisp/modules.crypto.lsp (See the detailed description above)

Apache just shows the text of the newlisp script, instead of executing it!

You could try adding the line:

AddHandler cgi-script .cgi .lsp

To /etc/apache2/sites-available/default (or instead of default, your site name)

If things really don't want to execute, try this:

cd /var/www
sudo nano .htaccess

Add the line "Options +ExecCGI"

It works, but I can't write to the database (I can't make any new posts)

Make sure you've set the permissions on DATABASENAME.db (whatever name you gave it at the start). Usually chown www-data *.db works. You may also have to go to /var and type chown www-data www to give permission to the web server to create new files in that directory.

It works, but the front page still shows the "It works but no content has been added yet" page, I have to go to rockets-main.lsp manually

Sometimes the default index.cgi won't execute if you have PHP installed, or if you have index.html already in /var/www. Delete /var/www/index.html and, if necessary, create a new file called index.php that has the following lines:

header( 'Location: rockets-main.lsp' );

This will redirect the front page of the site to the first page of Rockets.

Any other issues? Post a reply to this thread and I'll try to answer them!

Comments (34)

Views: 11371

Yet another test poll

Post #: 96
Date: 2013-03-25 16:49:44.000
Author: Rocket Man

How many roads must a man walk down?


This one features some text in here to try and see how that affects the formatting.

Poll Results:

Total votes: 91

one : 6......
two : 32...................................
three : 7.......
four : 10..........
forty-two : 36.......................................

Comments (16)

Views: 3816

This is another poll test - 2

Post #: 93
Date: 2013-03-21 13:00:52.000
Author: Rocket Man

How many friggles in the flooby?



Poll Results:

Total votes: 48

one : 10....................
two : 16.................................
three : 9..................
four : 13...........................

Comments (6)

Views: 3470

How do I build a Forgot Password module? Here's how!

Post #: 88
Date: 2013-03-06 17:18:44.000
Author: Rocket Man

I'd been putting off doing a Forgot Password module for newLISP on Rockets because it is such a pain doing it properly. You can't just have one click to reset a password, because what if someone else knows your user name or email? Then they could change your password to whatever they want!

So what most sites do is let you trigger a reset, then send a confirmation message to that email address, and then make you retrieve the email and click on a special link to reset your password.

Funnily enough, on another site I'm developing I was testing logging out and logging in, and you know what? I forgot my password. So I figured this was as good as an excuse as any to build a Forgot Module! (And no, I couldn't just grab the password from the database, because it's encrypted for security!)

I wanted the whole thing to be only a single page for simplicity. rockets-forgotpassword.lsp is the page that handles triggering the email, confirming and sending the email, and resetting the password, so the code flow may not seem obvious at first glance. The emails contain links of unique identifiers (sometimes called GUIDs) that expire after an hour and are matched with email addresses of the people who sent them, so people won't be able to guess them either. The tokens are stored in a file called reset-tokens.lisp. This file is automatically generated if it doesn't previously exist.

One more thing: to get the email links to work, the module needs two additional configuration options in Rockets-config.lisp:

(set 'AdminEmail "")

(set 'SiteURL "")

You should change these to your own email and URL from whatever domain you are running Rockets on.

The code, along with the rest of Rockets, is available in GitHub here:

Views: 3264

How to compile newLISP from source on 64-bit Ubuntu

Post #: 87
Date: 2013-02-26 15:35:09.000
Author: Rocket Man

I've been wanting to update newLISP on my development box to see what neat new changes and features are available. Unfortunately, it's a 64-bit Ubuntu install, and pre-packaged binaries are only available for i386 (32-bit) on

So what to do? Well, compile from source of course!

First get the source:

cd ~
tar zxvf newlisp-10.4.5.tgz
cd newlisp-10.4.5

Now you're in the source code directory. First you need a few libraries, then you can go ahead and compile:

sudo apt-get install libffi-dev
sudo apt-get install libreadline6 libreadline6-dev
sudo make
sudo make install

And that's it! To get Rockets to work on Ubuntu, you'll have to go into the sqlite3.lsp module and add the appropriate path for where it lives on Ubuntu 64-bit:

cd /usr/share/newlisp/modules
sudo nano sqlite3.lsp

Add the following line under the list of similar lines:

"/usr/lib/x86_64-linux-gnu/" ; Ubuntu

Then do the same for crypto.lsp:

"/usr/lib/x86_64-linux-gnu/" ; Ubuntu

And you're good to go!

Comments (12)

Views: 4169

Converting other newLISP code to Rockets

Post #: 85
Date: 2013-02-21 18:54:17.000
Author: Rocket Man

Today I relaunched my personal website at It had previously been running on Dragonfly, a web development framework that inspired me to write Rockets.

Converting the code was really easy. All it took was the following:

1. Replace all instances of (print) with (display) and (println) with (displayln)
2. Remove Dragonfly-specific functions like (web-root) that are no longer necessary.
3. Make sure to start each page with:

#!/usr/bin/env newlisp

(load "newlisp-rockets.lisp") ; this is where the magic happens!

and end each page with

(display-footer "Jeremy Reimer")

And that's pretty much it! So if you want to convert any Dragonfly code to Rockets, that's how you do it.

Comments (2)

Views: 3907

Refactoring Rockets

Post #: 84
Date: 2013-02-15 11:59:24.000
Author: Rocket Man

I've made some changes to the code base that will make it easier to start new custom sites based on Rockets. This is for my benefit as well as everyone else's-- I'm currently developing a bunch of new sites with this technology!

Now, when you run setup-rockets.lisp, the script asks you for a long and short name for your blog, an owner name, and the database name. These are automatically saved in a new configuration file called Rockets-config.lisp. I went through every page in the Rockets blog and changed it so that it reads various custom data about the blog from the config file.

The config file looks like this:

(context 'RocketsConfig)
(set 'Database "ROCKETS-BLOG")
(set 'Name "The newLISP on Rockets Blog")
(set 'ShortName "newLISP on Rockets")
(set 'Owner "Rocket Man")
(context MAIN)

This should make it a lot easier to set up new sites with different configurations.

Comments (2)

Views: 3835