Live data from Hacker News

Static Typing for Ruby: Adopting Sorbet at Scale

shopify.engineering

1–10 of 72 posts

Re: Static Typing for Ruby: Adopting Sorbet at Scale

#4
I wish this had been available years ago!

I think Ruby was an excellent replacement for Lua to do ML, once Torch ran out of steam due to LuaJIT memory limitations. However, historically, MRI Ruby was slow and problematic.

Personally, I prefer Ruby to Python. Ruby is very close to Smalltalk, with some ideas from Perl and Lisp.

Re: Static Typing for Ruby: Adopting Sorbet at Scale

#6
post #4

I wish this had been available years ago! I think Ruby was an excellent replacement for Lua to do ML, once Torch ran out of steam due to LuaJIT memory limitations. However, historically, MRI Ruby was slow and problematic. Personally, I prefer Ruby to Python. Ruby is very close to Smalltalk, with some ideas from Perl and Lisp.

> MRI Ruby was slow and problematic.

Why problematic?

On the slowness, I would agree that Ruby is slower than many languages, but as an interpreted language this is -up to a certain point- by design, or at least an accepted part of the trade-off one accepts when he takes a programming language. Moreover, Ruby's natural competitor is Python, not -say- Clojure; and I wouldn't that Ruby is significantly slower than Python.

Re: Static Typing for Ruby: Adopting Sorbet at Scale

#8
post #5

Isn't crystal lang trying to do the same thing? Why not join forces?

Beyond the syntax looking a bit similar, Crystal is a very different language. Porting over a production application such as Shopify isn't something you do in an evening.

Re: Static Typing for Ruby: Adopting Sorbet at Scale

#9
post #3
post #2

The second part of this two-part blogpost is here: https://shopify.engineering/adopting-sorbet

Happy to answer any questions here about our process, results or tools!

Having used Sorbet, one thing immediately noticeable is that it's incredibly verbose due to needing to be valid ruby syntax. Was there any developer pushback on that?

Also, maybe I missed it, but Sorbet has a very fleshed out plugin for VSCode but that's about it. How was the experience getting people who don't use VSCode to integrate it into their workflow?

Re: Static Typing for Ruby: Adopting Sorbet at Scale

#10
post #6
post #4

I wish this had been available years ago! I think Ruby was an excellent replacement for Lua to do ML, once Torch ran out of steam due to LuaJIT memory limitations. However, historically, MRI Ruby was slow and problematic. Personally, I prefer Ruby to Python. Ruby is very close to Smalltalk, with some ideas from Perl and Lisp.

> MRI Ruby was slow and problematic. Why problematic? On the slowness, I would agree that Ruby is slower than many languages, but as an interpreted language this is -up to a certain point- by design, or at least an accepted part of the trade-off one accepts when he takes a programming language. Moreover, Ruby's natural competitor is Python, not -say- Clojure; and I wouldn't that Ruby is significantly slower than Pyth…

It had lots of memory leaks. I love Ruby, and I used it anyway, but this bothered me a lot back in the mid-to-late 2000s.
Post reply on HN