Hi David,
You look at Espruino’s compiler, and it was clearly written in
a swashbuckling style:
Thanks for the links. At this point though my C knowledge isn't
sufficient to comment either way.
However, I will share that I have a class of 3-6 graders (22 kids aged
8-11 years), who are all quite happily coding on the Espruino platform
(actually a port of the Espruino platform to the ESP8266), without any
problems. This is just a regular class of kids, only 2 are what I'd
call geeks. (I'm a volunteer parent at the school). And, we're using
real hardware, on breadboards, not plastic toy parts.
I don't know of any other embedded platform capable of supporting that
use case, or that abuse, do you?
I mean, that's literally the ultimate newbie scenario - completely new
to programming!
So, personally, I'd look to Gordon's work as an good example of
trade-offs that work, from an end-user perspective, just saying.
i.e: if he's not doing it the way others are, and his way works, then
it's probably worth pausing to consider, no?
that's my gut feel, I could be wrong.
Just to clarify here: when I say swashbuckling, I mean it as a
compliment. :-) Gordon has done a great job with Espruino, and as you
point out, he’s done an excellent job directly supporting the boards
and making them _usable_ out of the box. He’s really the first one to
do that, and he seems committed to his ideas and able to turn them into
something very cool. Which probably means he’s already worked around
many of the corner cases. I would love if Espruino could migrate onto
the Mynewt core.
The OS provides a lot of the functions that Espruino currently
implements for each platform, meaning we really only need the core from
the project (we will have drivers, HALs and BSPs.) Jerryscript is just
the core, and while it’s slightly less optimized, it also hasn’t
made as many trade-offs for the smaller systems. I’m merely
speculating though — it will be interesting to see what David thinks
when he digs into it. :-)
Have you taken a look at the other JS engines: V7, KinomaJS, Duktape,
Tiny-JS?
V7 is GPL, and the code is all one file: whenever I see networking
support and an AST (syntax tree) implementation in the same file, it
stops my motivation to dig further. KinomaJS is targeted at higher end
systems from what I can tell.
Duktape looks pretty cool -
http://www.slideshare.net/seoyounghwang77/js-onmicrocontrollers was
interesting. I hadn’t dug into it much, I’ll take a look. Tiny-JS
was GF’s first attempt, I think Espruino would be a better choice.
Best,
Sterling