I’m proud to be involved in the Ruby community.
I want to do what I can to help other developers discover Ruby. Whether that’s seasoned non-Ruby developers or people like me who stumble into programming, I want to help.
As part of that, I’ve recently started on a project to help people learn Ruby. The final form will be a free set of guides (and maybe videos) to help people get started with the Ruby language. (More on that another time)
While working on this project, I spent some time thinking about how I could help get people writing Ruby quickly.
It’s not difficult to install Ruby on your computer. However, I remember as a beginner it was more involved than I anticipated, being a “non-programmer” at the time.
One of my first experiences with Ruby was using Try Ruby. (The fourth iteration of TryRuby lives here.) Try Ruby is a quick Ruby tutorial with the ability to run the Ruby code and get immediate feedback.
Inspired by that project, I want to bring a way to write Ruby code in the browser, and get immediate output.
I think this is especially valuable when teaching Ruby. The ability to hop in a browser, run some Ruby code and get immediate feedback is a win while learning Ruby.
Heck, even as a more “seasoned” Ruby developer I see value in this.
Wanting to bring this project to life lead me to collaborate with the most intelligent person I know, Will Glynn.
Today, I want to share run.rb with you. Naming is hard, so I pronounce this “runner bee.”
When you visit run.rb and run Ruby code, your code never leaves the browser. Will, once again- a freaking genius, helped me compile Ruby 2.6.0 into WebAssembly.
Your Ruby code executes in the browser.
This project is still very much an early prototype.But I wanted to get it into the hands of others.
For example, our next step is to add Ruby’s Standard Library (which is currently not there) into run.rb. I’d also like to allow you to share your code snippets as a link back to run.rb.
So, please give it a spin. Let us know what we can do to make this better.