Rust, a New Toy Opening New Possibilities

I have not had a chance to blog in a while. Aside from the usual busyness of life, and the occasional bouts of illness, I have been distracted by a few new thing I’ve been learning: Rust, Kivy and Electron. I’ll write about Kivy and Electron in a future post. And a lot of that is centred around the upcoming product launches for Amber Penguin Software. But that is again for another post.


For the longest time, systems level programming (especially operating systems) have fascinated me. As part of that, I tried to learn the languages used to implement systems namely C and C++. While today I feel more comfortable with these languages, these still scare me with either their complexity (C++), their programming tools (gdb, gcc, autoconf, and minions) and their potential to do horrible things to your system if you are not careful. And bugs can be incredibly difficult to trace down and debug. So I while I have tried to code more C and C++, I still avoid them for these reasons.

Recently I started playing around with Rust, the new language developed partially by Mozillians. After trying to write a small Docker utility in Rust, and working through some koans for Rust, I have become smitten with the language. While some of the borrowing, references and types drive me a bit crazy, overall Rust is an amazing language. It brings the best ideas from Haskell, ML, Python and C and makes them very accessible. While the language is new and evolving the community has super active and creating lots of libraries for the language on

Also I recommend listening to the New Rustacean podcast to learn Rust as well. It is not only informative, but very well executed by host Chris Krycho. So far I’ve listened to 10 episodes, and between the podcast, the koans and simply playing with Rust, I’ve learned a lot about Rust. In fact I feel more comfortable with Rust now then I have ever felt with C or C++.

Qt Bindings for Rust or Rather the Lack Of

On the topic C++, the one thing that keeps bringing me back to liar of C++ is the amazing platform that is Qt. However one on the most infuriating thing is that (aside from the limited QML), the only effective way to program Qt apps is using C++. Sure there is PySide and PyQt, with promises that PySide will actually support modern Qt5… some day… soon…

One of the things I hoped for Rust bindings for Qt to come quickly. Unfortunately it turns out that binding to Qt and C++ inside of Rust is really, really hard. There is an interesting project to develop some Qt C bindings for Rust, but it is really early in development and I had no luck using it. It probably is easier to bring in Rust to a C++ Qt project than the other way around.

In general UIs in Rust is a weak point for the language. Then again UI libraries are not the simplest thing to get off the ground, and it might be easier to rethink how we build them in general. Again this something I can get to in a future post.

Automagic Code Generation…?

Another morning. A bit wet but perfect for mlaren racing as the soil gets nicely packed and allows for better traction. Now if only I had the time to start upon that project…

As my systems programming and data structures exams loom ever closer, I continue in my quest of understanding the material better by hacking a few applications. I finally found one idea to test my knowledge of thread programming using the POSIX compliant thread libraries. It will be a simulation of a small development team using an revision control server. One of the servers will be use a locked commit (e.g. Visual SafeSource), and the other will use the better method (e.g. CVS, Subversion). Should be interesting…

For my other system programming, I plan on making a useful pipe, and redirect program. PNP (PNP is Not a Pipe) will let you to execute a command, and pipe or redirect the output to another program or file, while enabling you to see all the output being displayed to the screen.

As for my data structure work… I will get on it as soon as I can.

Talked to Kat yesterday shortly, but that definitely made my day. I promptly ruined my day by being lazy, which made my folks irk. Today, I plan to balance work and study a bit better, and not be such a lazy bum. One good thing was that I started on a Herculean task of figuring the GNU Autotools. Bizarre is the best thing to say, and I am so not used to using any of them. Like I understand Makefiles, and Ant build scripts perfectly. However, all this automatic code generation is making my head spin (not mention my headers).

Well I guess I better get back to hacking… lot of work to do, and so little time. *Climbs back into the cockpit of the mlaren for around lap.*

Delirious Joy

Had my first exam today. Just as I predicted a practical cakewalk. Funny for a course I spend 0 hours studying for too… The questions were simple enough, a bit of guessing but overall great!
I am so happy that this course is over.

So two more exams to follow. Data structures… (youch!) and systems programming (yummy!). I am going to start studying for them tomorrow morning. Mostly visualizations of the algorithms of the data structures in Java, and a multipipe/redirect program. Stay tuned folks.

I have put off my toy projects: justCheckers and Insomia. As soon as my last exam is over, and when I finally get high speed. Yes, I have been using this slow dial-up connection for developing… get over it. Then I can get things into full swing again. Wish that I had my own Subversion/web server too… unfortunately if there is truly a cap on how much I can upload/download… then my Apache server is not going online.

Other than that… just another day in the life of me. OH and my blog page keeps on getting redirected to Blogger…. now noone can see my rants except for me. 🙁