home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psgrain!percy!data!kend
- From: kend@data.rain.com (Ken Dickey)
- Newsgroups: comp.lang.scheme
- Subject: Re: stand-alone executables
- Message-ID: <706@data.rain.com>
- Date: 26 Aug 92 16:38:19 GMT
- References: <JIMB.92Aug25053328@occs.cs.oberlin.edu>
- Distribution: comp
- Organization: Microtek DSD, Hillsboro, OR
- Lines: 53
-
- jimb@occs.cs.oberlin.edu (Jim Blandy) writes:
- >In my experience, stand-alone executable files generated by scheme
- >compilers tend to be very large. For example, compiling the program
- > (display "Hello, World!")
- > (newline)
- >using the Gambit scheme compiler on an HP9000/375 running BSD produces
- >a 400k executable file.
- ...
- >This seems odd to me. Gambit's interpreter, gsi, is 400k, which
- >suggests to me that Gambit's standalone generation system just throws
- >the whole interpreter in with your code.
-
- This is exactly what happens. If you don't use Eval, however, you
- can load only the kernel and any other code you require. There is no
- funbction there to remove unused code automagically, however--and you
- have to be careful to bring in all the code you require.
-
- >This is a pretty small sample of scheme systems; is this behavior
- >common?
-
- If you are doing Scheme, you most typically want the full runtime
- system. It is a bit like doing "hello world" in a database query
- language--you get the database code as well.
-
- The two (major) commercial vendors, Cadence Research, and Lightship,
- do offer application builders which strip out unused code. MacScheme
- seems to do a reasonable job of this. I have not used the Chez app
- builder.
-
-
- >.. Is it so challenging to do the sort of
- >linking C compilers do, and throw away the unnecessary library
- >routines?
-
- If you don't use Eval (or load source code) Scheme is the ideal
- vehicle for this. The C interpreters I have worked with are huge and
- slow. There has not been much interest in batch Scheme environments.
- I don't think that there is a large amount of work to do this, just
- very little interest.
-
-
- >I'd like to be able to invoke small scheme programs from the shell and
- >not have it take several seconds to load and occupy several megabytes
- >of swap space.
-
- I tend to work the other way. Use Scheme (e.g. Gambit) as a shell
- either directly or have a Scheme server which is already loaded. I
- agree that it would be nice to make small, stand-alone executables,
- but for me this is the 1% case and not a high priority. I would
- encourage you to do the implementation work so that we all can
- benefit. (I can give you a sketch of how it is done.)
-
- -Ken
-