Forum: Ruby go bindings?

Df0876ee40fb4c3e6b825983471de259?d=identicon&s=25 Saku Ytti (Guest)
on 2014-04-15 11:14
(Received via mailing list)
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,
0a6f759ed6dcc27727ae0b70f430d00d?d=identicon&s=25 Arnaud Berthomier (Guest)
on 2014-04-15 17:49
(Received via mailing list)
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
Df0876ee40fb4c3e6b825983471de259?d=identicon&s=25 Saku Ytti (Guest)
on 2014-04-15 18:58
(Received via mailing list)
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,
6bed507c0085d39447171b95c515a890?d=identicon&s=25 david palm (Guest)
on 2014-04-30 16:18
(Received via mailing list)
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.
Df0876ee40fb4c3e6b825983471de259?d=identicon&s=25 Saku Ytti (Guest)
on 2014-04-30 16:43
(Received via mailing list)
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.
6bed507c0085d39447171b95c515a890?d=identicon&s=25 david palm (Guest)
on 2014-05-01 08:32
(Received via mailing list)
>
>
> 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! :)
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.