Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Embedding 1.9

Reply
Thread Tools

Embedding 1.9

 
 
Dave Thomas
Guest
Posts: n/a
 
      01-07-2008
Folks:

I'm working on the "Extending Ruby" chapter (now an appendix) for the
third PickAxe, and I'm finding a whole bunch of conflicting
information. Reading the source, it seems like there's no canonical
way of embedding Ruby in a C application. I have lots of alternatives
that _seem_ to work, but I want to be more authoritative than that.

Does anyone have any pointers to stuff that would help?


Thanks



Dave

 
Reply With Quote
 
 
 
 
Dave Thomas
Guest
Posts: n/a
 
      01-08-2008

On Jan 7, 2008, at 7:41 PM, Mark Guzman wrote:

> Have you checked out VIM? It has ruby embedded and provides an
> interface into vim buffers from ruby. HTH. Good luck.


Mark:

I don;t believe it has Ruby 1.9, though.


Dave

 
Reply With Quote
 
 
 
 
Dave Thomas
Guest
Posts: n/a
 
      01-08-2008

On Jan 8, 2008, at 12:20 AM, Mark Guzman wrote:

> case TAG_RAISE:
> case TAG_FATAL:



Mark:

Are you manually defining the TAG_xxx values somewhere? eval_intern.h
isn't installed onto the user side on my box.


Dave

 
Reply With Quote
 
Mark Guzman
Guest
Posts: n/a
 
      01-08-2008
<(08/01/08 16:0 Dave Thomas>
> Are you manually defining the TAG_xxx values somewhere? eval_intern.h isn't
> installed onto the user side on my box.


Dave,
Those are defined locally in if_ruby.c, that seems to be the convention
as the tcltk extension does the same. I wonder if those should be pushed
into ruby.h to ease embedding...?
--mark

--
Those the gods wish to destroy they call promising.
blog: http://hasno.info

 
Reply With Quote
 
Dave Thomas
Guest
Posts: n/a
 
      01-08-2008

On Jan 8, 2008, at 11:05 AM, Mark Guzman wrote:

>> Are you manually defining the TAG_xxx values somewhere?
>> eval_intern.h isn't
>> installed onto the user side on my box.

>
> Dave,
> Those are defined locally in if_ruby.c, that seems to be the
> convention
> as the tcltk extension does the same. I wonder if those should be
> pushed
> into ruby.h to ease embedding...?


That'd get my vote. I've copied core on this..

Dave

 
Reply With Quote
 
Paul Brannan
Guest
Posts: n/a
 
      01-09-2008
On Wed, Jan 09, 2008 at 03:03:49AM +0900, Dave Thomas wrote:
> > Dave,
> > Those are defined locally in if_ruby.c, that seems to be the
> > convention as the tcltk extension does the same. I wonder if those
> > should be pushed into ruby.h to ease embedding...?

>
> That'd get my vote. I've copied core on this..


I submitted a bug for this a while ago:

http://rubyforge.org/tracker/?func=d...8&group_id=426

I see no reason for this to be an opaque value.

Currently I use the #ifndef trick to get the TAG_ macros.

Paul


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding a Control in DataGrid =?Utf-8?B?SW1kYWQ=?= ASP .Net 1 01-24-2005 07:11 PM
embedding Perl Kris De Schutter Perl 1 08-18-2004 04:43 PM
Embedding Perl into C: Why? Frank Iannarilli Perl 1 06-03-2004 04:53 AM
Experts on embedding Perl in C wanted: Weird problem on RH7.3/Perl 5.6.1 David F. Skoll Perl 2 11-14-2003 05:37 PM
embedding perl in new language: dynaload problem Boris R. Perl 0 10-15-2003 06:23 PM



Advertisments