<story><title>Our Experience Porting the YJIT Ruby Compiler to Rust</title><url>https://shopify.engineering/porting-yjit-ruby-compiler-to-rust</url></story><parent_chain><item><author>onebot</author><text>I honestly love Ruby and Ruby on Rails, but I can&amp;#x27;t understand why companies like Shopify and Github go through so much effort to scale Ruby especially at their size. Maybe I am wrong, but couldn&amp;#x27;t this effort be put to rewriting parts of it in a more performant language like Go or Rust? One has to imagine that they have a large code base, how much developer time is spent writing Tests for Ruby? How much time was spent debugging odd monkey patching gems over the life of the codebase?&lt;p&gt;I do get that developer time was&amp;#x2F;is more expensive than servers. But I am not so sure at some level of scale. When you need 100 servers vs 5, and need to spend so much testing effort dealing with dynamic language, etc. And then you build custom compilers, special tools for tracing, entire architectures to deal with single threaded model, etc. Between Github &amp;amp; Shopify alone, they could have probably build a very Ruby on Rails like framework on a language more suited to the size and scale of these platforms.</text></item></parent_chain><comment><author>nickjj</author><text>&amp;gt; they could have probably build a very Ruby on Rails like framework on a language more suited to the size and scale of these platforms.&lt;p&gt;I have a hunch they would rather have tens of thousands of other folks using a framework that has massive community support and folks other than them directly maintaining it.&lt;p&gt;Also being able to Google almost any problem in Rails and find multiple really good answers is worth needing 5 or 10 times more compute costs on just your application servers because dev time is expensive at any scale.&lt;p&gt;If you&amp;#x27;re paying 2,000 developers 150k+ a year that&amp;#x27;s 300 million dollars without accounting for anything that scales off base salary (bonuses, 401k matching, etc.). If you can save each developer 5 hours a week because of the Rails community existing that&amp;#x27;s 10,000 dev hours a week saved. An average person might work let&amp;#x27;s say 1,900 hours a year. That&amp;#x27;s roughly ~5.2 years of dev time saved from using Rails in opportunity costs and direct costs per week. Direct costs alone is ~$790k per week. I don&amp;#x27;t know what Shopify or a bigger place is paying on just application server costs but I&amp;#x27;m guessing it&amp;#x27;s well worth hosting Rails instead of building their own framework in a more computationally efficient framework.&lt;p&gt;I think these numbers are really generous too. I&amp;#x27;m guessing using Rails is saving a lot more than 5 hours a week of dev time per developer.</text></comment>
<story><title>Our Experience Porting the YJIT Ruby Compiler to Rust</title><url>https://shopify.engineering/porting-yjit-ruby-compiler-to-rust</url></story><parent_chain><item><author>onebot</author><text>I honestly love Ruby and Ruby on Rails, but I can&amp;#x27;t understand why companies like Shopify and Github go through so much effort to scale Ruby especially at their size. Maybe I am wrong, but couldn&amp;#x27;t this effort be put to rewriting parts of it in a more performant language like Go or Rust? One has to imagine that they have a large code base, how much developer time is spent writing Tests for Ruby? How much time was spent debugging odd monkey patching gems over the life of the codebase?&lt;p&gt;I do get that developer time was&amp;#x2F;is more expensive than servers. But I am not so sure at some level of scale. When you need 100 servers vs 5, and need to spend so much testing effort dealing with dynamic language, etc. And then you build custom compilers, special tools for tracing, entire architectures to deal with single threaded model, etc. Between Github &amp;amp; Shopify alone, they could have probably build a very Ruby on Rails like framework on a language more suited to the size and scale of these platforms.</text></item></parent_chain><comment><author>IAmEveryone</author><text>The &amp;quot;parts of it&amp;quot; in your question might be the clue to an answer: you start implementing some often-used code path only to realize that they share code with all the rarely used code paths (permissions&amp;#x2F;authentication come to mind),&lt;p&gt;So you&amp;#x27;d need to reimplement a whole bunch of your codebase, at which point you&amp;#x27;ll have two versions of everything that you need to keep in sync.</text></comment>