Hello Nikodemus, thank you for directions.
On Thu, 24 Jun 2004 15:42:51 +0300 (EEST) Nikodemus Siivola <[EMAIL PROTECTED]> wrote: > > On Wed, 23 Jun 2004, Oleg A. Paraschenko wrote: > > > Here is an explanation why I need this functinality. Maybe a better > > way > > exists but I missed it. I want to write an embeddable implementation > > of a complex system. For development I use many Lisp features, these > > features are not required in runtime, so for runtime I want to use a > > minimal possible Lisp. The task is to get a code for the minimal Lisp > > from the development code. > > I'm confused. What do you mean by embeddable? Embeddable in a C program, > running in an embedded system, or what? It is hard to explain. I'm working on a research project and even don't know what I will get as result. Here is the first approximation: A program (C, Java, etc) has hierarchial data structures and a little language to work with such data (xpath). I want to replace all occurrence of xpath strings by equivalent C or Java or etc code. I plan to do so by extracting xpath strings, putting them into a Lisp system, creating an interpreter, expanding it to a minimal set of primitives and making equivalent C or Java code for a resulting S-expression. > > In the first case CMUCL is probably not the optimal tool, and in the > second case (where space may be at premium) your program has to be > pretty hefty to have significant space requirements over the standard > CMUCL core... > > Are you trying to get rid of functionality such as COMPILE-FILE, or just > avoiding bits of your own code that the final application doesn't use? > Or both? Both. > > In any case seems to me that what you _need_ is a tree shaker... Thank you, I think that you saved me time. Now I know this keyword. > (A magical thing that removes unused functionality from the image -- as > far as I know one doesn't exist for CMUCL, unless you count manually > building a custom core without unused functionality). > > How much space do you have / expect to save? Or is there another motive > besides space savings for doing this? I don't bother for space yet, right now I'm doing a proof of concept. A motive is to decrease development time. Realization of xpath requires big efforts, so if we need it for k languages, this efforts are multiplied k times. I want to realize xpath only once and then easily port realization to different languages. > > Anyways, if you need the FUNCTION-LAMBDA-EXPRESSION to return useful > things, when either a high debug setting or doing something like > > (declaim (ext:maybe-inline foo)) > (defun foo ...) > > may help. Yes, and maybe (debug 3) too. > > Cheers, > > -- Nikodemus "Not as clumsy or random as a C++ or > Java. > An elegant weapon for a more civilized > time." > Bye! -- Oleg
