[plt-scheme] Help intigrating C/C++ into Scheme

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Sat Nov 29 17:50:48 EST 2008

Zukowski, Steven D wrote:
>
> Well I was hoping to communicate to it the easiest way possible which 
> seemed like calling it directly from the Scheme program. I'm not sure 
> what you mean by sockets exactly, but running it via command-line 
> arguments did cross my mind to. I'm just at a complete loss about how 
> to do, well, any of that from the Scheme program.
>
> Also the program is one I'm writing myself and is very easy to for me 
> to edit.
>

a) since you wrote the C code yourself, discard it and write your Scheme 
code that is equivalent. In general, the Scheme version will be shorter, 
easier to understand/maintain (in short, better)...
b) if there is any reason that method A is impossible (say part of the C 
code can't be rewrite in Scheme), then Scheme's Foreign Language 
Interface is the way to go. Since you are following the document and got 
shucked, maybe you should post here the part you have problem with (i.e. 
the part of the doc that you can't understand), so others can provide help.

> Steven Zukowski
>



Posted on the users mailing list.