Embedding 1.9

Discussion in 'Ruby' started by Dave Thomas, Jan 7, 2008.

  1. Dave Thomas

    Dave Thomas Guest

    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
    Dave Thomas, Jan 7, 2008
    #1
    1. Advertising

  2. Dave Thomas

    Dave Thomas Guest

    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
    Dave Thomas, Jan 8, 2008
    #2
    1. Advertising

  3. Dave Thomas

    Dave Thomas Guest

    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
    Dave Thomas, Jan 8, 2008
    #3
  4. Dave Thomas

    Mark Guzman Guest

    <(08/01/08 16:08) 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
    Mark Guzman, Jan 8, 2008
    #4
  5. Dave Thomas

    Dave Thomas Guest

    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
    Dave Thomas, Jan 8, 2008
    #5
  6. Dave Thomas

    Paul Brannan Guest

    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=detail&atid=1698&aid=13838&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
    Paul Brannan, Jan 9, 2008
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SW1kYWQ=?=

    Embedding a Control in DataGrid

    =?Utf-8?B?SW1kYWQ=?=, Jan 24, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    586
    Patrick
    Jan 24, 2005
  2. Boris R.
    Replies:
    0
    Views:
    451
    Boris R.
    Oct 15, 2003
  3. David F. Skoll
    Replies:
    2
    Views:
    855
    David F. Skoll
    Nov 14, 2003
  4. Frank Iannarilli

    Embedding Perl into C: Why?

    Frank Iannarilli, Jun 2, 2004, in forum: Perl
    Replies:
    1
    Views:
    496
    Sean Lynch
    Jun 3, 2004
  5. Kris De Schutter

    embedding Perl

    Kris De Schutter, Aug 18, 2004, in forum: Perl
    Replies:
    1
    Views:
    476
    penguinista
    Aug 18, 2004
Loading...

Share This Page