{"id":43148,"date":"2024-05-08T14:30:07","date_gmt":"2024-05-08T18:30:07","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=43148"},"modified":"2024-05-08T14:30:07","modified_gmt":"2024-05-08T18:30:07","slug":"the-alternative-implementation-problem","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/05\/08\/the-alternative-implementation-problem\/","title":{"rendered":"The Alternative Implementation Problem"},"content":{"rendered":"<p><a href=\"https:\/\/pointersgonewild.com\/2024\/04\/20\/the-alternative-implementation-problem\/\">Maxime Chevalier<\/a>:<\/p>\n<blockquote cite=\"https:\/\/pointersgonewild.com\/2024\/04\/20\/the-alternative-implementation-problem\/\">\n<p>What I&rsquo;ve concluded, based on experience, is that positioning your project as an alternative implementation of something is a losing proposition. It doesn&rsquo;t matter how smart you are. It doesn&rsquo;t matter how hard you work. The problem is, when you build an alternative implementation, you&rsquo;ve made yourself subject to the whims of the canonical implementation. They have control over the direction of the project, and all you can do is try to keep up. In the case of JITted implementations of traditionally interpreted languages, there&rsquo;s a bit of a weird dynamic, because it&rsquo;s much faster to implement new features in an interpreter. The implementers of the canonical implementation may see you as competition they are trying to outrun. You may be stuck trying to ice skate uphill.<\/p>\n<p>Almost 4 years ago, with support from Shopify, two dedicated colleagues and I started a project to build YJIT, yet another Ruby JIT. The difference is that we made the key choice to build YJIT not as an alternative implementation, but directly inside CRuby itself. This came with a number of design tradeoffs, but critically, YJIT could be 100% compatible with every CRuby feature from the start. YJIT is now the &ldquo;official&rdquo; Ruby JIT, and is deployed at Shopify, Discourse and GitHub among others. If you&rsquo;ve visited github.com today, or any Shopify store, you&rsquo;ve interacted with YJIT. We&rsquo;ve had more success than any other Ruby JIT compiler so far, and compatibility has been key in achieving this.<\/p>\n<\/blockquote>\n<p>See also: <a href=\"https:\/\/www.therubyonrailspodcast.com\/508\">The Ruby on Rails Podcast<\/a>.<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/05\/04\/mojo-programming-language\/\">Mojo Programming Language<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Maxime Chevalier: What I&rsquo;ve concluded, based on experience, is that positioning your project as an alternative implementation of something is a losing proposition. It doesn&rsquo;t matter how smart you are. It doesn&rsquo;t matter how hard you work. The problem is, when you build an alternative implementation, you&rsquo;ve made yourself subject to the whims of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-05-08T18:30:10Z","apple_news_api_id":"c0618e0d-1f9a-43f1-9841-4b57184c5425","apple_news_api_modified_at":"2024-05-08T18:30:10Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AwGGODR-aQ_GYQUtXGExUJQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[255,817,991,138,71,287,2105],"class_list":["post-43148","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-compiler","tag-just-in-time-compilation-jit","tag-open-source-software","tag-optimization","tag-programming","tag-ruby","tag-shopify"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=43148"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43148\/revisions"}],"predecessor-version":[{"id":43149,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/43148\/revisions\/43149"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=43148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=43148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=43148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}