Page 1 of 1

Is this possible with newLisp

Posted: Thu Jan 14, 2016 12:31 pm
by bob
Hi my name is Bob Ueland and I'm a programmer from Sweden. I'm totally new to newLisp trying to decide if I could use newLisp in my projects.

I write Mac OS X apps using Objective-C. Some parts of the program I would like to express in newLisp rather than in Objective-C. So would it be possible to have one or more text files, containing newLisp code, as a resource in my Objective-C app, and let my app execute the newLisp code dynamically whenever needed? (By execute I mean calling newLisp functions with arguments from Objective-C code.)

Re: Is this possible with newLisp

Posted: Thu Jan 14, 2016 4:35 pm
by Lutz
On OS X use makefile_darwinLP64_utf8_lib to build a newlisp.dylib shared library. Here is a C example on how to import it from C (second example in the chapter):

http://www.newlisp.org/downloads/CodePa ... tml#toc-24

The library will keep state between different calls.

Ps: the example also shows hpr to use [text] [/text] tags for bigger source code portions.