Rust + Gtk = Wow

As I’ve been experimenting with writing Rust apps, I attempted to create a small little GUI application. At first I attempted to setup everything with Qt, but C++/Qt interoperability with Rust is painful. Very, very painful. I experimented with some more radical UI frameworks such as Azul and Conrad. These have a lot of promise going forward. However for the here and now, I recommend looking at gtk-rs, Rust binding for Gtk.

With a bit of experimentation, looking through gtk-rs examples, some other projects using gtk-rs, and lots and lots of searching, I was able to create this:

This is a code viewer that lets you open Rust code, and view it. Yes, you are looking at a portion of the code that runs that code viewer. Getting the GtkSourceView working took some coaxing. Also I had to learn how to use the Glade UI editor for Gtk. Overall it took me about 2 to 3 hours to pull this off. I am very impressed with the results, and it opens up new possibilities for me.

On Hacking with Maemo

Time is the ultimae in precious and scarce commodities. With work and travelling up North to kayak, I spend most of my spare time away from a workstation. Hence the convenience of owning a N810. I can code and write anywhere!

Ok so I haven’t tried putting gcc or other c development tools on this tablet. While with Jalimo I can run Java code… I’m not sure on the feasibility of running Tomcat. And there is no way Eclipse will fit. Actually Tomcat would need an SDK, so running a full Java web development platform is most likely a no go. Instead I could set up a hosted test server.

Still I can edit the code itself. Originally I installed Vim. Then I tried PyGTKEdior and it works for me. Additionally I installed subversion. So now I can work on justCheckers while on the go.

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.