Aw:c++11

I have goog experience with SWIG.
www.swig.org

Arvind Kalyan <base16@gmail.com> schrieb:

···

Hi folks, had a question regarding C11/C++11 and ruby interoperability.

Assuming we have a very well written, concurrent, network client library in C/C++11 I'd like to hear your thoughts on reusing that in ruby say as a gem. More specifically, say with in RoR.

I'm leaving this vague to welcome thoughts, lessons, best practices from folks who have attempted or know enough about these topics to comment on.

Thanks

--

Arvind Kalyan
Arvind K. - Amazon | LinkedIn
cell: (408) 761-2030

Thanks for the replies. I would like to hear specifically around
concurrency, memory model, etc.

If the library is built around the assumptions/guarantees of the new C++11
language (as compared to older C++ version libraries that didn't have those
guarantees) how much of that would translate (and hold) to our ruby env?
Should we recompile ruby mri with C++11 to achieve those guarantees? Or can
we be sure that the GIL will handle all subtleties?

···

On Tue, Jun 16, 2015 at 9:37 AM, ralf.mueller <ralf.mueller@mpimet.mpg.de> wrote:

I have goog experience with SWIG.
www.swig.org

Arvind Kalyan <base16@gmail.com> schrieb:

Hi folks, had a question regarding C11/C++11 and ruby interoperability.

Assuming we have a very well written, concurrent, network client library
in C/C++11 I'd like to hear your thoughts on reusing that in ruby say as a
gem. More specifically, say with in RoR.

I'm leaving this vague to welcome thoughts, lessons, best practices from
folks who have attempted or know enough about these topics to comment on.

Thanks

--
Arvind Kalyan
Arvind K. - Amazon | LinkedIn
cell: (408) 761-2030

--
Arvind Kalyan
http://www.linkedin.com/in/base16
cell: (408) 761-2030

Thanks for the replies. I would like to hear specifically around
concurrency, memory model, etc.

if your code is thread-safe, this should hold true when called through ruby, too

If the library is built around the assumptions/guarantees of the new C++11
language (as compared to older C++ version libraries that didn't have those
guarantees) how much of that would translate (and hold) to our ruby env?
Should we recompile ruby mri with C++11 to achieve those guarantees? Or can
we be sure that the GIL will handle all subtleties?

as long as ruby does not make use of c++11 features (which I think, is the case), you should not gain anything
from re-compiling mri.
I once did this for a small c++ library with swig. If you want to take a look, download
https://code.zmaw.de/attachments/download/10187/cdi-1.6.9.tar.gz and check stuff below the 'interfaces'
directory. the only handwriten SWIG input file is cdiobj.i (and cdilib.i, handling the C version only).

ralf

···

On 19/06/15 02:41, Arvind Kalyan wrote: