The daily selecting a platform (~language)

Comparing languages to me is a matter of comparing ecosystems. Despite having strong opinions on a few things, I value practical decision making. So for a new project i simply pick the language whichs platform ecosystem most matches my product, to benefit from others work in a similar direction. This is open source.

Here i am comparing ecosystems for building a pick and place controller. Openpnp is already written in java, which is probably a good choice. The reason i’m revalidating that choice is because a processor that can run java is about twice the cost of something not supported by the jvm (for example mips).

I didn’t read the code of openpnp yet because its GPL infected, but Jason is a smart guy, so there is probably very little NIH (not invented here). Let’s go library shopping.

Function Java Ruby Node.js Python Elixir Go Qt Naked C++
serial port good good good good good good good good
cnc controll (gcode) good good good [good] ( good good ok ok
vision (opencv) good good 1 good good 1 hopeless good no [good] (
eagle cad parser ok good shitty good no no no no
REST server good good good good good good ok 2 bearable
Video Streaming bad 3 good good good ok 4 good ok good

Some of the libs have different goals, and its a bit comparing apples vs bananes, but the point is to get an idea of how the ecosystem of those platforms shares a common interest in the product i’m making.

As expected, ruby and python win at ecosystem hands down, even for something less web-y as a cnc machine. I couldn’t really find a big difference either between the two. Pip is still garbage, and ruby still sucks at event handling. Nothing new and nothing fatal.

What suprised me is that the java ecosystem is alot better than C++, despite C++ being the obvious choice for good old machine builders. But that’s probably because the C++ ecosystem is generally a complete desaster. I really really wish elixir was good, but it just can’t compete. I love elixir but i can never justifiy using it.

  1. ruby and python have a global interpreter lock. It’s questionable how much processing can really be done inside their vms. Alternative vms fix that, but they won’t work on mips either.  2

  2. i wrote half the stuff on that list so i’m going to say ok, although i know that “me” doesn’t count as ecosystem. the truth is, the ecosystem for web services in Qt is terrible. 

  3. I couldn’t figure out how to run a rest thing plus a pure binary stream in the same context. This is really where the bloat of java design shows. Everything is just so not modular, despite using as many design patterns as possible. 

  4. Massive scale video processing is amazing in erlang, but i just can’t find anything out of the box as for other platforms. 

Written on December 29, 2015