Skip to content

Comment on Tessel: A microcontroller that runs JavaScript

Comments

I wonder how the timing on the micro-controller is. Is the JavaScript still async? While JavaScript +/-10ms is fine on a computer, when messing with signals that really limits you. Mind you this could be overcome by adding some flag before the code to specify it to be run synchronously...or something like that.

nothing in Javascript fundamentally forces IO libraries to be asynchronous, it's just that the domain in which JS is used (Node or Browsers) tend to have a lot of async IO due to networks.

nothing in Javascript fundamentally forces IO libraries to be asynchronous

Javascript inherently relies on highly non-deterministic heap allocation, deallocation, and garbage collection. None of these are conducive to real-time IO. You can not make strong guarantees about javascript execution time.

They probably partially get around this by having all the important IO stuff done in C, but then that's not really a javascript microcontroller, is it?

It's not clear to me exactly how it came about that javascript is asynchronous. My suspicion is that in the earliest days, javascript was single-threaded simply because that made the implementation simpler.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.