Ruby 1.8.7 vs. Ruby 1.9.2, dynamic linking vs. static linking

Started by Blizzard, March 07, 2011, 03:49:23 pm

Previous topic - Next topic

Blizzard

Alright, I was able to successfully dynamically link ARC against Ruby 1.8.7. This is most probably a temporary solution for now. There are some weird problems when I try to statically link Ruby 1.8.7, some functions don't seem to be implemented like they are described in the headers. :/
With Ruby 1.9.2 I had the continuous problem that I couldn't get the interpreter running. Each time I tried to initialize and run an interpreter node, it wouldn't work.

I have also committed the file test.rb in the root directory which is then read and executed. Sadly, I don't know how to get out of the interpreter main loop yet as it doesn't seem to stop after all scripts have been executed.

In any case, our final goal is to compile a minimalistic Ruby 1.9.2 and then to compile ARC and statically link it against that static library. For now, we will work with what we have here.

EDIT: I probably did this in record time compared to anybody else who tried it in the RMXP community. #_# It took me 3 hours today and I think 3 more hours the other day where I mainly wasted time compiled Ruby. And if I had tried it with Ruby 1.8.7 right away, I probably would have done it in under an hour since there is a proper documentation how to do it in Ruby 1.8.x while for Ruby 1.9.x there is none. :/
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

I believe the ARGSS person was having trouble with this too. in any case as long as we get 1.9 in eventually it's all good. it's on average 3x faster that means 120fps instead of 60 a big difference.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Yeah. For now it's fine.

Also, I'm an idiot. The scripts kept going on because I did an infinite loop in test.rb. xD
Now there are two major things to do. First is a rewrite of all hidden RGSS classes. The second is the interfacing of those classes with Ruby. After that we should theoretically be able to insert the scripts of RMXP into ARC and everything will work. :D
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

hmm. strange you say there is no documentation but I'm finding posts by the creator of ruby himself talking about how to do it.
http://www.ruby-forum.com/topic/137935
the post I'm talking about is a few posts down.

now for all I know you've already looked at this so...
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Unbelievable. I have googled for at least 10 different terms and combinations of words and that thread never came up. Thanks, I'll take a look at that tomorrow. I know that it's trivial, but unless somebody tells you the few lines that you need, you're lost, lol!
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

it's weird, I seem to have an ability to search for stuff on google and get exactly what I want on the first page with only two or three combinations. (that was third or forth on my first try.) this isn't the first time it that I've been able to easily find  what others couldn't. I guess all my google search practice on my High school's Aerospace Design team helped.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

G_G

Just so I'm clear, we're going to be able to do this in ruby.
Sprite sprite = Sprite.new
sprite.bitmap = Bitmap.new(100, 100)


However the sprite class is coded in C++ and accessed through the library correct?

Ryex

thats my understanding.

EDIT: I also found this http://redmine.ruby-lang.org/issues/3731. apparently the only problem is that you can only run one node per process.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Quote from: Ryex on March 07, 2011, 06:58:13 pm
it's weird, I seem to have an ability to search for stuff on google and get exactly what I want on the first page with only two or three combinations. (that was third or forth on my first try.) this isn't the first time it that I've been able to easily find  what others couldn't. I guess all my google search practice on my High school's Aerospace Design team helped.


So do I usually. That's why I can't believe what just happened here. xD

EDIT: HAH! Successfully linked dynamically to Ruby 1.9.2! I tried a couple of things and combinations and one of those workarounds worked.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ryex

dose there seem to be any problems with the workaround?

in any case. WOOOOOOOOOOOOOOOOOOOOOOOOOO!

EDIT: I built the new system. and edited the test.rb to print the ruby version. we are well on our way.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />