[1] http://micropython.org/ https://github.com/micropython/micropython/
[1] http://micropython.org/ https://github.com/micropython/micropython/
It seems those who already know Python want either the whole Python language, or not Python at all. I guess it's easier to learn a whole new language, than to use a language you already know but where some parts are suddenly off-limits?
Depends on whom you ask I guess. The subset implemented is fairly big imo. Maybe I just got lucky but I never really missed something, and looking at the list of differences [1] that might be because most of them are rather obscure/fancy features which I usually tend to avoid anyway or don't even know exist (multiple inheritance, attributes for functions just to name some) or else can be worked around.
[1] http://docs.micropython.org/en/latest/pyboard/genrst/index.h...
The issue is everyone has this “great idea” for an embedded language to replace C which means device headers in the Lang, and that’s way too much to support.
If the goal is to replace C imo it’s a waste of time. But there is a market IMO for an embedded lang that you can execute tests and scripts from C in a VM that can foreign function interface back to C functions.
There is on that uses JS called mJS but I found the one of the guys that supports it to be extremely rude and unhelpful. Documention is lacking. You basically need to be an expert in JS to get started. And then they doubled their ROM use age from 23k to ~50k. But it does seem to be the best out there for the goals I stated.
I’m still on the hunt.
The other target is trying to embed some interpreter in a larger application, which ends up being mostly constrained by how nice the language is as well as how nice the C API barrier ends up being.
C is certainly not going anywhere, but it is pretty cool that other options are being built to lower the barrier of entry for some application domains.
I've done some poking at various embedded JS frameworks like Duktape and it's pretty easy to trip on various memory leaks[1] that make it really hard to recommend it as a viable platform for memory constrained spaces.
[1] http://point.davidglasser.net/2013/06/27/surprising-javascri...
http://metasepi.org/doc/metasepi-icfp2015-arduino-ats.pdf
Chez Scheme used to run on 8-bit platform, too. Then there's Pascal and BASIC dialects for microcontrollers. Astrobe has Oberon dialect for ARM Cortex's. AVR-Ada lets you use Ada with AVR's. OcaPIC put Ocaml subset on PIC microcontrollers.
People are using C because most people already use C with the ecosystem benefits that follow. Although C and assembly are dominant, there are other options available if people think their pro's and con's line up with their needs.
I'll try to use in my next embedded job, where they do just C.
But keep in mind that even MicroPy recommends 256k ROM, which is before your program at all, that excludes nearly all Cortex M series and 16 and 8 bit micros. So that’s what brought me to Pi in the first place.
This and JerryScript (https://github.com/jerryscript-project/jerryscript) are the two most active embedded JS engines.
eLua is famously used in the https://en.wikipedia.org/wiki/NodeMCU firmware for the ESP8266, a non-Arm based system.
[1] https://ziglang.org/But wren and Potion are much smaller. Wren added a nice work-stealing native-thread scheduler on top of potion.
Also, mruby has the benefit over most of these other languages of having had a recent thorough security audit[1].