Thanks for your questions, I’ll try to answer them in order.
What global objects are available besides misty ?
There are no other system global objects.
Is there a maximum size of the uploaded JS file ? e.g., what happens if I upload a file that has size 64 MB?
As for the comments in the post you referenced…
code.mistyskills.com is not a Misty product. A community developer wrote their own client tool for writing and deploying scripts, so I can’t speak to the functionality of that tool.
We have not seen this issue, so if this is still happening, please let us know and we can look into it.
The way callbacks work is unusual. From the docs, nothing like a normal callback is in the API, only named callbacks.
SetTimeout and setInterval aren’t available. Both myself and the person working next to me immediately wanted to use these functions, as it’s the natural way to do something that appears “autonomous”.
Since there is no browser and no DOM, setTimeout and setInterval are not implemented by default. We attempted to give you the same functionality with the timer events.
Implement console.log yourselves, it’s not a protected function, and you can implement it in terms of misty.Debug.
console.log prints data directly to the console. misty.Debug sends websocket events that a user must register for and process, so they aren’t actually the same thing since the code is not actually running in the browser.
At the time of development, Chakra was supported on the IoT device (and Node was not) and it is actually the direction that Microsoft recommended. Unfortunately they have deprecated Chakra since then, which was a surprise for us as well. I am not familiar with Babel, and am not completely sure what they are recommending here, sorry.
I assume this was referring to examples on the community site and I agree. People should certainly use try/catch statements in your code where appropriate.
Use Promises for one-off asynchronous code (like misty.GetAudioList())
Promises have the same threading issue as the callbacks did on the robot. With a system that is receiving events all the time from the robot, it blocked the handling of those events until promises returned, causing skills to not work.
Use an addListener/removeListener style API for pubsub-like APIs.
I believe this recommending changing the style to camelCase instead of PascalCase. It is certainly something we have discussed, but hasn’t made it to the top of the list yet.
I hope this answered your questions, thanks!