Hello all,
I'd like to take a moment to let you know about some upcoming changes that have been keeping us busy for the last couple of months.
In the past, we've used an engine for the scripts that supported ECMAScript 5 and some homegrown system for dependencies and other things. As JavaScript changed a lot in the past couple of years, many of the users are now using most of the languages features that ECMAScript 6 (ES6) brought and are familiar with them. When writing scripts for the SinusBot, many of the heavy ES6 users are quite confused as there is no support for arrow functions and such in the engine we're using.
Sooo, the next version (should everything run fine and no real blockers remain) will have a completely new engine based on v8 - that's the same engine that is powering the Chrome browser. That brings most of the good and new JavaScript stuff you might be familiar with to the bot.
When is it coming?
There's a running alpha version that supports most of the features the bot had before and most scripts will probably run without a problem, but there's still a lot to check in regards to memory and cpu consumption as well as some of the more exotic functions. If everything works as expected, a "stable" version can be as near as a couple of weeks - if not, well...
Will we have breaking changes?
Probably just a few. I'd like to streamline some things like sharing functionality between scripts. It was possible via engine.export() / require / on('load') before and will most likely be changed to module.exports / require with at least basic dependency management (the exports / require part is already working). That's what more people are familiar with, so I think that makes sense. I'd also like to make it possible for scripts to be split in separate files (this has been requested a lot in the past), so for that there will be modules like in node.js - you get a dedicated folder instead of just a file named "scriptname.js".
Another thing that will most likely change is the privilege system. If you want to use restricted modules (like for example the net module), there should be an easier way to allow that than editing the config.ini.
I'm planning to release a couple of internal versions in the next couple of days - so if you're into JavaScript and interested in helping out with testing, please let us know so we can add you to the "Insiders"-group.
What do you think? Do you have any ideas for improvements? Please let us know.
Have a Happy New Year 2019!
-- flyth
I'd like to take a moment to let you know about some upcoming changes that have been keeping us busy for the last couple of months.
In the past, we've used an engine for the scripts that supported ECMAScript 5 and some homegrown system for dependencies and other things. As JavaScript changed a lot in the past couple of years, many of the users are now using most of the languages features that ECMAScript 6 (ES6) brought and are familiar with them. When writing scripts for the SinusBot, many of the heavy ES6 users are quite confused as there is no support for arrow functions and such in the engine we're using.
Sooo, the next version (should everything run fine and no real blockers remain) will have a completely new engine based on v8 - that's the same engine that is powering the Chrome browser. That brings most of the good and new JavaScript stuff you might be familiar with to the bot.
When is it coming?
There's a running alpha version that supports most of the features the bot had before and most scripts will probably run without a problem, but there's still a lot to check in regards to memory and cpu consumption as well as some of the more exotic functions. If everything works as expected, a "stable" version can be as near as a couple of weeks - if not, well...
Will we have breaking changes?
Probably just a few. I'd like to streamline some things like sharing functionality between scripts. It was possible via engine.export() / require / on('load') before and will most likely be changed to module.exports / require with at least basic dependency management (the exports / require part is already working). That's what more people are familiar with, so I think that makes sense. I'd also like to make it possible for scripts to be split in separate files (this has been requested a lot in the past), so for that there will be modules like in node.js - you get a dedicated folder instead of just a file named "scriptname.js".
Another thing that will most likely change is the privilege system. If you want to use restricted modules (like for example the net module), there should be an easier way to allow that than editing the config.ini.
I'm planning to release a couple of internal versions in the next couple of days - so if you're into JavaScript and interested in helping out with testing, please let us know so we can add you to the "Insiders"-group.
What do you think? Do you have any ideas for improvements? Please let us know.
Have a Happy New Year 2019!
-- flyth