Lisp HUG Maillist Archive

Foreign Library Compatibility?

I am facing a situation of absorbing a large amount of research-grade Go code into a Lisp application. 

I know that LW has a Java interface as well as an Objective C FLI interface (and for that matter, C). I also know that Go (and the others) have a runtime subsystem that they rely on for memory management, thread control, etc.

So I’m wondering how LW manages to coexist in the same process image with these other modules? Is there a sytem-wide standard Malloc that all abide by? What about in-process thread control? How do they manage to avoid stepping on each other?

It would seem that the only “safe” way to proceed would be to sandbox the foreign modules into their own process space, and use machine-level IPC to cross the process barrier with Lisp.

- DM

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Re: Foreign Library Compatibility?

I have done this many times with external C libraries. 

But every instance that I can recall only uses the libraries as services against Lisp data that is passed to the C module. Fast crypto routines in C, fast filtering routines and FFT’s for signal processing. None of my external C modules allocates its own memory, nor does any thread switching.

- DM

> On Oct 15, 2019, at 9:29 AM, dbm@refined-audiometrics.com wrote:
> 
> I am facing a situation of absorbing a large amount of research-grade Go code into a Lisp application. 
> 
> I know that LW has a Java interface as well as an Objective C FLI interface (and for that matter, C). I also know that Go (and the others) have a runtime subsystem that they rely on for memory management, thread control, etc.
> 
> So I’m wondering how LW manages to coexist in the same process image with these other modules? Is there a sytem-wide standard Malloc that all abide by? What about in-process thread control? How do they manage to avoid stepping on each other?
> 
> It would seem that the only “safe” way to proceed would be to sandbox the foreign modules into their own process space, and use machine-level IPC to cross the process barrier with Lisp.
> 
> - DM


_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html

Updated at: 2020-12-10 08:29 UTC