Ruby under a microscopePat Shaughnessy

Ruby under a microscope

by Pat Shaughnessy · first published 2014

47mentions
32recommended by
41HN commenters
2012–2026first – last mentioned

78% recommend20% neutral2% critical

Why HN recommends it

Approachable tour of how Ruby works internally, covering parsing, the class structure and the YARV virtual machine, without requiring C knowledge. Suits Ruby developers curious about interpreters.

Summarised by Claude from recommending comments

"An under-the-hood look at how the Ruby programming language runs code. Extensively illustrated with complete explanations and hands-on experiments. Covers Ruby 2.x"-- "Ruby is a powerful programming language with a focus on simplicity, but beneath its elegant syntax, the language is performing countless unseen tasks. Ruby Under a Microscope gives developers an inside, hands-on look at Ruby's core, using simple diagrams coupled with clear explanations. Author Pat Shaughnessy takes a scientific approach, laying out a series of experiments with Ruby code to demonstrate how things work. Shaughne

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

60 2007: 0 mentions2008: 0 mentions2009: 0 mentions2010: 0 mentions2011: 0 mentions2012: 3 mentions2013: 2 mentions2014: 5 mentions2015: 6 mentions2016: 3 mentions2017: 4 mentions2018: 0 mentions2019: 1 mention2020: 3 mentions2021: 4 mentions2022: 2 mentions2023: 2 mentions2024: 1 mention2025: 5 mentions2026: 2 mentions200720172026

What Hacker News says

  • filereaper · Apr 10, 2016 · Recommends

    …System" [1] to be an excellent starting point, it's written by database veterans James Hamilton and Micheal Stonebraker and references other much deeper works. I've always liked Pat Shaughnessy's work, Ruby under a Microscope was a fantastic introduction to MRI 2.0. I really hope to see more works like these. [1] http://db.cs.berkeley.edu/papers/fntdb07-architecture.pdf

    on “Following a Select Statement Through Postgres Internals (2014)” ↗
  • lmcnish14 · Dec 23, 2015 · Recommends

    A few books I read for fun this year: - Armada: Ernest Cline - Very disappointing and predictable - Library of Souls: Ransom Riggs - Easy but engrossing book - Ruby Under a Microscope: Pat Shaughnessy - I find his style of explaining things very accessible - Being Mortal: Medicine and What Matters in the End: Atul Gawande - It's a hard subject to think about but helped me to understand…

    on “Ask HN: Books you read in 2015?” ↗
  • dmunoz · Jul 28, 2016 · Recommends

    > 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…

    on “Ask HN: Improve C language skills after K&R?” ↗
  • tadkar · Sep 16, 2020 · Recommends

    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…

    on “Python's Innards: Introduction (2010)” ↗
  • divtiwari · Jun 25, 2021 · Recommends

    I would recommend reading/implementing the below: 1. 'Write a Interpreter in Go' by Thorsten Ball 2. 'Write a Compiler in Go' by Thorsten Ball 3. 'Crafting Interpreters' by Bob Nystrom 4. 'Ruby under a Microscope' by Pat Shaughnessy

    on “Ask HN: Technical Summer Reading List” ↗
  • thinkbohemian · Nov 27, 2013 · Recommends

    …accomplishment. If you're ever at a Rubyconf, go to his talks. Also love the speed work he's been doing with generational GC. For a primer, Pat Shaughnessy has a great talk you should check out, also Ruby Under a Microscope is a good dive into Ruby.

    on “What's New in Ruby 2.1 [pdf]” ↗
  • ucarion · Sep 30, 2014 · Recommends

    In fact, such a book has been written before already: http://patshaughnessy.net/ruby-under-a-microscope

    on “C for Rubyists” ↗
  • Legion · Aug 12, 2013 · Recommends

    Anyone interested in this kind of content should see Pat Shaughnessy's Ruby Under a Microscope book: http://patshaughnessy.net/ruby-under-a-microscope It's the closest thing we have to a new Ruby Hacking Guide. It's a somewhat gentler, more approachable treatment of the subject matter, but no less awesome. Shaughnessy also has a number of blog posts on his site that dive into the same kind of de

    on “Ruby hacking guide” ↗
  • fellellor · Aug 12, 2019 · Recommends

    …experience left me in a bad place. Now after all these years, Ruby feels like a breath of fresh air, and the texts that I have come across on the subject - Design Patterns in Ruby, Practical OOD in Ruby, Ruby under a Microscope etc. have increased my interest in the language. But more and more frequent articles on Ruby's decline are pretty disheartening.

    on “Python Is Eating the World” ↗
  • diehunde · Aug 20, 2020 · Recommends

    I just finished 3 books about internals and I really enjoyed them: - Ruby Under a Microscope - Database internals - Writing An Interpreter In Go Are there any other good books on internals of any technology out there? I don't mind if it's a language or a tool. I just think it's pretty interesting…

    on “Ask HN: Any Good Books on Internals?” ↗
  • cenazoic · Nov 22, 2021 · Recommends

    Ruby Under the Microscope: http://patshaughnessy.net/ruby-under-a-microscope The CS Detective: https://nostarch.com/csdetective Mazes for Programmers: http://www.mazesforprogrammers.com/ A Curious Moon: https://bigmachine.io/products/a-curious-moon/ xchg rax,rax: https://www.xorpd.net/pages/xchg_rax/snip_00.html

    on “Ask HN: Most interesting, mildly impractical, well-written books on software?” ↗
  • montblanc · Nov 28, 2021 · Recommends

    Ruby Under a Microscope is the first and only technical book I will finish; if you like Ruby and are curious about how things work under the hood it's a joy to read. You need to look for something that actually interests you.…

    on “Books that changed my career as a software engineer” ↗
  • tenderlove · Jun 21, 2023 · Recommends

    This guide is interesting but extremely out of date. I recommend Ruby Under a Microscope[1] though it is also out of date as well (but less out of date than the Ruby Hacking Guide) 1. https://nostarch.com/rum

    on “Ruby Hacking Guide” ↗
  • AstonJ · Oct 17, 2012 · Recommends

    Hi, thanks for the comment and encouragement! If you're looking for books on the internals of Rails, this one could be right up your street: http://patshaughnessy.net/ruby-under-a-microscope If you're looking for more general but advanced books there are loads of fantastic ones - some of my favourites are Eloquent Ruby, Design Patterns in Ruby, Metaprogramming Ruby and there's Crafting Rails App

    on “Anyone Can Ride Rails - should I write this book?” ↗
  • pat_shaughnessy · Oct 29, 2012 · Recommends

    Yes - Ruby's internal workings are very mysterious to most people. While the C source code behind Ruby is open source, it's hard to read and understand for most people. In Ruby Under a Microscope, I explain how Ruby works internally… without assuming you know anything about C programming. Why study Ruby internals in the first place? Here are my reasons (from the book's preface): - By studying…

    on “Ruby Under a Microscope: Learning Ruby Internals through Experiment” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help