Lisp with Batteries Included
Tuesday, April 3, 2007
I often used to get emails from new Lisp users asking about the best way to get started developing with Common Lisp. I guess this was because, a few years ago, I created a page for the Common Lisp Cookbook called Setting up an IDE with Emacs on Windows or Mac OS X that a lot of people found useful. However, that page is now pretty much obsolete as I haven't maintained it for a number of years and the tool recommendations on the page are at least partly defunct (ILISP has been pretty much replaced by SLIME now). In recent years, if people asked for my advice, I have recommended one of the following:
- Emacs, SLIME, and either CLISP, OpenMCL, or SBCL (if they were adament about using an open source solution) with a suggestion to use Lispbox if they weren't very familiar with .emacs customizations.
- Either the trial (no cost) or commercial versions of Allegro Common Lisp or LispWorks (if they were amenable to using a non - OSS solution). For people who aren't already Emacs users, starting out with either ACL or LispWorks can greatly reduce the initial learning curve and both Franz and LispWorks have excellent support and user forums.

I'll see if Edi wants to include the patches in his code; however, he may not want to maintain non-Windows binary distributions. So, if anyone else is interested in the Mac changes, let me know.
If you're using Edi's Starter Pack on Windows with LispWorks Personal Edition, you may find the following WSH script useful to start up LispWorks and load the initial start.lisp code (the LispWorks Personal version doesn't have support for init files):
Dim Wsh
Set Wsh = Wscript.CreateObject("Wscript.Shell")
Set Net = WScript.CreateObject("WScript.Network")
rem Start up LispWorks
Wsh.Run("C:\PROGRA~1\LISPWO~1\LISPWO~1.EXE")
rem Wait for a few seconds for it to start
WScript.Sleep(5000)
rem Press the OK button on the splash screen
Wsh.AppActivate "Upgrade LispWorks"
Wsh.SendKeys "{ENTER}"
rem Load the startup code
Wsh.AppActivate "LispWorks Personal Edition 5.0.1"
username = Net.UserName
str = "(load " & """C:/Documents\ and\ Settings/" & username & "/My\ Documents/Lisp\ Libraries/start.lisp"")"
WScript.Sleep(100)
Wsh.SendKeys (str)
Wsh.SendKeys "{ENTER}"
WScript.Sleep(100)
The script should work without any modifications so long as you
followed Edi's
installation instructions and didn't change any of the directory
locations.The equivalent AppleScript script for Mac OS X is here:
do shell script "open -a \"LispWorks Personal\"" do shell script "sleep 8"This script assumes that the libraries are installed in "~/Documents/Lisp-Libraries" (this may change if Edi decides to include support for Mac OS X and doesn't use the same location as I did). Incidentally, you'll notice in the AppleScript above that the lines that close the LispWorks splash window are commented out. This used to work on previous versions of LispWorks but doesn't work on version 5. If anyone knows the correct incantation to use, I'd appreciate knowing (I'll update this post if I get an answer)! In the meantime, you'll need to manually close the LispWorks splash window.
tell application "LispWorks Personal" activate tell application "System Events" tell process "LispWorks Personal" repeat until get frontmost end repeat -- The following should close the splash window but it doesn't work!! (manually close it for now) -- tell window "LispWorks Personal Edition" -- click button "Close" -- end tell tell window "Listener 1" keystroke "(when (probe-file \"~/Documents/Lisp-Libraries/start.lisp\") (load \"~/Documents/Lisp-Libraries/start.lisp\"))" keystroke return end tell end tell end tell end tell
Update-2007-04-04: Wow, that was quick - Edi has already applied my Mac OS X patches to his STARTER-PACK library and there is a new 0.4.5 release available! Edi has no current plans to provide a Mac OS X binary of STARTER-PACK; however, anyone who has a Mac and who wants to build the software can now do so (you will need the Apple Develoment Tools in order to build some things - for example, the UFFI parts of CLSQL). Since Macs come with SQLite3 already, it isn't necessary to download a copy of SQLite if you want to try out CLSQL. Thanks again Edi for writing STARTER-PACK and for providing such excellent libraries for the CL community!

