Hacker Blogs
Work in progress: 15,409 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #661

P

Pat Shaughnessy

Personal blog · patshaughnessy.net · on HN as pat_shaughnessyprogrammingdata

Pat Shaughnessy's personal blog at patshaughnessy.net covers programming and data. Since 2011, 95 different Hacker News readers have linked it 119 times, most often “Ruby Under a Microscope: Learning Ruby Internals through Experiment”. It is still writing: the last post was on 2025-11-17, and you can follow it by feed.

Visit the blog
119mentions?
7recommend?
95HN people?
2011–2025first – last linked?
Links on Hacker News per year · peak 23 in 2012

Sometimes recommended · 7 of 35 sampled comments recommend it?

Why HN links it

HN readers link Pat Shaughnessy's posts for deep dives into how language runtimes and databases work internally, mainly Ruby's MRI and GC, Python's object system, and Postgres internals. Commenters also point to his book Ruby Under a Microscope.

Recommended for · 7 comments
One commenter says he does a great job combining high-level explanations, visual aids and gritty details; another calls his Ruby book a fantastic resource for i

Summarised by Claude from a sample of 35 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

The author on HN?

pat_shaughnessy · 426 karma · member since 2011

Boston based Ruby developer: http://patshaughnessy.net and @pat_shaughnessy

From their public HN profile, which links to this site.

Most-linked posts?

  1. Ruby Under a Microscope: Learning Ruby Internals through Experiment
    12 people · 12 mentions · first linked 2012-10-17
  2. Generational GC in Python and Ruby (2013)
    6 people · 6 mentions · first linked 2013-11-07
  3. Garbage collection in Ruby 2.0
    6 people · 6 mentions · first linked 2012-03-23
  4. Discovering the Computer Science Behind Postgres Indexes
    4 people · 4 mentions · first linked 2014-11-12
  5. Following a Select Statement Through Postgres Internals (2014)
    4 people · 4 mentions · first linked 2014-10-13
  6. Is Your Postgres Query Starved for Memory?
    3 people · 3 mentions · first linked 2016-04-10
  7. Two ways of using Redis to build a NoSQL autocomplete search index
    3 people · 3 mentions · first linked 2011-11-29
  8. Never create Ruby strings longer than 23 characters
    3 people · 3 mentions · first linked 2012-01-04
  9. Visualizing Garbage Collection in Ruby and Python
    3 people · 3 mentions · first linked 2013-11-04
  10. Seeing double: how Ruby shares string values
    3 people · 3 mentions · first linked 2012-01-18

What Hacker News says?

  1. PostgreSQL has Ltree http://patshaughnessy.net/2017/12/13/saving-a-tree-in-postgr...

    Comment linking /2017/12/13/saving-a-tree-in-postgres-using-ltree

    on “The data model behind Notion's flexibility”
  2. Submitted Learning to Read X86 Assembly Language as a story · 591 points

    HN discussion
  3. I'm actually tempted to start a series of blog posts in this vein for Ruby. The book Ruby Under a Microscope [0] covers these topics (and more), at least from a cursory glance of the blog series, but it would be nice to refresh that material in my own head for Ruby 3. [0]: http://patshaughnessy.net/ruby-under-a-microscope

    Comment linking /ruby-under-a-microscope

    on “How the Python object system works”
  4. Submitted To learn a new language, read its standard library as a story · 402 points

    HN discussion
  5. codehusker · 2016-04-10Recommends
    This article was also discussed before: https://news.ycombinator.com/item?id=8449329 Pat Shaughnessy has 3 other similar articles about Postgres internals. He does a great job of combining high level explanations, visual aids, and gritty details. Discovering the Computer Science Behind Postgres Indexes http://patshaughnessy.net/2014/11/11/discovering-the-compute... A Look at How Postgres Executes a Tiny Join http://…

    Comment linking /2016/1/22/is-your-postgres-query-starved-for-memory

    on “Following a Select Statement Through Postgres Internals (2014)”
  6. Submitted Never create Ruby strings longer than 23 characters as a story · 357 points

    HN discussion
  7. This is a great post. I like how they walked through all the steps and especially the "perf" tool. Ruby has a patch to do the same thing -- increase sharing by moving reference counts out of the object itself: Index here: http://www.rubyenterpriseedition.com/faq.html#what_is_this First post in a long series: http://izumi.plan99.net/blog/index.php/2007/07/25/making-rub... I think these patches or something similar ma…

    Comment linking /2012/3/23/why-you-should-be-excited-about-garbage-collection-in-ruby-2-0

    on “Dismissing Python Garbage Collection at Instagram”
  8. Submitted Following a Select Statement Through Postgres Internals (2014) as a story · 302 points

    HN discussion
  9. I feel that a discussion of ltree is incomplete without discussion of manipulating the tree. e.g. splicing, cutting, moving, deleting branches [1] etc. Also, how ltree uses Gist indexes [2]. Reference: [1] http://patshaughnessy.net/2017/12/14/manipulating-trees-usin... [2] http://patshaughnessy.net/2017/12/15/looking-inside-postgres...

    Comment linking /2017/12/15/looking-inside-postgres-at-a-gist-index

    on “Hierarchical Structures in PostgreSQL (2020)”
  10. Submitted Compiling Ruby to machine language as a story · 287 points

    HN discussion
  11. If this sort of stuff is relevant to you, http://patshaughnessy.net/ruby-under-a-microscope is an essential book to read.

    Comment linking /ruby-under-a-microscope

    on “How to spy on a Ruby program”
  12. Submitted Following a Select Statement Through Postgres Internals as a story · 189 points

    HN discussion
  13. Did you see this a few weeks ago? http://patshaughnessy.net/2013/10/24/visualizing-garbage-col...

    Comment linking /2013/10/24/visualizing-garbage-collection-in-ruby-and-python/

    on “Baby's First Garbage Collector”
  14. Submitted Ruby Under a Microscope: Learning Ruby Internals through Experiment as a story · 124 points

    HN discussion
  15. I believe this also includes the bitmap marking GC changes which will make the GC copy-on-write friendly. This is pretty important for a lot of folks running Ruby web servers. See, for example: http://patshaughnessy.net/2012/3/23/why-you-should-be-excite...

    Comment linking /2012/3/23/why-you-should-be-excited-about-garbage-collection-in-ruby-2-0

    on “Ruby 2.0.0 feature freeze”
  16. Submitted Visualizing Garbage Collection in Ruby and Python as a story · 114 points

    HN discussion
  17. 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...

    Comment linking /ruby-under-a-microscope

    on “Why blocks make Ruby methods slower”
  18. Submitted My eBook build process and some PDF, EPUB and MOBI tips as a story · 111 points

    HN discussion
  19. This cheerfully reminded me of the thing in MRI Ruby of (relatively recent) yesteryear where strings longer than 23 characters were twice as slow, qv. http://patshaughnessy.net/2012/1/4/never-create-ruby-strings...

    Comment linking /2012/1/4/never-create-ruby-strings-longer-than-23-characters

    on “Node.js: Some quick optimization advice”
  20. Submitted Why You Should Be Excited About Garbage Collection in Ruby 2.0 as a story · 106 points

    HN discussion
  21. I'm working on a little static site generator now for my own site. The PHP/SQL wordpress kind of option just annoys me and have held me back from publishing altogether (don't even get me started on publishing services and social media sites. Well, stuff like hugo, nanoc, ikiwiki... inspirational! My static site generator is using rake for file rules to do stuff with git hooks. It's going to depend on Ruby, but won't…

    Comment linking /2015/1/8/using-rake-to-generate-a-blog

    on “Is Self Hosted Blogging Dead?”
  22. Submitted Ruby 2.0 Works Hard So You Can Be Lazy (2013) as a story · 63 points

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

    Comment linking /ruby-under-a-microscope

    on “C for Rubyists”
  24. Submitted Why Bundler 1.1 will be much faster as a story · 58 points

    HN discussion
  25. > you almost inevitably need to learn to read the Ruby codebase (written in C) That's how I ran across this reference, but from the other direction — I've been reading the MRI codebase with the goal of writing faster/better Ruby :) I've been working on my own version of a file-type identification library (even before the recent `mimemagic` drama) and have found it very necessary to understand the way allocation work…

    Comment linking /2013/2/8/ruby-mri-source-code-idioms-3-embedded-objects

    on “Definitive Guide to Ruby's C API”
  26. Submitted How Ruby Borrowed a Decades Old Idea From Lisp as a story · 57 points

    HN discussion
  27. It's interesting to compare this to how python does it (reference counting with generations): http://patshaughnessy.net/2013/10/30/generational-gc-in-pyth... "At first glance, Ruby and Python seem to implement garbage collection very differently. Ruby uses John McCarthy’s original mark and sweep algorithm, while Python uses reference counting. But when we look more closely, we see that Python uses bits of the mark a…

    Comment linking /2013/10/30/generational-gc-in-python-and-ruby

    on “Garbage Collection in Ruby 2.1”
  28. Submitted Never create Ruby strings longer than 23 characters as a story · 54 points

    HN discussion
  29. Legion · 2013-08-12Recommends
    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 details covered in his…

    Comment linking /ruby-under-a-microscope

    on “Ruby hacking guide”
  30. Submitted Ruby MRI Source Code Idioms #1: Accessing Data Via Macros as a story · 43 points

    HN discussion

Search all of HN for patshaughnessy.net

Linked by the same people?