PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > C / C++ extensions: need all the tips/tricks you can give me
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
C / C++ extensions: need all the tips/tricks you can give me

Réponse
 
LinkBack Outils de la discussion
Vieux 10/03/2008, 15h22   #1
Emmanuel Oga
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut C / C++ extensions: need all the tips/tricks you can give me

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/.

  Réponse avec citation
Vieux 11/03/2008, 00h12   #2
Jan Dvorak
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: C / C++ extensions: need all the tips/tricks you can give me

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 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

  Réponse avec citation
Vieux 11/03/2008, 00h22   #3
Emmanuel Oga
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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 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/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h46.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11959 seconds with 11 queries