5 ms·
I can imagine this would be great if you want to have multiple tiny apps running on a small embedded device - even with some basic multi-tasking! This is actual
by bArray 5y ago
I can imagine this would be great if you want to have multiple tiny apps running on a small embedded device - even with some basic multi-tasking! This is actually super cool.
Literally just yesterday I was trying to find the equivalent for Java, byte code or otherwise. I want to attempt to run several nano JVM apps on an ESP32, but I'm starting to think that it might not be possible.
Many years ago now I ran a custom 'script runner' that fit into 512 bytes of assembly language for a custom kernel (that was also 512 bytes) [1]. I would really like to play with something like Elk and see what can be done!
[1] https://bitbucket.org/danielbarry/saxoperatingsystem/src/master/PROGRAMS/RUN/RUN.ASM https://bitbucket.org/danielbarry/saxoperatingsystem/src/mas...
- wyager 5y agoIt seems to me that embedded Lua would be a more appropriate choice, and barring that, there is already a quite robust embedded Python implementation. Don't get me wrong, this is a cool project, but I don't see why you would ever choose to use JS in an embedded context except for fun. The arguments for using lua or micropython are already very narrowly applicable.
- afavour 5y agoSeems inarguable to me that JavaScript is much more widely known and adopted than Lua. So it makes sense to use JS in 'toy' like environments where someone is learning an embedded platform.
- CameronNemo 5y agoJS is more common, but this is not a complete implementation. So those skills may not transfer 100%.
- saagarjha 5y agoBut they certainly will more than they would to a completely new language…
- wyager 5y agoI don’t understand why people are so focused on preventing anyone from ever having to learn a new language. If you already know JS, learning lua should be trivial.
- bArray 5y agoInteresting, could you link me the Lua and Python libraries you are thinking of?
- wyager 5y agoMicropython and eLua come to mind
- pjmlp 5y agoMicrosoft also considers JavaScript makes business sense. https://www.microsoft.com/en-us/makecode https://www.microsoft.com/en-us/makecode
- pjmlp 5y agoDid you look hard enough? https://www.microej.com/product/sdk/ https://www.microej.com/product/sdk/ https://developer.microej.com/supported-embedded-runtime-architectures/ https://developer.microej.com/supported-embedded-runtime-arc...
- seabird 5y agoIt doesn't take away from the point that the thing exists, but the licensing for this sort of stuff is almost always horrid. You're sparing yourself the headache of semi-supported open-source options, but it always feels like anything you saved by doing that is completely offset and then some by getting your balls busted in perpetuity by whatever vendor you went with. I don't blame anybody for sending these types of things to the mental trash bin when they see them.
- pjmlp 5y agoSome supermarkets take pull requests, unfortunely most of them still like to get cash instead.
- seabird 5y agoI'm gonna be honest -- I don't entirely understand what you're trying to say. Are you implying that the work needs to be paid for it get done? Of course that's the case, and open source embedded libraries can and do make plenty of money through consulting without having to annoy the customer with per-architecture and/or per-product licensing, and without having to hire salespeople to convince customers that that's necessary.
- bArray 5y ago> Did you look hard enough? I did see microej but I'm specifically interested in open-source - and from what I can tell this is some kind of paid service. I didn't look particularly close though [1]. The ESP32 device they do support appears to be a very specific development kit [2]. [1] https://github.com/MicroEJ https://github.com/MicroEJ [2] https://github.com/MicroEJ/Platform-Espressif-ESP-WROVER-KIT-V4.1 https://github.com/MicroEJ/Platform-Espressif-ESP-WROVER-KIT...
- oso2k 5y agoThere were several very small implementation of JVM over the years. One semi-popular one was leJOS for Legos Mindstorms. At one point, I recall even building it for DOS to test some things. https://lejos.sourceforge.io/ https://lejos.sourceforge.io/
- bArray 5y agoSeems interesting, how was the porting process? I was just looking at the Java bytecode and thinking "in theory, one could build a small JVM for this" [1]. But it still looks like an enormous effort to build, test and then use in a meaningful way. [1] https://en.wikipedia.org/wiki/Java_bytecode_instruction_listings https://en.wikipedia.org/wiki/Java_bytecode_instruction_list...
- oso2k 5y agoIIRC, at the time, building on DOS w/djgpp was fully supported since leJOS is designed to be fairly OS independent. There's not much room for an OS in the Lego Mindstorms MCU. You can think of it a bit like how people today build minimal Rust or Go-lang OS experiments.