Settings

Theme

Ask HN: Would you choose Dalvik VM to Arduino?

4 points by justavm 6 years ago · 5 comments · 1 min read


Hi All,

    I developed a Dalvik VM in C from scratch which let you code in Java with lambdas.

 It runs as fast as Arduino UNO/MEGA on a cheaper board with similar power consumption.
Would you use an Arduino UNO like board which can be programmed in Java?

Below is the list of features

* >1M instructions on STM32 based BluePill board(<$3).

* Precise compacting GC. No fragmentation!

* Interrupt support.

* Native C interface generator.

* Platform abstraction layer for HW peripherals.

* Arrays, Float, Switch, Exception, Interface, Multiple inheritance, dynamic and etc.

Any information is appreciated!

Best Regards

alufers 6 years ago

Do native Java APIs, when paired with special hardware work on such a solution? For example I think It would be cool to attach an Ethernet NIC to such a board and just use Java's HTTP libraries.

Another aspect is, the size of the binaries, as many of those prototyping devices are not limited by their processing speeds, but the flash size.

What about Kotlin support (I presume it works, since Kotlin is compatible with java).

Cheers.

  • justavmOP 6 years ago

    It is doable, but I do not believe existing java libraries not written well enough to perform great and consume less space.

    I do believe in separating code between the fast and slow path. My goal is to bring open source, well optimized common libraries to VM world.

    Platform can handle a simple http server with a NIC as of today but with custom apis.

    Kotlin and groovy works for hello world, did not tried further as I am thinking of bringing those languages by eliminating Java ties. I am aware of Kotlin native but 200K for a hello world is not reasonable. I can fit in 21K for VM.

    If you have killer app idea for this platform I can make it happen in a very short period of time.

pietroglyph 6 years ago

Sounds like a cool project!

I prefer C++ to Java, but I think there’s absolutely a niche in the US educational market because the AP Computer Science A test uses Java. It could be pretty nice to have a Java-compatible MCU for the high school students I mentor because that’s the language they know, and it would make some cool hardware projects more accessible.

  • justavmOP 6 years ago

    I will love to do a demo to you. I can provide a demo sdk if you want to give it a try.

    What are the top 3 reasons you prefer C++ to Java for embedded systems?

    Do you have a killer project for students in your mind which will help them learn with fun with this?

    • pietroglyph 6 years ago

      This reply is a little late, but I work on things in the robotics space where there are much more robust libraries for C++ than in Java, and some little extra features (e.g. operator overloading for linear algebra libraries) really make a big difference.

      For students however I think that Java is probably the better call (fewer footguns, more resources like the AP curriculum.)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection