HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Ruby Under a Microscope: An Illustrated Guide to Ruby Internals

Pat Shaughnessy · 5 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Ruby Under a Microscope: An Illustrated Guide to Ruby Internals" by Pat Shaughnessy.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
Ruby is a powerful programming language with a focus on simplicity, but beneath its elegant syntax it performs countless unseen tasks. Ruby Under a Microscope gives you a hands-on look at Ruby's core, using extensive diagrams and thorough explanations to show you how Ruby is implemented (no C skills required). Author Pat Shaughnessy takes a scientific approach, laying out a series of experiments with Ruby code to take you behind the scenes of how programming languages work. You'll even find information on JRuby and Rubinius (two alternative implementations of Ruby), as well as in-depth explorations of Ruby's garbage collection algorithm. Ruby Under a Microscope will teach you: How a few computer science concepts underpin Ruby's complex implementation How Ruby executes your code using a virtual machine How classes and modules are the same inside Ruby How Ruby employs algorithms originally developed for Lisp How Ruby uses grammar rules to parse and understand your code How your Ruby code is translated into a different language by a compiler No programming language needs to be a black box. Whether you're already intrigued by language implementation or just want to dig deeper into Ruby, you'll find Ruby Under a Microscope a fascinating way to become a better programmer. Covers Ruby 2.x, 1.9 and 1.8
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
There's also this wonderful book [1] covering similar ground for Ruby. An extract from a review gives a flavour:

"Ruby Under a Microscope" does something fairly ambitious. It attempts to write a system internals book in a language that non computer scientists can readily understand. While there are numerous code snippets and examples to try and examine, the ability to look at the various Ruby internals and systems and see how they fit together can be accomplished by someone with general skills and basic familiarity with programming at the script level (which for many of us is as far as we typically get). An old saying says you can’t tell where yo hare going if you don’t know where you’ve been. Similarly, we can’t expect to get the most out of languages like ruby without having a more clear idea what’s happening under the hood. It’s entirely possible to work with Ruby and never learn some of this stuff, but having a guide like "Ruby Under a Microscope” opens up a variety of avenues, and does so in a way that will make the journey interesting and, dare I say it, even a little fun.

[1] https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Int...

digianarchist
I own this. Great book. Someone should write the Python equivalent.
I'm just a little over a year out of school myself, so I'm far from an expert, but happy to share some things that come to mind.

I haven't had a chance to look through it in-depth yet, but this looks pretty interesting: https://github.com/donnemartin/system-design-primer

As far as things that have had an important impact in my learning path, I do have a few Ruby books I really like (the key here is to get your hands dirty with code as you read along): - https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Int... - https://www.amazon.com/Metaprogramming-Ruby-Program-Like-Fac... - https://gumroad.com/l/rebuilding_rails

I think reading about (and looking at the code) for things you use and trying to understand how they work under the hood has been super useful: http://aosabook.org/en/index.html

Having smart people around to learn from is extremely helpful too.

Happy to chat more if you'd like. Just drop me a line: connor[at]opendoor[dot]com

> My objective is to better understand how computers work, how ruby works...

Check out Pat Shaughnessy's Ruby Under a Microscope [0].

It gives a nice overview of the internals of MRI. It doesn't cover a who lot of the C code, but references plenty of it and where it can be found in the source code of MRI. Grab the book, the source for MRI, and do some digging.

[0] https://www.amazon.com/Ruby-Under-Microscope-Illustrated-Int...

616c
Agreed. I was at a Hackerspace years ago that worked on this principle, and wanted to start lower than that.

http://nand2tetris.org/course.php

Alas, I left before I could really get into it, and never had the peer pressure to understand a lot of core CS way over my head.

This doesn't really answer your question but you might be interested in this book

http://patshaughnessy.net/ruby-under-a-microscope

http://www.amazon.com/Ruby-Under-Microscope-Illustrated-Inte...

    Work on the Ruby interpreter is weirdly silo'ed off and mostly done by Japanese developers, so there's a significant barrier to entry for any enterprising C developer to roll her sleeves up and get hacking.
This is wrong. Ruby Developers welcome contribution in any form. Also, they have various resource to get started:

    Official Contributing Guide: http://ruby-doc.org/core-2.1.1/doc/contributing_rdoc.html
    Ruby Hacking Guide: http://ruby-hacking-guide.github.io/
    Book on ruby internals: http://www.amazon.com/Ruby-Under-Microscope-Illustrated-Internals/dp/1593275277
    RubySpecs: http://rubyspec.org/
Further, incase you are stuck. you can post on the mailing-lists. someone will surely help you get started.
stormbrew
It's entirely possible that it's changed in the last few years, but at the very least what he said was once very true. There has traditionally been a very real and very painful language barrier to the ruby core team.

But, to be fair, it's a bit of a goose and gander kind of situation. People everywhere else in the world have to deal with that kind of situation all the time.

steveklabnik
It has, very significantly. There is still a 日本語-only mailing list (ruby-dev), but the English one has significantly more traffic (ruby-core). No decisions are made in ruby-dev that are not also discussed in ruby-core.

In addition, it's only that mailing list that's split; the bugtracker is in English, the help is all in English (with one or two 日本語 translations).

It's actually never been easier to contribute to Ruby.

stormbrew
That's good to hear.
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.