[ANN] ErlPort (library to connect Erlang to Ruby) 1.0.0alpha released

Hi all,

I’ve just released ErlPort version 1.0.0alpha. ErlPort is a library for
Erlang which helps connect Erlang to a number of other programming
languages (currently supported Python and Ruby). Apart from using
ErlPort as a tool to call Python/Ruby functions from Erlang it also can
be used as a middleware for Python/Ruby instances.

Check http://erlport.org for more details.

The new version of ErlPort is basically a complete redesign and rewrite
of the project. The main changes in this version are:

  • Redesigned as Erlang application
  • Added support for all recent (2.5 and higher) versions of Python
  • Added support for all recent (1.8.6 and higher) versions of Ruby
  • Added support for custom data types

Why ErlPort can be interesting for Ruby developers?

Apart from calling Ruby functions from Erlang or Erlang function from
Ruby, ErlPort also allows to use Erlang as a middleware for Ruby.
The following is a small inter-process recursion example (place it in
roll.rb file). Actually this example will be even simpler with ErlPort
1.0.0.

include ErlPort
include ErlPort::Erlang

def roll n, procs=nil
procs = [] if procs == nil
procs.push Erlang.self
puts “Hello from #{Process::pid}”
if n > 1
status, pid = call :ruby, :start, []
if status == :ok
procs = call :ruby, :call,
[pid, :roll, :roll, [n - 1, procs]]
end
end
procs
end

And it can be used with Erlang shell and ErlPort like this:

1> {ok, R} = ruby:start().
{ok,<0.34.0>}
2> ruby:call(R, roll, roll, [5]).
Hello from 5892
Hello from 5894
Hello from 5896
Hello from 5898
Hello from 5900
[<0.34.0>,<0.37.0>,<0.40.0>,<0.43.0>,<0.46.0>]


Dmitry Vasiliev
http://hlabs.org
http://twitter.com/hdima

On Wed, Jun 12, 2013 at 4:42 AM, Dmitry Vasiliev
[email protected]wrote:

Hi all,

I’ve just released ErlPort version 1.0.0alpha. ErlPort is a library for
Erlang which helps connect Erlang to a number of other programming
languages (currently supported Python and Ruby). Apart from using
ErlPort as a tool to call Python/Ruby functions from Erlang it also can
be used as a middleware for Python/Ruby instances.

Check http://erlport.org for more details.

+1. thanks for erlport.
kind regards -botp