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.

Rust

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 crate.io.

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.

Innovation in Increments

I have the good fortune of working in a Research & Development group. That means I get to learn about new ideas, experiment with them and apply them appropriately. Unfortunately I can not discuss my current project, other than it involves automating the creation of mobile applications. While I can not say that I am building something that is so deeply innovative that it has no precedence. But then again what most people do not realize that innovation happens mostly in small increments. You take an interesting idea, see if it makes your life easier and better. If not you review your work and options, and you try again. If it works, you get innovation!

So while I can not comment on my own work… ūüôĀ I can point some interesting work happening in the libre software community.

Canonical’s New Take on Scrollbars

Many of today’s computing innovations like tablets deal not with radical new technologies. ¬†But rather making technology more usable for non-developers and non-engineers. ¬†It might not sound like much, but Canonical is working on improving the usability of scrollbars in their Gnome desktop:¬†http://www.markshuttleworth.com/archives/615

Take a look at the video in Mark Shuttleworth’s post. ¬†I definitely think that abstracting the line indicator and the actual control is a great idea. ¬†It also makes it more touch friendly and intuitive.

MeeGo and Qt Lives for KDE and the N900

While not so much an innovation per se, I am happy to hear that the development of Qt and MeeGo will continue. ¬†The KDE crew came out and pointed out that Qt back when KDE started was a great framework and is even better now. ¬†Back when I started using KDE, I was amazed at how well everything integrated together in look and feel terms. ¬†This was all possible with KDE settling on one good UI framework, Qt. ¬†Now that it is more cross-platform and rounded out, it still is a great compelling framework to learn and use. ¬†There are some governance issues that need to get worked out, but it is nothing that won’t be resolved nicely soon. ¬†I indeed intend on learning Qt, as soon as my own schedule clears up.

[Another analysis on the Nokia/Qt/MeeGo/KDE question. ¬†Man isn’t life in the libre software world messy at times.]

As for MeeGo, sounds like Nokia will be supporting the N900 as an official development device for MeeGo. ¬†So maybe Mr. Elop changed direction, but at least there is a way forward for MeeGo handset developers. ¬†Hopefully that’ll mean that we can get started hacking on MeeGo. ¬†And once more devices come out, all developer efforts can get carried over. ¬†Maybe, just maybe we’ll finally have a good libre software platform for new¬†disruptive¬†devices, that won’t be threatened by the domination of one massive vendor. ¬†I’m looking at you Google, Microsoft and Apple.

Nokia and Qt, I Choose You!

Since I commented on this post about MeeGo here, I really should explain.

I went to a Wavefront/Nokia seminar about Nokia’s Qt and Ovi store on Friday. ¬†Partially out of curiosity, partially to network and partially to perhaps win a brand new spanking N8. ¬†Not that I want to hand in my N900, but I like new kit. ¬†And as a research & development mobile developer it is my responsibility to learn about the whole of the mobile ecosystem.

First of all I want to say is that I am amazed by the pains that Nokia goes through to maintain being a market leader. ¬†Not to sound like a PR person for Nokia, but the number of countries and languages that Ovi is available is astounding. ¬†And for anyone wanting to integrate their app purchases with a carrier’s billing system Ovi is the only way to go. ¬†Why? ¬†The Google Market integrates with 2 carriers. ¬†Nokia’s Ovi Store integrates with 99 carriers. ¬†So while Apple iOS and Google Android do a remarkable job, they don’t scale like Ovi does.

Another thing that Nokia does well is compete in various markets against various vendors at the same time. ¬†In the superphone market it is up against Apple, Samsung, HTC, Motorola, Microsoft, Google, etc. ¬†In the business space against RIM’s BlackBerry. ¬†And it wipes the floor in the feature phone market. ¬†Yes, the superphone market is proving difficult for them. ¬†Hopefully MeeGo will change all that.

Qt is amazing, and Nokia is pushing Qt hard. ¬†Very, very hard. ¬†This is awesome news for the KDE community. ¬†And it also provides a glimmer of hope for developers who would love to learn one framework very, very well and use everywhere. ¬†Java failed, and if Android (which ONLY works on smartphones or smartphone-like handsets) is the best we can do then we have failed. ¬†This is coming from someone who earns his bread and butter as an Android developer. ¬†I love working in Android, even with all of its quirks and oddities. ¬†But Qt… thats a whole new level, especially if the market accepts MeeGo.

So know there is a bunch of speculation about Nokia CEO Stephen Elop dropping a platform and merging with something Microsoft. ¬†And everyone is speculating Symbian, Symbian^3 or MeeGo. ¬†Symbian is not going away. ¬†And I don’t think MeeGo will go for three reasons: it took years to get MeeGo to where it is. ¬†Second is that already most of the up and coming in-vehicle interface systems will run MeeGo. ¬†And third is this interesting tidbit:

Audience: So when is the next Qt training session for Toronto?

Nokia Rep: There is one in March for Montreal.  There will be one in Vancouver in April.  And there will be a whole new set of sessions including Toronto, around MeeGo devices.

That and other comments at the seminars point to MeeGo device appearing sometime before May. ¬†So what about this mysterious announcement? ¬†Well everyone seems to have forgotten that Nokia has a gaming platform: NGage. ¬†Yes, that NGage. ¬†The one that is not doing so well. ¬†So how will they compete in the mobile gaming space with the iPhone/iPad and Sony’s next PSP that is Android based? ¬†How about bringing Microsoft’s XBox to mobile devices? ¬†Hmm…

Discuss!

As a sidenote, I’m planning to learn Qt while working on my current work project. ¬†I can’t wait.

Crazy Busy

I’m going to have to keep these next upcoming posts short.¬† I am a bit overwhelmed at the moment, with the sheer amount of things going on at the same time.¬† I still want to try to keep going forward on the projects already in progress.¬† But I will not add anything new to my plate for the next few weeks.¬† I’m seriously planning a trip to Europe this year.¬† Planning this trip will take quite some effort.¬† Still a short update is in order.

I got meet up my university friend Rob yesterday.  Have not talked to him in ages.  I did spend a long time with him.  But it was great to talk to him again, and I needed someone in a similar position to my own to bounce ideas off of.

I started to compile some notes for my novel.¬† I wrote down most of the background of the novel.¬† Now I plan on completing my notes and sketching out the plot.¬† Then the serious work writing can begin.¬† As for programming, I’m working on a PHP powered website for justCheckers.¬† Also I am slowly reading through a book on coding C++ and Qt, along with a silly application I plan on writing to learn the Qt framework.

Kicking Tires

This week, I’ve started working on my delayed projects again.¬† I feel exhausted from the week.¬† But I also can not wait to play around with my projects.

Learning Qt

I’ve always admired the KDE and Qt developers.¬† They make some of the most innovative and interesting technology in the consumer-desktop-mobile land.¬† I’ve decided to pick up learning Qt and C++.¬† So far I’ve read the beginning of C++ GUI Programming with Qt 4 (1st ed).¬† I need to play around with C++, which I plan on doing it while using Qt Creator.¬† One of my first major Qt experiments might be getting the TEA text editor working on my Nokia 5800 XpressMusic.¬† I know that Nokia just released the tech preview¬† of Qt 4 for S60 devices.¬† But I’ll give it a shot.¬† Hopefully the GUI will port over nicely.

Completing justCheckers

Yes, the project that I left for dead still lives.¬† I want to work on it, as portfolio material.¬† I first plan on building a website in PHP (or maybe JSP?) that renders beautiful CSS and XHTML.¬† And then I need to give the project much love.¬† But I owe it to myself to finish this application.¬† I won’t build any crazy game servers.¬† But I want to make something totally configurable and fun.¬† And in the process I want to create something that proves that I am a strong Java developer.

Writing A Collection of Shards

I am going back to writing.  Unfortunately I need to start almost from scratch, since many of my written sections simply will not work.  The ideas are there.  I just need to get them down on paper.

Driving License

This one is the ultimate in the tire kicking sense.¬† I plan on getting my driver’s license really soon.¬† Aside from parking, I feel comfortable driving.¬† Once I figure out all this parking stuff, then I’ll be ready.¬† I’m exciting since this will give me a lot more mobility and flexiblity.¬† I’ll be able to solve a lot of problems and have even more time to do things in the day.¬† And I’ll be able to sleep and live in normal time periods.

Bruised and Sore

Uff! I’m bruised and tired from yesterday’s taekwondo session. The warmup consisted of a lot of running, jumping jacks, pushups, sit ups, and leg raisers. At the end I wanted to pass out from panting exhaustion on the floor. A great workout, followed by practice on kicking and hand motions. There is so much for me to perfect, but I think I’m making good progress. Still I’m months away from a black belt. Give a year or so. ūüôā

This morning however I could not be bothered to get up. Or rather got up stiffer than a stiff. And sore, and parts of my anatomy (limbs I mean, I don’t know what you are thinking about) aren’t fully cooperative.¬† Movement in general today feels constrained and straining. I’m sure it will wear off by the time I go for the next session.

Fortunately, muscular bruising hasn’t adversly affected my thinking. The story and ideas for the novel are rapidly taking shape. And I’m enjoying writing it, since I have not thought out the entire story in such detail that it bores me. Instead every paragraph explorers a new thought and dream. I’m not sure how it will turn out and that is what makes it exciting. Also I started reading up on Qt development. I must say that the more I read about Qt and C++, the more I like those two technologies. I’m already looking forward to coding up my first C++ applications in the near future. Should be quite exciting. And finally a word about my secret project… I’ve done a fair bit of work on it, and I’m just dying to write about it. This project challenges me in everyway that I want to grow professionally and artistically. However I can’t openly talk about it… or maybe I could. We’ll see I guess once I have something concrete to show for my pains.

All in all I am bruised and sore.¬† But I’m excited with the prospects that appear before me. Little bits of sustained effort are paying off.

Things That Work, Things That Don’t

As usual I like to experiment on various hacks to improve myself and enrich my life. Actually recently I have been actively trying to distract my mind from other issues. Along the way I like to record what worked and what didn’t.

Blogging on a touchscreen cellphone works as a compromise of convenience. Writing on a physical keyboard works better. I don’t end up pressing wrong letters and rewriting words. But carrying an IT strains my pocket more. And carrying a phone is far more useful. Besides the IT is still in an unusable state at the moment. Hmm… Another call looks like in order.

Microblogging works less well. It acts more like a distraction, than a useful form of communication such as an instant messenger or social network site. Besides just like Marika I prefer to blog in the long format.
Ok… I’m drawing a blank on what to write next. Oh right, keeping todos on my site works better than on the builtin PIM on the¬† 5800. TaskFreak works really well. All I need is a syncing client for the todo list on my cell. Maybe I should write one as my first Qt project. Hmm…

Additionally, I am striving to incorporate regular exercise into my life. It helps to clear my mind and to keep me fit. In the winter, I used to play indoor volleyball. Nowadays I’ve switched over to taekwondo and soon, soccer. Exercise really does work, so long as it is packaged in the fun form of a sport.

Maemo Hacking and Project Revivals

With such a cold wet summer, I thought I would spend more time hacking. Yet this year spare time is a scarce commodity and most of that time I find myself far from a proper development workstation. Fortunately with an Internet tablet in my pocket, I can at least start on learning about Maemo development.

For an embedded device, the maemo platform is neither the easiest nor the hardest device to start hacking. Setting up the SDK on Ubuntu takes only a few minutes. In fact I also managed to setup Eclipse to do maemo development too. But I didn’t try to compile any source code so far.

Developing on Maemo, requires knowledge in both Linux and C programming. The N810 itself uses a heavily modified version of the 2.6.27 Linux kernel, Gnome and GTK. GTK seems to handle the GUI side of things in much that the same that Java Swing does. And I like the fact that GObject brings some semblence of OO programming to C. I’d prefer to learn Qt instead of GTK, but I guess I have to start somewhere. Judging by blog posts from KDE developers that got N810s at Akademy 2008, the state of Qt and KDE on Maemo is in its infancy.

In a recent conversation with Dan D’Alimonte, he suggested that I should think about reviving the justCheckers project as a web application. Considering the state of the codebase I work on a daily basis, the justCheckers codebase is very much maintainable. As a web application, the releases can happen faster and casual users can play with the program. And I’d like to play around with some more advanced Java web technologies. Now whether or not I actually revive the project is another matter. It is a definite maybe for now.

Technorati Tags:

Web 2.0: Hype or Future?

I recently applied for a web designer job, and among the requirements was a knowledge of Javascript and this new thing, AJAX. Truth be told, I never loved (or love) Javascript and never really enjoyed most client-side based web gimmicks (applets, Flash, etc.). In a few cases, these technologies were beneficial to the site deployed. For the most part I just found them to be irritating and in the way. Not to mention browser incompatibilities (Heck, they can’t handle a simple idea like CSS correctly why should they a full blown scripting language).

Needless to say, I avoided Javascript through most of my career, and mostly used it to “authenticate” on the client side (if there is such a thing as security on the client). When I heard of AJAX, I thought oh know… another gimmick and now it wants to “grope” my precious server with its “XMLHttpRequests”. Then my good friend Dima mentioned Bindows. Interesting a full desktop-like application in a browser. Today at a web seminar by MySQL, they showcased Zimbra. An open source full communications suite in AJAX. Impressive.

So what is this Web 2.0? The idea is to get more interactive applications on the web. The goal is to integrate all the information floating on the web, condense it and present in a dynamic manner. Hence the use of AJAX (or Javascript) as the underlying front end for web browsers. Yet the idea is broader than that. Not only are computers with web browsers involved, but also the myriad of different network-capable handheld devices. An interesting and lofty goal but can it be achieved?

Technology wise, the extensive use of Javascript and XML is produces impressive results. The idea of finally separating the presentation layer from the business logic and data is commendable. Before anyone starts waving the flag of revolution and buys stocks for the Web 2.0 boom, here are a few thoughts. The use of Javascript is SO intensive there is a need for whole UI and layout toolkits. In the open source community there are around 30 right now. In the desktop realm there is maybe 10 UI development kits: Swing/AWT, Gtk, Qt, along with the native Mac and Windows widgets being the most popular. Some standards exist for linking the many parts together but they vary widely. As with any standard, every vendor has their own perspective of how it should be implemented. Microsoft who is the founder of this entire paradigm, is shifting their attention to .net, which will mean locking in the client to the platform. And a swift kick to the head for the community effort. Finally even what to expect from a Web 2.0 application is not set in stone.

My analysis is this: the current situation is a messy free-for-all. The standards will almost certainly be abused, and you can look to the usual suspects for that one. The toolkits are all over the place. Finally a known fact is that a project without a rigorous specification is going to go off on a tangent. Tangents like these cause what is called in my part of the woods “development hell”.

A case in point is CSS. The W3C has done in my opinion an amazing job of nailing down the idea of what a stylesheet should do, and how. The details are there, and the theory is beautiful. Now lets look at the vendors or what-my-web-browser-really-does side. The specification is rarely ever held to, and thanks to Microsoft’s Vader-like grasp on the browser market is abused terribly. The folks at Netscape and the Mozilla Foundation do a much better job but its not perfect. Just ask any web designer who wrote an aesthetic layout in CSS how many hoops they had to jump through to get it work on the majority of browsers. If we can not get something as simple as CSS right, then I fear other more complex technologies will simply break.

In the end, I think AJAX will benefit a few large companies. Web developers and designers will still groan and will dream of a better, simpler web. Web 2.0 will not finally get everyone on the same page. Then again, I might be completely wrong.