I'll try to get around to writing this up as a nice HTML file to hang  
off
  my Web server someplace, but in the mean time, here's how I got a  
version
of SBCL with McCLIM running on Mac OS X.

A word of warning: while I'm okay with Common Lisp itself,  I'm a  
relative newbie to the whole
software packaging & distribution environments for Common Lisp, so  
this is largely a recipe, and
I don't necessarily understand it all in a deep sense.  In other  
words, this worked for me, but it's not
necessarily the best or truly right way to do this. I welcome feedback  
from others about things I'm
doing that aren't really the Common Lisp way, especially with respect  
to asdf configuration.

I did this on my Intel MacBook a while ago running 10.5; I just  
repeated the
steps on my old G4 PowerBook running 10.4.11, and it seems to work okay.

=== Carbon Emacs ===
I like working in Carbon Emacs with Slime. I'd recommend you look at  
it, too.
1. Get from http://homepage.mac.com/zenitani/emacs-e.htmlinstall
2. Mount disk image; copy Emacs.app to Applications (be sure to get  
the version for the version of the OS you're running)

=== SBCL ===
SBCL seems well-supported by McCLIM, and by the world in general.
1. Get SBCL from http://www.sbcl.org/platform-table.htmlinstall
    (Pick X or P from the table on that page for X86 or PPC)
2. Unpack, open a terminal to the unpacked directory
3. Install per sbcl-1.0.2-powerpc-darwin/INSTALL. I chose the default,  
putting it in /usr/local:
    KF6GPEs-PB-G4:~/Desktop/sbcl-1.0.2-powerpc-darwin kf6gpe$ sudo sh
    Password: <entered password>
    # INSTALL_ROOT=/usr/local sh install.sh

At this point, you now can run SBCL from the Terminal if you so choose.

=== SLIME ===
SLIME in Carbon Emacs is swell. So:
1. Get from http://common-lisp.net/project/slime/. In the terminal, I  
used CVS,
and just stashed the whole slime installation as a hidden directory.
    KF6GPEs-PB-G4:~/Desktop/ kf6gpe$ cvs -d :pserver:anonymous:[EMAIL 
PROTECTED] 
:/project/slime/cvsroot co slime
    KF6GPEs-PB-G4:~/Desktop/ kf6gpe$ mv slime ~/.slime
You might want to place SLIME someplace where other users can get at  
it if you share your Macintosh
with other folks. I was too lazy to think about that. :)
2.  Wire SLIME up to your emacs installation. I followed the  
instructions in the SLIME documentation.
To summarize, in your ~/.emacs, add:
    (setq inferior-lisp-program "<the path to your Lisp system>")
    (add-to-list 'load-path "<the path of your slime directory>")
    (require 'slime)
    (slime-setup)

You can stop at this point if you don't want to work with McCLIM; you  
have a working SBCL
environment using Carbon Emacs and SLIME. To use SLIME, start emacs  
from the Terminal or
Carbon Emacs and run SLIME using M-x slime

=== McCLIM from Source ===
I followed the steps from http://mcclim.cliki.net/GettingStarted to do  
this.

1. darcs
The stuff you need for McCLIM is kept in a darcs repository, so you  
first need to get and
install darcs from http://darcs.net/. For my PPC G4, I used one of the  
pre-built binaries from http://wiki.darcs.net/DarcsWiki/ 
CategoryBinaries. Make sure that however you do this, darcs
is in your path when you're done installing, of course.

2. Making a Lisp package repository on your local machine.
If you haven't already gotten Lisp packages from elsewhere, make a  
package directory and
set up your list system to know about that directory.
In your ~/.sbclrc file, add the following:
   (require 'asdf)
   (push
     (truename "<path to your lisp package directory>")
     asdf:*central-registry*)

Being lazy, I just stuck a directory lispsystems in the home directory  
of my machine, like this:
    KF6GPEs-PB-G4:~ kf6gpe$ mkdir lispsystems
    KF6GPEs-PB-G4:~ kf6gpe$ cd lispsystems
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$

3. Getting the McCLIM sources.
Now get the sources to McCLIM. This puts the sources in their own  
directory, and makes it available to SBCL.
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ cvs -z3 -d:pserver:anonymous:[EMAIL 
PROTECTED] 
:/project/mcclim/cvsroot co mcclim
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ ln -s mcclim/mcclim.asd .
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ ln -s mcclim/clim-examples.asd .

4. Getting the things that McCLIM depends on.
There are some other dependencies to get, too:
First is the Common Lisp Library for X, clx:
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ darcs get 
http://common-lisp.net/~crhodes/clx
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ ln -s clx/clx.asd .
Next is spatial-trees:
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ curl 
http://ftp.linux.org.uk/pub/lisp/cclan/spatial-trees.tar.gz 
  > spatial-trees.tar.gz
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ tar -xvzf spatial-trees.tar.gz
Finally is flexichain:
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ curl 
http://common-lisp.net/project/flexichain/download/flexichain_latest.tgz 
  > flexichain_latest.tgz
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ tar -xvzf flexichain_latest.tgz
    KF6GPEs-PB-G4:~/lispsystems kf6gpe$ ln -s ln -s flexichain_1.5.1/ 
flexichain.asd .

5. Setting your DISPLAY variable.
Before you continue, make sure you've got your DISPLAY variable set to  
something sane,
so the McCLIM X client knows what server to talk to. (I only point  
this out because I forgot
to, and it was really annoying...)

6. Build the McCLIM system.
Now it's time to build the system. Fire up your SBCL environment.
Launch Carbon Emacs, hit M-x slime, and then enter
    CL-USER> (asdf:oos 'asdf:load-op :mcclim)
Be prepared to wait a while while the system builds for the first time.

To see if everything is running as expected, you can build the samples:
   CL-USER> (asdf:oos 'asdf:load-op :clim-examples)

Finally, if you want to play with the samples and see what's working,  
use
   CL-USER> (clim-demo::run-test 'clim-demo::demodemo)


McCLIM from clbuild.
While you still need darcs, this may be a simpler option than building  
from sources.
I got this to work on my Intel MacBook running Mac OS X 10.5, but I  
didn't keep good notes,
and when I went to reproduce this on my G4 for these notes, it failed.  
Caveat emptor.

These steps are shamelessly borrowed from
http://mcclim.cliki.net/Getting%20started%20using%20clbuild

1. darcs
Begin by getting darcs from http://darcs.net/, installing it, and  
making sure it's in your path.

2. Use clbuild to get McCLIM
Now it's just a matter of actually getting McCLIM --- clbuild does  
this nicely.
 From the Terminal:
    KF6GPEs-PB-G4:~ kf6gpe$ darcs get 
http://common-lisp.net/project/clbuild/clbuild/
    KF6GPEs-PB-G4:~ kf6gpe$ cd clbuild
    KF6GPEs-PB-G4:~/clbuild kf6gpe$ chmod +x clbuild
    KF6GPEs-PB-G4:~/clbuild kf6gpe$ ./clbuild update mcclim
    The following extra dependencies were found: cffi cljl clx skippy  
slime spatial-trees
    include dependencies in update? (Y/n)y
    NEW darcs get cffi
    Copying patch 578 of 578... done!
    <lots of additional console output elided here>
    KF6GPEs-PB-G4:~/clbuild kf6gpe$ dumpcore mcclim

You're now ready to start using McCLIM --- try something like
   KF6GPEs-PB-G4:~/clbuild kf6gpe$ ./clbuild run demodemo

I hope that this has been useful for folks!

Best regards,
Ray Rischpater
On Sep 10, 2008, at 3:35 PM, Ethan Herdrick wrote:

>
> Hi Ray - Could share it here?
>
> -Ethan
>
> On Wed, Sep 10, 2008 at 3:07 PM, Ray Rischpater <[EMAIL PROTECTED]>  
> wrote:
>>
>> Hi, Dru!
>>
>> On 10.5.4, I'm using SBCL with McCLIM for both some personal projects
>> and some rapid prototyping of algorithms at work. I'd be glad to talk
>> about the setup if you like.
>>
>> Cheers,
>> Ray
>>
>>
>> On Sep 10, 2008, at 1:39 PM, Jeff Palmer wrote:
>>
>>>
>>> I was using SBCL and OpenMCL on OS X for a while last year. Other
>>> things have since taken up my free time (scala), but I'd be happy to
>>> discuss my configuration with you if you're interested.
>>>
>>>      - Jeff
>>>
>>> On Sep 10, 9:12 am, "Dru Nelson" <[EMAIL PROTECTED]> wrote:
>>>> interesting link.
>>>>
>>>> actually, this is a good place to ask: is anyone using Common Lisp
>>>> or any
>>>> Lisp on OS X on this group?
>>>>
>>>> cheers,
>>>>
>>>> dru
>>>>
>>>> On Wed, Sep 10, 2008 at 9:01 AM, Raoul Duke <[EMAIL PROTECTED]>  
>>>> wrote:
>>>>
>>>>> http://www.lambdassociates.org/
>>>>
>>
>>
>>>
>>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to "Bay Area Functional 
Programmers"  
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/bayfp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to