Concurrent code in Ruby 1.8.6 through inlining
Posted by Chuck Vose Mon, 07 Jan 2008 18:11:00 GMT
Slight typo in the code fixed: 2008-01-08
Toshiyuki and I have released a new gem called rbridge which allows us to execute functional, side-effect free, concurrent code directly in Ruby regardless of the version by using Erlang as a processor. This includes using the Mnesia distributed database and ETS/DETS.
To try it out please follow these steps:
1. Download Erlang for your os. Windows has binaries and OS X can be configured with `./configure—prefix=/opt/local` to make MacParts happy. I haven’t yet tried it with Linux but the default configure options should be okay.
2. Download the rbridge gem. `sudo gem install rbridge`
3. Start the rulang server in Erlang on port 9900. Change dir to the gem directory which is usually /usr/local/lib/ruby/gems/1.8/gems/rbridge-0.1/lib and run sudo erlc rulang.erl. Enter the Erlang shell by typing erl. Finally, start the server with rulang:start_server(9900). (There’s a dot at the end of the command).
4. Require rubygems and rbridge in your code and create a new connection to the rulang server. This is the simplest bit of inline code I can think of but there is a lot more we can do: asynchronous access and ruby-style syntax specifically.
require 'rubygems'
require 'rbridge'
@r = RBridge.new(nil, 'localhost', 9900)
puts @r.erl('10*10.')
To read more check out the documentation on ruby-mnesia.rubyforge.org.
Aside: Toshiyuki Hirooka found me. Thank you to everyone that helped search and offered to translate for us. I’m constantly impressed by the support from the Ruby community.

This is produced by the sun enough vitamin D for a week in the body. It may be that the children get the whole day just to drink too little, then it can be a problem if they get just before the meal thirst. This one has good health, you need good, healthy food, good digestion, good elimination.
the whole day just to drink too little, then it can be a problem if they get just before the meal thirst. Th
I found this website very interesting and the post content the good updated information thanks a lot.
I am absolutely amazed at how terrific the stuff is on this site. I have saved this webpage and I truly intend on visiting the site in the upcoming days. Keep up the excellent work!
Good post thanks for the help .i was searching for this….
Thanks dude, this is absolutely fantastic post…. I like it
I am profoundly grateful, touched by the great distinction and honor and great compliment accorded me by the
authorities of Harvard this morning. I am overwhelmed, as a matter of fact, and I am rather fearful of my inability
to maintain such a high rating as you’ve been generous enough to accord to me. In these historic and lovely
surroundings, this perfect day, and this very wonderful assembly, it is a tremendously impressive thing to an
individual in my position.tiffany and co outlet
These shoes are awesome! They are light weight and super comfortable.I am http://www.tiffanyandcoonline.com/">Tiffany And Co Outlet lover
I love what you guys tend to be up too. This kind of clever work and reporting! Keep up the wonderful works guys I’ve you guys to our blog roll.
authorities of Harvard this morning. I am overwhelmed, as a matter of fact, and I am rather fearful of my inability
christian louboutin
ralph lauren cai bu guan ni
red bottoms
Not actually in the mood to write anything. It’s the southern summer humidity getting to my brain. Congratulation to both nominees and winners.
This kind of clever work and reporting! Keep up the wonderful works guys I’ve you guys to our blog roll.
to maintain such a high rating as you’ve been generous enough to accord to me. In these historic and lovely
tiffany uk sale
I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
cribbble
USKO is the globalized version of the game; the developers sign contracts with publishing houses, like K2/G1, who distribute the game to a larger audience on behalf of the developers. There was no purchase and K2/G1 does not hold any ownership of Knight Online.