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 (NOTE:The script has also been tested and adapted so it will work on Ubuntu 16 and 18). All you have to do is install the OpenSSH server when you're creating your server, then log in via SSH, type
wget http://newlisponrockets.com/downloads/install_rockets.sh
sudo chmod +x install_rockets.sh
sudo ./install_rockets.sh
Views: 7214
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 newlisp.org and go to the Downloads page. You will find something that looks like "download from newlisp.org: 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
sudo ./configure
sudo make
sudo make test
sudo make install
Edit file: /usr/share/newlisp/modules/sqlite3.lsp
(set 'files (list
"/usr/lib64/libsqlite3.so.0.8.6" ; CentOS --- add this
"/usr/lib/libsqlite3.so" ; SuSE Linux
"/usr/local/lib/libsqlite3.so" ; Linux, BSD, Solaris
"/usr/pkg/lib/libsqlite3.so" ; NetBSD
"/usr/local/lib/libsqlite3.so.13.3" ; 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/libcrypto.so.10" ; CentOS --- add this
"/usr/lib/x86_64-linux-gnu/libcrypto.so" ; Ubuntu 12.04 LTS
"/usr/lib/i386-linux-gnu/libcrypto.so"; Ubuntu 12.04
"/lib/i386-linux-gnu/libcrypto.so.1.0.0" ; UBUNTU Linux 13.04
"/usr/lib64/libcrypto.so" ; Fedora, CentOS 6.x
"/usr/lib/libcrypto.so"
"/usr/lib/libcrypto.so.4"
"/usr/lib/libcrypto.so.18.0" ; OpenBSD 4.6
"/usr/lib/libcrypto.so.19.0" ; OpenBSD 5.0
"/usr/lib/libcrypto.dylib"
))
Views: 6662
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.
Views: 9349
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.
wget url-of-most-recent-newLISP-package
sudo dpkg -i newlisp_10.5.4-1_i386.deb
sudo apt-get install sqlite3
<VirtualHost *:80>
ServerAdmin starman@starscene.net
ServerName starscene.net
ServerAlias www.starscene.net
DocumentRoot /var/www/starscene
<Directory />
Options FollowSymLinks +ExecCGI
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
AddHandler cgi-script .cgi .lsp
Views: 21400
Poll Results:
Total votes: 92
one : | 6 | ...... |
two : | 32 | .................................. |
three : | 7 | ....... |
four : | 11 | ........... |
forty-two : | 36 | ....................................... |
Views: 8571
Poll Results:
Total votes: 48
one : | 10 | .................... |
two : | 16 | ................................. |
three : | 9 | .................. |
four : | 13 | ........................... |
Views: 6331
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 "newlisponrockets@newlisponrockets.com")
(set 'SiteURL "newlisponrockets.com")
Views: 6355
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 newlisp.org.
So what to do? Well, compile from source of course!
First get the source:
cd ~
wget http://www.newlisp.org/downloads/newlisp-10.4.5.tgz
tar zxvf newlisp-10.4.5.tgz
cd newlisp-10.4.5
sudo apt-get install libffi-dev
sudo apt-get install libreadline6 libreadline6-dev
sudo make
sudo make install
cd /usr/share/newlisp/modules
sudo nano sqlite3.lsp
"/usr/lib/x86_64-linux-gnu/libsqlite3.so" ; Ubuntu
"/usr/lib/x86_64-linux-gnu/libcrypto.so.0.9.8" ; Ubuntu
Views: 9374
Today I relaunched my personal website at http://www.jeremyreimer.com. 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!
(display-footer "Jeremy Reimer")
(display-page)
Views: 8531
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)
Views: 6662