home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / scheme / 2095 < prev    next >
Encoding:
Text File  |  1992-08-25  |  2.2 KB  |  56 lines

  1. Newsgroups: comp.lang.scheme
  2. Path: sparky!uunet!morrow.stanford.edu!CSD-NewsHost.Stanford.EDU!Xenon.Stanford.EDU!mcbride
  3. From: mcbride@Xenon.Stanford.EDU (Philip McBride)
  4. Subject: Re: stand-alone executables
  5. Message-ID: <1992Aug26.003413.9670@CSD-NewsHost.Stanford.EDU>
  6. Sender: Philip McBride
  7. Organization: Computer Science Department, Stanford University.
  8. References: <JIMB.92Aug25053328@occs.cs.oberlin.edu>
  9. Distribution: comp
  10. Date: Wed, 26 Aug 1992 00:34:13 GMT
  11. Lines: 43
  12.  
  13. An interesting approach to linking, loading, and executables can be
  14. found in "Integrating the Scheme and C Languages," by Rose and Muller
  15. in Lisp and Functional Programming, 1992.  They use the SunOS dynamic
  16. linker and loader directly.
  17.  
  18. The executable file for the hello world program is 24k.  Upon startup,
  19. however, the size increases to 116k (I think they have some type of
  20. delayed loading of the byte code interpreter).  So, they have 92k
  21. overhead above the minimal binary code from their compiler.
  22.  
  23. -Philip
  24.  
  25. In article <JIMB.92Aug25053328@occs.cs.oberlin.edu> jimb@occs.cs.oberlin.edu (Jim Blandy) writes:
  26. >
  27. >In my experience, stand-alone executable files generated by scheme
  28. >compilers tend to be very large.  For example, compiling the program
  29. >
  30. >    (display "Hello, World!")
  31. >    (newline)
  32. >
  33. >using the Gambit scheme compiler on an HP9000/375 running BSD produces
  34. >a 400k executable file.  Last I checked, Chez scheme didn't do too
  35. >well either (although that was a while ago), and I seem to recall
  36. >Scheme->C producing a 500k executable file for a program which
  37. >computes and prints the factorial of a number.
  38. >
  39. >This seems odd to me.  Gambit's interpreter, gsi, is 400k, which
  40. >suggests to me that Gambit's standalone generation system just throws
  41. >the whole interpreter in with your code.
  42. >
  43. >This is a pretty small sample of scheme systems; is this behavior
  44. >common?  Are there many schemes out there which generate
  45. >reasonably-sized executables?  If not, why does everyone find it so
  46. >difficult to generate them?  Is it so challenging to do the sort of
  47. >linking C compilers do, and throw away the unnecessary library
  48. >routines?
  49. >
  50. >I'd like to be able to invoke small scheme programs from the shell and
  51. >not have it take several seconds to load and occupy several megabytes
  52. >of swap space.
  53. >--
  54.  
  55.  
  56.