Ruby Internal

Hey guys!

Im looking at ruby for 6 months now.
I would describe my level of Ruby knowledge as “middle”.
Knowing metaprogramming and such stuff…

Now i thought the next step to be a better rubyist and general
programmer
would be to understand the core under the hood.

In MRI C, Rubinius C++, JRuby Java and so on.
I chose MRI and Rubinius, because i think looking at MRI’s Core so get a
better C Knowledge will help me afterwards for understanding Rubinius
Core which is written mostly in C++.

I don’t want to start a discussion whats better C or C++ first.
I have just a little C knowledge for now (knowing what structures,
unions, pointers and so on are)

Is there a good Documentation or Book (or whatever :D) to get or should
i look right into the core files and ask in this forum whenever i got an
question :slight_smile:

For example. First Question
Saw that VALUE “type” in most ruby c files and wondering what it is
I just can imagine it is an struct or union?

Best Greetings Benny :slight_smile:

http://ruby-hacking-guide.github.io/ - first you should read this one
http://patshaughnessy.net/ - and also I would recommend you this blog


Iurii Plugatariov
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

Iurii Plugatariov wrote in post #1128192:

http://ruby-hacking-guide.github.io/ - first you should read this one
http://patshaughnessy.net/ - and also I would recommend you this blog


Iurii Plugatariov
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

Okay thx for this fast response :slight_smile:

Ironic this topic should come up today. I just purchased Pat
Shaughnessy’s book titled “Ruby Under a Microscope”. It contains the
information you are looking for! I’ve only read the first couple of
pages, and skimmed through the rest, but it contains just the thing you
are looking for.

Wayne


From: Benny K. [email protected]
To: [email protected]
Sent: Thursday, November 21, 2013 11:16 AM
Subject: Re: Ruby Internal

Subject: Ruby Internal
Date: gio 21 nov 13 06:10:55 +0100

Quoting Benny K. ([email protected]):

Is there a good Documentation or Book (or whatever :D) to get or should
i look right into the core files and ask in this forum whenever i got an
question :slight_smile:

I remember when I first looked at that myself. It is now several years
ago, but the approach I followed is still open.

You should download MRI. You probably already have. In the main
directory, there is a file called README.EXT. That file is quite
terse, but it includes everything for you to start.

Slowly chew and digest what’s written there, and do your experiments.
It has taken me quite a lot of time and effort to make sense of the
mechanism, but the effort has been generously rewarded at the
end. C-Ruby synergy works wonderfully.

You can find lots of examples under the ‘ext’ folder of the MRI
source. There you find the code for all C extensions thar Ruby ships
with.

Carlo

Thx for your answers :slight_smile:
Ill just look at MRI’s README.ext and see what ill finding here

The book also sounds really interesting :slight_smile:

Greetings Benny

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs