Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Playing with Sorbet
Search
Luciano Sousa
September 12, 2019
Programming
52
0
Share
Playing with Sorbet
A short presentation about how Sorbet could help your project
Luciano Sousa
September 12, 2019
More Decks by Luciano Sousa
See All by Luciano Sousa
Knowing mina deploy
lucianosousa
1
77
Creating your startup without Developer
lucianosousa
0
180
Patterns Falacy v2
lucianosousa
0
120
Project Management like Software Developer
lucianosousa
1
120
The Patterns Falacy - Rails Version
lucianosousa
1
120
Sinatra::Ftw
lucianosousa
0
110
Other Decks in Programming
See All in Programming
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
1.7k
Explore CoroutineScope
tomoeng11
0
180
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
260
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
130
t *testing.T は どこからやってくるの?
otakakot
1
920
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
160
ローカルLLMでどこまでコードが書けるか / How much code can be written on a local LLM
kishida
2
340
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
決定論 vs 確率論:Gemini 3 FlashとTF-IDFを組み合わせた「法規判定エンジン」の構築
shukob
0
160
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
430
Claude CodeでETLジョブ実行テストを自動化してみた
yoshikikasama
0
1.2k
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
Featured
See All Featured
We Are The Robots
honzajavorek
0
220
Typedesign – Prime Four
hannesfritz
42
3k
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
540
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
690
Six Lessons from altMBA
skipperchong
29
4.2k
Done Done
chrislema
186
16k
KATA
mclloyd
PRO
35
15k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Agile that works and the tools we love
rasmusluckow
331
21k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
390
Transcript
Playing with Sorbet
What
Sorbet is a fast, powerful type checker designed for Ruby.
Why
Once upon a time
We expose a public API
Expecting params = { user: { first_name: "Luciano", last_name: "Sousa"
} }
We got a
params = { user: "a" }
TypeError (no implicit conversion of Symbol into Integer)
None
NoMethodError (undefined method `where' for nil:NilClass)
Let’s talk about Java
None
Let’s talk about dynamic vs static typed languages
• •
• • •
String javaString = new String(“I am a Java string”) ruby_string
= “I am a Ruby string”
Dynamic languages
Ruby
Examples
begin do_something rescue StandardErro do_something_else end
Tests
Let's talk about Shopify
~1500 devs
~40 deploys/day
~5 million req/min
~83k req/sec ~170k req/sec peak
Sorbet at Shopify
~36 issues fixed
~17 dead code never hit
~16 name error
~3 wrong args
Maybe some millions
Examples
“I hate type annotations.”
class UserHelper def name_length(name) name.length end end
# typed: true class UserHelper def name_length(name) name.length end end
# typed: true class UserHelper extend T::Sig def name_length(name) name.length
end end
# typed: true class UserHelper extend T::Sig sig { params(name:
String).returns(Integer) } def name_length(name) name.length end end
How it works
Disclaimer
None
# typed: true
None
extend T::Sig
sig { params(name: String).returns(Integer) }
sig { params(name: String).returns(Integer) }
Resources •
Resources •
Resources •
Resources •
Thanks!