I started reading this in search of knowing ruby internals. This PDF is
based on ruby 1.7. Is there any other resource for Ruby 2 or is it ok to
read this PDF and still I will be able to understand the source code of
current ruby.
Some parts have changed a bit, some parts maybe not so much (I've never
looked at a 1.7, only 1.8). High-level concepts/data-structures don't
change much.
The current README.EXT might be better, but the key is understanding
underlying how core data structures (e.g.
class/module/method/const/ivars/etc) are arranged, relate to each other
and how they work together.
If you've used Ruby enough, you should already have a mental model of
this. Once you understand the core data structures, code is easy
Most notably, 1.9 and later adds a bytecode layer, but that is an
implementation detail; and not a required property of implementing Ruby
semantics. Unlike the bytecode (inside InstructionSequence), the core
data structures I mentioned above are essential.
Similarly (if you know git well), an analogy would be packfiles being an
implementation detail + optimization of git. The earliest forms of git
only had unpacked blobs/trees/commits; that design has not changed since
the early weeks.
Having good code navigation tools (e.g. ctags, git, especially
"git log -p"), following discussions on ruby-core also helps.
I started reading this in search of knowing ruby internals. This PDF is
based on ruby 1.7. Is there any other resource for Ruby 2 or is it ok to
read this PDF and still I will be able to understand the source code of
current ruby.
I haven't gotten far in it yet, but I'm finding Ruby Under A Microscope to be a good overview. I'm not sure how current it is, but the concepts seem general enough. http://patshaughnessy.net/ruby-under-a-microscope
Josh
Hi
I got hold of this PDF from https://ruby-hacking-guide.github.io/.
I started reading this in search of knowing ruby internals. This PDF is based on ruby 1.7. Is there any other resource for Ruby 2 or is it ok to read this PDF and still I will be able to understand the source code of current ruby.
Thanks John Abraham for pointing me to the hacking guide link! It’s been instrumental in me understanding the anatomy for Ruby as a language. I’ve just started reading the minimal introduction to ruby section and there’s something that I don’t completely get about the “NEW” method.
Mainly if an instance object (variable) inherits from the object class (which has new method defined). Why is it that the instance.new method errors out? It technically should be able to “create” other instances of the same class.
Thanks again.
···
On Mar 7, 2015, at 2:48 PM, Eric Wong <normalperson@yhbt.net> wrote:
I started reading this in search of knowing ruby internals. This PDF is
based on ruby 1.7. Is there any other resource for Ruby 2 or is it ok to
read this PDF and still I will be able to understand the source code of
current ruby.
Some parts have changed a bit, some parts maybe not so much (I've never
looked at a 1.7, only 1.8). High-level concepts/data-structures don't
change much.
The current README.EXT might be better, but the key is understanding
underlying how core data structures (e.g.
class/module/method/const/ivars/etc) are arranged, relate to each other
and how they work together.
If you've used Ruby enough, you should already have a mental model of
this. Once you understand the core data structures, code is easy
Most notably, 1.9 and later adds a bytecode layer, but that is an
implementation detail; and not a required property of implementing Ruby
semantics. Unlike the bytecode (inside InstructionSequence), the core
data structures I mentioned above are essential.
Similarly (if you know git well), an analogy would be packfiles being an
implementation detail + optimization of git. The earliest forms of git
only had unpacked blobs/trees/commits; that design has not changed since
the early weeks.
Having good code navigation tools (e.g. ctags, git, especially
"git log -p"), following discussions on ruby-core also helps.
On Mar 8, 2015, at 12:44, Joshua Bodah <jb3689@yahoo.com> wrote:
I haven't gotten far in it yet, but I'm finding Ruby Under A Microscope to be a good overview. I'm not sure how current it is, but the concepts seem general enough.
I'm having trouble contacting Steve Litt, I just finished the translation
of one of his articles, and I would like to send a copy of the document and
request permission to publish the article, apparently the mail that says on
its website
is down or something.
All material shown on its website is subject to copyright license, so I
need to talk to him.
Thanks John Abraham for pointing me to the hacking guide link! It’s been
instrumental in me understanding the anatomy for Ruby as a language. I’ve
just started reading the minimal introduction to ruby section and there’s
something that I don’t completely get about the “NEW” method.
Mainly if an instance object (variable) inherits from the object class
(which has new method defined). Why is it that the instance.new method
errors out? It technically should be able to “create” other instances of
the same class.
Thanks again.
> On Mar 7, 2015, at 2:48 PM, Eric Wong <normalperson@yhbt.net> wrote:
>
> john abraham <jef.abraham@gmail.com> wrote:
>> I got hold of this PDF from https://ruby-hacking-guide.github.io/\.
>>
>> I started reading this in search of knowing ruby internals. This PDF is
>> based on ruby 1.7. Is there any other resource for Ruby 2 or is it ok to
>> read this PDF and still I will be able to understand the source code of
>> current ruby.
>
> Some parts have changed a bit, some parts maybe not so much (I've never
> looked at a 1.7, only 1.8). High-level concepts/data-structures don't
> change much.
>
> The current README.EXT might be better, but the key is understanding
> underlying how core data structures (e.g.
> class/module/method/const/ivars/etc) are arranged, relate to each other
> and how they work together.
>
> If you've used Ruby enough, you should already have a mental model of
> this. Once you understand the core data structures, code is easy
>
> Most notably, 1.9 and later adds a bytecode layer, but that is an
> implementation detail; and not a required property of implementing Ruby
> semantics. Unlike the bytecode (inside InstructionSequence), the core
> data structures I mentioned above are essential.
>
> Similarly (if you know git well), an analogy would be packfiles being an
> implementation detail + optimization of git. The earliest forms of git
> only had unpacked blobs/trees/commits; that design has not changed since
> the early weeks.
>
> Having good code navigation tools (e.g. ctags, git, especially
> "git log -p"), following discussions on ruby-core also helps.