text
stringlengths
0
2.46k
**Leslie Lamport:** Yeah. And developing those other algorithms, I developed my skill as thinking about concurrent algorithms, and thinking about how to reason about them.
**Jerod Santo:** Well, that certainly wasn't your end game. That was very much getting you into the game. You went on from there to publish many things. We talked about that Paxos paper... A lot of your work is out there driving Azure, driving -- you know, way down in there in the algorithms of AWS, of all these distri...
I'm curious, as we close up here, Leslie, and I appreciate all your time today; don't want to take too much of it... I'm curious what are you up to these days? You've got this book in the works... What does your work look like when you're not -- I mean, obviously, if you're authoring a book, I know what that looks like...
**Leslie Lamport:** Well, my work day seems to involve answering a lot of email, and a lot of things that take up time... But other than writing the book, I'm doing various things that involve what I would say is sort of management type things involving TLA+. I told you, this colleague, Marcus, was doing the heavylifti...
**Jerod Santo:** Awesome. Definitely looking forward to that book. Well, Leslie, I will let you go, like I said before. Honored to have you on the show. I appreciate you spending some time with me today. To our listener, we do have the links to all of the things mentioned here today in your show notes... Of course, che...
**Leslie Lamport:** Well, the same advice I give is "Think." And really, thinking means writing. So write.
• Origins of Sorbet and its development at Stripe
• Type checking in Ruby and its adoption by large organizations
• Challenges of convincing developers to adopt type checking in Ruby
• Influence of TypeScript and other type systems on the development of Sorbet
• Importance of type checking in large, complex codebases
• Comparison of Sorbet to other type systems, such as RBS
• Transition from prototyping to long-term development with type checking
• Impact of changing programming languages and environments on developers
• Jake's interest in types and programming languages started in university, but he didn't realize he wanted to work with them until later
• He joined Stripe's type team and was mentored by experienced developers, allowing him to dive into the work immediately
• The team worked on various projects, including an ahead-of-time compiler for Ruby, which was ultimately not pursued due to latency concerns
• Sorbet is now used in over 99% of Stripe's production Ruby files, with the majority of files using the "typed true" or higher checking levels
• The use of Sorbet has significantly improved developer productivity, particularly with features like accurate jump to definition and code exploration
• The team has seen a network effect, where developers self-select to use Sorbet's stricter checking levels due to its benefits in understanding and refactoring code
• Challenges of large codebases with dynamic languages like Ruby
• Difficulty of static analysis due to Ruby's metaprogramming features
• Sorbet's approach to type checking in Ruby, including opt-in type checking and escape hatches for metaprogramming
• Balance between type checking and metaprogramming in Ruby
• Use of linters in combination with type checkers like Sorbet
• Method missing in Ruby and its implications for type checking
• Discussion of first-party Ruby official types and their potential relationship to Sorbet
• Sorbet is a type checker for Ruby that was initially seen as one more type checker, but eventually gained backing from companies like Stripe and Shopify, leading to consideration by the Ruby Core team.
• The Ruby Core team decided to implement type annotations without changing the Ruby syntax, and created RBS (Ruby Signature) files, which have a different syntax than Sorbet annotations.
• RBS files are already shipped with Ruby 3.0, and can be used with a type checker like Steep, but Sorbet does not currently parse them.
• Sorbet's developers are prioritizing other features over parsing RBS files, but may do so in the future.
• The Ruby Core team's implementation of type annotations is seen as a first step towards integrating types into the language, but the process may take time.
• Discussion of Sorbet's name and branding
• Comparison of Sorbet to TypeScript
• Explanation of gradual type checking in Sorbet
• Discussion of control flow-sensitive typing in Sorbet
• Example use case of control flow-sensitive typing in Sorbet
• Comparison of Sorbet's adoption and type definition support to TypeScript's
• Discussion of challenges in adding type support to existing Ruby libraries
• Making the Sorbet development process easier for application developers and library developers
• Using third-party gems to analyze and generate type annotations for gems like Active Record
• Challenges and limitations of this approach, including complexity and performance issues
• RBI (Ruby Interface) files vs. RBS (Ruby Standard) files, including syntax and functionality differences
• Sorbet's performance and optimizations, including incremental type-checking and avoiding unnecessary work
• Stripe's codebase size is estimated at 15 million lines, making it larger than Shopify's
• Comparing codebases by lines of code may not be accurate, bytes would be a better metric
• Sorbet can be adopted incrementally, starting with static type checking and runtime library installation
• Editor support for Sorbet is available through VS Code extension and language server protocol
• Tracking adoption is important, especially for larger companies, to give stakeholders visibility into progress
• TypeScript is compared to Sorbet, with the idea being to make it easier for developers familiar with TypeScript to understand Sorbet's type system
• Types will win in the end, according to Jake Zimmerman, as they provide a strong vocabulary for structuring thoughts and are essential for large codebases
• Jake Zimmerman's background in type systems is discussed, including his experience with Standard ML and its influence on other languages like Rust
• Sorbet's name is discussed, with Jake Zimmerman mentioning that he is not a fan of Sorbet, but likes the ice cream equivalent
• The challenges of searching for information about Sorbet due to its name being overloaded with non-programming results are mentioned
• The importance of a good domain name is discussed, with Jake Zimmerman mentioning that he was able to secure the Sorbet.org domain for a Stripe project
• Conclusion of the conversation
• Acknowledgment of the guest's participation
**Jerod Santo:** Alright, we are here with Jake Zimmerman. What's up, Jake?
**Jake Zimmerman:** Not much. How are you guys?
**Jerod Santo:** Doing good, doing good. Happy to have you here. This is a requested episode... Always happy when we get to do a show that's --
**Adam Stacoviak:** Requested.
**Jerod Santo:** We know it's 100% on point, for at least one person in our listening audience. This one was requested by Max VelDink who says "Type checking has been a white whale in Ruby for a long time, and very divisive. There's even a built-in attempt in Ruby 3 called RBS that hasn't gained much traction." Sorbet,...
**Jake Zimmerman:** That's true. Yeah, I think all of those things he commented on - it's kind of what I've lived and breathed for the past five years of working on Sorbet and type checking Ruby. It's been a wild ride.
**Jerod Santo:** Yeah, that was the first thing that I noticed, was - I had heard of Sorbet, but it was somewhat recently... And I went back to check a little bit on the history, and like you guys were doing presentations in 2018.
**Jake Zimmerman:** Yup.
**Jerod Santo:** And I think it goes back to 2017. Is that right? You've been working on it for a long time.
**Jake Zimmerman:** The project itself started, yeah, in fall of 2017, at Stripe. And that's kind of one of the things that's kind of set this project apart from a lot of other kind of like larger attempts to type JavaScript or type Python. We've kind of just focused on just doing what we need to do, and not really goi...
**Jerod Santo:** What about inside Stripe, though? Is it more evangelical inside of Stripe in terms of like--
**Jake Zimmerman:** Well, that's the other weird thing... Max in his comment had said "I'm curious to hear how -- it must have been hard convincing these curmodgeonly Ruby developers", but it was the complete opposite inside of Stripe. It was the sort of thing were for years prior to starting this type checker project ...
**Jerod Santo:** \[08:02\] That's interesting.
**Adam Stacoviak:** Do you think that TypeScript and that move paved the way, to some degree, that it can be done successfully?
**Jake Zimmerman:** Oh, yeah. Absolutely. I think a huge part of it was people would switch back and forth between writing Typescript in the frontend, or Flow in the frontend, and then Ruby in the backend, and to know what could have been the case, what they were missing out on, basically... So they just asked for it, ...
**Adam Stacoviak:** Yeah. The lack of types in Ruby is really keen to the prototyping, and I think Stripe is kind of baked... I mean, obviously, you're innovating. Do you think that that's maybe less needed now, once it's sort of -- you know where Stripe is going. It's a big codebase, lots of Ruby... Do you think that'...
**Jake Zimmerman:** Yeah, I think people will sometimes say that in the prototyping phase you care less about types, and then in the iteration long-term maybe you need more types... I mean, there's a class of people that will break that mold and say "I actually prefer the type checking, even when I'm in my prototyping ...
But I think that the biggest motivating factor for us was just at the time we were getting up to the place where we had hundreds of developers, and even if we were building new code, it was hard to make sense of it all. We really just wanted jump to definition, to be able to follow paths of control flow through the cod...
**Jerod Santo:** It's interesting hearing that, because I guess been around long enough, I remember when people would be so excited to be able to work in Ruby on their day job... Because it was just hobbies for so long, and it was slowly becoming adopted. Obviously, Rails really helped that adoption come in, when you c...