Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!uunet!zephyr.ens.tek.com!tekcrl!tekchips!kend From: kend@tekchips.LABS.TEK.COM (Ken Dickey) Newsgroups: comp.lang.lisp Subject: Re: LISP compiler? Summary: linking standalone binaries Message-ID: <5031@tekcrl.LABS.TEK.COM> Date: 9 Nov 89 21:02:25 GMT References: <5081@internal.Apple.COM> Sender: ftp@tekcrl.LABS.TEK.COM Lines: 68 Reply-To: kend@mrloog.WR.TEK.COM (Ken Dickey) Followup-To: a.out Distribution: Organization: Tektronix, Inc., Beaverton, OR. Keywords: Lisp, Scheme, linking In article <5081@internal.Apple.COM> chewy@apple.com (Paul Snively) writes: >In article <89Nov7.234038est.2758@neat.cs.toronto.edu> >rayan@cs.toronto.edu (Rayan Zachariassen) writes: >> chewy@apple.com (Paul Snively) writes: >> >> >A future version of MACL WILL do a treewalking dead-code stripper, >reducing >> >application sizes tremendously. >> >> yah, well, this is nice but a bit shortsighted as a general solution. >> >> - What I really want is to be able to run small standalone lisp >applications. >> I want to write cat in list (for example) without it ending up as a 2Meg >> binary. This is addressed by the pruner you mention (someone from Lucid >> told me they have one or are planning one too). >> >> - I want to run *many* different standalone lisp programs. Imagine >> 30% of unix commands being implemented in lisp. See where the code >stripping >> idea falls short? You'll have all this code duplicated in most commands. >> >> Solution? Put the Lisp runtime support into a shared image, which the >> application link to when they start up, like (sun/svr4) shared libraries. >> That is in fact what it is, the Lisp equivalent to libc. All lisp >applications >> would share the runtime text, and have independent data pages per >process. >> >> One would think this isn't too complicated to do. > >Not only is it difficult to do under the current Macintosh operating >system, it's impossible. > Let's seperate out the 2 concerns: The key to being able to link an application--rather than GC and save an image--is not to call EVAL or the compiler. Either of these must have a full runtime support since arbitrary code may be introduced. Without them, linking is relatively straight-forward. The Mac's (lack of) OS problem (no multitasking, & friends) are of a more severe nature. A couple of date points: Standalone Mac applications can be generated by LightShip's MacScheme+ToolSmith. Cadence Research System's Chez Scheme creates sharable binaries (Under Unix; I don't know if their VMS or Domain systems do this). They have an `Application Builder' which generates standalone binaries. I hope this helps. -Ken Dickey kend@mrloog.WR.TEK.COM