Schedule

Emma Haruka Iwao
Emma Haruka Iwao

Emma is a software engineer at Google, based out of Seattle, WA. Besides software engineering, shes likes games, traveling, and eating delicious food.

Ruby and the World Record Pi Calculation

I broke the world record of pi calculations with 100 trillion digits. When I was preparing for the challenge, I created a small Ruby script and an ERB template for the calculation software config file to automate benchmarking, and a shell one-liner to create a CSV file for review. The script saved me days of manual work and allowed me to find optimal parameters. The final calculation took 157 days, almost twice as fast as the earliest configurations, which could’ve taken more than 300 days.

This talk will show you how I turned the vague problem scope (breaking the pi world record) into a smaller solvable task (automation with Ruby). You’ll also learn scripting techniques for benchmarking such as invoking an external program in Ruby, and multiline text formatting with the sed, grep, and paste commands.

You may not calculate pi, but I’m sure you have a thing or two that you want your computer to do for you!