Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matlab/Simulink nim-mex #8331

Closed
develooper1994 opened this issue Jul 15, 2018 · 10 comments
Closed

Matlab/Simulink nim-mex #8331

develooper1994 opened this issue Jul 15, 2018 · 10 comments

Comments

@develooper1994
Copy link

Matlab/Simulink can generate code like nim. Matlab generates two type 1) Standalone C,C++/Cuda(not support lots of thinks) 2) Matlab Runtime C,C++/Cuda code generation
I am imagining code generation will become easier than anything.

@andreaferretti
Copy link
Collaborator

What is exactly the issue? I honestly do not understand what you are asking for

@develooper1994
Copy link
Author

Have you ever used matlab c shared libray and mex functions?
Making matlab extentions will become easy with nim mex tool and grnerated matlab code can ve used in nim applications.

@andreaferretti
Copy link
Collaborator

No, I have not, but I still do not understand what feature you are asking for.

Something that will autogenerate bindings to use nim libraries from matlab - like nimpy does for Python? If so, this would be better suited to a nimble package.

@develooper1994
Copy link
Author

Yes. Binding generation for matlab or other scientific tools. I am using matlab/simulink for a long time.
Matlab has no capability to generate io function code generation but generated mathmetical codes are lighting fast. You can make replacement with other blas and lapack libraries.
Sorry for confusion.

@mratsim
Copy link
Collaborator

mratsim commented Jul 16, 2018

This should be done as a library just like Nimpy by an interested party. It does not belong in core Nim or Nim standard library.

I vote for closing this. It could be added to the meta Are we scientist yet but if it does not exist in Python or Julia (which can wrap C/C++ easily) I think it's even less likely to find someone to maintain a Nim <-> Matlab bridge.

@develooper1994
Copy link
Author

develooper1994 commented Jul 16, 2018

There is one think about core library. Instead of writing all of mathmetical operations with famous libraries, make Nim code replacement for blas and lapacak like matlab.
I will make some try with them.

@andreaferretti
Copy link
Collaborator

andreaferretti commented Jul 16, 2018

@develooper1994 My guess is that you are not a native english speaker, so I am not sure I interpret your last remark correctly, but for sure a tool that generates Matlab bindings for Nim can be developed purely as a library.

This is the approach followed by Nimpy, that I mention above, and can be used for Matlab as well. If you want to argue for this bridge, the best place to post is the thread Are we scientist yet linked by @mratsim

@develooper1994
Copy link
Author

develooper1994 commented Jul 16, 2018

I am not native english speaker. My keyboard makes some bir silly corrections. I am struggling with it. 😁
Please, Close issue if you can.

@kaushalmodi
Copy link
Contributor

@develooper1994 As you mentioned the biggest hole in the Matlab mex toolset, it doesn't support exporting simple file open/close operations, which is crazy.

It would though be nice to have Nim and Matlab talk to each other for other calculation stuff. I was instead thinking of accessing Matlab libraries exported to C from Nim.

Though, looks like this discussion doesn't need to be an Issue here, as this is probably not something that Nim core needs to support. I'd believe, the Nim Forum is a better place for this.

@andreaferretti
Copy link
Collaborator

Closing as requested by @develooper1994 - feel free to post on http://forum.nim-lang.org/ or on the thread linked by @mratsim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants