• If you need help or want to discuss things, you now can also join us on our Discord Server!

Again, upcoming changes regarding the scripting engine

flyth

is reticulating splines
Staff member
Developer
Contributor
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
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Happy New Year!

Just removed the breaking changes for the modules, so transition should be really smooth between the engines now. :)
 

Everlike

Well-Known Member
Contributor
Hey,
nice to hear of these great changes! I´d love to test the new scripting-engine and upcoming versions of sinusbot as I find the time to!
If an application or something like this is required, please let me know.

What do you think? Do you have any ideas for improvements?
May Iam the only one, becouse Iam not a programmer or something like this and dont have great skills, but I would love an easier way to connect stored vars and arrays with an html file. For creating a webinterface for scripts, such as @Tunakill with his Rankingscript. I may just didn´t inform myself enough on how to do so... but yeah... don´t blame me for that. please.

And another thing which Iam not sure about if this is already implemented or possible in anyway. Just today I saw sinusbot takes up to 96% of my cpu. And I admit I have huge scripts runnig, but it would be interesting and also great for creating new scripts, how many cpu/mem and stuff each script takes.

Greetings
 

Diesmon

Tuetchen Dominator
is awesome!
Contributor
Insider
it would be interesting and also great for creating new scripts, how many cpu/mem and stuff each script takes.
Backing this, would like to see some more stats about the individuals tasks. But dunno if that is still possible to track in your sinusbot code.
 

PaInKiLLeR

Donor
is awesome!
@flyth

Dir/Euch auch ein gesundes neues Jahr ;)

Ein Feature was ich noch sehr vermisse ist das man Benutzer Konten an bestimmte Ordner verknüpfen kann so das nur diese darauf Zugriff haben,das wäre echt ein Highlight 😪

Ansonsten Danke noch mal an alle Plug-in Entwickler die Ihre ganze Arbeit kostenlos zur Verfügung stellen und dann auch noch hier einen 24/7 Super Support leisten 5**** 👍

Bleibt alle gesund und kommt gut durchs Jahr 😎

MfG Nico
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Just an update for everyone watching this thread: an alpha release with the v8 is available here.

but I would love an easier way to connect stored vars and arrays with an html file
It should actually be fairly easy, but yeah, documentation is lacking. There are a couple of scripts that use this, though.

how many cpu/mem and stuff each script takes
Such a feature is planned - though maybe not per script, but per instance.

Ein Feature was ich noch sehr vermisse ist das man Benutzer Konten an bestimmte Ordner verknüpfen kann so das nur diese darauf Zugriff haben,das wäre echt ein Highlight 😪
Mal sehen - das wäre schon eine deutlich größere Änderung. Jedenfalls nichts für die 1.0, sorry ;)
 

Nisutec

Donor
is awesome!
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.
Ich würde gerne beim Testen helfen. Muss man dafür irgendwelche bestimmten Voraussetzungen haben ?
 

olokos

Insider
Insider
I've seen there's a new update to Beta Sinusbot, I wanted to ask this question here
https://forum.sinusbot.com/threads/sinusbot-for-linux.260/page-16
but I can't post there, is that because I'm not insider? If so, how could I become an insider? I've tested all the latest released alphas already :p
anyway, I was wondering how much of a difference there is between alpha 7 and fresh beta1 scripts-wise?

I'm not sure if I should be really worried about scripts compatibility between alpha 7 and beta 1 as I suppose the warning about scripts compatibility was meant for those coming from 0.14 version(pre-alpha/beta).
 

flyth

is reticulating splines
Staff member
Developer
Contributor
but I can't post there, is that because I'm not insider?
It's because too many people would get email notifications when answering there ;)

I was wondering how much of a difference there is between alpha 7 and fresh beta1 scripts-wise?
None, the alpha 7 became the beta 1. The warning is only for those not coming from the 1.0 alphas as you guessed.
 
Thread starter Similar threads Forum Replies Date
flyth Announcements 5

Similar threads

Top