HNHacker News
TopNewBestAskShowJobs

darkdimius

266 karma · joined October 23, 2015

[ my public key: https://keybase.io/darkdimius; my proof: https://keybase.io/darkdimius/sigs/Jzt_Wl-Cx4ifVIpySdoxGloto1lF9RL6l1nw8qXOFYA ]
submissionscomments
darkdimius··on Static Typing for Ruby: Adopting Sorbet at Scale
Dmitry here, from Stripe. One of founding members of Sorbet(though I no longer work on it anymore).

Story that Ufuk shares is common.

We saw this process repeat in many companies, Stripe, Shopify and many others - folks are initially bothered with verbosity of `sig` syntax, but as the company starts using it in practice stop being bothered pretty quikcly. It happens even faster now that IDE integration allows to auto-complete entire signature and can in most cases correctly guess the types of arguments & result type. You rarely type `sig`s yourself.

The common internal asks at Stripe are about even better IDE support, new features & etc and that's where most of investments are. Well, and and obviously performance. Sorbet was already very fast and we intend to keep it fast as our huge codebase grows.

darkdimius··on RBS, Ruby’s new type signature language
(One of core devs on Sorbet)

Agreed. But don't read too much in RBS details yet. RBI is currently very early and will need to change substantially learning from experience of actually typechecking real codebases. Stripe and Shopify are helping with this.

RBS has better syntax, but has features that don't have clear semantics or feasible implementation. And doesn't support inline annotations that are necessary in practice.

RBI is limited by ruby syntax and thus isn't as nice, but has good semantics and support inline annotations. And has been tried on hundreds of real codebases including those with dozens of millions lines of code.

We'll need to gather benefits of both on our way forward.

darkdimius··on Open-sourcing Sorbet: a fast, powerful type checker for Ruby
This is true, we're part of a single working group that's working on types for Ruby3. https://twitter.com/darkdimius/status/1119130004313350144 has some detail
darkdimius··on Open-sourcing Sorbet: a fast, powerful type checker for Ruby
We only use it at build time, as for a user, it should be invisible for you
darkdimius··on Open-sourcing Sorbet: a fast, powerful type checker for Ruby
Companies that use Rails have also started working on https://github.com/chanzuckerberg/sorbet-rails, worth checking out!
darkdimius··on Open-sourcing Sorbet: a fast, powerful type checker for Ruby
Yes, join the slack! While Stripe doesn't run rails all other companies in private beta did!
darkdimius··on Types will be part of Ruby 3 stdlib source
A lot of great insight in this comment.

The only difference is that Stipe has foresaw the problems and has been working on productivity for quite a while, with a dedicated group of people who help our engineers by building tools and abstractions. For example https://youtu.be/lKMOETQAdzs is done by the same org couple of years ago.

darkdimius··on Types will be part of Ruby 3 stdlib source
See https://news.ycombinator.com/item?id=19697581
darkdimius··on Types will be part of Ruby 3 stdlib source
We're collaborating with @yukihiro_matz, @mametter, @soutaro and Jeff Forster to make sure that types are not disruptive to Ruby. Thus, types are optional. The intention is to deliver value for unmodified Ruby programs. Hear more from Matz at https://youtu.be/cmOt9HhszCI?t=2148
darkdimius··on Types will be part of Ruby 3 stdlib source
We're currently looking for beta users! Reach out to us at sorbet@stripe.com. If you describe your team&codebase in the email, it will help us figure out what cohort to include you in.
darkdimius··on Types will be part of Ruby 3 stdlib source
Indeed Sorbet does have literal types for strings and Ruby symbols. We're still figuring out the details and converging on a common type system for Ruby3, but we've found them super useful, as you rightly point out!

And +1 on the Ruby renaissance! Super excited about all the exciting things that are currently being built!

darkdimius··on Stripe is building a Ruby typechecker
> A question I didn't get to ask while there is -- will there be some sort of type sharing system introduced?

Yes. This was one of goals of our talks. We wanted implementors of type systems for ruby to start collaborating, in particular on a repository of typed shims.

The details of how this would work out might be different. Typescript and Flow change syntax and thus they cannot be included inline in arbitrary JavaScript libraries. We're intentionally compatible with Ruby syntax. Thus we would like this "repository of types for libraries" to only contain types intermittently, until types have been accepted to upstream of respective library.

darkdimius··on Dotty: a next generation compiler for Scala
Hi. I'm one of main developers of Dotty. I've gave answers to similar concerns here: https://www.reddit.com/r/programming/comments/44um2l/fear_un...
darkdimius··on The Dotty experimental compiler for Scala now bootstraps
http://www.infoq.com/news/2015/10/dotty-scala-bootstraps has some more details.