tags:

views:

364

answers:

3
+2  Q: 

Ruby in Erlang

Is it possible to embed Ruby into Erlang? Would Yecc be the correct tool for that? If it is possible how many man hours would it take, rough estimate?

+3  A: 

You need to explain in a little more detail what you want to do. "Embed" is a rather vague word in this context.

Yecc would be appropriate if you intended to implement a Ruby-parser/interpreter in Erlang, but I'm guessing this is not what you want to do.

If you want to call Ruby-code from Erlang, this can be done in a manner similar to how Erlang's jinterface application is used to talk to Java. (You can also google on the subject.)

You cannot expect to get any sort of realistic estimate without putting in a week or two of work, figuring out exactly what should be done and how. Otherwise, you'll end up with "anything from 2 months to two years", which probably isn't very helpful.

JesperE
+7  A: 

Erlectricity exposes Ruby to Erlang and vice versa:

http://github.com/mojombo/erlectricity

Tim Fletcher
+3  A: 

Depending on exactly what your task is, you could could do something as simple as spawning a ruby process to talk to via STDIN/OUT.

ozone
This is the most robust, flexible, debuggable way of making Erlang communicate with external languages.
piro