D-Link with R/MATLAB/Julia/SQL

John Colvin john.loughran.colvin at gmail.com
Mon Dec 9 08:41:58 PST 2013


On Monday, 9 December 2013 at 16:31:54 UTC, Siavash Babaei wrote:
> It seems that I like the whole idea of D a bit too much to act 
> conservatively. So I will start learning it and hope that 
> things will get better by then. Although, I have to insist 
> again, having "something" to call programmes/functions in R and 
> MATLAB easily and readily is a must for D.
> Julia is also an upstart and very intriguing language and seems 
> to have a solid basis, so it might not be a bad idea to 
> collaborate with their Devs.
> On the business side, it is probably not the best idea to 
> `sell' the best and one of the very few learning materials when 
> you are trying to compete with a monster like C++.
> PS- Thank you for your help and once I have learned the 
> language, I will perhaps ask for detailed help ...

Just a thought:

Matlab compiler 
(http://www.mathworks.co.uk/products/compiler/description2.html) 
produces a C header file for the library it generates.

There is a tool DStep (https://github.com/jacob-carlborg/dstep) 
that can convert C headers to D modules.


So, the following steps should work:


generate the C header and shared library from matlab

run DStep on the header

import the generated d module

use the relevant matlab functions you want in your program

link with the shared library when compiling.


More information about the Digitalmars-d mailing list