This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-04-11 16:00:01

AlanProjects
Scratcher
Registered: 2008-06-23
Posts: 500+

Interacting with Scratch with ruby instead of python?

All I've seen for scratch hacks/mods use python. I'm not that familiar with python, but understand ruby fairly well. How would I interact with the squeak side of scratch using ruby?

Offline

 

#2 2009-04-11 22:45:24

chalkmarrow
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: Interacting with Scratch with ruby instead of python?

You can use Ruby's built in Socket class.

http://tinyurl.com/dfbbpq

Just make a test Ruby program that connects to port 42001 of localhost (127.0.0.1). I tried it, and it works, though I never did anything with it like parse broadcasts, etc.

In fact, I'm surprised that nobody has made a Ruby Shoes program (which makes it easy to make buttons and things) with some kind of socket programming functions.

If you come up with something, make sure you post it on the scratch connections wiki.

Offline

 

Board footer