parlour
sord
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
sord
-
How do you document your code?
I tend to follow along using the YardDoc comment style. It has many small things I love about it; an example is when yardoc is followed it can be used to generate RBS/Sorbet type files with the sord gem, you can also generate application documents similar to rdoc/sdoc.
-
Ruby compiler is now 22–170% faster than Ruby's default implementation for Stripe's production API traffic
You may be interesting in checking out the Sord gem. If you do YARDOC based comments and documentation in your code not only does it make your code pretty easy to understand. But you can also generate Sorbet RBI and Ruby RBS files based off of your documentation. It's pretty much a require in any new project I start working with.
-
Do people use type signatures for ruby actively?
I love using yard as well and if you use it you can use sord and based on you yard annotates it'll build sorbet types for your code. I've used it on my last few projects and it's helped building your types setup amazingly easy.
-
Static Typing in Ruby 3 Gives Me a Headache (But I Could Grow to Like It)
Sord was originally developed to generate Sorbet type signature files from YARD comments. Sorbet is a type checking system developed by Stripe, and it does not use anything specific to Ruby 3 but is instead a custom DSL for defining types. However, Sord has recently been upgraded to support generation of RBS files (Ru*by **Signature*). This means that instead of having to write all your Ruby 3 type signature files by hand (which are standalone—Ruby 3 doesn't support inline typing in Ruby code itself), you can write YARD comments—just like with Solargraph—and autogenerate the signature files.
-
Ruby: How Can Something So Beautiful Become So Ugly
Why isn't anyone talking about Sord?? I see that as being a great solution. https://github.com/AaronC81/sord#example
-
Differences between Sorbet and RBS
Go for both until things evolve : https://github.com/AaronC81/sord
- the 'sord' gem can automatically generate .rbi and .rbs type signature files from YARD doc
What are some alternatives?
rbs_parser - Ruby RBS parsing and translation to Sorbet RBI
tapioca - The swiss army knife of RBI generation
crystal - The Crystal Programming Language
YARD - YARD is a Ruby Documentation tool. The Y stands for "Yay!"
sorbet - A fast, powerful type checker designed for Ruby
steep - Static type checker for Ruby
value-object-in-ruby-benchmarks - A series of micro benchmarks about Data.define vs Struct vs OpenStruct in #Ruby
rubydoc.info - Next generation rdoc.info site
yard-doctest - Doctests from YARD examples
yard-markdown - yard plugin to generate markdown documentation