Anyone know if project like this https://github.com/qur/gopy exists for ruby? Would really love to see this available to optimize some things which are trivial to run concurrently (right now thinking about SNMP polling. Seems like perfect compromise between time spent developing and performance gained between C and and ruby. Thanks,
on 2014-04-15 11:14
on 2014-04-15 17:49
On the April 15, at 12:13 (+0300), Saku Ytti wrote: > Anyone know if project like this https://github.com/qur/gopy exists for ruby? AFAIK, the most active project here is dealing with mruby rather than MRI: https://github.com/mitchellh/go-mruby HTH. -- oz
on 2014-04-15 18:58
Arnaud wrote: > AFAIK, the most active project here is dealing with mruby rather than > MRI: https://github.com/mitchellh/go-mruby Apologies I had disabled email delivery and couldn't find anywhere to bounce the email to myself so I could reply. I've now enabled delivery. I might be confused in what gopy is and what go-mruby is, what I'd love is non-hackish way to create go binaries for ruby to consume, not to consumer ruby libraries in go. There seems to be way to do it via C wrappers, but they didn't strike very kosher (my evaluation of the situation is dubious at best). http://gopy.qur.me/extensions/examples.html this example on gopy looks like you're exposing go binary for python consumption. But it looks like go-mruby is otherway around. Thanks,
on 2014-04-30 16:18
afaik Go cannot be called from C and this has deep causes I'm not smart enough to explain. This means that we cannot use Go to implement ruby extensions (by way of C wrappers), less you wrap the ruby interpreter in a go program to let it initialize and then juggle the calls back and forth.
on 2014-04-30 16:43
Hi David, Shame, I wonder if they're thinking this is feature (they seem somewhat opionated) or if they might make Go more friendly to foreign environments. I wonder what is the status with rust for same use-case? Or is my only option C, if I want performance in ruby module.
on 2014-05-01 08:32
> > > Shame, I wonder if they're thinking this is feature (they seem somewhat > opionated) or if they might make Go more friendly to foreign environments. > They do want to change this, but say that the timeline is pretty long-term. Hopefully before Go 2.0, but I honestly doubt it. > I wonder what is the status with rust for same use-case? Or is my only > option C, if I want performance in ruby module. > I researched it briefly a while back and even found a brief tutorial on it. Rust is probably a better choice for further investigation but be aware that it is still probably pretty tricky to get it to work! Do report back on any progress! :)