Re:Tessel, a NodeJS-based microcontroller
by jffry on Thursday September 05, 2013 @10:11AM
(#6334273)
Tessel actually transpiles JavaScript into Lua, which is what is actually running on the device.
[ Parent
| on HN ]
Re:Tessel, a NodeJS-based microcontroller
by gruseom on Thursday September 05, 2013 @01:16PM
(#6335418)
In 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.
Re:Tessel, a NodeJS-based microcontroller
by legutierr on Thursday September 05, 2013 @11:21AM
(#6334704)
That's cool. Do you know what library they use to do the translation?
Re:Tessel, a NodeJS-based microcontroller
by jffry on Thursday September 05, 2013 @12:50PM
(#6335232)
I don't, but their FAQ says that they will be open-sourcing their code and hardware.
Re:Tessel, a NodeJS-based microcontroller
by jnbiche on Thursday September 05, 2013 @11:30AM
(#6334753)
Oh, way cool. Did you build the transpiler in-house?
Re:Tessel, a NodeJS-based microcontroller
by jffry on Thursday September 05, 2013 @12:49PM
(#6335226)
I 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!)