From: KDr2 Date: 2009-04-29T12:06:19+09:00 Subject: Re: Ruby Interface of Erlang --001636e8ff9dfb0ca60468a8dc7f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I release erlix-v0.3 today: bugfix: IO block bug in ErlixConnection?#erecv feature: 1. ErlixList? #new("string") 2. ErlixConnection?#close 3. ErlixConnection?#closed? 4. ErlixConnection? #rpc("module","function",ErlixTermList?) 5. ErlixConnection?#peer see the section Erlix RPC on http://code.google.com/p/erlix/wiki/ErlixTutorial On Tue, Apr 28, 2009 at 9:43 AM, KDr2 wrote: > 1.Erlectricity interact with Erlang through the ports system. If you are an > Erlang programmer,you will feel confused about it: > Where are my Erlang-Terms? How to match two Terms? How to make my > ruby-process an erlang-node? so i start the project erlix. > 2.erlix is based on the erl_interface, all its api is the same as > erl_interface: > > irb(main):001:0> require "erlix" > => true > irb(main):002:0> > > list=ErlixList.new([ErlixAtom.new("erlatom"),ErlixInt.new(2),ErlixFloat.new(3.0)]) > => # > irb(main):003:0> list.puts > [erlatom,2,3.000000] > => nil > irb(main):004:0> list.match("[A,2,B]") > => true > irb(main):005:0> list.match("[A,3,B]") > => false > irb(main):006:0> b=list.mget("[Atom,_,_]","Atom") > => erlatom > irb(main):007:0> b.class > => ErlixAtom > irb(main):008:0> ObjectSpace.each_object(Class).inject([]){|a,i|a<< i if > i.ancestors.any?{|k|k==ErlixTerm};a} > => [ErlixBinary, ErlixTuple, ErlixList, ErlixAtom, ErlixRef, ErlixPid, > ErlixFloat, ErlixUInt, ErlixInt] > irb(main):009:0> > > And... use erlix, you can make you ruby-process an Erlang-Node(read the > test > code in the src-package) hehe > > :) > > > > > On Tue, Apr 28, 2009 at 6:24 AM, David Masover wrote: > > > Erlectricity > > > > > -- > Best Regards, > -- KDr2, at x-macro.com. > -- Best Regards, -- KDr2, at x-macro.com. --001636e8ff9dfb0ca60468a8dc7f--