Peter's Adventures in Ruby

During the summer of 2020, I was presented with an amazing opportunity to work as an intern at Shopify on the Ruby and Rails infrastructure team (and now full time 🎉). I was tasked with various experiments to improve Ruby’s garbage collector. As a developer that uses (and frequently contributes) to open source software, I was really excited to contribute to a language that I love and use very frequently. But the journey was (and still is) difficult. There’s very little documentation on how Ruby works internally, and the C source code is almost not documented at all. The fact that I had close to no experience in neither C nor building language interpreters only made it more difficult.

Throughout my journey, I’ve kept notes about my discoveries and knowledge I’ve learned from highly experienced colleagues. I would like to thank everyone on my team for being friendly, supportive, and helping me throughout my learning journey. I wouldn’t be where I am today without them.

I present to you the “Peter’s Adventures in Ruby” series where I will share the knowledge I’ve accumulated as I work in the Ruby codebase and I will (try) to keep these articles up-to-date. Feel free to contact me via email (peter [at] peterzhu [dot] ca) if you have any questions, an article contains errors, or just want to chat!

  1. Tips and tricks in MRI Ruby development
  2. Garbage Collection in Ruby
  3. Creating Ruby strings in C