From: Pupeno
Subject: Distributed compilation
Date: 
Message-ID: <d8qf6u$i6i$1@domitilla.aioe.org>
Is it possible to do distributed compilation of lisp code with SBCL (ala
distcc for C code) ?
-- 
Pupeno <······@pupeno.com> (http://pupeno.com)
Reading ? Science Fiction ? http://sfreaders.com.ar

From: Eric Lavigne
Subject: Re: Distributed compilation
Date: 
Message-ID: <1118884115.764537.112100@g43g2000cwa.googlegroups.com>
>Is it possible to do distributed compilation of lisp code with SBCL (ala
>distcc for C code) ?

I haven't heard of this, but I am new to Lisp so that isn't saying
much. More importantly, I don't think this would be as useful in Lisp
as in C. The distcc homepage has this testimony:

>...compile our ~1MLOC C++ tree (which can take an hour on a single CPU
>to recompile if we change certain header files... With distcc compile times
>are way down and my productivity has greatly improved...

This is important in C because you need to recompile every time you
make a change. Otherwise you can't test the code to see if you messed
up. In Lisp, minor changes are instant. Functions can be recompiled one
at a time. You can even change the code while your program is still
running, so compile time does not effect programmer productivity.

Welcome to Lisp. Please leave your old ideas at the door and prepare
for a mind-bending experience :)
From: Pupeno
Subject: Re: Distributed compilation
Date: 
Message-ID: <d8qpjd$tns$1@domitilla.aioe.org>
Eric Lavigne wrote:

>>Is it possible to do distributed compilation of lisp code with SBCL (ala
>>distcc for C code) ?
> 
> I haven't heard of this, but I am new to Lisp so that isn't saying
> much. More importantly, I don't think this would be as useful in Lisp
> as in C. The distcc homepage has this testimony:
> 
>>...compile our ~1MLOC C++ tree (which can take an hour on a single CPU
>>to recompile if we change certain header files... With distcc compile
>>times are way down and my productivity has greatly improved...
> 
> This is important in C because you need to recompile every time you
> make a change. Otherwise you can't test the code to see if you messed
> up. In Lisp, minor changes are instant. Functions can be recompiled one
> at a time. You can even change the code while your program is still
> running, so compile time does not effect programmer productivity.
While you are right, I'm almost always working on top of a big amount of
libraries, without counting SBCL which is big and takes a lot to compile,
Slime, UCW, Araneida, CL-SQL, Elephant, etc... all should be compiled
before starting to work and that's what I'm tring to avoid.

The thing is that I want to work on my notebook, but my notebook is an old
Pentium II 266MHz, so, I like to compile the big parts at home, with my
desktop helping it (thru distributed compilation) and then leave and work
elsewhere.
That's what I'm doing with the rest of my system which is written in C or
C++ (why compiling so much ? it's Gentoo... it doesn't make much sense to
have Gentoo on this notebook, but it makes sense in my workstation and I
want the same system on both, I've tried different ones already and I
didn't like it).

Anyway, since it seems this doesn't exists, does anybody have a clue or some
thoughts about how to implement it ? (just for the sake of exchaning useful
bits thru this newsgroup).
-- 
Pupeno <······@pupeno.com> (http://pupeno.com)
Reading ? Science Fiction ? http://sfreaders.com.ar
From: Eric Lavigne
Subject: Re: Distributed compilation
Date: 
Message-ID: <1118896759.910761.256750@z14g2000cwz.googlegroups.com>
>The thing is that I want to work on my notebook, but my notebook is an old
>Pentium II 266MHz, so, I like to compile the big parts at home, with my
>desktop helping it (thru distributed compilation) and then leave and work
>elsewhere.

Sounds like a rather strange form of distributed compilation, with one
machine doing 90%+ of the work while the other (weaker machine) does
its best to keep up. Maybe you could just do all the compiling on your
desktop and copy files over afterwards?

If you are really hooked on the distcc way, I suspect that few changes
would be required to make it work for other compilers, such as Lisp. My
guess is that each machine compiles a few of the object files, then
they are brought together for linking. Before the linking step,
compilation of one object file is totally independent of compilation of
another object file, making distributed computing relatively trivial.
Lisp is the same way, except that linking happens at run-time (so that
you don't have to worry about it at all). Just convince distcc to call
SBCL (with appropriate arguments) instead of gcc. On the other hand,
you might run into weird issues if some of your recently compiled files
are getting run part way through the process. SBCL for example might be
used to recompile itself, something distcc wouldn't be expecting.

Anyway, take it for what it is: the ramblings of a newbie. I never made
a Lisp project big enough to be worth using more than one file :)
From: Raffael Cavallaro
Subject: Re: Distributed compilation
Date: 
Message-ID: <2005061600382916807%raffaelcavallaro@pasdespamsilvousplaitmaccom>
On 2005-06-15 23:02:31 -0400, Pupeno <······@pupeno.com> said:

> The thing is that I want to work on my notebook, but my notebook is an old
> Pentium II 266MHz, so, I like to compile the big parts at home, with my
> desktop helping it (thru distributed compilation) and then leave and work
> elsewhere.

Isn't this what fasls and saved images are for?

fasls:
Compile the stable parts on your desktop machine, copy the fasls to 
your laptop, then just load the fasls in your init file. Shouldn't take 
more than a few seconds when you start up sbcl.

saved image:
Even faster would be to compile and load all the stable code, then save 
an image. Then just boot sbcl using this saved image. Should be fairly 
instantaneous (< 1 second).