5 ms·
Ruby's a great language- I've always enjoyed its ergonomics and clarity. But its editor tooling hasn't kept up with its one-time competitor, Python. I've mostl
by xavdid 2y ago
Ruby's a great language- I've always enjoyed its ergonomics and clarity. But its editor tooling hasn't kept up with its one-time competitor, Python.
I've mostly been in the Python ecosystem for the past few years and the LSP investment from Microsoft has really shown. Rich Python support in VSCode is seamless and simple. Coming back to Ruby after that caught me off guard - it feels like I'm writing syntax-highlighted plain text. There's an LSP extension from Shopify, but it's temperamental and I have trouble getting it working.
Editor support isn't everything (the actual language design is still the most important), but it definitely affects how eager I am to use it. I basically never choose Ruby over Python given the option, which is too bad. Ruby's a cool language!
- anothername12 2y agoThe “editor tooling” in Jetbrains’ Rubymine is fabulous.
- xavdid 2y agoThat's true, I've heard good things! I don't use Jetbrains products, but I'm glad they work well here.
- anothername12 2y agoYeah I think they have some special sauce that puts them a bit ahead of what LSP-based. Definitely check it out
- rafamvc 2y agoIt got a lot better recently. You should take a second look.
- xavdid 2y agoI mean, I was trying to set up editor support for a Ruby script last week. So unless it was improved really recently, it's not where I'd like it to be.
- manume 2y ago> but it's temperamental and I have trouble getting it working. > I was trying to set up editor support Not sure what problems you had exactly, but saying that editor tooling is bad, simply because you can't get it to work, is not fair. I've been using the LSP from Shopify since it came out, it works great, is very stable and updates come in on a regular basis.
- trevor-e 2y agoI tried last month and it was still a mess. The old Ruby extension used to work fine and the new LSP one from Shopify doesn't want to work for whatever reason.
- manume 2y ago> ... the new LSP one from Shopify doesn't want to work for whatever reason. Sorry, but calling it "a mess" simply because you can't get it to work is quite unfair. I've been using the LSP from Shopify since it came out, it works great, is very stable and updates come in on a regular basis.
- trevor-e 2y agoI would say it's quite fair. It's not just me but several coworkers, other people in this thread, and reviews on the actual VSCode extension itself. I sank several hours trying to fix whatever issue it has with my system and continued to run into problems. I'll give it another shot when I'm back on Ruby projects.
- mega-tux 2y agoLove the Shopify effort on the LSP, I even reported issues. But, no, it's not stable or easy to setup unless you use it on specific scenarios. Also I have very high cpu usage nas crashes every day.
- barrell 2y agoFunny, I have the complete opposite experience with python. Constantly turned off inline errors and warnings because they were almost always wrong - packages I installed “could not be found” by the LSP, it constantly worried about type issues that were no longer incorrect, it didn’t pick up function changes across files, etc etc. Then you think “maybe I just have the wrong lsp” only to realize there are half a dozen that all behave differently and nobody can agree on. I tried them all, they all turned even my simplest of scripts between 10-50% red. I think half of my ire towards python came from the fact that the LSP situation was so awful, I just had to get used to reading code with a bunch of “errors” in my face, or turn them off completely… I could never decide which was worse
- globular-toast 2y agoHmm... I use python-lsp-server and it just works almost every time. The main thing is your editor being aware of your venv. Which editor do you use? I use direnv and the direnv support in Emacs so each project has its own venv, then install the project plus all dev dependencies (like type stubs) in that venv. The LSP server itself is installed globally, though.
- lucasoshiro 2y agoFor both Ruby and Python most of time I use Emacs without an LSP, and it works better with Ruby than Python. I never search _exactly_ why Ruby became so less popular than Python, but I think that at least two things: - Having its popularity too much dependent of Rails; - Not having any other killer app (e.g. Python is not only Django, but NumPy, TensorFlow, Pandas, Flask and so on); So, even if I love Ruby, Python is still my main language for most of things as it has a huge ecosystem and it is easy to use. But for writing shell scripts the advantages that I mentioned in the article generally I don't care too much about those things.
- portpecos 2y agoEven from a systems perspective there are more tools available in Python. Pyroute2 vs netlinkrb which was last updated 8 years ago and only does a few things. It’s sad because ruby had the potential, but ruby developers prefer to focus on the Rails ecosystem.