home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / scheme / 2099 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  2.5 KB

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