C / C++ extensions: need all the tips/tricks you can give me

Discussion in 'Ruby' started by Emmanuel Oga, Mar 10, 2008.

  1. Emmanuel Oga

    Emmanuel Oga Guest

    Hi!

    I'm looking for all available sources of information on developing ruby
    extensions. I'm not a C language expert, but I've worked some years ago
    as a junior C/C++ developer. For that reason, I think I could get in
    business if I find the good resources inside the mess of google results
    for "writing ruby C extensions" query...

    I would like to hear your suggestions, experiences, gotchas, etc... on
    the subject as links to web pages or directly here for both:

    * Essentials C (and C++) language knowledge that I will need
    * Specific ruby extensions tips
    * I need mostly info on 1.8.x mri, but info related to jruby and others
    will be appreciated too.
    * Writing extensions in other languages. I would like info in writing
    extension in D language, for example.

    DISCLAIMER: I know how to use google :). I already did my homework...
    Still, I would like to hear suggestions from real experts (that is, YOU
    :) better than from a stupid computer (that is, google), that always
    spits a big amount of junk inside the useful links.

    P.S.: My intent is 1) to learn this subject 2) To compile a definitive
    document/webpage/wiki/something --with proper credits attached :)-- to
    summarize the good info sources I retrieve. You may agree with me that
    info on writing C extensions is scarce and scattered all over the web.

    P.S.2: I Know that the main source of information is on the ruby source
    itself and the txt files bundled. I also know of the Pickaxe chapter on
    this. The problem is that, being no C expert, is a little difficult to
    me to learn from those sources. That's why I would also appreciate your
    recommendations on good / concise sources of C related knowledge.
    --
    Posted via http://www.ruby-forum.com/.
     
    Emmanuel Oga, Mar 10, 2008
    #1
    1. Advertising

  2. Emmanuel Oga

    Jan Dvorak Guest

    On Monday 10 March 2008 15:22:51 Emmanuel Oga wrote:
    > Hi!
    >
    > I'm looking for all available sources of information on developing ruby
    > extensions. I'm not a C language expert, but I've worked some years ago
    > as a junior C/C++ developer. For that reason, I think I could get in
    > business if I find the good resources inside the mess of google results
    > for "writing ruby C extensions" query...
    > ...
    > P.S.2: I Know that the main source of information is on the ruby source
    > itself and the txt files bundled. I also know of the Pickaxe chapter on
    > this. The problem is that, being no C expert, is a little difficult to
    > me to learn from those sources. That's why I would also appreciate your
    > recommendations on good / concise sources of C related knowledge.


    Well, you've written pretty much everything anyone could tell you on a generic
    question about ruby extension programming. The ruby C API is pretty
    straightforward, it is documented in file README.EXT which comes with ruby
    source, and as you said yourself you can find many sources on the subject all
    over the net. So far i wrote two extensions and i can't think of any serious
    problem or a tip that wouldn't be mentioned in the docs.

    Really the best way to learn this is to just start coding, and see if you'll
    hit any problems, then you can ask specifically, and i'm sure everyone here
    will try to help you.

    Also, if you'll start exercising your C skills, remember that C and C++ are
    two radically different languages, that share common syntax by mere
    accident :)

    Jan
     
    Jan Dvorak, Mar 10, 2008
    #2
    1. Advertising

  3. Emmanuel Oga

    Emmanuel Oga Guest

    Re: C / C++ extensions: need all the tips/tricks you can giv

    > Well, you've written pretty much everything anyone could tell you on a
    > generic question


    Wow!!! I tried my best, but you skillfully gave me the answer I was
    trying to avoid! (no offense, just a joke! :) )

    You are very very right. Still, by browsing these very forums and all
    over the web I found tips like "beware of multi-threading" or "don't do
    this when writing a binding for a c++ lib". I'm just trying to get up to
    date tips and links that I may have loose on my research.

    > Really the best way to learn this is to just start coding, and see if
    > you'll hit any problems, then you can ask specifically, and i'm sure everyone
    > here will try to help you.


    Thanks! I use to get all info I can get before starting a project.
    That's why I asked first, but again you are right. Still would like to
    receive tips / links in advance

    --
    Posted via http://www.ruby-forum.com/.
     
    Emmanuel Oga, Mar 10, 2008
    #3
    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. Cowboy \(Gregory A. Beamer\)

    Tips and Tricks: Page Templates

    Cowboy \(Gregory A. Beamer\), Dec 3, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    406
    Colin Young
    Dec 4, 2003
  2. =?Utf-8?B?S2VubmV0aCBQ?=

    Trying localization with Sams Tips&Tricks

    =?Utf-8?B?S2VubmV0aCBQ?=, Nov 15, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    1,611
    =?Utf-8?B?S2VubmV0aCBQ?=
    Nov 15, 2004
  3. Replies:
    0
    Views:
    435
  4. Replies:
    0
    Views:
    385
  5. Replies:
    3
    Views:
    372
    andreaz
    Dec 13, 2005
Loading...

Share This Page