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
0
46
Playing with Sorbet
A short presentation about how Sorbet could help your project
Luciano Sousa
September 12, 2019
Tweet
Share
More Decks by Luciano Sousa
See All by Luciano Sousa
Knowing mina deploy
lucianosousa
1
65
Creating your startup without Developer
lucianosousa
0
160
Patterns Falacy v2
lucianosousa
0
120
Project Management like Software Developer
lucianosousa
1
100
The Patterns Falacy - Rails Version
lucianosousa
1
100
Sinatra::Ftw
lucianosousa
0
86
Other Decks in Programming
See All in Programming
tsconfigのオプションで変わる型世界
keisukeikeda
1
120
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
7
370
rbs-traceを使ってWEARで型生成を試してみた After RubyKaigi 2025〜ZOZO、ファインディ、ピクシブ〜 / tried rbs-trace on WEAR
oyamakei
0
920
DevTalks 25 - Create your own AI-infused Java apps with ease
kdubois
2
110
漸進。
ssssota
0
530
External SecretsのさくらProvider初期実装を担当しています
logica0419
0
210
AI時代のリアーキテクチャ戦略 / Re-architecture Strategy in the AI Era
dachi023
0
190
人には人それぞれのサービス層がある
shimabox
3
440
OpenTelemetryで始めるベンダーフリーなobservability / Vendor-free observability starting with OpenTelemetry
seike460
PRO
0
160
❄️ tmux-nixの実装を通して学ぶNixOSモジュール
momeemt
1
120
TypeScript を活かしてデザインシステム MCP を作る / #tskaigi_after_night
izumin5210
4
460
DevDay2025-OracleDatabase-kernel-addressing-history
oracle4engineer
PRO
6
1.6k
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Building Applications with DynamoDB
mza
95
6.4k
Visualization
eitanlees
146
16k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.5k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Optimizing for Happiness
mojombo
378
70k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
840
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Making the Leap to Tech Lead
cromwellryan
133
9.3k
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!