sorbet
solargraph
sorbet | solargraph | |
---|---|---|
53 | 16 | |
3,528 | 1,847 | |
0.2% | - | |
9.9 | 7.4 | |
2 days ago | 2 months ago | |
Ruby | Ruby | |
Apache License 2.0 | MIT License |
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.
sorbet
-
The Design Principles of the Elixir Type System
Not part of the official language spec, but Ruby has Sorbet, from a company who employs Ruby core contributors and helped with the recently released JIT additions to the language, amount countless other contributions over the last couple decades.
https://sorbet.org/
- Почему я программирую на Ruby
-
Bringing more sweetness to ruby with sorbet types 🍦
First let's introduce the tool: Sorbet is a gem developed by Stripe that aims to bring type notation syntax and type checking support for the Ruby ecosystem by utilizing the "Gradual typing" philosophy, it also provide type generation from YARD comments via the tapioca gem, allowing to grow alongside the already built Ruby codebase.
-
An Introduction to Metaprogramming in Ruby
We have hundreds of thousands of lines of ruby code spanning many services / monoliths. Even now I find it somewhat annoying to open a controller / component that is basically an empty class def but somehow executes a bunch of complex stuff via mixins, monkey patches etc, and you have to figure out how.
We are turning to https://sorbet.org/ to reign in the madness. I'm keen to know if others are doing the same, and how they are finding it (pros and cons)
- A few words on Ruby's type annotations state
-
Is Ruby on Rails still in demand?I see very few companies using it.Is it used in big tech companies like Google,Amazon,Facebook,Microsoft?
According to https://sorbet.org/ , the vast majority of code at Stripe is written in ruby.
-
¿Que lenguaje de programación consideran que no está saturado?
Caso de Stripe, que tuvo que inventar Sorbet para tener type checking en ruby.
- Building GitHub with Ruby on Rails
-
RJIT a New JIT for Ruby
> I guess what I'm asking is: do you see a future where there is more explicit control afforded to people who want to pick their own tradeoffs without resorting to writing everything performance-sensitive in extensions written in C/Rust/whatever?
An approach exists already in the present, and it's Stripe's Sorbet AOT compiler (https://github.com/sorbet/sorbet/tree/master/compiler).
-
Has Ruby actually increased the speed significantly?
That's incorrect. You may be thinking of Stripe, and AFAICT it's not very actively developed anymore: https://github.com/sorbet/sorbet/commits/master/compiler
solargraph
-
A few words on Ruby's type annotations state
My favorite typing solution so far in ruby is Solargraph https://solargraph.org/.
-
Nice Ruby IDEs
Solagraph: https://solargraph.org
-
Using SyntaxSuggest with Solargraph LSP!
Yay! For those who don’t know solargraph provides a language server protocol (LSP) for Ruby so that your IDE (like vscode) can know more about the code you’re writing https://solargraph.org/.
-
Ruby Delights Built into the Language: No Gems Required
If you're looking for IDE-level language assistance, I can't help you, but since you mentioned nvim: I use regular vim with CoC / Conquer of Completion (vim plugin; LSP server, may not strictly be necessary for nvim), Solargraph (Ruby Gem; language server), and Rubocop (also a Gem) for linting. I previously/still use ALE (vim plugin; Asynchronous Lint Engine) because I haven't gotten CoC+Solargraph to play nice with Rubocop, probably due to something silly.
https://github.com/neoclide/coc.nvim
https://solargraph.org/
https://rubocop.org/
https://github.com/dense-analysis/ale
My impression with all of this running under MacVim... it's plenty responsive. It can take a while for Solargraph to index everything on startup if you're working in a big project; once it loads, it's snappy. (There's probably a way to cache that startup scan.)
-
I need help with lsp-mode setup
I am trying to use lsp-mode for ruby via solargraph and for Rails era templates using web-mode via lsp-tailwindcss and both seems to kinda sorta work but neither one is really giving me all the features that I see that others have.
-
State of the Ruby language server (LSP) ecosystem / looking for suggestions
https://github.com/castwide/solargraph Seems to be the most mature/developed one. Slow on my system, bad documentation. Language docs are shipped as "cores" you imperatively download that float around in your home directory; this is messy and prone to failure. Doesn't have any docs for versions of ruby past 2.7.
-
Trouble With Solargraph Completions
I have recently installed Solargraph and can see that when I open a Ruby file that the LSP is attached to my buffer via `LspInfo`. However whenever I am trying to do some very basic completions or see what kind of methods are available for an object, literally nothing happens. What I am aiming for is something like on the official Solargraph website: https://solargraph.org/
-
Linting and Auto-formatting Ruby Code With RuboCop
If you use Vim or Neovim, you can display RuboCop's diagnostics through coc.nvim. You need to install the Solargraph language server (gem install solargraph), followed by the coc-solargraph extension (:CocInstall coc-solargraph). Afterwards, configure your coc-settings.json file as shown below:
-
anyone here using neovim for ruby on rails projects?
The builtin LSP works well with solargraph to provide autocompletion.
-
Sorbet: Stripe's Type Checker for Ruby
Sorbet and/or RBS seems like they may be the future given how popular typescript is with JS programmers these days. There are some other projects that assist programmers without relying on formal type definitions in the source or shadow typing files:
Solargraph combines inference and insight from YARD docs (standard for many gems, plus Castwide has written more YARD for the standard library) to make some pretty good guesses. Crucially it has plugins that add the insights from popular gems with static analysis (e.g. reek, rubocop). I maintain solargraph-rails, which parses your Ruby to make guesses about (surprise) Rails.
The typeprof gem can help IDE plugins make typing guesses based on your tests. This project is interesting to me because it's going into Ruby 3.1 so I think it reflects awareness from the core ruby team that many programmers are not ready to add types to their code.
solargraph: https://github.com/castwide/solargraph
What are some alternatives?
vscode-solargraph - A Visual Studio Code extension for Solargraph.
ruby-lsp - An opinionated language server for Ruby
rbs - Type Signature for Ruby
steep - Static type checker for Ruby
rubocop - A Ruby static code analyzer and formatter, based on the community Ruby style guide.
vscode-ruby - Provides Ruby language and debugging support for Visual Studio Code
noclip.website - A digital museum of video game levels
Roda - Routing Tree Web Toolkit
tapioca - The swiss army knife of RBI generation
TypeORM - ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
content - The content behind MDN Web Docs
vscode-ruby-debug - A Ruby debugger.