There is a new version of Ready Lisp for Mac OS X available. This version is based on SBCL 1.0.16, and requires OS X Leopard 10.5. The most notable change from the previous version is that 64-bit mode and experimental threading are no longer supported, since both have been known to have issues on OS X, while the purpose of Ready Lisp is to smoothly introduce Common Lisp to new users.
What is Ready Lisp? It’s a binding together of several popular Lisp packages for OS X, including: Aquamacs, SBCL and SLIME. Once downloaded, you’ll have a single application bundle which you can double-click — and find yourself in a fully configured Common Lisp REPL. It’s ideal for OS X users who want to try out Lisp with a minimum of hassle. The download is approximately 76 megabytes.
There is a GnuPG signature for this file in the same directory;
append .asc to the above filename to download it. To
install my public key onto your keyring, use this command:
$ gpg --keyserver pgp.mit.edu --recv 0x824715A0
Once installed, you can verify the download using the following command:
$ gpg --verify ReadyLisp.dmg.asc
For more information, see the Ready Lisp project page.
I realized the other day that on OS X, the Spotlight indexing
process is started using launchd. This makes it very
easy to modify the launchd configuration script to
insure that background indexing uses the least amount of CPU and
I/O bandwidth possible.
Edit the configuration script by running this command as root:
# open /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
You should find yourself in the Property List Editor application. Now add two keys at the top-level, one named LowPriorityIO, which is a boolean set to true, and another named Nice which should be an integer set to 20.
Now whenever the mds spawns mdworker
processes to index recent changes to the file system, it won’t get
in your way quite as much as before. (Without this change,
mdworker processes run at the same priority as user
processes, according to output from the ps axl
command).
There has been a small debate among some Mac users about whether defragmenting your disks is necessary for the smooth operation of OS X. I’ve always been in the camp of those who do it regularly, because I’ve seen what my disk ends up looking like after a few weeks of not doing it (and how pretty the graph looks afterwards). It could all be psychological, but I find the progress bar rather hypnotizing, and my wife has been known to find me staring at it for hours on end. Ok, very psychological.
Well, I’ve found one circumstance where defragmentation is definitively helpful: compressing sparse disk images.
I have a habit of creating encrypted disk images for every client I work for. A lot happens in those images, which tend to grow and shrink quite a bit. OS X has a command to squeeze out the unused space, which looks like this:
$ hdiutil compact DiskImage.sparseimage
I just ran this command on one of my work images, and it reported a savings of 786 Mb out of 3 Gb. Just for interest’s sake, I ran iDefrag on the same volume, which eliminated the small amount of fragmentation that had built up, and compacted the files down toward the beginning of the image.
Running hdiutil compact on the same disk image
again resulted in a further savings of 518 Mb! Given that the image
itself is now 1.4 Gb, that’s about a 30% further reduction.
So, if you’re like me and you use lots of virtual disk images — and you’ve always wondered if defragmentation tools were worth anything at all — here’s one reason to consider it.
A couple of pathname issues were discovered in the release of
Ready Lisp that was posted yesterday, leading to the inability to
load asdf-install (or use it). These have been fixed
in the new release uploaded today. If you now use
asdf-install and choose a “system-wide” installation,
the installed packages get saved in your Application bundle.
However, due to the way that asdf-install itself
works, if you then move your application bundle to another
directory, symbolic links in the systems directory
will get broken. So I recommend installing new packages into your
home directory instead.
Also, the sources for SBCL are now included, meaning that if you
use M-. (jump to definition) and pick a function like
mapcar, it will drop you into the source code for
SBCL’s mapcar implementation.
The new version is available here (the old link still works, it is now a reference to that one).
Lastly, I’ve created a new home page for the Ready Lisp project, which now lives here.
There is a new version of Ready Lisp for Mac OS X available. This version is based on SBCL 1.0.12.17, and requires OS X Leopard 10.5. The most notable change from the previous version is that it is now fully universal, supporting PowerPC and 32- bit and 64-bit Intel machines. Also, threading has been turned on for Intel processor. See the NEWS below.
What is Ready Lisp? It’s a binding together of several popular Lisp packages for OS X, including: Aquamacs, SBCL and SLIME. Once downloaded, you’ll have a single application bundle which you can double-click — and find yourself in a fully configured Common Lisp REPL. It’s ideal for OS X users who want to try out Lisp with a minimum of hassle. The download is approximately 87 megabytes.
There is a GnuPG signature for this file in the same directory;
append .asc to the above filename to download it. To
install my public key onto your keyring, use this command:
$ gpg --keyserver pgp.mit.edu --recv 0x824715A0
Once installed, you can verify the download using the following command:
$ gpg --verify ReadyLisp-1.0.12-10.5.1.dmg.asc
Below is a full rundown of what’s new.
Ready Lisp is now fully universal, and runs on the following platforms:
There is no port of SBCL to 64-bit PowerPC. Experimental threading has been enabled for both Intel platforms.
The following pieces were updated:
Aquamacs remains at version 1.2a.
Info documentation for the Common Lisp pieces is now bundled in.
Just type C-h i to read it. Also, when editing Common
Lisp files, you can type C-h f to instantly access the
HyperSpec index. In Emacs Lisp files, C-h f will get
you help on Emacs Lisp functions.
There is also HTML and PDF versions of all documentation in:
Ready Lisp.app/Contents/Resources/htmlReady Lisp.app/Contents/Resources/docThere are a few more Common Lisp libraries bundled in the core file with this release:
CL-FADLOCAL-TIMESERIESMEMOIZECL-PPCREI find these libraries very handy, but mainly I’m including them
because the upcoming release of my CL-Ledger accounting tool
depends on them, so it will work for Ready Lisp users
out-of-the-box. See the “doc” subdirectory above for documentation
on how to use these libraries (except MEMOIZE, which
does not have separate documentation; use
memoize:memoize-function to mark a function as
memoized).
After upgrading my system to Leopard this weekend, I decided to refresh Ready Lisp as well. It now contains both 32-bit and 64-bit builds of SBCL (which has been bumped to 1.0.11), so if you have a Core 2 Duo machine, you’ll be running Lisp at full 64-bit! Alas, Emacs itself cannot support 64-bit as a Carbon app, because there are no 64-bit Carbon libraries. SLIME has also been updated, to CVS latest as of today. Aquamacs is still the same version at 1.2a.
I did spend several hours trying to build a fully Universal
package that would run on PowerPC as well (I have a PowerBook G4 in
addition to this MacBook Pro), but it seems Leopard has broken the
PowerPC port of SBCL. Some of the core OS structures have changed,
such as os_context_t.
Ready Lisp is now being versioned according to the SBCL version it contains, which makes today’s release ReadyLisp-1.0.11-10.5-x86.dmg. The older version, which still works on 10.4, can be downloaded here.
NOTE: The recent loading bug for Leopard users has been fixed. Please re-download. Also, it still does not work on OS X 10.4 (Tiger) at the moment. I will have to create a separate build of SBCL for that version this weekend.
A few days ago I posted instructions for getting a freeware based Common Lisp installation running on your Mac. I have since discovered a better alternative: just install LispWorks Personal Edition, a free environment with a superb set of debugging and profiling tools. Note that it does have the restriction that it will only run for five hours at a time. Once you hit the four hour mark, it gives you a warning, after which you should shutdown and restart the environment. But really, if you’re Lisping for more than four hours every day, that’s great news.
The other option is Lisp in a Box, which offers a completely self-contained freeware Lisp environment that’s ready to download and run on your Mac.
Since the Lisp in a Box site has gotten a little stale with
regard to OS X, I’ve created a new package based on Aquamacs, which
I call Ready Lisp. The advantage to this package is that it
downloads as a single Application bundle. You just drag-and-drop it
into your /Applications directory, double-click and
go! You’ll have all of the following tools immediately at your
disposal:
But the nicest part for those new to Emacs and Lisp is that everything is pre-configured and setup for you. Once you double-click the packaged application, you will find yourself at a REPL where you can start right away:
CL-USER> (format nil "Hello, world!")
"Hello, world!"
CL-USER>
The disk image is 44 Mb and can be downloaded from my Lisp repository over FTP. Also, please note that this package is for Intel Macs only. If you need an easy Lisp to run on the PowerPC architecture, I suggested you visit the Lisp in a Box site and download one of their packages based on OpenMCL.
Happy Lisping!
NOTE: I have removed the pre-built tarball of these links form my Lisp repository due to possible copyright concerns. I recommend that if you want to collect these documents into one place (for searching in programs like DEVONthink), that you use the tools available in such programs to download these resources from the Web:
I’ve found a very easy way to use local DNS caching on the Mac: simply setup Internet sharing from one device you don’t use, to another you don’t use. Since I almost always get my Internet access through wireless, I’ve setup my system to share my Fireware port to anyone connected to my Ethernet port.
Although this sharing setup doesn’t do any sharing, what it does do is to cause OS/X to run a local DHCP server and a local DNS server. This local DNS server takes its nameserver addresses from your current Internet configuration (in my case, wireless), so everything is automatically setup to cache DNS from the nameservers you’re actually using.
The only thing necessary to do is to change
/etc/resolv.conf to point at your new local
nameserver. Using the Network Preferences Pane, find out what your
local Ethernet address is (to use my example; you’ll have to find
the IP of the interface you’re sharing from). Now edit
/etc/resolv.conf so it looks something like this:
nameserver 192.168.2.1
In my case, my local Ethernet interface gets set to 192.168.2.1 when I’m using sharing. You may need to setup a cron job (check out the utility CronniX) in order for your resolv.conf to get overwritten each time with this setting.
Now site back and enjoy the added speed of cached DNS! This is especially helpful on connections that drop packets a lot, since I find a great number of the “pauses” in my Internet usage all relate to lagged out DNS lookups.