If you twist Atwood's Law a bit, the answer is, of course, javascript.
The current de-facto language is C. I personally believe (as the creator of a JS IoT Library) that we will see a split in how we define the hardware field which will be a deciding factor in what things are written in.
What does 'robotics' mean? Is a device that waters plants a 'robot'? What about an autonomous drone?
Let's go with a very broad example look at any hardware controlling device which is not just sensing (so interacting with it's environment). Is that fair?
I believe that if a robot is doing dangerous and mission critical work, work that is maybe time and computer intensive, definitely needs a real-time clock for finite control, etc. etc. Than C is the way to go (happy to hear alternatives here, but I think you want to get as close to the metal as possible).
Thing is, C programmers aren't exactly a dime a dozen, they are fairly specialized. How many websites and apps are being written in C?
So, if the field is going to grow at the forcasted rate, there is going to have to be a huge volume of developers learning C to program IoT and robotics. But, how can you scale up that many devs. Or repurpose devs from the most popular language already, and one that runs on many low-powered devices. I don't think another language fits that mold as well as javascript.
For this reason, I've been building an IoT javascript library http://getfavor.net. Still in early stages, but keen to hear feedback.
And what do you think about elixir/erlang? Great error handling and ability to send/receive fast messages. Wouldn't that be suitable for really complex robots (e.g. humanoids) to get inputs from surrounding environment?
(I'm completely naif on this subject, maybe my question doesn't even make any sense)
It depends what you are calling a robot, but if you are moving legs or arms close to human, you don't want to have soft real time capabilities but definitely hard real time for safety reasons. This is why C is still king.
So likely we will still have C/C++ for the low level, low latency, and then for higher level, well whatever you want, including javascript.
For example, ROS [0] have various bindings available python, lisp, (also ruby I believe), etc.
I don't know much about erlang or elixir. Erlang was popular at work for a short period of time, but I think more people are fans of Haskell now (seems Scala may even be falling out of favor a bit).
As Seren said, C is pretty much defacto at the moment. C has a fairly large community. What would be gained by using Erlang? My understanding is that Erlang is geared toward distributed systems. I can absolutely imagine an massively distributed control system would benefit from Erlang. If you think of 'robotics' like cars where there is essentially a different robot for each control, maybe Erlang is a good fit. If the device is going to have a single CPU, maybe not so much.
It really depends on the application and the architecture, but to me, Erland isn't a natural choice.
You get a lot from Erlang VM. Among other things: by far the best VM instrumentation out there, rock solid stability, fault tolerance and hot code loading, exemplified in this little video of a drone in-flight flying control system upgrade
On the Elixir side of things, there's something like the Rails of embedded development in the making, a project called Nerves. This is a recent presentation on the project:
Justin Schneck - Enhanced Embedded Systems with Nerves (ElixirConfEU 2016)
Currently I would say that for the low level parts, this is C and/or a subset of C++ for hard real time constraints (motion control, safety,...)
As someone struggling with legacy C++ spaghetti code, I feel that the situation would slightly improved if Rust took over but there is a long way to go. The closer you are to the metal the more conservative people are regarding their technology stack (maybe rightly so!)
But let's be honest in 15 years, in the best case, someone will struggle with legacy Rust spaghetti code.
6 comments
[ 2.0 ms ] story [ 18.9 ms ] threadThe current de-facto language is C. I personally believe (as the creator of a JS IoT Library) that we will see a split in how we define the hardware field which will be a deciding factor in what things are written in.
What does 'robotics' mean? Is a device that waters plants a 'robot'? What about an autonomous drone?
Let's go with a very broad example look at any hardware controlling device which is not just sensing (so interacting with it's environment). Is that fair?
I believe that if a robot is doing dangerous and mission critical work, work that is maybe time and computer intensive, definitely needs a real-time clock for finite control, etc. etc. Than C is the way to go (happy to hear alternatives here, but I think you want to get as close to the metal as possible).
Thing is, C programmers aren't exactly a dime a dozen, they are fairly specialized. How many websites and apps are being written in C?
So, if the field is going to grow at the forcasted rate, there is going to have to be a huge volume of developers learning C to program IoT and robotics. But, how can you scale up that many devs. Or repurpose devs from the most popular language already, and one that runs on many low-powered devices. I don't think another language fits that mold as well as javascript.
For this reason, I've been building an IoT javascript library http://getfavor.net. Still in early stages, but keen to hear feedback.
(I'm completely naif on this subject, maybe my question doesn't even make any sense)
So likely we will still have C/C++ for the low level, low latency, and then for higher level, well whatever you want, including javascript.
For example, ROS [0] have various bindings available python, lisp, (also ruby I believe), etc.
[0] http://www.ros.org/
As Seren said, C is pretty much defacto at the moment. C has a fairly large community. What would be gained by using Erlang? My understanding is that Erlang is geared toward distributed systems. I can absolutely imagine an massively distributed control system would benefit from Erlang. If you think of 'robotics' like cars where there is essentially a different robot for each control, maybe Erlang is a good fit. If the device is going to have a single CPU, maybe not so much.
It really depends on the application and the architecture, but to me, Erland isn't a natural choice.
https://www.youtube.com/watch?v=96UzSHyp0F8
On the Elixir side of things, there's something like the Rails of embedded development in the making, a project called Nerves. This is a recent presentation on the project:
Justin Schneck - Enhanced Embedded Systems with Nerves (ElixirConfEU 2016)
https://www.youtube.com/watch?v=118-g0ODfgg
As someone struggling with legacy C++ spaghetti code, I feel that the situation would slightly improved if Rust took over but there is a long way to go. The closer you are to the metal the more conservative people are regarding their technology stack (maybe rightly so!)
But let's be honest in 15 years, in the best case, someone will struggle with legacy Rust spaghetti code.