I have now been trying for a few days to "compile" a program with the
CMUCL system from a source file without success. I am unclear about how
the traditional, basic lisp program development works. Are there binary
executables as gcc's a.outs? How can you create those using the CMUCL
system? So far I have only seen CMUCL's "interpreter" feature (which I
am unsure if that's all it is). There must be more to it.
I hope you can help me or direct me to some further reading.
Yours,
Fabian Wauthier
Fabian Wauthier <··@gilching.de> writes:
> I have now been trying for a few days to "compile" a program with the
> CMUCL system from a source file without success. I am unclear about how
> the traditional, basic lisp program development works. Are there binary
> executables as gcc's a.outs?
not really. lisp is kind of weird and is a square peg in the round
hole of unix. unix bends over backwards to support C programs. since
unix doesn't make the same efforts towards lisp, it appears awkward.
> How can you create those using the CMUCL
> system?
you can make a .fasl file. this is a binary file containing machine
code. however, it is missing its run-time system. it is roughly like
a C program without an important shared library.
> So far I have only seen CMUCL's "interpreter" feature (which I
> am unsure if that's all it is). There must be more to it.
cmucl itself is that missing run-time system. you can compile to a
.fasl and then call cmucl with that file as an argument. iirc there
is a way to make linux load strange binaries which can be used to make
linux fire up cmucl when you invoke a .fasl file.
> I hope you can help me or direct me to some further reading.
--
J o h a n K u l l s t a m
[········@ne.mediaone.net]
Don't Fear the Penguin!
In article <·················@gilching.de>, Fabian Wauthier
<··@gilching.de> wrote:
> I have now been trying for a few days to "compile" a program with the
> CMUCL system from a source file without success. I am unclear about how
> the traditional, basic lisp program development works. Are there binary
> executables as gcc's a.outs? How can you create those using the CMUCL
> system? So far I have only seen CMUCL's "interpreter" feature (which I
> am unsure if that's all it is). There must be more to it.
>
> I hope you can help me or direct me to some further reading.
>
> Yours,
> Fabian Wauthier
Consult the ANSI CL documentation. The CMU CL manual also
have something to say about that.
Common Lisp has following functions:
COMPILE
compiles code within the Lisp environment
COMPILE-FILE
compiles source files to compiled code files
LOAD
loads source files and compiled files
Additionally to compiling Lisp source files and loading
the compiled files, many Lisp system can save
applications/images/worlds. Consult the manual for
that.
****Extensive**** documentation for CMU CL is
available from http://www.cons.org/cmucl/�
See: http://www.mindspring.com/~rtoy/software/cmu-user/index.html
and http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
There is also a link to a help mailing list for CMUCL
users. See: http://www.cons.org/cmucl/cmucl-ml-announce.txt
Rainer Joswig
--
Rainer Joswig, Hamburg, Germany
Email: ·············@corporate-world.lisp.de
Web: http://corporate-world.lisp.de/
In our last episode (Thu, 28 Sep 2000 23:07:31 +0200),
the artist formerly known as Fabian Wauthier said:
>I have now been trying for a few days to "compile" a program with the
>CMUCL system from a source file without success. I am unclear about how
>the traditional, basic lisp program development works. Are there binary
>executables as gcc's a.outs? How can you create those using the CMUCL
>system? So far I have only seen CMUCL's "interpreter" feature (which I
>am unsure if that's all it is). There must be more to it.
It is decidedly a compiling environment; you should avail yourself of
<http://www.mindspring.com/~rtoy/software/cmu-user/index.html> the
full manual on CMUCL.
Avail yourself of the following particularly relevant sections:
2.12 Saving a Core Image
4.2 Calling the Compiler
5.9 Byte Coded Compilation
5.12.1 Compile Your Code
The "core image" is the nearest equivalent to "a.out"; note that
"images" are likely to be quite large, >20MB in size.
Some CL implementations offer some form of "tree shaker" that will
generate a "core image" where it "shakes the tree" and throws away
everything that doesn't "stick," which would diminish the size
considerably from 20MB. CMUCL doesn't offer that functionality.
It is likely that to usefully deploy an app, you might want to use a
combination of the 3 major varieties of compiled code:
a) By putting in a Core Image covering a good chunk of the
application, you never need to load it separately.
b) The code that Needs To Be Fast but which isn't always used might be
compiled but left on disk until needed.
c) Code that Is Verbose And Doesn't Need To Be Fast can be byte
compiled; that allows it to be loaded very quickly on demand, and
remain compact.
--
(concatenate 'string "aa454" ·@" "freenet.carleton.ca")
<http://www.ntlug.org/~cbbrowne/lisp.html>
Group Dynamics
"Following Minsky and Schelling, consider a person as a society of
agents. A group is then a larger society of such agents. Understand
groups by examining interactions of coalitions of agents that
cross-cut their grouping into people."
-- Mark Miller