The application I want. I'm taking a course on Embedded Systems this semester. I'm a CS student, so I don't know much (read: know next to nothing) about hardware design. But I learned about logical gates, and latches, and stuff like that, and I have a pretty good idea about how one would go about building a small processor.
I would like to be able to play with these small hardware components, and I intend to write a small simulator for myself. The basic nonfunctional requirements of the simulator are the following:
- graphical user interface. Although I understand the superiority of a text oriented hardware description language + parser, I feel that a GUI would allow me to get a better feeling for hardware
- cross platform
Of course, I have a good idea about how one would go in writing such a program. Except that I can't decide on a programming language/platform for the project because of the lack of good GUIs. Here are my current thoughts on this matter:
- Java. As far as I'm concerned, even though I hate Java-the-language very much, this is my best choice so far. Java has a decent cross-platform GUI, is reasonably efficient, and I can get around the language for some of the more advanced things I want. However, thinking about the huge amount of code it would take to do even the most basic processing makes me take a step back.
- C#. I find C# to be better language than Java, but it has a huge problem: it's not cross platform (yes, I do know about Mono).
- C++. Ah. This is the language that I am most experienced with. Even though it doesn't do garbage collection and doesn't manage the code for me, C++ is somewhat better than Java from a language semantics point of view. However, it lacks a standard GUI. Let's look at the GUI libraries you can find:
- QT. No thanks. I don't like metacompilers. Compiling C++ code is already very slow; I don't want the metacompiler to take another age. I don't like proprietary. I don't like the license. The GUI code, however, is quite clean and workable with.
- MFC. NOT. The code is messy, proprietary and not cross-platform.
- GTK+. The syntax is somewhat better and wxWidgets, but it's still messy. Also, it's not really C++. I don't like reading GTK code. I do like the box feature though. Documentation is not as good as it should be.
- GTKMM. Better than GTK+ because it's more C++. However, the syntax is still not as good as it should be and it's not as flexible as wxWidgets. The documentation needs more work. If I would chose C++ for this project, GTKMM would probably be my GUI library.
- wxWidgets. Well, this one is, imho, the best GUI for C++ ever. However, it's just as messy as MFC, and I don't like the code at all. Quite good documentation.
- Python is one of my favorite languages. It is very easy to write good Python code and you can find a library with good docs for just about anything. However, Python is lacking at the speed chapter. You see, Python can be up to 50 times slower than C++. That can be the difference between waiting one second for a simulation to finish, and waiting 1 minute. Python comes with standard Tk bindings, but I would probably chose it's wxWidgets bindings for extra power.
- Haskell. Haskell is another favorite of mine when it comes to coding algorithms. Haskell comes lazily evaluated by default, but I'm not very concerned about it's speed limitations. What I am concerned about is that there is no standard GUI library and there are no good bindings to other libraries -- all of them wrap code around the IO monad, making it bad on your eyes.
- Ocaml is Haskell's older cousin. Ocaml doesn't come lazily evaluated and is dead fast. It is very expressive when it comes to coding algorithms, but the GUI bindings are really bad from an aesthetic point of view.
- Lisp/Scheme. Which one? I'm sure they are fast enough for what I need, and I'm sure that the code will end up to be very elegant, but I don't have any experience with GUIs for either of the two. Can anyone share some insight into this?
Although I would like to have all the source code in just one language, I'll probably end up choosing one language for the GUI and another for the backend. Currently I'm thinking about choosing Java or Python for the GUI and C++ or Haskell for the backend. Of course, interop will be very fun and I'll probably end up duplicating code between the two languages.
Have fun and may you never need to think about this kind of shit.