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

Sean P. DeNigris sean at clipperadams.com
Thu Oct 28 22:46:59 UTC 2010


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