[squeak-dev] Wrapping Ruby libraries - what is the best way?

Tim Felgentreff tim at nada1.de
Fri Oct 29 07:49:52 UTC 2010


You could look into implementing the Drb protocol in Squeak - this way, you'll only need to kickstart a Ruby process with Drb to be able to script Ruby from Smalltalk.

Another way to do this would be to look into using Maglev to bridge Smalltalk and Ruby. According to Konstantin Haase, it's possible to run a Pharo on a Maglev instance.

Regards,
Tim

On Oct 29, 2010, at 12:46 AM, Sean P. DeNigris wrote:

> 
> Squeakers,
> 
> I never want to leave my image!!  That includes interacting with my web
> accounts (e.g. gmail, wordpress).  I started using WebClient to
> access/script them in Squeak, but ran into SSL problems on the Mac.  I
> switched to Ruby's Mechanize library, but as much as I was vibing with VI,
> the run-code cycle (yuck) and files (eww) were too much to bear.  So I
> decided to wrap the library in Squeak.
> 
> Where can I find examples/tutorials on how to do this?  What advice do you
> have?
> 
> My (possibly naive) plan is to:
> 1. write a Ruby app that includes the library and starts a socket server
> (done)
> 2. create classes in Squeak to mirror the library classes
> 3. use FFI to start the Ruby app (done)
> 4. send text commands via socket to do the real work in Ruby (proof of
> concept done)
> 
> I got Ruby and Squeak talking through the socket, but wanted a sanity check
> before spending too much time.  What do you think?
> 
> Thanks.
> Sean
> -- 
> View this message in context: http://forum.world.st/Wrapping-Ruby-libraries-what-is-the-best-way-tp3018205p3018205.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
> 




More information about the Squeak-dev mailing list