A few notes on choosing between Go and D for a quick project
bachmeier via Digitalmars-d
digitalmars-d at puremagic.com
Tue Mar 17 19:00:39 PDT 2015
On Tuesday, 17 March 2015 at 22:04:08 UTC, jmh530 wrote:
> Nevertheless, I think that there would be a lot of value in
> writing up what you have done with R and D. That sounds very
> interesting.
I posted a link elsewhere in this thread, but it's buried in all
these posts, so here it is again:
https://bitbucket.org/bachmeil/dmdinline
Unfortunately there is little documentation (though I'm working
on that). I only use Linux but I would be happy if someone that
knows Windows would find that it works there. I do a lot of
matrix algebra, regressions, and simple rewriting of loops.
I don't personally use lme4. I looked at the source on Github.
Everything has to be passed as an SEXP struct from R to C++ and
you have to return a single SEXP struct. I believe all the C++
code used with Rcpp is marked extern "C". D can create and take
as function arguments SEXP's, so you should be able to call into
the code the same way that R does. That's not to say it's trivial
but it is doable. It might make a good example of the dmdinline
package. It depends on how much time it takes to get it working
and how much of the R code would have to be rewritten in D.
More information about the Digitalmars-d
mailing list