From: Joe Date: 2008-01-09T10:19:44+09:00 Subject: Re: Ruby questions On Jan 8, 2008 2:05 PM, Jeff M. wrote: > Hello, peeps. I'm dipping my feet into Ruby waters (from Smalltalk). > Just have some questions that I hope someone doesn't mind answering. > I'm on OS X 10.5. > > I see that Ruby 1.9 is out and Leopard shipped with 1.8.6. I also > heard that 1.9 would introduce a new VM that would be significantly > faster than 1.8. Is that the case? If so, is there a standard way of > getting 1.9 on OS X or am I kinda stuck waiting for Apple to "do their > thing"? > > I'm primarily playing around with GLUT and OpenGL in Ruby for fun. > This required getting ruby-opengl through gems (note: I think the idea > of gems is slick!). However, if I ever wanted to distribute my code or > a program, is there a proper way of distributing everything needed > with it? Is there a way of generating native executables or at least > combining the ruby executable with the source so that 2 years from now > my program still runs the same even though I have version 3.8 of ruby? rubyscript2exe is windows only. there is a package to make it a tar, but the user will still have to install the gems you depend on if I understand it correctly. Honestly, the best way I've seen to distribute a ruby app to actual users that I've seen is JRuby. Compile your program to java bytecode and you can distribute it in a jar. The last time this came up some people talked about starkits in tcl, and suggested something like that for ruby, but it didn't really go anywhere. I believe one of the goals in rubinius is to have something similar to jar for ruby, but i could be wrong about that. > > Perhaps I've missed this in documentation, but am I able to extend a > class without subclassing? Something akin to "loose methods" in > Smalltalk? > > Anyway, thanks for taking the time to read/answer any of these. I > appreciate it. > > Jeff M. > >