Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!decvax!decwrl!labrea!rocky!ali From: ali@rocky.UUCP Newsgroups: comp.sys.amiga Subject: Re: Getting smaller binaries Message-ID: <235@rocky.STANFORD.EDU> Date: Wed, 15-Apr-87 13:46:13 EST Article-I.D.: rocky.235 Posted: Wed Apr 15 13:46:13 1987 Date-Received: Sat, 18-Apr-87 01:06:18 EST References: <1108@rpics.RPI.EDU> Reply-To: ali@rocky.UUCP (Ali Ozer) Distribution: world Organization: Stanford University Computer Science Department Lines: 47 In article <1108@rpics.RPI.EDU> guilford@rpics.RPI.EDU (Jim Guilford) writes: > I was thinking that a large part of binaries tends to be large chunks of >library code such as printf and its associated luggage. I was thinking that >it may not be too bad of idea to make most of these large "add-ons" into a >real amiga-style library, and then have all programs share it. I can see >very little reason for the simple "hello" program from K&R to take up lots >and lots of space, specially when most of the code in the binary is in every >other binary on the disk. I was thinking along the same lines. I'm working on a Lisp compiler (a class project) for the Dec-20, and I was wondering how difficult it would be to port it to the Amiga. Then I started thinking along the lines of creating a "lisp.library," which would have all of the Lisp stuff and allow you to run Lisp "executables" without the use of the interpreted Lisp environment. Also, last night, at the Stanford Amiga Project meeting, we had one of the developers of JForth talk to us about JForth, and he mentioned that currently the only way to get stand-alone programs (ie, independent of the Forth environment) was to do a "save," which essentially dumps the whole environment into an executable file, resulting in huge executables. [Note: I am not saying anything against JForth here. We played with it a bit last night, and I was very pleased with the product. Creation of stand-along executables from interpreted languages is usually either impossible, or you get huge executables, like in this case, or you end up doing what AmigaBasic does --- You click on the icon for a Basic program, and the Basic is started up in which your program is run.] In any case, Amiga libraries are wonderful things and I would love to see them used as you describe --- Ie, to store a lot of the stuff that normally would get linked in with your code. In fact, if you think about it, most of us probably run at least 3 or 4 C programs concurrently (say a clock, a load average program, emacs, system monitor, hanoi, etc...), so a library would result in a lot of savings. Hmm, I seem to remember reading that Absoft Fortran already does this... Is this true? To get around the problem of creating truly stand alone products (ie, ones you could execute without the library), you probably would still need the option of linking in the code with your program. I haven't answered any of your questions about whether this is possible or not for C, but I am excited about the idea and hope it works... I will think further about the application of the idea in creating Lisp executables. Ali Ozer, ali@rocky.stanford.edu