MicroPython running “bare metal” in the browser via unicorn.js
forum.micropython.org
forum.micropython.org
It's a cool way to quickly test out performance and iterate on micropython scripts built for microcontrollers; not a python engine in the browser, sandboxed and running instructions directly.
Some bits on how eLua compares with MicroPython from their comparison page[1]:
> eLua, with LTR patch, boasts only 5.42K RAM usage after book, down from ~25K with unpatched Lua. (ref: http://www.eluaproject.net/doc/v0.9/en_arch_ltr.html). uPy offers ~540 bytes usage after boot (10 times less than patched eLua), and truly can boot and accept commands with 2K heap.
[1]: https://github.com/micropython/micropython/wiki/MicroPythonV...
I don't think "bare metal" means what you think it means.
I tried to the whole thing in a VM, so I can attest that it works on """bare metal""", as well.
http://pypyjs.org/ , https://github.com/pypyjs/pypyjs
Sadly, current implementation is buggy and has not been updated for 2 years.
We find this approach works fine, assuming you have a stable internet connection.
>>> sum(x for x in range(100000))
did not complete even after several minutes.
You can probably iterate more rapidly on the emulator; it's not like this and real hardware are mutually exclusive, just as using, say, an Android emulator in development and also real devices aren't mutually exclusive, but things people do together.
“Wouldn't X be better?” is only meaningful if the options are mutually exclusive.
A nice thing about MicroPython is that you only need to flash the chip once - at least if it has enough flash storage to support a file system. Once flashed, you can work on a REPL (over either UART or WLAN) and write files.