Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!gatech!usenet.ins.cwru.edu!abvax!iccgcc!klimas From: klimas@iccgcc.decnet.ab.com Newsgroups: comp.lang.smalltalk Subject: Re: Stand-Alone .exe's & C libraries Message-ID: <4321.280dd75f@iccgcc.decnet.ab.com> Date: 18 Apr 91 22:29:03 GMT References: <91104.114417U09762@uicvm.uic.edu> Lines: 31 In article <91104.114417U09762@uicvm.uic.edu>, U09762@uicvm.uic.edu (Steve Oster) writes: > Is it possible to create stand-alone programs with Smalltalk/V or > Smalltalk/V 286? Yes, Digitalk gives you a tool with their runtime license to create an EXE program. Object Technology Intl. also has some tools for this with their ENVY toolkit. > Also, is it possible to write Smalltalk programs > that can use 3rd party libraries (that are primarily meant for use > with C compilers)? Yes, The Floating Point library in the goodies package is just such an example of how to interface ST/V286 into an external C program. ST/V286 does have one limitation that ST/V-PM doesn't WRT interfacing into external libraries. The functions are accessed via what are called primitives (desribed in detail in the manual) and although you can have a fair sized number of user defined primitives, the code associated with a particular primitive must be <64kb in size. Another reality that drives C fanatics crazy is that there is not much to be gained by using C based functions in terms of speed or memory. We have actually seen a reduction in total program size when we rewrote some C based libraries in Smalltalk/V-286 and the performance was just the same if not faster. Hence the rule of thumb is, 1.)If C libraries already exist, partiton into <64kb modules and interface into them via the Smalltalk primitives. 2.)Don't necessarily expect to gain performance or more memory by developing new code in C and interfacing into ST. 3.)If you have a speed problem with your ST code consider optimizing the algorithms first and then rewriting the remaining time critical code in assembler. BTW Digitalk includes examples of this with the product.