parlour
value-object-in-ruby-benchmarks
parlour | value-object-in-ruby-benchmarks | |
---|---|---|
1 | 1 | |
88 | 3 | |
- | - | |
2.3 | 6.1 | |
about 9 hours ago | about 1 month ago | |
Ruby | Ruby | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
parlour
-
Sorbet Compiler: An experimental, ahead-of-time compiler for Ruby
(disclaimer: I work on the Sorbet team)
I think I understand GP's motivation: RBI files and RBS files are two different formats, and as a user of the language, people tend to want to use the officially blessed solution the language provides.
In case you weren't aware, parlour[1] is a popular open source project for working with RBI files. I believe it supports transparently converting between RBI files (Sorbet) and RBS files (Ruby 3).
There is also rbs_parser[2], a C++ parser for RBS files to convert them to RBI files, written by Shopify, a major user of Sorbet.
Stepping back: I haven't personally read many complaints from Sorbet users describing how the current state of RBI/RBS interop gets in the way of what they can actually do with Sorbet. Almost all the feature requests we get about Sorbet (both inside Stripe and outside) are for fixing bugs or implementing new language-level features. RBI files as implemented seem to work.
Sorbet already has an extensive set of RBI files covering the Ruby standard library (at least as good or better to my knowledge than any existing repository of types for RBS files), and there are plentiful tools for working with RBI files, listed here.[3]
If lack of first-party RBS support in Sorbet is holding you back from trying Sorbet, I'd strongly encourage you to give Sorbet a try anyways! Many people have shared great experiences adopting Sorbet in their Ruby codebases.
[1] https://github.com/AaronC81/parlour
[2] https://github.com/Shopify/rbs_parser
[3] https://sorbet.org/en/community
value-object-in-ruby-benchmarks
-
Micro benchmarking value objects in Ruby: Data.define vs Struct vs OpenStruct
I added all code and results in a repo at https://github.com/lucianghinda/value-object-in-ruby-benchmarks
What are some alternatives?
rbs_parser - Ruby RBS parsing and translation to Sorbet RBI
benchmark-ips - Provides iteration per second benchmarking for Ruby
crystal - The Crystal Programming Language
Ruby on Rails - Ruby on Rails
sorbet - A fast, powerful type checker designed for Ruby
sord - Convert YARD docs to Sorbet RBI and Ruby 3/Steep RBS files
graphql-benchmarks - GraphQL benchmarks using the-benchmarker framework.
microjit-bench - Set of benchmarks for the YJIT CRuby JIT compiler and other Ruby implementations.