Devchat.tv Episode Roundup
Devchat.tv Episode Roundup
Devchat.tv
Aug 1, 2017 · 57 min

RR 321: Visual Studio Code Ruby Plugin with Penn Lv

MP3
RR 321: Visual Studio Code Ruby Plugin with Penn Lv
This episode of Ruby Rogues features panelists Dave Kimura, Brian Hogan, and Charles Max Wood. Two special guests join the panel today: Eric Barry and Penn Lv. Tune in and learn more about Visual Studio Code’s Ruby Plug-in!
Eric turned over Teach Me To Code to Charles, which helped build relationships for Charles that built the Ruby Rogues podcast. Eric is a software engineer who has been working in programming since 1998. He works for Skipio and has been a Ruby on Rails developer for nine years.
Penn is a software engineer for Redim. He works on the Ruby extension for Visual Studio Code. This extension deals with enhanced Ruby language support.
Usually when you try to build an extension for VS code it is just a NodeJS application. It has nothing to do with electrons; it is just a Node application. Everything is run in a separate process. Just about how to build an extension for VS code.
The first category is formatters, or colorization. For both of those you can write plain JavaScript. There are two categories that are difficult: first is de-buggers. The VS code is a set of common UI for de-bugging. Which is language diagnostic. Write an extension and hook up language debug.
The second is a language server to write language experience. VS code has a concept called language server protocol. Need to write an extension that follows protocol and tells the VS code about semantic information about your program.
Yes, have to run that in a stand-alone process. It analyzes Ruby, but it can’t run that in Node JS process.
Ruby for VS Code was his ticket to the VS code team. Penn wrote for himself. It is his hobby project.
It is a community project. There are probably in between 50 to 100 contributors.
It is challenging to know what to allow. Penn claims to still not be a professional Rubyist. The first step is to run test cases. His way of reviewing code is by downloading the code. He looks into every piece of the code, learns it, and plays around it. If it works, he adds it.
Every weekend he goes through everything. He will have maybe five to six VS code extensions and check them thoroughly.
Two months ago he finished a feature dealing with auto indentation. The option for this is called editor.autoindent. Indentation gets adjusted automatically while you type.
Charles recommends Emacs key bindings and Penn recommends the VS code extension Vim.
Yes. At the very beginning they were using JavaScript. They were one of the first adopters of TypeScript and are now all TypeScript.
The setup of TypeScript is not easy. If you are using a NodeJS application and they have TypeScript or typing support there is no specific thing that needs to be done to make it happen. In VS code there is a feature called automatic type acquisition. If creating a new project that uses an express package, which already has a typing file for it. VS code provides you with auto complete. Also don’t need to worry about typescript file if you are not going to create a library. Can do TypeScript gradually.
A language server is the missing part.
No one does that right now. RubyMine has the best support currently.
Atom has basic support for Ruby but it is just about colorization, indentation, and formatters. Everyone is waiting for a language server for Ruby.
Users cannot customize that. A language support extension has to handle that.
Source code pro
First go to code.visualstudio.com. Then, install VS code. At the welcome page instructions will show you how to use the command palate, give you an interactive playground, and show the best place to get familiar with everything. The welcome page also has links: one is VS tips and tricks, which are shared by the community. There is a Youtube channel, which shows how to make VS Code productive.
There is a docs session on the website that tells you how to write extensions for VS Code. Penn thinks if you build a debugger it is most difficult. There needs to be an understanding of real debuggers. Look at some of existing debugger, understand how they read source code, get an understanding from there.
First looked at Python. Then switched to PHP, which is pretty similar to the Ruby extension. The protocol is very similar. That’s how he learned to make the Ruby extension.
The organization name is Ruby IDE and GitHub name is vscode-ruby. There is a Wiki Page on how to setup and explain concepts behind everything.
A couple of hours. He was at his girlfriend’s parent’s house bored, got a job with VS code because of it.
Compared to some of competitors, VS code is fast. The best part of VS code is that it is open source. Everything is on GitHub, including issues and user feedback. Users know every issue that is being worked out. All information is open to users. Can file an issue and they will respond immediately.
There is an elm plug-in.
Picks
Dave:
Azure’s cognitive services
Brian:
OmniFocus
Eric:
Hugo
Netlify
Code Sponsor
Charles:
Building stairs
Upwork
Penn:
The Text Editor Sam by Rob Pike
Ruby Weekly

Episodes play from the podcast's own servers, unmodified. Not affiliated with Podbay.