Ruby to Javascript

Someone in one of the German forums (http://rpgmaker-vx-ace.de/board52-spieleentwicklung-maker-übergreifend/board10-diskussionen/p46567-rpg-maker-mv/#post46567) gave this link:

http://opalrb.org/

I haven't checked it myself, so I can't say anything about the quality or how it works - but it might be something that helps the transition to RMMV and Javascript
I'm actually not certain how well this would work as we are not certain how the built in scripts are set up yet. I'm thinking that the best way to avoid compatibility issues is to just rewrite scripts by hand made in Ruby to JS (once MV comes out so we know which functions to use and stuff). 🙂  
While that tool converts Ruby to valid Javascript, there's still the fact that the "JGSS" will be different from RGSS3 in the same way that the RGSS3 was different from RGSS2, so it will be very hard for a script to work properly when converted.
This version is so different for sure, javascript just likes other way of working.

It is better to code in javascript, still I gess if you really miss ruby, you may want to use opal
It seems to work nicely but It's probably best to do the editing yourself, so you will have understanding of what you're writing. I guess someone would use this if They simply don't have the time to translate a script to javascript by hand or they don't have any knowledge of javascript and not willing to learn.
There is absolutely no point to this, rgss3 didn't work with rgss2 and so on...  javascript is a completely different language and syntax compared to ruby, it's not going to be an easy conversion and should be rewritten from the ground up for compatibility sake. 
Even if you somehow make it work, the converted code is pretty much impossible to read. If you test the example, you'll see what I'm talking about. Scripting like this will be so tedious that you might as well just learn JavaScript.
I find it more fun to convert them manually...
If anyone is looking for a nice middle-ground between Ruby and JavaScript, you might want to consider CoffeeScript which has a nice looking, Ruby-ish sort of syntax (it was created by a Rubyist and popular in the Ruby on Rails community). It really makes up for a lot of the stuff that JS is lacking, and of course, no annoying curly braces and semi-colons littered everywhere throughout your code. Just be careful with your indentation because it actually matters (like in Python). If you do use it to write your scripts, I would still recommend getting familiar with JavaScript first so you can understand the compiled output. Luckily, unlike Opal, the JS that gets produced isn't that complicated... most of the time.

Other compile-to-JS language alternatives include:

  • ES2015 aka ES6 - Basically the newest version of the JavaScript standard, currently implemented by Babel. It borrowed quite a few features from CoffeeScript, but it still has very little syntax sugar so it's still nowhere near as pretty or concise. Still, Babel is gaining far more favor in the web-development community than CoffeeScript ever did (not surprising since it's official and backwards compatible with previous JS syntax). Actually, if RMMV uses the V8 JS engine/Node.js, then there's a good chance that some ES2015 features will be usable directly (i.e. without any extra compilation step). If you wanted to transfer your skills over to web development in the future then this would probably be the way to go.
  • LiveScript - A somewhat popular offshoot of CoffeeScript with slightly different syntax and features.
  • TypeScript - Brings static typing to JavaScript. If you don't know what that means or why you'd want it, don't worry about it.
Just something to think about for those coming from Ruby with no JS experience.
This is a very real thing that actually does work. You can write ruby code and it compiles to javascript code. theres also engines to compile C code to javascript. Now with you guys dealing with RGSS it wont work.  because you would be calling on RGSS methods that do not exist in the new javascript code for MV

Original thread: https://forums.rpgmakerweb.com/threads/ruby-to-javascript.43495/