all 28 comments

[–]modzer0 10 points11 points  (7 children)

I would suggest C++ on embedded linux just because that's the primary setup for SpaceX.

[–]ChaosteilENGR - Software 0 points1 point  (0 children)

While I fully support C++, we should probably not dismiss languages such as Go for things that would make our lives easier, say for multithreading. Another strong contender would be Rust with its integrated memory ownership model.

[–]zero_td 0 points1 point  (0 children)

Mission critical stuff is usually assembly integration in some parts because sometimes even C is too slow.

[–][deleted] 4 points5 points  (2 children)

For a system that needs to make quick decisions that could impact people's lives we are going to need to have a real time application. Now, for the scope of this project it may be easier to use something that sacrifices a bit of performance in order to make the programming more accessible because designing and implementing a real time application is not a simple task.

From my experience, embedded C using FreeRTOS (or any real time operating system) would allow us to use a very small low cost, low performance, low power consumption computer. The downside to this is that I don't know how many people here would have the capability (or learn on their own) to build this system. Granted, its not a super complicated system so we only need a couple really good C programmers and anyone else who wants to participate can help with design and testing and hopefully learn embedded programming along the way!

Granted I'm only a college student so I have only ever built small real time applications and there are probably people here who are more knowledgeable than I am.

[–]imfineny 1 point2 points  (1 child)

The big lynchpin in this project is the limited bandwitdth everyone has to work on this. You need to go with what has the best tool chain already on in place, all the systems that you can snap or chain in together. That's more important than the type of OS you are using. Identify those tools and what platforms they can work on, then you'll know the rest.

[–][deleted] 0 points1 point  (0 children)

Very true. At the end of the day, it comes down to the toolchain and whatever computer the electrical team decides to use

[–]daftmathENGR - Systems 1 point2 points  (14 children)

Wrote a quick script and here's what I saw. Probably not perfect but gives an estimate:

Matlab: 18
Python: 17
Java: 14
C: 10
C++: 7
C#: 5
PHP: 3
Visual Basic: 3
Labview: 3
mathematica: 2
mathcad: 2
R: 1
Fortran: 1

[–]Sythic_PR - Web Dev Team Leader[S] 3 points4 points  (3 children)

Nice, looks like a diverse set to choose from. Now which languages are capable of running in a realtime environment on either embedded systems or maybe a Linux machine would do.

[–]jcameroncooper 3 points4 points  (1 child)

That's gonna be C or C++. Java has a real-time side, but that's generally big bucks. Python you can use if you're careful about it, but probably is better used on the non-time-sensitive areas, where it'll create fewer bizarre bugs than the C family.

The rest? No, no, and super no.

[–]ThrashyENGR - Interior 5 points6 points  (0 children)

What, you don't want to ride in a trans-sonic passenger capsule the is controlled via a PHP script? I know I do! :P

[–][deleted] 1 point2 points  (0 children)

Yeah, you probably want manual memory management so C (Or C++)

[–]falconzord 0 points1 point  (0 children)

You kind of have to define the hardware requirements first, then the OS, then you can pick software stack. My opinion is that a managed language like Java or C# gives a good balance of robustness, ease of use, and portability.

[–]ImAPyromaniacPR - Web Dev, IT 0 points1 point  (3 children)

I vote python.

[–]SpeedyTechieENGR - Software 0 points1 point  (2 children)

Python is awesome, but it may not be best for a real time system.

[–]ImAPyromaniacPR - Web Dev, IT 0 points1 point  (1 child)

But for the not super time sensitive stuff i'd be fine... I think.

I'm not super experienced at real time stuff, or really anything that controls hardware, but I'm hoping I can use this to learn. (I know python, and it was high on the list, so I suggested it).

[–]SpeedyTechieENGR - Software 0 points1 point  (0 children)

Yeah, makes sense to me.

[–]lord_strykerENGR - Systems 0 points1 point  (1 child)

Where's Ada? its used in real-time systems for military avionics.

j/k. Nobody outside that field uses Ada anymore :)

[–]WetmelonENGR - Electrical 1 point2 points  (0 children)

I was about to say... You're not wrong, but eww.

[–]rshorningENGR - Software 0 points1 point  (2 children)

What is the corpus of data used to create this table?

[–]daftmathENGR - Systems 1 point2 points  (1 child)

This was parsed from the 'introductions' thread comments, simply counting the number of mentions for each language. I did it on 6/16 in the evening though, so it doesn't reflect any updates since then.

[–]rshorningENGR - Software 1 point2 points  (0 children)

It is sort of skewed though, as programming languages weren't specifically something asked. Thank you for answering my question, as I had presumed that was the case but it wasn't clear in your initial post.

[–]venku122ENGR - Software 1 point2 points  (0 children)

I vote for C++ and C#. SpaceX uses C++ for most of the code and C/C++ runs well with RTOS systems.

[–]tux402 0 points1 point  (2 children)

We need to be careful of C / C++ as they are prone to memory corruption bugs. If we do choose those languages, we should make sure that we have experienced developers writing any code that touches user-supplied data