HACKER Q&A
📣 aalhour

Resources for Studing Ruby's Runtime and Internals


Hey folks, I am interested in learning more about Ruby's internals and it's runtime, topics such as: garbage collection, concurrency, memory management ... etc. What would be a good place to read on these before jumping right into the C code? Thanks.


  👤 jjgreen Accepted Answer ✓
I had a look around last time I dived into Ruby internals, and there's really not a lot around. But the Ruby source is well structured and well commented, I'd recommend just piling in to it, when you get stuck search on the text of the comments or ask on SO etc.

👤 ignurant
In addition to the Ruby under a Microscope (linked elsewhere), a lot of talks from Aaron Patterson (Tenderlove) are enlightening in this regard. I've learned a lot from them, and they also provided the inspiration to keep digging. Some highlights:

Memory:

- https://www.youtube.com/watch?v=ZfgxvNUfQdU&t=3s&ab_channel=...

- https://www.youtube.com/watch?v=1F3gXYhQsAY&ab_channel=Confr...

JIT and the Ruby VM:

- https://www.youtube.com/watch?v=FCjwSOlHqbY&ab_channel=hexde...

- https://www.youtube.com/watch?v=5QgQicKHmeU&ab_channel=RubyC...

And loads of others.


👤 stefanos82
Probably this book https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Int... will be sufficient for you.