[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Extending other languages with Ruby

Mark Chandler

3/28/2007 12:16:00 AM

Hello,

I have recently been trying to figure out how to extend another language
by using Ruby as a scripting language. I have found a bit of information
on how to do this, but it is mostly just bland explanations and, seeing
as I am a visual learner, I am having a lot of trouble figuring out how
to correctly implement something like this without code examples or
something like that. Does anyone have a link to a better explanation? It
would be nice if the extended language explanation were C++ or C# or
something like that.

Thanks!

--
Posted via http://www.ruby-....

4 Answers

R. Mark Volkmann

3/28/2007 12:19:00 AM

0


On Mar 27, 2007, at 7:15 PM, Mark Chandler wrote:

> Hello,
>
> I have recently been trying to figure out how to extend another
> language
> by using Ruby as a scripting language. I have found a bit of
> information
> on how to do this, but it is mostly just bland explanations and,
> seeing
> as I am a visual learner, I am having a lot of trouble figuring out
> how
> to correctly implement something like this without code examples or
> something like that. Does anyone have a link to a better
> explanation? It
> would be nice if the extended language explanation were C++ or C# or
> something like that.

I have two slide presentations on this, one on extending Java with
Ruby (JRuby) and one on extending C/C++ with Ruby. Both are at http://
www.ociweb.com/mark.


Mark Chandler

3/28/2007 2:47:00 AM

0

Mark Volkmann wrote:
> On Mar 27, 2007, at 7:15 PM, Mark Chandler wrote:
>
>> to correctly implement something like this without code examples or
>> something like that. Does anyone have a link to a better
>> explanation? It
>> would be nice if the extended language explanation were C++ or C# or
>> something like that.
>
> I have two slide presentations on this, one on extending Java with
> Ruby (JRuby) and one on extending C/C++ with Ruby. Both are at http://
> www.ociweb.com/mark.

Those are very awesome, and I appreciate that you shared them with me.
They've definitely helped me quite a bit, but now all I am left
wondering is if/how I can do the same using C# (Mono, preferably). Any
more information would be extremely useful!

Thanks!

--
Posted via http://www.ruby-....

Mark Chandler

3/28/2007 11:44:00 PM

0

Mark Volkmann wrote:
> On Mar 27, 2007, at 7:15 PM, Mark Chandler wrote:
>
>> to correctly implement something like this without code examples or
>> something like that. Does anyone have a link to a better
>> explanation? It
>> would be nice if the extended language explanation were C++ or C# or
>> something like that.
>
> I have two slide presentations on this, one on extending Java with
> Ruby (JRuby) and one on extending C/C++ with Ruby. Both are at http://
> www.ociweb.com/mark.

I went ahead and decided to play around with embedding Ruby in a C
program, but now I am receiving this:

lynxy:~/src/Ruby/Embed/Testing markchandler$ cc main.c
-I/usr/local/ruby/lib/ruby/1.8/i686-darwin8.9.1/
/usr/bin/ld: Undefined symbols:
_rb_load_file
_ruby_init
_ruby_run
_ruby_script
collect2: ld returned 1 exit status

The c code:
#include <ruby.h>

main() {
ruby_init();
ruby_script("embedded");
rb_load_file("start.rb");
while (1) {
ruby_run();
}
}

Thanks!

--
Posted via http://www.ruby-....

brabuhr

3/29/2007 12:15:00 AM

0

On 3/27/07, Mark Chandler <mark@chandlerm.com> wrote:
> Mark Volkmann wrote:
> > On Mar 27, 2007, at 7:15 PM, Mark Chandler wrote:
> > I have two slide presentations on this, one on extending Java with
> > Ruby (JRuby) and one on extending C/C++ with Ruby. Both are at http://
> > www.ociweb.com/mark.
>
> Those are very awesome, and I appreciate that you shared them with me.
> They've definitely helped me quite a bit, but now all I am left
> wondering is if/how I can do the same using C# (Mono, preferably). Any
> more information would be extremely useful!

RubyCLR (http://www.ru...)
IronRuby (http://www.wilcob.com/Wilco/Iro...)
Ruby.NET (http://plas.fit.qut.edu.au...)
Ruby/Mono (http://raa.ruby-lang.org/project/...)