News for hackers. Stuff that matters.
Re:Stripe is building a Ruby typechecker by ptarjan on Monday June 04, 2018 @06:20AM (#17226332)
Hi and thank you for working on RDL! We do love the project and spoke with Jeff Foster a few times last year.

We did use your standard library annotations for Sorbet and have many fixes to them sitting in your pull request queue: https://github.com/plum-umd/rdl/pull/68 https://github.com/plum-umd/rdl/pull/72 https://github.com/plum-umd/rdl/pull/57 . We stopped submitting more since these weren't being upstreamed.

Before we started our project, I evaluated rolling out RDL instead of building our own typechecker. Trust me, I would MUCH rather use an existing project than have to build our own, but sadly it just didn't scale to our millions of lines of code.

I'm more than happy to chat about the details of why we didn't use RDL if you'd like to email me at [email protected]. Thanks again for your great project, we're standing on the shoulders of giants.

Re:Stripe is building a Ruby typechecker by nextos on Monday June 04, 2018 @09:25AM (#17227494)
You are embarking onto a very interesting, but tough project due to the extremely dynamic nature of Ruby!

Have you considered the property-based QuickCheck approach? Instead of building a type checker, you just annotate your code with properties (preconditions, postconditions and class invariants). You can generate tests to verify your code and also inject runtime checks to fail early in case of violations.

In my experience, this tends to work much better on dynamic languages and it also scales to larger codebases with heavy usage of dynamic idioms.

Re:Stripe is building a Ruby typechecker by sankha93 on Monday June 04, 2018 @11:10PM (#17234690)
Oh, I am not sure how these went unmerged! We should do something about the PRs.

Will shoot you an email to discuss more.