[erlang-questions] suggestion: NIF_D

Ulf Wiger ulf.wiger@REDACTED
Tue Apr 20 17:00:43 CEST 2010


Hi Paul,

My assumption from what I've read is that the D runtime gives
minimal overhead, and the integration is a matter of declaring
the C API as EXTERNAL C (D-friendly declarations).

But this is just from browsing. I am looking for concrete
feedback if possible.

BR,
Ulf W

Paul Davis wrote:
> 
> Ulf,
> 
> Two issues come to mind. NIF execution ties up an entire scheduler,
> which means that embedded language environments are fairly limited in
> what they can do. The two JavaScript embeddings I know of both focus
> on use for small quickly executed scripts to serve merely as a
> convenience and/or sandbox for user code on servers.
> 
> Secondly, both JavaScript interpreter embeddings use less than 1K
> lines of code each. One of the reasons I think that NIF's are so cool
> is that they really don't require a lot of code to plug in different
> libraries. So unless the D is really well integrated it most likely
> wouldn't be worth the hurdle as a user of the NIF.
> 
> Two ways I can think of to make language embeddings more interesting
> would be to somehow allow NIF's to create a pid that could send and
> receive messages in a background thread or to have some sort of
> automagical dispatch to a thread pool.
> 
> HTH,
> Paul Davis


-- 
Ulf Wiger
CTO, Erlang Solutions Ltd, formerly Erlang Training & Consulting Ltd
http://www.erlang-solutions.com
---------------------------------------------------

---------------------------------------------------

WE'VE CHANGED NAMES!

Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD.

www.erlang-solutions.com



More information about the erlang-questions mailing list