Skip to content

Instantly share code, notes, and snippets.

@patshaughnessy
Last active July 25, 2024 14:34
Show Gist options
  • Save patshaughnessy/7104128 to your computer and use it in GitHub Desktop.
Save patshaughnessy/7104128 to your computer and use it in GitHub Desktop.
Resources for learning about MRI Ruby's internal C source code
Recently someone asked me for online resources about MRI's internal C source
code. Here are a few - if there are more to add please leave a comment! - pat
1. Ruby Hacking Guide - The definitive resource for people who want to learn
the C programming details of how Ruby works internally. Intended for C hackers.
It was just recently translated into English from the original Japanese.
http://ruby-hacking-guide.github.io
2. Various presentations by Koichi Sasada - he often does public presentations
on Ruby internals and they're always fascinating and full of technical details.
http://www.confreaks.com/presenters/178-koichi-sasada
http://www.atdot.net/~ko1/activities/Euruko2013-ko1.pdf
http://www.ustream.tv/recorded/35107339/highlight/377033
3. Nell Shamrell did a presentation at GoGaRuCo and Lone Star Ruby about how
regex works internally - I haven't seen it yet, but I'm looking forward to
seeing her do it again at RubyConf next month.
http://www.confreaks.com/videos/2678-gogaruco2013-beneath-the-surface-regular-expressions-in-ruby
4. Ruby Under a Microscope - my book is a visual, conceptual explanation of how
Ruby works intended for Ruby developers who don't know C. It does contain some
C code snippets and explanations, however, for people who are interested in the
C code.
- the new expanded, updated print version is about to come out in November:
http://nostarch.com/rum
- the 2012 eBook is still online if you want to get that:
http://patshaughnessy.net/ruby-under-a-microscope
5. I wrote a series of articles about how to read and understand Ruby's C
source code:
- http://patshaughnessy.net/tags/mri-idioms
I have a number of other articles on Ruby internals on my site also. I tend to
shy away from C code details, however, and focus on the conceptual ideas using
diagrams.
6. My screencast with Peter Cooper - we just did one last year but I'm
considering doing more myself when I have time.
http://www.rubyinside.com/ruby-mri-code-walk-tour-6020.html
7. I've done a few presentations at GoRuCo, RubyConf, EuRuKo and other places about Ruby
internals as well. http://www.confreaks.com/presenters/612-pat-shaughnessy
Other resources on MRI source code? Leave a comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment