essential Erlang

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Wed Oct 22 14:29:29 CEST 2003

Replying to an older post:

----- Original Message ----- 
From: "Joachim Durchholz" <joachim.durchholz@REDACTED>
> I'd find it more interesting if there were a way of making Erlang
> interface better with C programs. I've been interfacing Windows with a
> non-C language, and it's been a pain even though it was a direct-call
> interface - I'm wondering how much worse it will be to write a driver
> program for Erlang... (semiautomatically generating drivers from C
> include files would help a lot)

I've been trying that, and my experience is that converting the headres is just
the simpler part (tedious and boring, but simpler). The problem for me was how
to handle memory allocation of objects needed on both sides. Maybe it's not that
difficult, but I couldn't make it work. So I returned to writing a port program
that did the interfacing.

Maybe this is the way to go, so that non-system drivers don't crash the runtime:
from C headers generate code (C and Erlang) that will provide 80% of a port
program. I think the old IG application, no longer supported, could be seen as a
starting point. []


ps: sorry, IC doesn't appeal to me :-) Converting C headers to IDL is just as
tedious and boring.

More information about the erlang-questions mailing list