[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Platform Question

Bryce Byrd

10/4/2003 5:42:00 AM

If I write a program in Ruby using opengl, sdl, and tcl/tk will the program,
with no modifications, run on both windows and linux machines?

If no, what kind of modifications am I looking at.

Thanks

Bryce Byrd


2 Answers

Hal E. Fulton

10/4/2003 6:02:00 AM

0

Bryce Byrd wrote:
> If I write a program in Ruby using opengl, sdl, and tcl/tk will the program,
> with no modifications, run on both windows and linux machines?
>
> If no, what kind of modifications am I looking at.

I can only partly answer this.

First of all, Ruby and Tk seem to work the same on Linux and Windows; at
least, I have never observed any difference.

I can't speak for OpenGL and SDL. Someone else can.

However, Ruby does run differently on these platforms. For example,
Windows does not have a native fork(). If you run the Cygwin version,
you will get it emulated; most people, I think, run the "one-click"
Windows installer version, and thus simply can't call fork.

Similar restrictions exist relative to the filesystem and such. You
can't expect things like chmod to work exactly the same on Windows
(perhaps not at all; I haven't checked). Windows has the concept of
binary and text files; Linux doesn't make such a distinction. The
directory separator characters are different, but it's possible to
code around that pretty easily.

Basically Ruby interfaces well with whatever OS it's on, but doesn't
usually go out of its way to emulate others.

Hope that helps,
Hal


maillist@bestworldweb.homelinux.com

10/4/2003 9:52:00 AM

0


> If I write a program in Ruby using opengl, sdl, and tcl/tk will the program,

I know that pygame (pythons sdl bindings) run on both Linux and Windows
with no modifications. I assume the same with rubys bindings.