3 ms·
Tessel actually transpiles JavaScript into Lua, which is what is actually running on the device.
by jffry 13y ago
Tessel actually transpiles JavaScript into Lua, which is what is actually running on the device.
- legutierr 13y agoThat's cool. Do you know what library they use to do the translation?
- jffry 13y agoI don't, but their FAQ says that they will be open-sourcing their code and hardware.
- jnbiche 13y agoOh, way cool. Did you build the transpiler in-house?
- jffry 13y agoI don't work for them, I just read the FAQ at the bottom of TFA: | What's running JavaScript under the hood? | We're currently running a custom-built, real time operating | system on top of a Lua Runtime. Your JavaScript is compiled | to Lua bytecode when you push your code, and that bytecode | is run on the runtime. It's this runtime that allows us to | have such low memory overhead. We may switch over to an | implementation of Libuv or a microLinux flavor in the future, | but that shouldn't change anything about the user experience | with Tessel (except it will be faster!)
- gruseom 13y agoIn that case they've buried the lede, as this is arguably more noteworthy than the microcontroller. Has anyone done a production-worthy JS-to-Lua compiler before? The idea has come up many times because the two languages are so similar. But I've not seen anything as complete as what they must have if they're running Node. (What about the non-JS parts of Node? Can those just be handled with a standard compiler?) JS-to-Lua might not be well-suited to this sort of platform, since it is so easy to just write Lua instead. But it would be useful if you want to get existing JS code running on new hardware, or if you want your program to be able to run in a web browser as well.